# 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.log_query_definition_group_by import LogQueryDefinitionGroupBy
    from datadog_api_client.v1.model.log_query_definition_search import LogQueryDefinitionSearch
    from datadog_api_client.v1.model.logs_query_compute import LogsQueryCompute

    globals()["LogQueryDefinitionGroupBy"] = LogQueryDefinitionGroupBy
    globals()["LogQueryDefinitionSearch"] = LogQueryDefinitionSearch
    globals()["LogsQueryCompute"] = LogsQueryCompute


class LogQueryDefinition(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 {
            "compute": (LogsQueryCompute,),
            "group_by": ([LogQueryDefinitionGroupBy],),
            "index": (str,),
            "multi_compute": ([LogsQueryCompute],),
            "search": (LogQueryDefinitionSearch,),
        }

    attribute_map = {
        "compute": "compute",
        "group_by": "group_by",
        "index": "index",
        "multi_compute": "multi_compute",
        "search": "search",
    }

    read_only_vars = {}

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

        Keyword Args:
            compute (LogsQueryCompute): [optional]
            group_by ([LogQueryDefinitionGroupBy]): [optional] List of tag prefixes to group by in the case of a cluster check.
            index (str): [optional] A coma separated-list of index names. Use \"*\" query all indexes at once. [Multiple Indexes](https://docs.datadoghq.com/logs/indexes/#multiple-indexes)
            multi_compute ([LogsQueryCompute]): [optional] This field is mutually exclusive with `compute`.
            search (LogQueryDefinitionSearch): [optional]
        """
        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(LogQueryDefinition, 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,
)


def lazy_import():
    from datadog_api_client.v1.model.log_query_definition_group_by import LogQueryDefinitionGroupBy
    from datadog_api_client.v1.model.log_query_definition_search import LogQueryDefinitionSearch
    from datadog_api_client.v1.model.logs_query_compute import LogsQueryCompute

    globals()["LogQueryDefinitionGroupBy"] = LogQueryDefinitionGroupBy
    globals()["LogQueryDefinitionSearch"] = LogQueryDefinitionSearch
    globals()["LogsQueryCompute"] = LogsQueryCompute


class LogQueryDefinition(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 {
            "compute": (LogsQueryCompute,),
            "group_by": ([LogQueryDefinitionGroupBy],),
            "index": (str,),
            "multi_compute": ([LogsQueryCompute],),
            "search": (LogQueryDefinitionSearch,),
        }

    attribute_map = {
        "compute": "compute",
        "group_by": "group_by",
        "index": "index",
        "multi_compute": "multi_compute",
        "search": "search",
    }

    read_only_vars = {}

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

        Keyword Args:
            compute (LogsQueryCompute): [optional]
            group_by ([LogQueryDefinitionGroupBy]): [optional] List of tag prefixes to group by in the case of a cluster check.
            index (str): [optional] A coma separated-list of index names. Use \"*\" query all indexes at once. [Multiple Indexes](https://docs.datadoghq.com/logs/indexes/#multiple-indexes)
            multi_compute ([LogsQueryCompute]): [optional] This field is mutually exclusive with `compute`.
            search (LogQueryDefinitionSearch): [optional]
        """
        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(LogQueryDefinition, 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. LogQueryDefinition - a model defined in OpenAPI          Keyword Args:             compute (LogsQueryCompute): [optional]             group_by ([LogQueryDefinitionGroupBy]): [optional] List of tag prefixes to group by in the case of a cluster check.             index (str): [optional] A coma separated-list of index names. Use \"*\" query all indexes at once. [Multiple Indexes](https://docs.datadoghq.com/logs/indexes/#multiple-indexes)             multi_compute ([LogsQueryCompute]): [optional] This field is mutually exclusive with `compute`.             search (LogQueryDefinitionSearch): [optional] Helper creating a new instance from a response.