From a3cb91869dbb266cf79e30c857b429d2f192f0fb Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Wed, 8 Jul 2020 07:59:34 +0000 Subject: [PATCH] Regenerate client from commit 44c5568 of spec repo --- .apigentools-info | 8 +- .../v1/model/synthetics_assertion.py | 108 +++++++--- ...synthetics_assertion_json_path_operator.py | 169 +++++++++++++++ .../synthetics_assertion_json_path_target.py | 196 ++++++++++++++++++ ...etics_assertion_json_path_target_target.py | 174 ++++++++++++++++ .../v1/model/synthetics_assertion_operator.py | 2 + .../v1/model/synthetics_assertion_target.py | 191 +++++++++++++++++ datadog_api_client/v1/models/__init__.py | 4 + datadog_api_client/v1/openapi.yaml | 51 ++++- docs/v1/README.md | 4 + docs/v1/SyntheticsAssertion.md | 9 +- .../v1/SyntheticsAssertionJSONPathOperator.md | 11 + docs/v1/SyntheticsAssertionJSONPathTarget.md | 14 ++ ...SyntheticsAssertionJSONPathTargetTarget.md | 13 ++ docs/v1/SyntheticsAssertionTarget.md | 14 ++ ...synthetics_assertion_json_path_operator.py | 33 +++ ...t_synthetics_assertion_json_path_target.py | 48 +++++ ...etics_assertion_json_path_target_target.py | 33 +++ tests/v1/test_synthetics_assertion_target.py | 43 ++++ 19 files changed, 1086 insertions(+), 39 deletions(-) create mode 100644 datadog_api_client/v1/model/synthetics_assertion_json_path_operator.py create mode 100644 datadog_api_client/v1/model/synthetics_assertion_json_path_target.py create mode 100644 datadog_api_client/v1/model/synthetics_assertion_json_path_target_target.py create mode 100644 datadog_api_client/v1/model/synthetics_assertion_target.py create mode 100644 docs/v1/SyntheticsAssertionJSONPathOperator.md create mode 100644 docs/v1/SyntheticsAssertionJSONPathTarget.md create mode 100644 docs/v1/SyntheticsAssertionJSONPathTargetTarget.md create mode 100644 docs/v1/SyntheticsAssertionTarget.md create mode 100644 tests/v1/test_synthetics_assertion_json_path_operator.py create mode 100644 tests/v1/test_synthetics_assertion_json_path_target.py create mode 100644 tests/v1/test_synthetics_assertion_json_path_target_target.py create mode 100644 tests/v1/test_synthetics_assertion_target.py diff --git a/.apigentools-info b/.apigentools-info index cbce82c0e6..5b0c16f8b2 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.2.0", - "regenerated": "2020-07-02 22:52:51.104065", - "spec_repo_commit": "4d84e86" + "regenerated": "2020-07-08 07:59:25.271906", + "spec_repo_commit": "44c5568" }, "v2": { "apigentools_version": "1.2.0", - "regenerated": "2020-07-02 22:52:59.913708", - "spec_repo_commit": "4d84e86" + "regenerated": "2020-07-08 07:59:33.601210", + "spec_repo_commit": "44c5568" } } } \ No newline at end of file diff --git a/datadog_api_client/v1/model/synthetics_assertion.py b/datadog_api_client/v1/model/synthetics_assertion.py index 8068c17209..77b7898029 100644 --- a/datadog_api_client/v1/model/synthetics_assertion.py +++ b/datadog_api_client/v1/model/synthetics_assertion.py @@ -29,10 +29,25 @@ validate_get_composed_info, ) try: - from datadog_api_client.v1.model import synthetics_assertion_operator + from datadog_api_client.v1.model import synthetics_assertion_json_path_operator except ImportError: - synthetics_assertion_operator = sys.modules[ - 'datadog_api_client.v1.model.synthetics_assertion_operator'] + synthetics_assertion_json_path_operator = sys.modules[ + 'datadog_api_client.v1.model.synthetics_assertion_json_path_operator'] +try: + from datadog_api_client.v1.model import synthetics_assertion_json_path_target +except ImportError: + synthetics_assertion_json_path_target = sys.modules[ + 'datadog_api_client.v1.model.synthetics_assertion_json_path_target'] +try: + from datadog_api_client.v1.model import synthetics_assertion_json_path_target_target +except ImportError: + synthetics_assertion_json_path_target_target = sys.modules[ + 'datadog_api_client.v1.model.synthetics_assertion_json_path_target_target'] +try: + from datadog_api_client.v1.model import synthetics_assertion_target +except ImportError: + synthetics_assertion_target = sys.modules[ + 'datadog_api_client.v1.model.synthetics_assertion_target'] try: from datadog_api_client.v1.model import synthetics_assertion_type except ImportError: @@ -40,7 +55,7 @@ 'datadog_api_client.v1.model.synthetics_assertion_type'] -class SyntheticsAssertion(ModelNormal): +class SyntheticsAssertion(ModelComposed): """NOTE: This class is auto generated by OpenAPI Generator. Ref: https://openapi-generator.tech @@ -70,7 +85,7 @@ class SyntheticsAssertion(ModelNormal): validations = { } - additional_properties_type = None + additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501 _nullable = False @@ -84,25 +99,13 @@ def openapi_types(): openapi_types (dict): The key is attribute name and the value is attribute type. """ - return { - 'operator': (synthetics_assertion_operator.SyntheticsAssertionOperator,), # noqa: E501 - 'type': (synthetics_assertion_type.SyntheticsAssertionType,), # noqa: E501 - '_property': (str,), # noqa: E501 - 'target': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 - } + return {} @cached_property def discriminator(): return None - attribute_map = { - 'operator': 'operator', # noqa: E501 - 'type': 'type', # noqa: E501 - '_property': 'property', # noqa: E501 - 'target': 'target', # noqa: E501 - } - - _composed_schemas = {} + attribute_map = {} required_properties = set([ '_data_store', @@ -111,17 +114,20 @@ def discriminator(): '_path_to_item', '_configuration', '_visited_composed_classes', + '_composed_instances', + '_var_name_to_model_instances', + '_additional_properties_model_instances', ]) @convert_js_args_to_python_args - def __init__(self, operator, type, *args, **kwargs): # noqa: E501 + def __init__(self, *args, **kwargs): # noqa: E501 """synthetics_assertion.SyntheticsAssertion - a model defined in OpenAPI Args: - operator (synthetics_assertion_operator.SyntheticsAssertionOperator): - type (synthetics_assertion_type.SyntheticsAssertionType): Keyword Args: + operator (synthetics_assertion_json_path_operator.SyntheticsAssertionJSONPathOperator): defaults to nulltype.Null, must be one of ["validatesJSONPath", ] # noqa: E501 + type (synthetics_assertion_type.SyntheticsAssertionType): defaults to nulltype.Null, must be one of ["body", "header", "statusCode", "certificate", "responseTime", "property", ] # noqa: E501 _check_type (bool): if True, values for parameters in openapi_types will be type checked and a TypeError will be raised if the wrong type is input. @@ -153,9 +159,11 @@ def __init__(self, operator, type, *args, **kwargs): # noqa: E501 through its discriminator because we passed in _visited_composed_classes = (Animal,) _property (str): The associated assertion property.. [optional] # noqa: E501 - target ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Target to apply the assertion to. It can be a string, a number, or a Date.. [optional] # noqa: E501 + target (synthetics_assertion_json_path_target_target.SyntheticsAssertionJSONPathTargetTarget): [optional] # noqa: E501 """ + operator = kwargs.get('operator', nulltype.Null) + type = kwargs.get('type', nulltype.Null) _check_type = kwargs.pop('_check_type', True) _spec_property_naming = kwargs.pop('_spec_property_naming', False) _path_to_item = kwargs.pop('_path_to_item', ()) @@ -179,13 +187,59 @@ def __init__(self, operator, type, *args, **kwargs): # noqa: E501 self._configuration = _configuration self._visited_composed_classes = _visited_composed_classes + (self.__class__,) - self.operator = operator - self.type = type + constant_args = { + '_check_type': _check_type, + '_path_to_item': _path_to_item, + '_spec_property_naming': _spec_property_naming, + '_configuration': _configuration, + '_visited_composed_classes': self._visited_composed_classes, + } + required_args = { + 'operator': operator, + 'type': type, + } + # remove args whose value is Null because they are unset + required_arg_names = list(required_args.keys()) + for required_arg_name in required_arg_names: + if required_args[required_arg_name] is nulltype.Null: + del required_args[required_arg_name] + model_args = {} + model_args.update(required_args) + model_args.update(kwargs) + composed_info = validate_get_composed_info( + constant_args, model_args, self) + self._composed_instances = composed_info[0] + self._var_name_to_model_instances = composed_info[1] + self._additional_properties_model_instances = composed_info[2] + unused_args = composed_info[3] + + for var_name, var_value in required_args.items(): + setattr(self, var_name, var_value) for var_name, var_value in six.iteritems(kwargs): - if var_name not in self.attribute_map and \ + if var_name in unused_args and \ self._configuration is not None and \ self._configuration.discard_unknown_keys and \ - self.additional_properties_type is None: + not self._additional_properties_model_instances: # discard variable. continue setattr(self, var_name, var_value) + + @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 beause 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 + return { + 'anyOf': [ + ], + 'allOf': [ + ], + 'oneOf': [ + synthetics_assertion_json_path_target.SyntheticsAssertionJSONPathTarget, + synthetics_assertion_target.SyntheticsAssertionTarget, + ], + } diff --git a/datadog_api_client/v1/model/synthetics_assertion_json_path_operator.py b/datadog_api_client/v1/model/synthetics_assertion_json_path_operator.py new file mode 100644 index 0000000000..eb8a21a655 --- /dev/null +++ b/datadog_api_client/v1/model/synthetics_assertion_json_path_operator.py @@ -0,0 +1,169 @@ +# coding: utf-8 + +# 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 __future__ import absolute_import +import re # noqa: F401 +import sys # noqa: F401 + +import six # noqa: F401 +import nulltype # noqa: F401 + +from datadog_api_client.v1.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + int, + none_type, + str, + validate_get_composed_info, +) + + +class SyntheticsAssertionJSONPathOperator(ModelSimple): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + ('value',): { + 'VALIDATES_JSON_PATH': "validatesJSONPath", + }, + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'value': (str,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = {} + + _composed_schemas = None + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """synthetics_assertion_json_path_operator.SyntheticsAssertionJSONPathOperator - a model defined in OpenAPI + + Args: + + Keyword Args: + value (str): Assertion operator to apply.. defaults to 'validatesJSONPath', must be one of ["validatesJSONPath", ] # noqa: E501 + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + """ + + value = kwargs.get('value', 'validatesJSONPath') + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.value = value + for var_name, var_value in six.iteritems(kwargs): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) diff --git a/datadog_api_client/v1/model/synthetics_assertion_json_path_target.py b/datadog_api_client/v1/model/synthetics_assertion_json_path_target.py new file mode 100644 index 0000000000..c8a881498e --- /dev/null +++ b/datadog_api_client/v1/model/synthetics_assertion_json_path_target.py @@ -0,0 +1,196 @@ +# coding: utf-8 + +# 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 __future__ import absolute_import +import re # noqa: F401 +import sys # noqa: F401 + +import six # noqa: F401 +import nulltype # noqa: F401 + +from datadog_api_client.v1.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + int, + none_type, + str, + validate_get_composed_info, +) +try: + from datadog_api_client.v1.model import synthetics_assertion_json_path_operator +except ImportError: + synthetics_assertion_json_path_operator = sys.modules[ + 'datadog_api_client.v1.model.synthetics_assertion_json_path_operator'] +try: + from datadog_api_client.v1.model import synthetics_assertion_json_path_target_target +except ImportError: + synthetics_assertion_json_path_target_target = sys.modules[ + 'datadog_api_client.v1.model.synthetics_assertion_json_path_target_target'] +try: + from datadog_api_client.v1.model import synthetics_assertion_type +except ImportError: + synthetics_assertion_type = sys.modules[ + 'datadog_api_client.v1.model.synthetics_assertion_type'] + + +class SyntheticsAssertionJSONPathTarget(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'operator': (synthetics_assertion_json_path_operator.SyntheticsAssertionJSONPathOperator,), # noqa: E501 + 'type': (synthetics_assertion_type.SyntheticsAssertionType,), # noqa: E501 + '_property': (str,), # noqa: E501 + 'target': (synthetics_assertion_json_path_target_target.SyntheticsAssertionJSONPathTargetTarget,), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + 'operator': 'operator', # noqa: E501 + 'type': 'type', # noqa: E501 + '_property': 'property', # noqa: E501 + 'target': 'target', # noqa: E501 + } + + _composed_schemas = {} + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, operator, type, *args, **kwargs): # noqa: E501 + """synthetics_assertion_json_path_target.SyntheticsAssertionJSONPathTarget - a model defined in OpenAPI + + Args: + operator (synthetics_assertion_json_path_operator.SyntheticsAssertionJSONPathOperator): + type (synthetics_assertion_type.SyntheticsAssertionType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + _property (str): The associated assertion property.. [optional] # noqa: E501 + target (synthetics_assertion_json_path_target_target.SyntheticsAssertionJSONPathTargetTarget): [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.operator = operator + self.type = type + for var_name, var_value in six.iteritems(kwargs): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) diff --git a/datadog_api_client/v1/model/synthetics_assertion_json_path_target_target.py b/datadog_api_client/v1/model/synthetics_assertion_json_path_target_target.py new file mode 100644 index 0000000000..177927c4a5 --- /dev/null +++ b/datadog_api_client/v1/model/synthetics_assertion_json_path_target_target.py @@ -0,0 +1,174 @@ +# coding: utf-8 + +# 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 __future__ import absolute_import +import re # noqa: F401 +import sys # noqa: F401 + +import six # noqa: F401 +import nulltype # noqa: F401 + +from datadog_api_client.v1.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + int, + none_type, + str, + validate_get_composed_info, +) + + +class SyntheticsAssertionJSONPathTargetTarget(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'json_path': (str,), # noqa: E501 + 'operator': (str,), # noqa: E501 + 'target_value': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + 'json_path': 'jsonPath', # noqa: E501 + 'operator': 'operator', # noqa: E501 + 'target_value': 'targetValue', # noqa: E501 + } + + _composed_schemas = {} + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, *args, **kwargs): # noqa: E501 + """synthetics_assertion_json_path_target_target.SyntheticsAssertionJSONPathTargetTarget - a model defined in OpenAPI + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + json_path (str): The JSON path to assert.. [optional] # noqa: E501 + operator (str): The specific operator to use on the path.. [optional] # noqa: E501 + target_value ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): The path target value to compare to.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + for var_name, var_value in six.iteritems(kwargs): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) diff --git a/datadog_api_client/v1/model/synthetics_assertion_operator.py b/datadog_api_client/v1/model/synthetics_assertion_operator.py index 2f8ad1ea83..db07ed1693 100644 --- a/datadog_api_client/v1/model/synthetics_assertion_operator.py +++ b/datadog_api_client/v1/model/synthetics_assertion_operator.py @@ -57,10 +57,12 @@ class SyntheticsAssertionOperator(ModelSimple): 'IS': "is", 'IS_NOT': "isNot", 'LESS_THAN': "lessThan", + 'MORE_THAN': "moreThan", 'MATCHES': "matches", 'DOES_NOT_MATCH': "doesNotMatch", 'VALIDATES': "validates", 'IS_IN_MORE_DAYS_THAN': "isInMoreThan", + 'IS_IN_LESS_DAYS_THAN': "isInLessThan", }, } diff --git a/datadog_api_client/v1/model/synthetics_assertion_target.py b/datadog_api_client/v1/model/synthetics_assertion_target.py new file mode 100644 index 0000000000..04cd221d08 --- /dev/null +++ b/datadog_api_client/v1/model/synthetics_assertion_target.py @@ -0,0 +1,191 @@ +# coding: utf-8 + +# 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 __future__ import absolute_import +import re # noqa: F401 +import sys # noqa: F401 + +import six # noqa: F401 +import nulltype # noqa: F401 + +from datadog_api_client.v1.model_utils import ( # noqa: F401 + ApiTypeError, + ModelComposed, + ModelNormal, + ModelSimple, + cached_property, + change_keys_js_to_python, + convert_js_args_to_python_args, + date, + datetime, + file_type, + int, + none_type, + str, + validate_get_composed_info, +) +try: + from datadog_api_client.v1.model import synthetics_assertion_operator +except ImportError: + synthetics_assertion_operator = sys.modules[ + 'datadog_api_client.v1.model.synthetics_assertion_operator'] +try: + from datadog_api_client.v1.model import synthetics_assertion_type +except ImportError: + synthetics_assertion_type = sys.modules[ + 'datadog_api_client.v1.model.synthetics_assertion_type'] + + +class SyntheticsAssertionTarget(ModelNormal): + """NOTE: This class is auto generated by OpenAPI Generator. + Ref: https://openapi-generator.tech + + Do not edit the class manually. + + Attributes: + allowed_values (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + with a capitalized key describing the allowed value and an allowed + value. These dicts store the allowed enum values. + attribute_map (dict): The key is attribute name + and the value is json key in definition. + discriminator_value_class_map (dict): A dict to go from the discriminator + variable value to the discriminator class name. + validations (dict): The key is the tuple path to the attribute + and the for var_name this is (var_name,). The value is a dict + that stores validations for max_length, min_length, max_items, + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, + inclusive_minimum, and regex. + additional_properties_type (tuple): A tuple of classes accepted + as additional properties values. + """ + + allowed_values = { + } + + validations = { + } + + additional_properties_type = None + + _nullable = False + + @cached_property + def openapi_types(): + """ + This must be a class method so a model may have properties that are + of type self, this ensures that we don't create a cyclic import + + Returns + openapi_types (dict): The key is attribute name + and the value is attribute type. + """ + return { + 'operator': (synthetics_assertion_operator.SyntheticsAssertionOperator,), # noqa: E501 + 'type': (synthetics_assertion_type.SyntheticsAssertionType,), # noqa: E501 + '_property': (str,), # noqa: E501 + 'target': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501 + } + + @cached_property + def discriminator(): + return None + + attribute_map = { + 'operator': 'operator', # noqa: E501 + 'type': 'type', # noqa: E501 + '_property': 'property', # noqa: E501 + 'target': 'target', # noqa: E501 + } + + _composed_schemas = {} + + required_properties = set([ + '_data_store', + '_check_type', + '_spec_property_naming', + '_path_to_item', + '_configuration', + '_visited_composed_classes', + ]) + + @convert_js_args_to_python_args + def __init__(self, operator, type, *args, **kwargs): # noqa: E501 + """synthetics_assertion_target.SyntheticsAssertionTarget - a model defined in OpenAPI + + Args: + operator (synthetics_assertion_operator.SyntheticsAssertionOperator): + type (synthetics_assertion_type.SyntheticsAssertionType): + + Keyword Args: + _check_type (bool): if True, values for parameters in openapi_types + will be type checked and a TypeError will be + raised if the wrong type is input. + Defaults to True + _path_to_item (tuple/list): This is a list of keys or values to + drill down to the model in received_data + when deserializing a response + _spec_property_naming (bool): True if the variable names in the input data + are serialized names, as specified in the OpenAPI document. + False if the variable names in the input data + are pythonic names, e.g. snake case (default) + _configuration (Configuration): the instance to use when + deserializing a file_type parameter. + If passed, type conversion is attempted + If omitted no type conversion is done. + _visited_composed_classes (tuple): This stores a tuple of + classes that we have traveled through so that + if we see that class again we will not use its + discriminator again. + When traveling through a discriminator, the + composed schema that is + is traveled through is added to this set. + For example if Animal has a discriminator + petType and we pass in "Dog", and the class Dog + allOf includes Animal, we move through Animal + once using the discriminator, and pick Dog. + Then in Dog, we will make an instance of the + Animal class but this time we won't travel + through its discriminator because we passed in + _visited_composed_classes = (Animal,) + _property (str): The associated assertion property.. [optional] # noqa: E501 + target ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Value used by the operator.. [optional] # noqa: E501 + """ + + _check_type = kwargs.pop('_check_type', True) + _spec_property_naming = kwargs.pop('_spec_property_naming', False) + _path_to_item = kwargs.pop('_path_to_item', ()) + _configuration = kwargs.pop('_configuration', None) + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) + + if args: + raise ApiTypeError( + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( + args, + self.__class__.__name__, + ), + path_to_item=_path_to_item, + valid_classes=(self.__class__,), + ) + + self._data_store = {} + self._check_type = _check_type + self._spec_property_naming = _spec_property_naming + self._path_to_item = _path_to_item + self._configuration = _configuration + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) + + self.operator = operator + self.type = type + for var_name, var_value in six.iteritems(kwargs): + if var_name not in self.attribute_map and \ + self._configuration is not None and \ + self._configuration.discard_unknown_keys and \ + self.additional_properties_type is None: + # discard variable. + continue + setattr(self, var_name, var_value) diff --git a/datadog_api_client/v1/models/__init__.py b/datadog_api_client/v1/models/__init__.py index a7dcfef4d4..90e6ff52f5 100644 --- a/datadog_api_client/v1/models/__init__.py +++ b/datadog_api_client/v1/models/__init__.py @@ -250,7 +250,11 @@ from datadog_api_client.v1.model.synthetics_api_test_result_short import SyntheticsAPITestResultShort from datadog_api_client.v1.model.synthetics_api_test_result_short_result import SyntheticsAPITestResultShortResult from datadog_api_client.v1.model.synthetics_assertion import SyntheticsAssertion +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_operator import SyntheticsAssertionOperator +from datadog_api_client.v1.model.synthetics_assertion_target import SyntheticsAssertionTarget from datadog_api_client.v1.model.synthetics_assertion_type import SyntheticsAssertionType from datadog_api_client.v1.model.synthetics_browser_error import SyntheticsBrowserError from datadog_api_client.v1.model.synthetics_browser_error_type import SyntheticsBrowserErrorType diff --git a/datadog_api_client/v1/openapi.yaml b/datadog_api_client/v1/openapi.yaml index 36961f7565..df4e225cc2 100644 --- a/datadog_api_client/v1/openapi.yaml +++ b/datadog_api_client/v1/openapi.yaml @@ -5467,16 +5467,38 @@ components: SyntheticsAssertion: description: 'Object describing the assertions type, their associated operator, - which property they apply , and upon which target.' + which property they apply, and upon which target.' + oneOf: + - $ref: '#/components/schemas/SyntheticsAssertionTarget' + - $ref: '#/components/schemas/SyntheticsAssertionJSONPathTarget' + type: object + SyntheticsAssertionJSONPathOperator: + description: Assertion operator to apply. + enum: + - validatesJSONPath + type: string + x-enum-varnames: + - VALIDATES_JSON_PATH + SyntheticsAssertionJSONPathTarget: + description: An assertion for the `validatesJSONPath` operator. properties: operator: - $ref: '#/components/schemas/SyntheticsAssertionOperator' + $ref: '#/components/schemas/SyntheticsAssertionJSONPathOperator' property: description: The associated assertion property. type: string target: - description: Target to apply the assertion to. It can be a string, a number, - or a Date. + description: Composed target for `validatesJSONPath` operator. + properties: + jsonPath: + description: The JSON path to assert. + type: string + operator: + description: The specific operator to use on the path. + type: string + targetValue: + description: The path target value to compare to. + type: object type: object type: $ref: '#/components/schemas/SyntheticsAssertionType' @@ -5492,10 +5514,12 @@ components: - is - isNot - lessThan + - moreThan - matches - doesNotMatch - validates - isInMoreThan + - isInLessThan type: string x-enum-varnames: - CONTAINS @@ -5503,10 +5527,29 @@ components: - IS - IS_NOT - LESS_THAN + - MORE_THAN - MATCHES - DOES_NOT_MATCH - VALIDATES - IS_IN_MORE_DAYS_THAN + - IS_IN_LESS_DAYS_THAN + SyntheticsAssertionTarget: + description: An assertion which uses a simple target. + properties: + operator: + $ref: '#/components/schemas/SyntheticsAssertionOperator' + property: + description: The associated assertion property. + type: string + target: + description: Value used by the operator. + type: object + type: + $ref: '#/components/schemas/SyntheticsAssertionType' + required: + - type + - operator + type: object SyntheticsAssertionType: description: Type of the assertion. enum: diff --git a/docs/v1/README.md b/docs/v1/README.md index 8eda401545..fe96f86e0a 100644 --- a/docs/v1/README.md +++ b/docs/v1/README.md @@ -490,7 +490,11 @@ Class | Method | HTTP request | Description - [synthetics_api_test_result_short.SyntheticsAPITestResultShort](SyntheticsAPITestResultShort.md) - [synthetics_api_test_result_short_result.SyntheticsAPITestResultShortResult](SyntheticsAPITestResultShortResult.md) - [synthetics_assertion.SyntheticsAssertion](SyntheticsAssertion.md) + - [synthetics_assertion_json_path_operator.SyntheticsAssertionJSONPathOperator](SyntheticsAssertionJSONPathOperator.md) + - [synthetics_assertion_json_path_target.SyntheticsAssertionJSONPathTarget](SyntheticsAssertionJSONPathTarget.md) + - [synthetics_assertion_json_path_target_target.SyntheticsAssertionJSONPathTargetTarget](SyntheticsAssertionJSONPathTargetTarget.md) - [synthetics_assertion_operator.SyntheticsAssertionOperator](SyntheticsAssertionOperator.md) + - [synthetics_assertion_target.SyntheticsAssertionTarget](SyntheticsAssertionTarget.md) - [synthetics_assertion_type.SyntheticsAssertionType](SyntheticsAssertionType.md) - [synthetics_browser_error.SyntheticsBrowserError](SyntheticsBrowserError.md) - [synthetics_browser_error_type.SyntheticsBrowserErrorType](SyntheticsBrowserErrorType.md) diff --git a/docs/v1/SyntheticsAssertion.md b/docs/v1/SyntheticsAssertion.md index c842aab063..8258a5c3c4 100644 --- a/docs/v1/SyntheticsAssertion.md +++ b/docs/v1/SyntheticsAssertion.md @@ -1,13 +1,14 @@ # synthetics_assertion.SyntheticsAssertion -Object describing the assertions type, their associated operator, which property they apply , and upon which target. +Object describing the assertions type, their associated operator, which property they apply, and upon which target. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**operator** | [**synthetics_assertion_operator.SyntheticsAssertionOperator**](SyntheticsAssertionOperator.md) | | -**type** | [**synthetics_assertion_type.SyntheticsAssertionType**](SyntheticsAssertionType.md) | | +**operator** | [**synthetics_assertion_json_path_operator.SyntheticsAssertionJSONPathOperator**](SyntheticsAssertionJSONPathOperator.md) | | defaults to nulltype.Null +**type** | [**synthetics_assertion_type.SyntheticsAssertionType**](SyntheticsAssertionType.md) | | defaults to nulltype.Null **_property** | **str** | The associated assertion property. | [optional] -**target** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | Target to apply the assertion to. It can be a string, a number, or a Date. | [optional] +**target** | [**synthetics_assertion_json_path_target_target.SyntheticsAssertionJSONPathTargetTarget**](SyntheticsAssertionJSONPathTargetTarget.md) | | [optional] +**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional] [[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) diff --git a/docs/v1/SyntheticsAssertionJSONPathOperator.md b/docs/v1/SyntheticsAssertionJSONPathOperator.md new file mode 100644 index 0000000000..ef7b3afad0 --- /dev/null +++ b/docs/v1/SyntheticsAssertionJSONPathOperator.md @@ -0,0 +1,11 @@ +# synthetics_assertion_json_path_operator.SyntheticsAssertionJSONPathOperator + +Assertion operator to apply. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**value** | **str** | Assertion operator to apply. | defaults to 'validatesJSONPath' + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/v1/SyntheticsAssertionJSONPathTarget.md b/docs/v1/SyntheticsAssertionJSONPathTarget.md new file mode 100644 index 0000000000..55aec6c135 --- /dev/null +++ b/docs/v1/SyntheticsAssertionJSONPathTarget.md @@ -0,0 +1,14 @@ +# synthetics_assertion_json_path_target.SyntheticsAssertionJSONPathTarget + +An assertion for the `validatesJSONPath` operator. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**operator** | [**synthetics_assertion_json_path_operator.SyntheticsAssertionJSONPathOperator**](SyntheticsAssertionJSONPathOperator.md) | | +**type** | [**synthetics_assertion_type.SyntheticsAssertionType**](SyntheticsAssertionType.md) | | +**_property** | **str** | The associated assertion property. | [optional] +**target** | [**synthetics_assertion_json_path_target_target.SyntheticsAssertionJSONPathTargetTarget**](SyntheticsAssertionJSONPathTargetTarget.md) | | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/v1/SyntheticsAssertionJSONPathTargetTarget.md b/docs/v1/SyntheticsAssertionJSONPathTargetTarget.md new file mode 100644 index 0000000000..e7b2d41a00 --- /dev/null +++ b/docs/v1/SyntheticsAssertionJSONPathTargetTarget.md @@ -0,0 +1,13 @@ +# synthetics_assertion_json_path_target_target.SyntheticsAssertionJSONPathTargetTarget + +Composed target for `validatesJSONPath` operator. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**json_path** | **str** | The JSON path to assert. | [optional] +**operator** | **str** | The specific operator to use on the path. | [optional] +**target_value** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | The path target value to compare to. | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/docs/v1/SyntheticsAssertionTarget.md b/docs/v1/SyntheticsAssertionTarget.md new file mode 100644 index 0000000000..761177a959 --- /dev/null +++ b/docs/v1/SyntheticsAssertionTarget.md @@ -0,0 +1,14 @@ +# synthetics_assertion_target.SyntheticsAssertionTarget + +An assertion which uses a simple target. +## Properties +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**operator** | [**synthetics_assertion_operator.SyntheticsAssertionOperator**](SyntheticsAssertionOperator.md) | | +**type** | [**synthetics_assertion_type.SyntheticsAssertionType**](SyntheticsAssertionType.md) | | +**_property** | **str** | The associated assertion property. | [optional] +**target** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type)}** | Value used by the operator. | [optional] + +[[Back to Model list]](README.md#documentation-for-models) [[Back to API list]](README.md#documentation-for-api-endpoints) [[Back to README]](README.md) + + diff --git a/tests/v1/test_synthetics_assertion_json_path_operator.py b/tests/v1/test_synthetics_assertion_json_path_operator.py new file mode 100644 index 0000000000..44ca70b339 --- /dev/null +++ b/tests/v1/test_synthetics_assertion_json_path_operator.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +# 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 __future__ import absolute_import +import sys +import unittest + +import datadog_api_client.v1 +from datadog_api_client.v1.model.synthetics_assertion_json_path_operator import SyntheticsAssertionJSONPathOperator + + +class TestSyntheticsAssertionJSONPathOperator(unittest.TestCase): + """SyntheticsAssertionJSONPathOperator unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSyntheticsAssertionJSONPathOperator(self): + """Test SyntheticsAssertionJSONPathOperator""" + # FIXME: construct object with mandatory attributes with example values + # model = SyntheticsAssertionJSONPathOperator() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/v1/test_synthetics_assertion_json_path_target.py b/tests/v1/test_synthetics_assertion_json_path_target.py new file mode 100644 index 0000000000..e8aa29ae0d --- /dev/null +++ b/tests/v1/test_synthetics_assertion_json_path_target.py @@ -0,0 +1,48 @@ +# coding: utf-8 + +# 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 __future__ import absolute_import +import sys +import unittest + +import datadog_api_client.v1 +try: + from datadog_api_client.v1.model import synthetics_assertion_json_path_operator +except ImportError: + synthetics_assertion_json_path_operator = sys.modules[ + 'datadog_api_client.v1.model.synthetics_assertion_json_path_operator'] +try: + from datadog_api_client.v1.model import synthetics_assertion_json_path_target_target +except ImportError: + synthetics_assertion_json_path_target_target = sys.modules[ + 'datadog_api_client.v1.model.synthetics_assertion_json_path_target_target'] +try: + from datadog_api_client.v1.model import synthetics_assertion_type +except ImportError: + synthetics_assertion_type = sys.modules[ + 'datadog_api_client.v1.model.synthetics_assertion_type'] +from datadog_api_client.v1.model.synthetics_assertion_json_path_target import SyntheticsAssertionJSONPathTarget + + +class TestSyntheticsAssertionJSONPathTarget(unittest.TestCase): + """SyntheticsAssertionJSONPathTarget unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSyntheticsAssertionJSONPathTarget(self): + """Test SyntheticsAssertionJSONPathTarget""" + # FIXME: construct object with mandatory attributes with example values + # model = SyntheticsAssertionJSONPathTarget() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/v1/test_synthetics_assertion_json_path_target_target.py b/tests/v1/test_synthetics_assertion_json_path_target_target.py new file mode 100644 index 0000000000..8d7fc48799 --- /dev/null +++ b/tests/v1/test_synthetics_assertion_json_path_target_target.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +# 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 __future__ import absolute_import +import sys +import unittest + +import datadog_api_client.v1 +from datadog_api_client.v1.model.synthetics_assertion_json_path_target_target import SyntheticsAssertionJSONPathTargetTarget + + +class TestSyntheticsAssertionJSONPathTargetTarget(unittest.TestCase): + """SyntheticsAssertionJSONPathTargetTarget unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSyntheticsAssertionJSONPathTargetTarget(self): + """Test SyntheticsAssertionJSONPathTargetTarget""" + # FIXME: construct object with mandatory attributes with example values + # model = SyntheticsAssertionJSONPathTargetTarget() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/tests/v1/test_synthetics_assertion_target.py b/tests/v1/test_synthetics_assertion_target.py new file mode 100644 index 0000000000..e91ae62bb8 --- /dev/null +++ b/tests/v1/test_synthetics_assertion_target.py @@ -0,0 +1,43 @@ +# coding: utf-8 + +# 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 __future__ import absolute_import +import sys +import unittest + +import datadog_api_client.v1 +try: + from datadog_api_client.v1.model import synthetics_assertion_operator +except ImportError: + synthetics_assertion_operator = sys.modules[ + 'datadog_api_client.v1.model.synthetics_assertion_operator'] +try: + from datadog_api_client.v1.model import synthetics_assertion_type +except ImportError: + synthetics_assertion_type = sys.modules[ + 'datadog_api_client.v1.model.synthetics_assertion_type'] +from datadog_api_client.v1.model.synthetics_assertion_target import SyntheticsAssertionTarget + + +class TestSyntheticsAssertionTarget(unittest.TestCase): + """SyntheticsAssertionTarget unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testSyntheticsAssertionTarget(self): + """Test SyntheticsAssertionTarget""" + # FIXME: construct object with mandatory attributes with example values + # model = SyntheticsAssertionTarget() # noqa: E501 + pass + + +if __name__ == '__main__': + unittest.main()