<reponame>Valisback/hiring-engineers
# 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,
    none_type,
)


def lazy_import():
    from datadog_api_client.v1.model.metrics_query_unit import MetricsQueryUnit
    from datadog_api_client.v1.model.point import Point

    globals()["MetricsQueryUnit"] = MetricsQueryUnit
    globals()["Point"] = Point


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

    Do not edit the class manually.
    """

    validations = {
        "unit": {
            "max_items": 2,
            "min_items": 2,
        },
    }

    @cached_property
    def openapi_types():
        lazy_import()
        return {
            "aggr": (
                str,
                none_type,
            ),
            "display_name": (str,),
            "end": (int,),
            "expression": (str,),
            "interval": (int,),
            "length": (int,),
            "metric": (str,),
            "pointlist": ([Point],),
            "query_index": (int,),
            "scope": (str,),
            "start": (int,),
            "tag_set": ([str],),
            "unit": ([MetricsQueryUnit],),
        }

    attribute_map = {
        "aggr": "aggr",
        "display_name": "display_name",
        "end": "end",
        "expression": "expression",
        "interval": "interval",
        "length": "length",
        "metric": "metric",
        "pointlist": "pointlist",
        "query_index": "query_index",
        "scope": "scope",
        "start": "start",
        "tag_set": "tag_set",
        "unit": "unit",
    }

    read_only_vars = {
        "aggr",
        "display_name",
        "end",
        "expression",
        "interval",
        "length",
        "metric",
        "pointlist",
        "query_index",
        "scope",
        "start",
        "tag_set",
        "unit",
    }

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

        Keyword Args:
            aggr (str, none_type): [optional] Aggregation type.
            display_name (str): [optional] Display name of the metric.
            end (int): [optional] End of the time window, milliseconds since Unix epoch.
            expression (str): [optional] Metric expression.
            interval (int): [optional] Number of seconds between data samples.
            length (int): [optional] Number of data samples.
            metric (str): [optional] Metric name.
            pointlist ([Point]): [optional] List of points of the time series.
            query_index (int): [optional] The index of the series' query within the request.
            scope (str): [optional] Metric scope, comma separated list of tags.
            start (int): [optional] Start of the time window, milliseconds since Unix epoch.
            tag_set ([str]): [optional] Unique tags identifying this series.
            unit ([MetricsQueryUnit]): [optional] Detailed information about the metric unit. First element describes the \"primary unit\" (for example, `bytes` in `bytes per second`), second describes the \"per unit\" (for example, `second` in `bytes per second`).
        """
        super().__init__(kwargs)

        self._check_pos_args(args)

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

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

        self._check_pos_args(args)

        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,
    none_type,
)


def lazy_import():
    from datadog_api_client.v1.model.metrics_query_unit import MetricsQueryUnit
    from datadog_api_client.v1.model.point import Point

    globals()["MetricsQueryUnit"] = MetricsQueryUnit
    globals()["Point"] = Point


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

    Do not edit the class manually.
    """

    validations = {
        "unit": {
            "max_items": 2,
            "min_items": 2,
        },
    }

    @cached_property
    def openapi_types():
        lazy_import()
        return {
            "aggr": (
                str,
                none_type,
            ),
            "display_name": (str,),
            "end": (int,),
            "expression": (str,),
            "interval": (int,),
            "length": (int,),
            "metric": (str,),
            "pointlist": ([Point],),
            "query_index": (int,),
            "scope": (str,),
            "start": (int,),
            "tag_set": ([str],),
            "unit": ([MetricsQueryUnit],),
        }

    attribute_map = {
        "aggr": "aggr",
        "display_name": "display_name",
        "end": "end",
        "expression": "expression",
        "interval": "interval",
        "length": "length",
        "metric": "metric",
        "pointlist": "pointlist",
        "query_index": "query_index",
        "scope": "scope",
        "start": "start",
        "tag_set": "tag_set",
        "unit": "unit",
    }

    read_only_vars = {
        "aggr",
        "display_name",
        "end",
        "expression",
        "interval",
        "length",
        "metric",
        "pointlist",
        "query_index",
        "scope",
        "start",
        "tag_set",
        "unit",
    }

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

        Keyword Args:
            aggr (str, none_type): [optional] Aggregation type.
            display_name (str): [optional] Display name of the metric.
            end (int): [optional] End of the time window, milliseconds since Unix epoch.
            expression (str): [optional] Metric expression.
            interval (int): [optional] Number of seconds between data samples.
            length (int): [optional] Number of data samples.
            metric (str): [optional] Metric name.
            pointlist ([Point]): [optional] List of points of the time series.
            query_index (int): [optional] The index of the series' query within the request.
            scope (str): [optional] Metric scope, comma separated list of tags.
            start (int): [optional] Start of the time window, milliseconds since Unix epoch.
            tag_set ([str]): [optional] Unique tags identifying this series.
            unit ([MetricsQueryUnit]): [optional] Detailed information about the metric unit. First element describes the \"primary unit\" (for example, `bytes` in `bytes per second`), second describes the \"per unit\" (for example, `second` in `bytes per second`).
        """
        super().__init__(kwargs)

        self._check_pos_args(args)

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

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

        self._check_pos_args(args)

        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. MetricsQueryMetadata - a model defined in OpenAPI          Keyword Args:             aggr (str, none_type): [optional] Aggregation type.             display_name (str): [optional] Display name of the metric.             end (int): [optional] End of the time window, milliseconds since Unix epoch.             expression (str): [optional] Metric expression.             interval (int): [optional] Number of seconds between data samples.             length (int): [optional] Number of data samples.             metric (str): [optional] Metric name.             pointlist ([Point]): [optional] List of points of the time series.             query_index (int): [optional] The index of the series' query within the request.             scope (str): [optional] Metric scope, comma separated list of tags.             start (int): [optional] Start of the time window, milliseconds since Unix epoch.             tag_set ([str]): [optional] Unique tags identifying this series.             unit ([MetricsQueryUnit]): [optional] Detailed information about the metric unit. First element describes the \"primary unit\" (for example, `bytes` in `bytes per second`), second describes the \"per unit\" (for example, `second` in `bytes per second`). Helper creating a new instance from a response.