<gh_stars>0
# 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.service_map_widget_definition_type import ServiceMapWidgetDefinitionType
    from datadog_api_client.v1.model.widget_custom_link import WidgetCustomLink
    from datadog_api_client.v1.model.widget_text_align import WidgetTextAlign

    globals()["ServiceMapWidgetDefinitionType"] = ServiceMapWidgetDefinitionType
    globals()["WidgetCustomLink"] = WidgetCustomLink
    globals()["WidgetTextAlign"] = WidgetTextAlign


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

    Do not edit the class manually.
    """

    validations = {
        "filters": {
            "min_items": 1,
        },
    }

    @cached_property
    def openapi_types():
        lazy_import()
        return {
            "custom_links": ([WidgetCustomLink],),
            "filters": ([str],),
            "service": (str,),
            "title": (str,),
            "title_align": (WidgetTextAlign,),
            "title_size": (str,),
            "type": (ServiceMapWidgetDefinitionType,),
        }

    attribute_map = {
        "filters": "filters",
        "service": "service",
        "type": "type",
        "custom_links": "custom_links",
        "title": "title",
        "title_align": "title_align",
        "title_size": "title_size",
    }

    read_only_vars = {}

    def __init__(self, filters, service, type, *args, **kwargs):
        """ServiceMapWidgetDefinition - a model defined in OpenAPI

        Args:
            filters ([str]): Your environment and primary tag (or * if enabled for your account).
            service (str): The ID of the service you want to map.
            type (ServiceMapWidgetDefinitionType):

        Keyword Args:
            custom_links ([WidgetCustomLink]): [optional] List of custom links.
            title (str): [optional] The title of your widget.
            title_align (WidgetTextAlign): [optional]
            title_size (str): [optional] Size of the title.
        """
        super().__init__(kwargs)

        self._check_pos_args(args)

        self.filters = filters
        self.service = service
        self.type = type

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

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

        self._check_pos_args(args)

        self.filters = filters
        self.service = service
        self.type = type
        return self
