criteo-api-retailmedia-sdk 2023.1.0.240118__py3-none-any.whl → 2023.1.0.240404__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-retailmedia-sdk might be problematic. Click here for more details.

Files changed (49) hide show
  1. {criteo_api_retailmedia_sdk-2023.1.0.240118.dist-info → criteo_api_retailmedia_sdk-2023.1.0.240404.dist-info}/METADATA +3 -3
  2. {criteo_api_retailmedia_sdk-2023.1.0.240118.dist-info → criteo_api_retailmedia_sdk-2023.1.0.240404.dist-info}/RECORD +36 -48
  3. {criteo_api_retailmedia_sdk-2023.1.0.240118.dist-info → criteo_api_retailmedia_sdk-2023.1.0.240404.dist-info}/WHEEL +1 -1
  4. criteo_api_retailmedia_v2023_01/__init__.py +1 -1
  5. criteo_api_retailmedia_v2023_01/api/audience_api.py +113 -100
  6. criteo_api_retailmedia_v2023_01/api/campaign_api.py +0 -442
  7. criteo_api_retailmedia_v2023_01/api_client.py +1 -1
  8. criteo_api_retailmedia_v2023_01/configuration.py +1 -1
  9. criteo_api_retailmedia_v2023_01/model/async_campaigns_report.py +57 -53
  10. criteo_api_retailmedia_v2023_01/model/async_line_items_report.py +57 -54
  11. criteo_api_retailmedia_v2023_01/model/campaign_attributes_v202301.py +4 -0
  12. criteo_api_retailmedia_v2023_01/model/campaign_v202301.py +4 -0
  13. criteo_api_retailmedia_v2023_01/model/editable_campaign_attributes_v202301.py +4 -0
  14. criteo_api_retailmedia_v2023_01/model/external_account.py +4 -0
  15. criteo_api_retailmedia_v2023_01/model/{create_retail_media_audience_attributes.py → rm_legacy_audience_create_entity_v1.py} +10 -5
  16. criteo_api_retailmedia_v2023_01/model/{create_retail_media_audience_body.py → rm_legacy_audience_create_entity_v1_resource.py} +18 -22
  17. criteo_api_retailmedia_v2023_01/model/{retail_media_audience_v2_response.py → rm_legacy_audience_create_entity_v1_response.py} +15 -15
  18. criteo_api_retailmedia_v2023_01/model/{create_retail_media_audience_v2_attributes.py → rm_legacy_audience_create_entity_v2.py} +10 -10
  19. criteo_api_retailmedia_v2023_01/model/{create_retail_media_audience_v2_data.py → rm_legacy_audience_create_entity_v2_resource.py} +18 -22
  20. criteo_api_retailmedia_v2023_01/model/{common_status_code_response.py → rm_legacy_audience_create_entity_v2_response.py} +16 -10
  21. criteo_api_retailmedia_v2023_01/model/{create_retail_media_audience_v2_request.py → rm_legacy_audience_create_input_entity_v1.py} +10 -16
  22. criteo_api_retailmedia_v2023_01/model/{create_retail_media_audience_request.py → rm_legacy_audience_create_input_entity_v2.py} +10 -16
  23. criteo_api_retailmedia_v2023_01/model/{retail_media_audience_v2_attributes.py → rm_legacy_audience_get_entity_v1.py} +23 -23
  24. criteo_api_retailmedia_v2023_01/model/{creative202207_response.py → rm_legacy_audience_get_entity_v1_list_response.py} +16 -16
  25. criteo_api_retailmedia_v2023_01/model/{retail_media_audience_v2.py → rm_legacy_audience_get_entity_v1_resource.py} +24 -29
  26. criteo_api_retailmedia_v2023_01/model/{retail_media_audience_attributes.py → rm_legacy_audience_get_entity_v2.py} +15 -15
  27. criteo_api_retailmedia_v2023_01/model/{create_retail_media_audience_response.py → rm_legacy_audience_get_entity_v2_list_response.py} +18 -20
  28. criteo_api_retailmedia_v2023_01/model/{resource_of_creative202207.py → rm_legacy_audience_get_entity_v2_resource.py} +10 -10
  29. criteo_api_retailmedia_v2023_01/model/rm_legacy_audience_user_behavior_create_v2.py +279 -0
  30. criteo_api_retailmedia_v2023_01/model/{user_behavior_details_v2.py → rm_legacy_audience_user_behavior_details_v2.py} +11 -11
  31. criteo_api_retailmedia_v2023_01/model/{customer_list_details.py → rm_legacy_segment_customer_list.py} +11 -5
  32. criteo_api_retailmedia_v2023_01/model/{color_variable_value.py → rm_legacy_segment_user_behavior_create_v2.py} +44 -15
  33. criteo_api_retailmedia_v2023_01/model/{user_behavior_details.py → rm_legacy_segment_user_behavior_v1.py} +28 -28
  34. criteo_api_retailmedia_v2023_01/model/{create_user_behavior_segment_v2.py → rm_legacy_segment_user_behavior_v2.py} +7 -5
  35. criteo_api_retailmedia_v2023_01/models/__init__.py +20 -32
  36. criteo_api_retailmedia_v2023_01/model/choice_variable_value.py +0 -269
  37. criteo_api_retailmedia_v2023_01/model/create_retail_media_audience.py +0 -287
  38. criteo_api_retailmedia_v2023_01/model/create_retail_media_audience_v2.py +0 -287
  39. criteo_api_retailmedia_v2023_01/model/creative202207.py +0 -340
  40. criteo_api_retailmedia_v2023_01/model/creative_create_model202207.py +0 -297
  41. criteo_api_retailmedia_v2023_01/model/creative_update_model202207.py +0 -297
  42. criteo_api_retailmedia_v2023_01/model/files_variable_value.py +0 -271
  43. criteo_api_retailmedia_v2023_01/model/get_page_of_audiences_by_account_id_response.py +0 -295
  44. criteo_api_retailmedia_v2023_01/model/hyperlink_variable_value.py +0 -269
  45. criteo_api_retailmedia_v2023_01/model/retail_media_audience.py +0 -297
  46. criteo_api_retailmedia_v2023_01/model/retail_media_audience_v2_list_response.py +0 -293
  47. criteo_api_retailmedia_v2023_01/model/template_variable_value.py +0 -303
  48. criteo_api_retailmedia_v2023_01/model/text_variable_value.py +0 -269
  49. {criteo_api_retailmedia_sdk-2023.1.0.240118.dist-info → criteo_api_retailmedia_sdk-2023.1.0.240404.dist-info}/top_level.txt +0 -0
