# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.


from datadog_api_client.v1.model_utils import (
    ModelNormal,
    cached_property,
)


def lazy_import():
    from datadog_api_client.v1.model.event_stream_widget_definition_type import EventStreamWidgetDefinitionType
    from datadog_api_client.v1.model.widget_event_size import WidgetEventSize
    from datadog_api_client.v1.model.widget_text_align import WidgetTextAlign
    from datadog_api_client.v1.model.widget_time import WidgetTime

    globals()["EventStreamWidgetDefinitionType"] = EventStreamWidgetDefinitionType
    globals()["WidgetEventSize"] = WidgetEventSize
    globals()["WidgetTextAlign"] = WidgetTextAlign
    globals()["WidgetTime"] = WidgetTime


class EventStreamWidgetDefinition(ModelNormal):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    validations = {}

    @cached_property
    def openapi_types():
        lazy_import()
        return {
            "event_size": (WidgetEventSize,),
            "query": (str,),
            "tags_execution": (str,),
            "time": (WidgetTime,),
            "title": (str,),
            "title_align": (WidgetTextAlign,),
            "title_size": (str,),
            "type": (EventStreamWidgetDefinitionType,),
        }

    attribute_map = {
        "query": "query",
        "type": "type",
        "event_size": "event_size",
        "tags_execution": "tags_execution",
        "time": "time",
        "title": "title",
        "title_align": "title_align",
        "title_size": "title_size",
    }

    read_only_vars = {}

    def __init__(self, query, type, *args, **kwargs):
        """EventStreamWidgetDefinition - a model defined in OpenAPI

        Args:
            query (str): Query to filter the event stream with.
            type (EventStreamWidgetDefinitionType):

        Keyword Args:
            event_size (WidgetEventSize): [optional]
            tags_execution (str): [optional] The execution method for multi-value filters. Can be either and or or.
            time (WidgetTime): [optional]
            title (str): [optional] Title of the widget.
            title_align (WidgetTextAlign): [optional]
            title_size (str): [optional] Size of the title.
        """
        super().__init__(kwargs)

        self._check_pos_args(args)

        self.query = query
        self.type = type

    @classmethod
    def _from_openapi_data(cls, query, type, *args, **kwargs):
        """Helper creating a new instance from a response."""

        self = super(EventStreamWidgetDefinition, cls)._from_openapi_data(kwargs)

        self._check_pos_args(args)

        self.query = query
        self.type = type
        return self

# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
# This product includes software developed at Datadog (https://www.datadoghq.com/).
# Copyright 2019-Present Datadog, Inc.


from datadog_api_client.v1.model_utils import (
    ModelNormal,
    cached_property,
)


def lazy_import():
    from datadog_api_client.v1.model.event_stream_widget_definition_type import EventStreamWidgetDefinitionType
    from datadog_api_client.v1.model.widget_event_size import WidgetEventSize
    from datadog_api_client.v1.model.widget_text_align import WidgetTextAlign
    from datadog_api_client.v1.model.widget_time import WidgetTime

    globals()["EventStreamWidgetDefinitionType"] = EventStreamWidgetDefinitionType
    globals()["WidgetEventSize"] = WidgetEventSize
    globals()["WidgetTextAlign"] = WidgetTextAlign
    globals()["WidgetTime"] = WidgetTime


class EventStreamWidgetDefinition(ModelNormal):
    """NOTE: This class is auto generated by OpenAPI Generator.
    Ref: https://openapi-generator.tech

    Do not edit the class manually.
    """

    validations = {}

    @cached_property
    def openapi_types():
        lazy_import()
        return {
            "event_size": (WidgetEventSize,),
            "query": (str,),
            "tags_execution": (str,),
            "time": (WidgetTime,),
            "title": (str,),
            "title_align": (WidgetTextAlign,),
            "title_size": (str,),
            "type": (EventStreamWidgetDefinitionType,),
        }

    attribute_map = {
        "query": "query",
        "type": "type",
        "event_size": "event_size",
        "tags_execution": "tags_execution",
        "time": "time",
        "title": "title",
        "title_align": "title_align",
        "title_size": "title_size",
    }

    read_only_vars = {}

    def __init__(self, query, type, *args, **kwargs):
        """EventStreamWidgetDefinition - a model defined in OpenAPI

        Args:
            query (str): Query to filter the event stream with.
            type (EventStreamWidgetDefinitionType):

        Keyword Args:
            event_size (WidgetEventSize): [optional]
            tags_execution (str): [optional] The execution method for multi-value filters. Can be either and or or.
            time (WidgetTime): [optional]
            title (str): [optional] Title of the widget.
            title_align (WidgetTextAlign): [optional]
            title_size (str): [optional] Size of the title.
        """
        super().__init__(kwargs)

        self._check_pos_args(args)

        self.query = query
        self.type = type

    @classmethod
    def _from_openapi_data(cls, query, type, *args, **kwargs):
        """Helper creating a new instance from a response."""

        self = super(EventStreamWidgetDefinition, cls)._from_openapi_data(kwargs)

        self._check_pos_args(args)

        self.query = query
        self.type = type
        return self

# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. # This product includes software developed at Datadog (https://www.datadoghq.com/). # Copyright 2019-Present Datadog, Inc. NOTE: This class is auto generated by OpenAPI Generator.     Ref: https://openapi-generator.tech      Do not edit the class manually. EventStreamWidgetDefinition - a model defined in OpenAPI          Args:             query (str): Query to filter the event stream with.             type (EventStreamWidgetDefinitionType):          Keyword Args:             event_size (WidgetEventSize): [optional]             tags_execution (str): [optional] The execution method for multi-value filters. Can be either and or or.             time (WidgetTime): [optional]             title (str): [optional] Title of the widget.             title_align (WidgetTextAlign): [optional]             title_size (str): [optional] Size of the title. Helper creating a new instance from a response.