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