criteo-api-marketingsolutions-sdk 0.0.241029__py3-none-any.whl → 0.0.250205__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of criteo-api-marketingsolutions-sdk might be problematic. Click here for more details.

Files changed (68) hide show
  1. criteo_api_marketingsolutions_preview/__init__.py +1 -1
  2. criteo_api_marketingsolutions_preview/api/campaign_api.py +0 -877
  3. criteo_api_marketingsolutions_preview/api/creative_api.py +107 -101
  4. criteo_api_marketingsolutions_preview/api_client.py +1 -1
  5. criteo_api_marketingsolutions_preview/configuration.py +1 -1
  6. criteo_api_marketingsolutions_preview/model/ad.py +4 -0
  7. criteo_api_marketingsolutions_preview/model/ad_set_frequency_capping_v24_q3.py +1 -1
  8. criteo_api_marketingsolutions_preview/model/adaptive_attributes.py +0 -10
  9. criteo_api_marketingsolutions_preview/model/adaptive_write_attributes.py +0 -4
  10. criteo_api_marketingsolutions_preview/model/coupon.py +4 -2
  11. criteo_api_marketingsolutions_preview/model/coupon_supported_sizes.py +0 -4
  12. criteo_api_marketingsolutions_preview/model/create_ad_set_attribution_configuration_v24_q3.py +284 -0
  13. criteo_api_marketingsolutions_preview/model/create_ad_set_v24_q3.py +6 -0
  14. criteo_api_marketingsolutions_preview/model/create_coupon.py +0 -2
  15. criteo_api_marketingsolutions_preview/model/create_image_slide.py +0 -2
  16. criteo_api_marketingsolutions_preview/model/creative.py +4 -0
  17. criteo_api_marketingsolutions_preview/model/dynamic_attributes.py +0 -4
  18. criteo_api_marketingsolutions_preview/model/dynamic_write_attributes.py +6 -6
  19. criteo_api_marketingsolutions_preview/model/html_tag_attributes.py +0 -2
  20. criteo_api_marketingsolutions_preview/model/html_tag_write_attributes.py +0 -2
  21. criteo_api_marketingsolutions_preview/model/image_attributes.py +0 -2
  22. criteo_api_marketingsolutions_preview/model/image_set.py +0 -2
  23. criteo_api_marketingsolutions_preview/model/image_slide.py +0 -2
  24. criteo_api_marketingsolutions_preview/model/json_report_rows.py +3 -3
  25. criteo_api_marketingsolutions_preview/model/nillable_lookback_window_v24_q3.py +271 -0
  26. criteo_api_marketingsolutions_preview/model/patch_ad_set_attribution_configuration_v24_q3.py +282 -0
  27. criteo_api_marketingsolutions_preview/model/patch_ad_set_v24_q3.py +6 -0
  28. criteo_api_marketingsolutions_preview/model/read_ad_set_attribution_configuration_v24_q3.py +284 -0
  29. criteo_api_marketingsolutions_preview/model/read_ad_set_v24_q3.py +6 -0
  30. criteo_api_marketingsolutions_preview/model/report_ok_response.py +18 -18
  31. criteo_api_marketingsolutions_preview/model/{creative_response.py → resource_collection_outcome_of_ad.py} +8 -12
  32. criteo_api_marketingsolutions_preview/model/{ad_list_response.py → resource_collection_outcome_of_coupon.py} +8 -14
  33. criteo_api_marketingsolutions_preview/model/resource_collection_outcome_of_creative.py +281 -0
  34. criteo_api_marketingsolutions_preview/model/{ad_write_request.py → resource_input_of_ad_write.py} +8 -8
  35. criteo_api_marketingsolutions_preview/model/{create_coupon_request.py → resource_input_of_create_coupon.py} +8 -8
  36. criteo_api_marketingsolutions_preview/model/{creative_write_request.py → resource_input_of_creative_write.py} +8 -8
  37. criteo_api_marketingsolutions_preview/model/{update_coupon_request.py → resource_input_of_update_coupon.py} +8 -8
  38. criteo_api_marketingsolutions_preview/model/{ad_resource.py → resource_of_ad.py} +5 -5
  39. criteo_api_marketingsolutions_preview/model/{ad_write_resource.py → resource_of_ad_write.py} +5 -5
  40. criteo_api_marketingsolutions_preview/model/{coupon_resource.py → resource_of_coupon.py} +5 -5
  41. criteo_api_marketingsolutions_preview/model/{coupon_supported_sizes_resource.py → resource_of_coupon_supported_sizes.py} +5 -5
  42. criteo_api_marketingsolutions_preview/model/{create_coupon_resource.py → resource_of_create_coupon.py} +5 -5
  43. criteo_api_marketingsolutions_preview/model/{creative_resource.py → resource_of_creative.py} +5 -5
  44. criteo_api_marketingsolutions_preview/model/{creative_write_resource.py → resource_of_creative_write.py} +5 -5
  45. criteo_api_marketingsolutions_preview/model/{update_coupon_resource.py → resource_of_update_coupon.py} +5 -5
  46. criteo_api_marketingsolutions_preview/model/{ad_response.py → resource_outcome_of_ad.py} +8 -12
  47. criteo_api_marketingsolutions_preview/model/{coupon_response.py → resource_outcome_of_coupon.py} +8 -12
  48. criteo_api_marketingsolutions_preview/model/{coupon_list_response.py → resource_outcome_of_coupon_supported_sizes.py} +8 -14
  49. criteo_api_marketingsolutions_preview/model/resource_outcome_of_creative.py +281 -0
  50. criteo_api_marketingsolutions_preview/models/__init__.py +23 -31
  51. {criteo_api_marketingsolutions_sdk-0.0.241029.dist-info → criteo_api_marketingsolutions_sdk-0.0.250205.dist-info}/METADATA +14 -5
  52. {criteo_api_marketingsolutions_sdk-0.0.241029.dist-info → criteo_api_marketingsolutions_sdk-0.0.250205.dist-info}/RECORD +54 -62
  53. {criteo_api_marketingsolutions_sdk-0.0.241029.dist-info → criteo_api_marketingsolutions_sdk-0.0.250205.dist-info}/WHEEL +1 -1
  54. criteo_api_marketingsolutions_preview/model/coupon_supported_sizes_response.py +0 -285
  55. criteo_api_marketingsolutions_preview/model/creative_list_response.py +0 -287
  56. criteo_api_marketingsolutions_preview/model/oci_brand_safety_response.py +0 -279
  57. criteo_api_marketingsolutions_preview/model/oci_brand_safety_response_data.py +0 -287
  58. criteo_api_marketingsolutions_preview/model/oci_brand_safety_rule.py +0 -275
  59. criteo_api_marketingsolutions_preview/model/oci_brand_safety_segment.py +0 -320
  60. criteo_api_marketingsolutions_preview/model/oci_targeting_node.py +0 -277
  61. criteo_api_marketingsolutions_preview/model/oci_targeting_response.py +0 -279
  62. criteo_api_marketingsolutions_preview/model/oci_targeting_response_data.py +0 -287
  63. criteo_api_marketingsolutions_preview/model/oci_targeting_rule.py +0 -275
  64. criteo_api_marketingsolutions_preview/model/target.py +0 -274
  65. criteo_api_marketingsolutions_preview/model/target_type.py +0 -290
  66. criteo_api_marketingsolutions_preview/model/targeting_error_model.py +0 -299
  67. criteo_api_marketingsolutions_preview/model/targeting_operator.py +0 -292
  68. {criteo_api_marketingsolutions_sdk-0.0.241029.dist-info → criteo_api_marketingsolutions_sdk-0.0.250205.dist-info}/top_level.txt +0 -0
