|
| 1 | +# coding: utf-8 |
| 2 | + |
| 3 | +# Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. |
| 4 | +# This product includes software developed at Datadog (https://www.datadoghq.com/). |
| 5 | +# Copyright 2019-Present Datadog, Inc. |
| 6 | + |
| 7 | + |
| 8 | +import re # noqa: F401 |
| 9 | +import sys # noqa: F401 |
| 10 | + |
| 11 | +import nulltype # noqa: F401 |
| 12 | + |
| 13 | +from datadog_api_client.v1.model_utils import ( # noqa: F401 |
| 14 | + ApiTypeError, |
| 15 | + ModelComposed, |
| 16 | + ModelNormal, |
| 17 | + ModelSimple, |
| 18 | + cached_property, |
| 19 | + change_keys_js_to_python, |
| 20 | + convert_js_args_to_python_args, |
| 21 | + date, |
| 22 | + datetime, |
| 23 | + file_type, |
| 24 | + none_type, |
| 25 | + validate_get_composed_info, |
| 26 | +) |
| 27 | + |
| 28 | +def lazy_import(): |
| 29 | + from datadog_api_client.v1.model.synthetics_test_request_certificate_item import SyntheticsTestRequestCertificateItem |
| 30 | + globals()['SyntheticsTestRequestCertificateItem'] = SyntheticsTestRequestCertificateItem |
| 31 | + |
| 32 | + |
| 33 | +class SyntheticsTestRequestCertificate(ModelNormal): |
| 34 | + """NOTE: This class is auto generated by OpenAPI Generator. |
| 35 | + Ref: https://openapi-generator.tech |
| 36 | +
|
| 37 | + Do not edit the class manually. |
| 38 | +
|
| 39 | + Attributes: |
| 40 | + allowed_values (dict): The key is the tuple path to the attribute |
| 41 | + and the for var_name this is (var_name,). The value is a dict |
| 42 | + with a capitalized key describing the allowed value and an allowed |
| 43 | + value. These dicts store the allowed enum values. |
| 44 | + attribute_map (dict): The key is attribute name |
| 45 | + and the value is json key in definition. |
| 46 | + discriminator_value_class_map (dict): A dict to go from the discriminator |
| 47 | + variable value to the discriminator class name. |
| 48 | + validations (dict): The key is the tuple path to the attribute |
| 49 | + and the for var_name this is (var_name,). The value is a dict |
| 50 | + that stores validations for max_length, min_length, max_items, |
| 51 | + min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum, |
| 52 | + inclusive_minimum, and regex. |
| 53 | + additional_properties_type (tuple): A tuple of classes accepted |
| 54 | + as additional properties values. |
| 55 | + """ |
| 56 | + |
| 57 | + allowed_values = { |
| 58 | + } |
| 59 | + |
| 60 | + validations = { |
| 61 | + } |
| 62 | + |
| 63 | + additional_properties_type = None |
| 64 | + |
| 65 | + _nullable = False |
| 66 | + |
| 67 | + @cached_property |
| 68 | + def openapi_types(): |
| 69 | + """ |
| 70 | + This must be a method because a model may have properties that are |
| 71 | + of type self, this must run after the class is loaded |
| 72 | +
|
| 73 | + Returns |
| 74 | + openapi_types (dict): The key is attribute name |
| 75 | + and the value is attribute type. |
| 76 | + """ |
| 77 | + lazy_import() |
| 78 | + return { |
| 79 | + 'cert': (SyntheticsTestRequestCertificateItem,), # noqa: E501 |
| 80 | + 'key': (SyntheticsTestRequestCertificateItem,), # noqa: E501 |
| 81 | + } |
| 82 | + |
| 83 | + @cached_property |
| 84 | + def discriminator(): |
| 85 | + return None |
| 86 | + |
| 87 | + |
| 88 | + attribute_map = { |
| 89 | + 'cert': 'cert', # noqa: E501 |
| 90 | + 'key': 'key', # noqa: E501 |
| 91 | + } |
| 92 | + |
| 93 | + _composed_schemas = {} |
| 94 | + |
| 95 | + required_properties = set([ |
| 96 | + '_data_store', |
| 97 | + '_check_type', |
| 98 | + '_spec_property_naming', |
| 99 | + '_path_to_item', |
| 100 | + '_configuration', |
| 101 | + '_visited_composed_classes', |
| 102 | + ]) |
| 103 | + |
| 104 | + @convert_js_args_to_python_args |
| 105 | + def __init__(self, *args, **kwargs): # noqa: E501 |
| 106 | + """SyntheticsTestRequestCertificate - a model defined in OpenAPI |
| 107 | +
|
| 108 | + Keyword Args: |
| 109 | + _check_type (bool): if True, values for parameters in openapi_types |
| 110 | + will be type checked and a TypeError will be |
| 111 | + raised if the wrong type is input. |
| 112 | + Defaults to True |
| 113 | + _path_to_item (tuple/list): This is a list of keys or values to |
| 114 | + drill down to the model in received_data |
| 115 | + when deserializing a response |
| 116 | + _spec_property_naming (bool): True if the variable names in the input data |
| 117 | + are serialized names, as specified in the OpenAPI document. |
| 118 | + False if the variable names in the input data |
| 119 | + are pythonic names, e.g. snake case (default) |
| 120 | + _configuration (Configuration): the instance to use when |
| 121 | + deserializing a file_type parameter. |
| 122 | + If passed, type conversion is attempted |
| 123 | + If omitted no type conversion is done. |
| 124 | + _visited_composed_classes (tuple): This stores a tuple of |
| 125 | + classes that we have traveled through so that |
| 126 | + if we see that class again we will not use its |
| 127 | + discriminator again. |
| 128 | + When traveling through a discriminator, the |
| 129 | + composed schema that is |
| 130 | + is traveled through is added to this set. |
| 131 | + For example if Animal has a discriminator |
| 132 | + petType and we pass in "Dog", and the class Dog |
| 133 | + allOf includes Animal, we move through Animal |
| 134 | + once using the discriminator, and pick Dog. |
| 135 | + Then in Dog, we will make an instance of the |
| 136 | + Animal class but this time we won't travel |
| 137 | + through its discriminator because we passed in |
| 138 | + _visited_composed_classes = (Animal,) |
| 139 | + cert (SyntheticsTestRequestCertificateItem): [optional] # noqa: E501 |
| 140 | + key (SyntheticsTestRequestCertificateItem): [optional] # noqa: E501 |
| 141 | + """ |
| 142 | + |
| 143 | + _check_type = kwargs.pop('_check_type', True) |
| 144 | + _spec_property_naming = kwargs.pop('_spec_property_naming', False) |
| 145 | + _path_to_item = kwargs.pop('_path_to_item', ()) |
| 146 | + _configuration = kwargs.pop('_configuration', None) |
| 147 | + _visited_composed_classes = kwargs.pop('_visited_composed_classes', ()) |
| 148 | + |
| 149 | + if args: |
| 150 | + raise ApiTypeError( |
| 151 | + "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % ( |
| 152 | + args, |
| 153 | + self.__class__.__name__, |
| 154 | + ), |
| 155 | + path_to_item=_path_to_item, |
| 156 | + valid_classes=(self.__class__,), |
| 157 | + ) |
| 158 | + |
| 159 | + self._data_store = {} |
| 160 | + self._check_type = _check_type |
| 161 | + self._spec_property_naming = _spec_property_naming |
| 162 | + self._path_to_item = _path_to_item |
| 163 | + self._configuration = _configuration |
| 164 | + self._visited_composed_classes = _visited_composed_classes + (self.__class__,) |
| 165 | + |
| 166 | + for var_name, var_value in kwargs.items(): |
| 167 | + if var_name not in self.attribute_map and \ |
| 168 | + self._configuration is not None and \ |
| 169 | + self._configuration.discard_unknown_keys and \ |
| 170 | + self.additional_properties_type is None: |
| 171 | + # discard variable. |
| 172 | + continue |
| 173 | + setattr(self, var_name, var_value) |
0 commit comments