# 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 (
    ModelComposed,
    cached_property,
)


def lazy_import():
    from datadog_api_client.v1.model.synthetics_assertion_json_path_operator import SyntheticsAssertionJSONPathOperator
    from datadog_api_client.v1.model.synthetics_assertion_json_path_target import SyntheticsAssertionJSONPathTarget
    from datadog_api_client.v1.model.synthetics_assertion_json_path_target_target import (
        SyntheticsAssertionJSONPathTargetTarget,
    )
    from datadog_api_client.v1.model.synthetics_assertion_target import SyntheticsAssertionTarget
    from datadog_api_client.v1.model.synthetics_assertion_type import SyntheticsAssertionType

    globals()["SyntheticsAssertionJSONPathOperator"] = SyntheticsAssertionJSONPathOperator
    globals()["SyntheticsAssertionJSONPathTarget"] = SyntheticsAssertionJSONPathTarget
    globals()["SyntheticsAssertionJSONPathTargetTarget"] = SyntheticsAssertionJSONPathTargetTarget
    globals()["SyntheticsAssertionTarget"] = SyntheticsAssertionTarget
    globals()["SyntheticsAssertionType"] = SyntheticsAssertionType


class SyntheticsAssertion(ModelComposed):
    """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():
        return {}

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

        Keyword Args:
            _property (str): [optional] The associated assertion property.
            operator (SyntheticsAssertionJSONPathOperator): [optional]
            target (SyntheticsAssertionJSONPathTargetTarget): [optional]
            type (SyntheticsAssertionType): [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(SyntheticsAssertion, cls)._from_openapi_data(kwargs)

        self._check_pos_args(args)

        return self

    @cached_property
    def _composed_schemas():
        # we need this here to make our import statements work
        # we must store _composed_schemas in here so the code is only run
        # when we invoke this method. If we kept this at the class
        # level we would get an error because the class level
        # code would be run when this module is imported, and these composed
        # classes don't exist yet because their module has not finished
        # loading
        lazy_import()
        return {
            "anyOf": [],
            "allOf": [],
            "oneOf": [
                SyntheticsAssertionJSONPathTarget,
                SyntheticsAssertionTarget,
            ],
        }

# 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 (
    ModelComposed,
    cached_property,
)


def lazy_import():
    from datadog_api_client.v1.model.synthetics_assertion_json_path_operator import SyntheticsAssertionJSONPathOperator
    from datadog_api_client.v1.model.synthetics_assertion_json_path_target import SyntheticsAssertionJSONPathTarget
    from datadog_api_client.v1.model.synthetics_assertion_json_path_target_target import (
        SyntheticsAssertionJSONPathTargetTarget,
    )
    from datadog_api_client.v1.model.synthetics_assertion_target import SyntheticsAssertionTarget
    from datadog_api_client.v1.model.synthetics_assertion_type import SyntheticsAssertionType

    globals()["SyntheticsAssertionJSONPathOperator"] = SyntheticsAssertionJSONPathOperator
    globals()["SyntheticsAssertionJSONPathTarget"] = SyntheticsAssertionJSONPathTarget
    globals()["SyntheticsAssertionJSONPathTargetTarget"] = SyntheticsAssertionJSONPathTargetTarget
    globals()["SyntheticsAssertionTarget"] = SyntheticsAssertionTarget
    globals()["SyntheticsAssertionType"] = SyntheticsAssertionType


class SyntheticsAssertion(ModelComposed):
    """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():
        return {}

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

        Keyword Args:
            _property (str): [optional] The associated assertion property.
            operator (SyntheticsAssertionJSONPathOperator): [optional]
            target (SyntheticsAssertionJSONPathTargetTarget): [optional]
            type (SyntheticsAssertionType): [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(SyntheticsAssertion, cls)._from_openapi_data(kwargs)

        self._check_pos_args(args)

        return self

    @cached_property
    def _composed_schemas():
        # we need this here to make our import statements work
        # we must store _composed_schemas in here so the code is only run
        # when we invoke this method. If we kept this at the class
        # level we would get an error because the class level
        # code would be run when this module is imported, and these composed
        # classes don't exist yet because their module has not finished
        # loading
        lazy_import()
        return {
            "anyOf": [],
            "allOf": [],
            "oneOf": [
                SyntheticsAssertionJSONPathTarget,
                SyntheticsAssertionTarget,
            ],
        }

# 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. SyntheticsAssertion - a model defined in OpenAPI          Keyword Args:             _property (str): [optional] The associated assertion property.             operator (SyntheticsAssertionJSONPathOperator): [optional]             target (SyntheticsAssertionJSONPathTargetTarget): [optional]             type (SyntheticsAssertionType): [optional] Helper creating a new instance from a response. # we need this here to make our import statements work # we must store _composed_schemas in here so the code is only run # when we invoke this method. If we kept this at the class # level we would get an error because the class level # code would be run when this module is imported, and these composed # classes don't exist yet because their module has not finished # loading