@@ -1,297 +0,0 @@
1
- """
2
- Criteo API
3
-
4
- Criteo API - RetailMedia # noqa: E501
5
-
6
- The version of the OpenAPI document: 2023-01
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_retailmedia_v2023_01.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_retailmedia_v2023_01.exceptions import ApiAttributeError
30
-
31
-
32
- def lazy_import():
33
- from criteo_api_retailmedia_v2023_01.model.template_variable_value import TemplateVariableValue
34
- globals()['TemplateVariableValue'] = TemplateVariableValue
35
-
36
-
37
- class CreativeUpdateModel202207(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
- @cached_property
68
- def additional_properties_type():
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
- lazy_import()
74
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
75
-
76
- _nullable = False
77
-
78
- @cached_property
79
- def openapi_types():
80
- """
81
- This must be a method because a model may have properties that are
82
- of type self, this must run after the class is loaded
83
-
84
- Returns
85
- openapi_types (dict): The key is attribute name
86
- and the value is attribute type.
87
- """
88
- lazy_import()
89
- return {
90
- 'name': (str,), # noqa: E501
91
- 'retailer_id': (int,), # noqa: E501
92
- 'template_id': (int,), # noqa: E501
93
- 'template_variable_values': ([TemplateVariableValue],), # noqa: E501
94
- 'brand_id': (int,), # noqa: E501
95
- }
96
-
97
- @cached_property
98
- def discriminator():
99
- return None
100
-
101
-
102
- attribute_map = {
103
- 'name': 'name', # noqa: E501
104
- 'retailer_id': 'retailerId', # noqa: E501
105
- 'template_id': 'templateId', # noqa: E501
106
- 'template_variable_values': 'templateVariableValues', # noqa: E501
107
- 'brand_id': 'brandId', # noqa: E501
108
- }
109
-
110
- read_only_vars = {
111
- }
112
-
113
- _composed_schemas = {}
114
-
115
- @classmethod
116
- @convert_js_args_to_python_args
117
- def _from_openapi_data(cls, name, retailer_id, template_id, template_variable_values, *args, **kwargs): # noqa: E501
118
- """CreativeUpdateModel202207 - a model defined in OpenAPI
119
-
120
- Args:
121
- name (str): The name of the creative
122
- retailer_id (int): The retailer associated to the creative
123
- template_id (int): The creative template used for this creative
124
- template_variable_values ([TemplateVariableValue]): The template chosen values
125
-
126
- Keyword Args:
127
- _check_type (bool): if True, values for parameters in openapi_types
128
- will be type checked and a TypeError will be
129
- raised if the wrong type is input.
130
- Defaults to True
131
- _path_to_item (tuple/list): This is a list of keys or values to
132
- drill down to the model in received_data
133
- when deserializing a response
134
- _spec_property_naming (bool): True if the variable names in the input data
135
- are serialized names, as specified in the OpenAPI document.
136
- False if the variable names in the input data
137
- are pythonic names, e.g. snake case (default)
138
- _configuration (Configuration): the instance to use when
139
- deserializing a file_type parameter.
140
- If passed, type conversion is attempted
141
- If omitted no type conversion is done.
142
- _visited_composed_classes (tuple): This stores a tuple of
143
- classes that we have traveled through so that
144
- if we see that class again we will not use its
145
- discriminator again.
146
- When traveling through a discriminator, the
147
- composed schema that is
148
- is traveled through is added to this set.
149
- For example if Animal has a discriminator
150
- petType and we pass in "Dog", and the class Dog
151
- allOf includes Animal, we move through Animal
152
- once using the discriminator, and pick Dog.
153
- Then in Dog, we will make an instance of the
154
- Animal class but this time we won't travel
155
- through its discriminator because we passed in
156
- _visited_composed_classes = (Animal,)
157
- brand_id (int): The brand associated to the creative. [optional] # noqa: E501
158
- """
159
-
160
- _check_type = kwargs.pop('_check_type', True)
161
- _spec_property_naming = kwargs.pop('_spec_property_naming', True)
162
- _path_to_item = kwargs.pop('_path_to_item', ())
163
- _configuration = kwargs.pop('_configuration', None)
164
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
165
-
166
- self = super(OpenApiModel, cls).__new__(cls)
167
-
168
- if args:
169
- for arg in args:
170
- if isinstance(arg, dict):
171
- kwargs.update(arg)
172
- else:
173
- raise ApiTypeError(
174
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
175
- args,
176
- self.__class__.__name__,
177
- ),
178
- path_to_item=_path_to_item,
179
- valid_classes=(self.__class__,),
180
- )
181
-
182
- self._data_store = {}
183
- self._check_type = _check_type
184
- self._spec_property_naming = _spec_property_naming
185
- self._path_to_item = _path_to_item
186
- self._configuration = _configuration
187
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
188
-
189
- self.name = name
190
- self.retailer_id = retailer_id
191
- self.template_id = template_id
192
- self.template_variable_values = template_variable_values
193
- for var_name, var_value in kwargs.items():
194
- if var_name not in self.attribute_map and \
195
- self._configuration is not None and \
196
- self._configuration.discard_unknown_keys and \
197
- self.additional_properties_type is None:
198
- # discard variable.
199
- continue
200
- setattr(self, var_name, var_value)
201
- return self
202
-
203
- required_properties = set([
204
- '_data_store',
205
- '_check_type',
206
- '_spec_property_naming',
207
- '_path_to_item',
208
- '_configuration',
209
- '_visited_composed_classes',
210
- ])
211
-
212
- @convert_js_args_to_python_args
213
- def __init__(self, name, retailer_id, template_id, template_variable_values, *args, **kwargs): # noqa: E501
214
- """CreativeUpdateModel202207 - a model defined in OpenAPI
215
-
216
- Args:
217
- name (str): The name of the creative
218
- retailer_id (int): The retailer associated to the creative
219
- template_id (int): The creative template used for this creative
220
- template_variable_values ([TemplateVariableValue]): The template chosen values
221
-
222
- Keyword Args:
223
- _check_type (bool): if True, values for parameters in openapi_types
224
- will be type checked and a TypeError will be
225
- raised if the wrong type is input.
226
- Defaults to True
227
- _path_to_item (tuple/list): This is a list of keys or values to
228
- drill down to the model in received_data
229
- when deserializing a response
230
- _spec_property_naming (bool): True if the variable names in the input data
231
- are serialized names, as specified in the OpenAPI document.
232
- False if the variable names in the input data
233
- are pythonic names, e.g. snake case (default)
234
- _configuration (Configuration): the instance to use when
235
- deserializing a file_type parameter.
236
- If passed, type conversion is attempted
237
- If omitted no type conversion is done.
238
- _visited_composed_classes (tuple): This stores a tuple of
239
- classes that we have traveled through so that
240
- if we see that class again we will not use its
241
- discriminator again.
242
- When traveling through a discriminator, the
243
- composed schema that is
244
- is traveled through is added to this set.
245
- For example if Animal has a discriminator
246
- petType and we pass in "Dog", and the class Dog
247
- allOf includes Animal, we move through Animal
248
- once using the discriminator, and pick Dog.
249
- Then in Dog, we will make an instance of the
250
- Animal class but this time we won't travel
251
- through its discriminator because we passed in
252
- _visited_composed_classes = (Animal,)
253
- brand_id (int): The brand associated to the creative. [optional] # noqa: E501
254
- """
255
-
256
- _check_type = kwargs.pop('_check_type', True)
257
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
258
- _path_to_item = kwargs.pop('_path_to_item', ())
259
- _configuration = kwargs.pop('_configuration', None)
260
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
261
-
262
- if args:
263
- for arg in args:
264
- if isinstance(arg, dict):
265
- kwargs.update(arg)
266
- else:
267
- raise ApiTypeError(
268
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
269
- args,
270
- self.__class__.__name__,
271
- ),
272
- path_to_item=_path_to_item,
273
- valid_classes=(self.__class__,),
274
- )
275
-
276
- self._data_store = {}
277
- self._check_type = _check_type
278
- self._spec_property_naming = _spec_property_naming
279
- self._path_to_item = _path_to_item
280
- self._configuration = _configuration
281
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
282
-
283
- self.name = name
284
- self.retailer_id = retailer_id
285
- self.template_id = template_id
286
- self.template_variable_values = template_variable_values
287
- for var_name, var_value in kwargs.items():
288
- if var_name not in self.attribute_map and \
289
- self._configuration is not None and \
290
- self._configuration.discard_unknown_keys and \
291
- self.additional_properties_type is None:
292
- # discard variable.
293
- continue
294
- setattr(self, var_name, var_value)
295
- if var_name in self.read_only_vars:
296
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
297
- f"class with read only attributes.")
@@ -1,271 +0,0 @@
1
- """
2
- Criteo API
3
-
4
- Criteo API - RetailMedia # noqa: E501
5
-
6
- The version of the OpenAPI document: 2023-01
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_retailmedia_v2023_01.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_retailmedia_v2023_01.exceptions import ApiAttributeError
30
-
31
-
32
-
33
- class FilesVariableValue(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
- ('asset_ids',): {
62
- },
63
- }
64
-
65
- @cached_property
66
- def additional_properties_type():
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
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
72
-
73
- _nullable = False
74
-
75
- @cached_property
76
- def openapi_types():
77
- """
78
- This must be a method because a model may have properties that are
79
- of type self, this must run after the class is loaded
80
-
81
- Returns
82
- openapi_types (dict): The key is attribute name
83
- and the value is attribute type.
84
- """
85
- return {
86
- 'asset_ids': ([str],), # noqa: E501
87
- }
88
-
89
- @cached_property
90
- def discriminator():
91
- return None
92
-
93
-
94
- attribute_map = {
95
- 'asset_ids': 'assetIds', # noqa: E501
96
- }
97
-
98
- read_only_vars = {
99
- }
100
-
101
- _composed_schemas = {}
102
-
103
- @classmethod
104
- @convert_js_args_to_python_args
105
- def _from_openapi_data(cls, asset_ids, *args, **kwargs): # noqa: E501
106
- """FilesVariableValue - a model defined in OpenAPI
107
-
108
- Args:
109
- asset_ids ([str]): The assets representing the images to be displayed
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.asset_ids = asset_ids
174
- for var_name, var_value in kwargs.items():
175
- if var_name not in self.attribute_map and \
176
- self._configuration is not None and \
177
- self._configuration.discard_unknown_keys and \
178
- self.additional_properties_type is None:
179
- # discard variable.
180
- continue
181
- setattr(self, var_name, var_value)
182
- return self
183
-
184
- required_properties = set([
185
- '_data_store',
186
- '_check_type',
187
- '_spec_property_naming',
188
- '_path_to_item',
189
- '_configuration',
190
- '_visited_composed_classes',
191
- ])
192
-
193
- @convert_js_args_to_python_args
194
- def __init__(self, asset_ids, *args, **kwargs): # noqa: E501
195
- """FilesVariableValue - a model defined in OpenAPI
196
-
197
- Args:
198
- asset_ids ([str]): The assets representing the images to be displayed
199
-
200
- Keyword Args:
201
- _check_type (bool): if True, values for parameters in openapi_types
202
- will be type checked and a TypeError will be
203
- raised if the wrong type is input.
204
- Defaults to True
205
- _path_to_item (tuple/list): This is a list of keys or values to
206
- drill down to the model in received_data
207
- when deserializing a response
208
- _spec_property_naming (bool): True if the variable names in the input data
209
- are serialized names, as specified in the OpenAPI document.
210
- False if the variable names in the input data
211
- are pythonic names, e.g. snake case (default)
212
- _configuration (Configuration): the instance to use when
213
- deserializing a file_type parameter.
214
- If passed, type conversion is attempted
215
- If omitted no type conversion is done.
216
- _visited_composed_classes (tuple): This stores a tuple of
217
- classes that we have traveled through so that
218
- if we see that class again we will not use its
219
- discriminator again.
220
- When traveling through a discriminator, the
221
- composed schema that is
222
- is traveled through is added to this set.
223
- For example if Animal has a discriminator
224
- petType and we pass in "Dog", and the class Dog
225
- allOf includes Animal, we move through Animal
226
- once using the discriminator, and pick Dog.
227
- Then in Dog, we will make an instance of the
228
- Animal class but this time we won't travel
229
- through its discriminator because we passed in
230
- _visited_composed_classes = (Animal,)
231
- """
232
-
233
- _check_type = kwargs.pop('_check_type', True)
234
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
235
- _path_to_item = kwargs.pop('_path_to_item', ())
236
- _configuration = kwargs.pop('_configuration', None)
237
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
238
-
239
- if args:
240
- for arg in args:
241
- if isinstance(arg, dict):
242
- kwargs.update(arg)
243
- else:
244
- raise ApiTypeError(
245
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
246
- args,
247
- self.__class__.__name__,
248
- ),
249
- path_to_item=_path_to_item,
250
- valid_classes=(self.__class__,),
251
- )
252
-
253
- self._data_store = {}
254
- self._check_type = _check_type
255
- self._spec_property_naming = _spec_property_naming
256
- self._path_to_item = _path_to_item
257
- self._configuration = _configuration
258
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
259
-
260
- self.asset_ids = asset_ids
261
- for var_name, var_value in kwargs.items():
262
- if var_name not in self.attribute_map and \
263
- self._configuration is not None and \
264
- self._configuration.discard_unknown_keys and \
265
- self.additional_properties_type is None:
266
- # discard variable.
267
- continue
268
- setattr(self, var_name, var_value)
269
- if var_name in self.read_only_vars:
270
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
271
- f"class with read only attributes.")