@@ -1,275 +0,0 @@
1
- """
2
- Criteo API
3
-
4
- Criteo API - MarketingSolutions # noqa: E501
5
-
6
- The version of the OpenAPI document: preview
7
- Generated by: https://openapi-generator.tech
8
- """
9
-
10
-
11
- import re # noqa: F401
12
- import sys # noqa: F401
13
-
14
- from criteo_api_marketingsolutions_preview.model_utils import ( # noqa: F401
15
- ApiTypeError,
16
- ModelComposed,
17
- ModelNormal,
18
- ModelSimple,
19
- cached_property,
20
- change_keys_js_to_python,
21
- convert_js_args_to_python_args,
22
- date,
23
- datetime,
24
- file_type,
25
- none_type,
26
- validate_get_composed_info,
27
- OpenApiModel
28
- )
29
- from criteo_api_marketingsolutions_preview.exceptions import ApiAttributeError
30
-
31
-
32
- def lazy_import():
33
- from criteo_api_marketingsolutions_preview.model.oci_targeting_node import OciTargetingNode
34
- from criteo_api_marketingsolutions_preview.model.target import Target
35
- globals()['OciTargetingNode'] = OciTargetingNode
36
- globals()['Target'] = Target
37
-
38
-
39
- class OciTargetingRule(ModelNormal):
40
- """NOTE: This class is auto generated by OpenAPI Generator.
41
- Ref: https://openapi-generator.tech
42
-
43
- Do not edit the class manually.
44
-
45
- Attributes:
46
- allowed_values (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
- with a capitalized key describing the allowed value and an allowed
49
- value. These dicts store the allowed enum values.
50
- attribute_map (dict): The key is attribute name
51
- and the value is json key in definition.
52
- discriminator_value_class_map (dict): A dict to go from the discriminator
53
- variable value to the discriminator class name.
54
- validations (dict): The key is the tuple path to the attribute
55
- and the for var_name this is (var_name,). The value is a dict
56
- that stores validations for max_length, min_length, max_items,
57
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
58
- inclusive_minimum, and regex.
59
- additional_properties_type (tuple): A tuple of classes accepted
60
- as additional properties values.
61
- """
62
-
63
- allowed_values = {
64
- }
65
-
66
- validations = {
67
- }
68
-
69
- @cached_property
70
- def additional_properties_type():
71
- """
72
- This must be a method because a model may have properties that are
73
- of type self, this must run after the class is loaded
74
- """
75
- lazy_import()
76
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
77
-
78
- _nullable = False
79
-
80
- @cached_property
81
- def openapi_types():
82
- """
83
- This must be a method because a model may have properties that are
84
- of type self, this must run after the class is loaded
85
-
86
- Returns
87
- openapi_types (dict): The key is attribute name
88
- and the value is attribute type.
89
- """
90
- lazy_import()
91
- return {
92
- 'target': (Target,), # noqa: E501
93
- 'rule': (OciTargetingNode,), # noqa: E501
94
- }
95
-
96
- @cached_property
97
- def discriminator():
98
- return None
99
-
100
-
101
- attribute_map = {
102
- 'target': 'target', # noqa: E501
103
- 'rule': 'rule', # noqa: E501
104
- }
105
-
106
- read_only_vars = {
107
- }
108
-
109
- _composed_schemas = {}
110
-
111
- @classmethod
112
- @convert_js_args_to_python_args
113
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
114
- """OciTargetingRule - a model defined in OpenAPI
115
-
116
- Keyword Args:
117
- _check_type (bool): if True, values for parameters in openapi_types
118
- will be type checked and a TypeError will be
119
- raised if the wrong type is input.
120
- Defaults to True
121
- _path_to_item (tuple/list): This is a list of keys or values to
122
- drill down to the model in received_data
123
- when deserializing a response
124
- _spec_property_naming (bool): True if the variable names in the input data
125
- are serialized names, as specified in the OpenAPI document.
126
- False if the variable names in the input data
127
- are pythonic names, e.g. snake case (default)
128
- _configuration (Configuration): the instance to use when
129
- deserializing a file_type parameter.
130
- If passed, type conversion is attempted
131
- If omitted no type conversion is done.
132
- _visited_composed_classes (tuple): This stores a tuple of
133
- classes that we have traveled through so that
134
- if we see that class again we will not use its
135
- discriminator again.
136
- When traveling through a discriminator, the
137
- composed schema that is
138
- is traveled through is added to this set.
139
- For example if Animal has a discriminator
140
- petType and we pass in "Dog", and the class Dog
141
- allOf includes Animal, we move through Animal
142
- once using the discriminator, and pick Dog.
143
- Then in Dog, we will make an instance of the
144
- Animal class but this time we won't travel
145
- through its discriminator because we passed in
146
- _visited_composed_classes = (Animal,)
147
- target (Target): [optional] # noqa: E501
148
- rule (OciTargetingNode): [optional] # noqa: E501
149
- """
150
-
151
- _check_type = kwargs.pop('_check_type', True)
152
- _spec_property_naming = kwargs.pop('_spec_property_naming', True)
153
- _path_to_item = kwargs.pop('_path_to_item', ())
154
- _configuration = kwargs.pop('_configuration', None)
155
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
156
-
157
- self = super(OpenApiModel, cls).__new__(cls)
158
-
159
- if args:
160
- for arg in args:
161
- if isinstance(arg, dict):
162
- kwargs.update(arg)
163
- else:
164
- raise ApiTypeError(
165
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
166
- args,
167
- self.__class__.__name__,
168
- ),
169
- path_to_item=_path_to_item,
170
- valid_classes=(self.__class__,),
171
- )
172
-
173
- self._data_store = {}
174
- self._check_type = _check_type
175
- self._spec_property_naming = _spec_property_naming
176
- self._path_to_item = _path_to_item
177
- self._configuration = _configuration
178
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
179
-
180
- for var_name, var_value in kwargs.items():
181
- if var_name not in self.attribute_map and \
182
- self._configuration is not None and \
183
- self._configuration.discard_unknown_keys and \
184
- self.additional_properties_type is None:
185
- # discard variable.
186
- continue
187
- setattr(self, var_name, var_value)
188
- return self
189
-
190
- required_properties = set([
191
- '_data_store',
192
- '_check_type',
193
- '_spec_property_naming',
194
- '_path_to_item',
195
- '_configuration',
196
- '_visited_composed_classes',
197
- ])
198
-
199
- @convert_js_args_to_python_args
200
- def __init__(self, *args, **kwargs): # noqa: E501
201
- """OciTargetingRule - a model defined in OpenAPI
202
-
203
- Keyword Args:
204
- _check_type (bool): if True, values for parameters in openapi_types
205
- will be type checked and a TypeError will be
206
- raised if the wrong type is input.
207
- Defaults to True
208
- _path_to_item (tuple/list): This is a list of keys or values to
209
- drill down to the model in received_data
210
- when deserializing a response
211
- _spec_property_naming (bool): True if the variable names in the input data
212
- are serialized names, as specified in the OpenAPI document.
213
- False if the variable names in the input data
214
- are pythonic names, e.g. snake case (default)
215
- _configuration (Configuration): the instance to use when
216
- deserializing a file_type parameter.
217
- If passed, type conversion is attempted
218
- If omitted no type conversion is done.
219
- _visited_composed_classes (tuple): This stores a tuple of
220
- classes that we have traveled through so that
221
- if we see that class again we will not use its
222
- discriminator again.
223
- When traveling through a discriminator, the
224
- composed schema that is
225
- is traveled through is added to this set.
226
- For example if Animal has a discriminator
227
- petType and we pass in "Dog", and the class Dog
228
- allOf includes Animal, we move through Animal
229
- once using the discriminator, and pick Dog.
230
- Then in Dog, we will make an instance of the
231
- Animal class but this time we won't travel
232
- through its discriminator because we passed in
233
- _visited_composed_classes = (Animal,)
234
- target (Target): [optional] # noqa: E501
235
- rule (OciTargetingNode): [optional] # noqa: E501
236
- """
237
-
238
- _check_type = kwargs.pop('_check_type', True)
239
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
240
- _path_to_item = kwargs.pop('_path_to_item', ())
241
- _configuration = kwargs.pop('_configuration', None)
242
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
243
-
244
- if args:
245
- for arg in args:
246
- if isinstance(arg, dict):
247
- kwargs.update(arg)
248
- else:
249
- raise ApiTypeError(
250
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
251
- args,
252
- self.__class__.__name__,
253
- ),
254
- path_to_item=_path_to_item,
255
- valid_classes=(self.__class__,),
256
- )
257
-
258
- self._data_store = {}
259
- self._check_type = _check_type
260
- self._spec_property_naming = _spec_property_naming
261
- self._path_to_item = _path_to_item
262
- self._configuration = _configuration
263
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
264
-
265
- for var_name, var_value in kwargs.items():
266
- if var_name not in self.attribute_map and \
267
- self._configuration is not None and \
268
- self._configuration.discard_unknown_keys and \
269
- self.additional_properties_type is None:
270
- # discard variable.
271
- continue
272
- setattr(self, var_name, var_value)
273
- if var_name in self.read_only_vars:
274
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
275
- f"class with read only attributes.")
@@ -1,274 +0,0 @@
1
- """
2
- Criteo API
3
-
4
- Criteo API - MarketingSolutions # noqa: E501
5
-
6
- The version of the OpenAPI document: preview
7
- Generated by: https://openapi-generator.tech
8
- """
9
-
10
-
11
- import re # noqa: F401
12
- import sys # noqa: F401
13
-
14
- from criteo_api_marketingsolutions_preview.model_utils import ( # noqa: F401
15
- ApiTypeError,
16
- ModelComposed,
17
- ModelNormal,
18
- ModelSimple,
19
- cached_property,
20
- change_keys_js_to_python,
21
- convert_js_args_to_python_args,
22
- date,
23
- datetime,
24
- file_type,
25
- none_type,
26
- validate_get_composed_info,
27
- OpenApiModel
28
- )
29
- from criteo_api_marketingsolutions_preview.exceptions import ApiAttributeError
30
-
31
-
32
- def lazy_import():
33
- from criteo_api_marketingsolutions_preview.model.target_type import TargetType
34
- globals()['TargetType'] = TargetType
35
-
36
-
37
- class Target(ModelNormal):
38
- """NOTE: This class is auto generated by OpenAPI Generator.
39
- Ref: https://openapi-generator.tech
40
-
41
- Do not edit the class manually.
42
-
43
- Attributes:
44
- allowed_values (dict): The key is the tuple path to the attribute
45
- and the for var_name this is (var_name,). The value is a dict
46
- with a capitalized key describing the allowed value and an allowed
47
- value. These dicts store the allowed enum values.
48
- attribute_map (dict): The key is attribute name
49
- and the value is json key in definition.
50
- discriminator_value_class_map (dict): A dict to go from the discriminator
51
- variable value to the discriminator class name.
52
- validations (dict): The key is the tuple path to the attribute
53
- and the for var_name this is (var_name,). The value is a dict
54
- that stores validations for max_length, min_length, max_items,
55
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
56
- inclusive_minimum, and regex.
57
- additional_properties_type (tuple): A tuple of classes accepted
58
- as additional properties values.
59
- """
60
-
61
- allowed_values = {
62
- }
63
-
64
- validations = {
65
- }
66
-
67
- additional_properties_type = None
68
-
69
- _nullable = False
70
-
71
- @cached_property
72
- def openapi_types():
73
- """
74
- This must be a method because a model may have properties that are
75
- of type self, this must run after the class is loaded
76
-
77
- Returns
78
- openapi_types (dict): The key is attribute name
79
- and the value is attribute type.
80
- """
81
- lazy_import()
82
- return {
83
- 'type': (TargetType,), # noqa: E501
84
- 'id': (int,), # noqa: E501
85
- }
86
-
87
- @cached_property
88
- def discriminator():
89
- return None
90
-
91
-
92
- attribute_map = {
93
- 'type': 'type', # noqa: E501
94
- 'id': 'id', # noqa: E501
95
- }
96
-
97
- read_only_vars = {
98
- }
99
-
100
- _composed_schemas = {}
101
-
102
- @classmethod
103
- @convert_js_args_to_python_args
104
- def _from_openapi_data(cls, type, id, *args, **kwargs): # noqa: E501
105
- """Target - a model defined in OpenAPI
106
-
107
- Args:
108
- type (TargetType):
109
- id (int):
110
-
111
- Keyword Args:
112
- _check_type (bool): if True, values for parameters in openapi_types
113
- will be type checked and a TypeError will be
114
- raised if the wrong type is input.
115
- Defaults to True
116
- _path_to_item (tuple/list): This is a list of keys or values to
117
- drill down to the model in received_data
118
- when deserializing a response
119
- _spec_property_naming (bool): True if the variable names in the input data
120
- are serialized names, as specified in the OpenAPI document.
121
- False if the variable names in the input data
122
- are pythonic names, e.g. snake case (default)
123
- _configuration (Configuration): the instance to use when
124
- deserializing a file_type parameter.
125
- If passed, type conversion is attempted
126
- If omitted no type conversion is done.
127
- _visited_composed_classes (tuple): This stores a tuple of
128
- classes that we have traveled through so that
129
- if we see that class again we will not use its
130
- discriminator again.
131
- When traveling through a discriminator, the
132
- composed schema that is
133
- is traveled through is added to this set.
134
- For example if Animal has a discriminator
135
- petType and we pass in "Dog", and the class Dog
136
- allOf includes Animal, we move through Animal
137
- once using the discriminator, and pick Dog.
138
- Then in Dog, we will make an instance of the
139
- Animal class but this time we won't travel
140
- through its discriminator because we passed in
141
- _visited_composed_classes = (Animal,)
142
- """
143
-
144
- _check_type = kwargs.pop('_check_type', True)
145
- _spec_property_naming = kwargs.pop('_spec_property_naming', True)
146
- _path_to_item = kwargs.pop('_path_to_item', ())
147
- _configuration = kwargs.pop('_configuration', None)
148
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
149
-
150
- self = super(OpenApiModel, cls).__new__(cls)
151
-
152
- if args:
153
- for arg in args:
154
- if isinstance(arg, dict):
155
- kwargs.update(arg)
156
- else:
157
- raise ApiTypeError(
158
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
159
- args,
160
- self.__class__.__name__,
161
- ),
162
- path_to_item=_path_to_item,
163
- valid_classes=(self.__class__,),
164
- )
165
-
166
- self._data_store = {}
167
- self._check_type = _check_type
168
- self._spec_property_naming = _spec_property_naming
169
- self._path_to_item = _path_to_item
170
- self._configuration = _configuration
171
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
172
-
173
- self.type = type
174
- self.id = id
175
- for var_name, var_value in kwargs.items():
176
- if var_name not in self.attribute_map and \
177
- self._configuration is not None and \
178
- self._configuration.discard_unknown_keys and \
179
- self.additional_properties_type is None:
180
- # discard variable.
181
- continue
182
- setattr(self, var_name, var_value)
183
- return self
184
-
185
- required_properties = set([
186
- '_data_store',
187
- '_check_type',
188
- '_spec_property_naming',
189
- '_path_to_item',
190
- '_configuration',
191
- '_visited_composed_classes',
192
- ])
193
-
194
- @convert_js_args_to_python_args
195
- def __init__(self, type, id, *args, **kwargs): # noqa: E501
196
- """Target - a model defined in OpenAPI
197
-
198
- Args:
199
- type (TargetType):
200
- id (int):
201
-
202
- Keyword Args:
203
- _check_type (bool): if True, values for parameters in openapi_types
204
- will be type checked and a TypeError will be
205
- raised if the wrong type is input.
206
- Defaults to True
207
- _path_to_item (tuple/list): This is a list of keys or values to
208
- drill down to the model in received_data
209
- when deserializing a response
210
- _spec_property_naming (bool): True if the variable names in the input data
211
- are serialized names, as specified in the OpenAPI document.
212
- False if the variable names in the input data
213
- are pythonic names, e.g. snake case (default)
214
- _configuration (Configuration): the instance to use when
215
- deserializing a file_type parameter.
216
- If passed, type conversion is attempted
217
- If omitted no type conversion is done.
218
- _visited_composed_classes (tuple): This stores a tuple of
219
- classes that we have traveled through so that
220
- if we see that class again we will not use its
221
- discriminator again.
222
- When traveling through a discriminator, the
223
- composed schema that is
224
- is traveled through is added to this set.
225
- For example if Animal has a discriminator
226
- petType and we pass in "Dog", and the class Dog
227
- allOf includes Animal, we move through Animal
228
- once using the discriminator, and pick Dog.
229
- Then in Dog, we will make an instance of the
230
- Animal class but this time we won't travel
231
- through its discriminator because we passed in
232
- _visited_composed_classes = (Animal,)
233
- """
234
-
235
- _check_type = kwargs.pop('_check_type', True)
236
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
237
- _path_to_item = kwargs.pop('_path_to_item', ())
238
- _configuration = kwargs.pop('_configuration', None)
239
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
240
-
241
- if args:
242
- for arg in args:
243
- if isinstance(arg, dict):
244
- kwargs.update(arg)
245
- else:
246
- raise ApiTypeError(
247
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
248
- args,
249
- self.__class__.__name__,
250
- ),
251
- path_to_item=_path_to_item,
252
- valid_classes=(self.__class__,),
253
- )
254
-
255
- self._data_store = {}
256
- self._check_type = _check_type
257
- self._spec_property_naming = _spec_property_naming
258
- self._path_to_item = _path_to_item
259
- self._configuration = _configuration
260
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
261
-
262
- self.type = type
263
- self.id = id
264
- for var_name, var_value in kwargs.items():
265
- if var_name not in self.attribute_map and \
266
- self._configuration is not None and \
267
- self._configuration.discard_unknown_keys and \
268
- self.additional_properties_type is None:
269
- # discard variable.
270
- continue
271
- setattr(self, var_name, var_value)
272
- if var_name in self.read_only_vars:
273
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
274
- f"class with read only attributes.")