criteo-api-retailmedia-sdk 2023.1.0.231113__py3-none-any.whl → 2023.1.0.240207__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 (47) hide show
  1. {criteo_api_retailmedia_sdk-2023.1.0.231113.dist-info → criteo_api_retailmedia_sdk-2023.1.0.240207.dist-info}/METADATA +3 -3
  2. {criteo_api_retailmedia_sdk-2023.1.0.231113.dist-info → criteo_api_retailmedia_sdk-2023.1.0.240207.dist-info}/RECORD +34 -46
  3. {criteo_api_retailmedia_sdk-2023.1.0.231113.dist-info → criteo_api_retailmedia_sdk-2023.1.0.240207.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 +4 -446
  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/campaign_attributes_v202301.py +4 -0
  10. criteo_api_retailmedia_v2023_01/model/campaign_v202301.py +4 -0
  11. criteo_api_retailmedia_v2023_01/model/editable_campaign_attributes_v202301.py +4 -0
  12. criteo_api_retailmedia_v2023_01/model/external_account.py +4 -0
  13. criteo_api_retailmedia_v2023_01/model/{create_retail_media_audience_attributes.py → rm_legacy_audience_create_entity_v1.py} +10 -5
  14. criteo_api_retailmedia_v2023_01/model/{create_retail_media_audience_body.py → rm_legacy_audience_create_entity_v1_resource.py} +18 -22
  15. criteo_api_retailmedia_v2023_01/model/{retail_media_audience_v2_response.py → rm_legacy_audience_create_entity_v1_response.py} +15 -15
  16. criteo_api_retailmedia_v2023_01/model/{create_retail_media_audience_v2_attributes.py → rm_legacy_audience_create_entity_v2.py} +10 -10
  17. criteo_api_retailmedia_v2023_01/model/{create_retail_media_audience_v2_data.py → rm_legacy_audience_create_entity_v2_resource.py} +18 -22
  18. criteo_api_retailmedia_v2023_01/model/{common_status_code_response.py → rm_legacy_audience_create_entity_v2_response.py} +16 -10
  19. criteo_api_retailmedia_v2023_01/model/{create_retail_media_audience_v2_request.py → rm_legacy_audience_create_input_entity_v1.py} +10 -16
  20. criteo_api_retailmedia_v2023_01/model/{create_retail_media_audience_request.py → rm_legacy_audience_create_input_entity_v2.py} +10 -16
  21. criteo_api_retailmedia_v2023_01/model/{retail_media_audience_v2_attributes.py → rm_legacy_audience_get_entity_v1.py} +23 -23
  22. criteo_api_retailmedia_v2023_01/model/{creative202207_response.py → rm_legacy_audience_get_entity_v1_list_response.py} +16 -16
  23. criteo_api_retailmedia_v2023_01/model/{retail_media_audience_v2.py → rm_legacy_audience_get_entity_v1_resource.py} +24 -29
  24. criteo_api_retailmedia_v2023_01/model/{retail_media_audience_attributes.py → rm_legacy_audience_get_entity_v2.py} +15 -15
  25. criteo_api_retailmedia_v2023_01/model/{create_retail_media_audience_response.py → rm_legacy_audience_get_entity_v2_list_response.py} +18 -20
  26. criteo_api_retailmedia_v2023_01/model/{resource_of_creative202207.py → rm_legacy_audience_get_entity_v2_resource.py} +10 -10
  27. criteo_api_retailmedia_v2023_01/model/rm_legacy_audience_user_behavior_create_v2.py +279 -0
  28. criteo_api_retailmedia_v2023_01/model/{user_behavior_details_v2.py → rm_legacy_audience_user_behavior_details_v2.py} +11 -11
  29. criteo_api_retailmedia_v2023_01/model/{customer_list_details.py → rm_legacy_segment_customer_list.py} +11 -5
  30. criteo_api_retailmedia_v2023_01/model/{color_variable_value.py → rm_legacy_segment_user_behavior_create_v2.py} +44 -15
  31. criteo_api_retailmedia_v2023_01/model/{user_behavior_details.py → rm_legacy_segment_user_behavior_v1.py} +28 -28
  32. criteo_api_retailmedia_v2023_01/model/{create_user_behavior_segment_v2.py → rm_legacy_segment_user_behavior_v2.py} +7 -5
  33. criteo_api_retailmedia_v2023_01/models/__init__.py +20 -32
  34. criteo_api_retailmedia_v2023_01/model/choice_variable_value.py +0 -269
  35. criteo_api_retailmedia_v2023_01/model/create_retail_media_audience.py +0 -287
  36. criteo_api_retailmedia_v2023_01/model/create_retail_media_audience_v2.py +0 -287
  37. criteo_api_retailmedia_v2023_01/model/creative202207.py +0 -340
  38. criteo_api_retailmedia_v2023_01/model/creative_create_model202207.py +0 -297
  39. criteo_api_retailmedia_v2023_01/model/creative_update_model202207.py +0 -297
  40. criteo_api_retailmedia_v2023_01/model/files_variable_value.py +0 -271
  41. criteo_api_retailmedia_v2023_01/model/get_page_of_audiences_by_account_id_response.py +0 -295
  42. criteo_api_retailmedia_v2023_01/model/hyperlink_variable_value.py +0 -269
  43. criteo_api_retailmedia_v2023_01/model/retail_media_audience.py +0 -297
  44. criteo_api_retailmedia_v2023_01/model/retail_media_audience_v2_list_response.py +0 -293
  45. criteo_api_retailmedia_v2023_01/model/template_variable_value.py +0 -303
  46. criteo_api_retailmedia_v2023_01/model/text_variable_value.py +0 -269
  47. {criteo_api_retailmedia_sdk-2023.1.0.231113.dist-info → criteo_api_retailmedia_sdk-2023.1.0.240207.dist-info}/top_level.txt +0 -0
@@ -1,340 +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 Creative202207(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
- ('status',): {
63
- 'READY': "Ready",
64
- 'IN_USE': "In_Use",
65
- 'ARCHIVED': "Archived",
66
- 'DELETED': "Deleted",
67
- },
68
- ('creative_format_type',): {
69
- 'UNKNOWN': "Unknown",
70
- 'FLAGSHIP': "FlagShip",
71
- 'SHOWCASE': "Showcase",
72
- 'SPONSOREDPRODUCTS': "SponsoredProducts",
73
- 'BUTTERFLY': "Butterfly",
74
- 'BUNDLEBOOST': "BundleBoost",
75
- 'IAB': "IAB",
76
- 'CUSTOM': "CUSTOM",
77
- 'DISPLAYPANEL': "DisplayPanel",
78
- 'DIGITALSHELFTALKER': "DigitalShelfTalker",
79
- },
80
- ('environments',): {
81
- 'WEB': "Web",
82
- 'MOBILE': "Mobile",
83
- 'APP': "App",
84
- },
85
- }
86
-
87
- validations = {
88
- }
89
-
90
- @cached_property
91
- def additional_properties_type():
92
- """
93
- This must be a method because a model may have properties that are
94
- of type self, this must run after the class is loaded
95
- """
96
- lazy_import()
97
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
98
-
99
- _nullable = False
100
-
101
- @cached_property
102
- def openapi_types():
103
- """
104
- This must be a method because a model may have properties that are
105
- of type self, this must run after the class is loaded
106
-
107
- Returns
108
- openapi_types (dict): The key is attribute name
109
- and the value is attribute type.
110
- """
111
- lazy_import()
112
- return {
113
- 'name': (str,), # noqa: E501
114
- 'status': (str,), # noqa: E501
115
- 'retailer_id': (int,), # noqa: E501
116
- 'creative_format_type': (str,), # noqa: E501
117
- 'environments': ([str],), # noqa: E501
118
- 'template_variable_values': ([TemplateVariableValue],), # noqa: E501
119
- 'brand_id': (int, none_type,), # noqa: E501
120
- 'associated_line_item_ids': ([str],), # noqa: E501
121
- 'updated_at': (datetime,), # noqa: E501
122
- }
123
-
124
- @cached_property
125
- def discriminator():
126
- return None
127
-
128
-
129
- attribute_map = {
130
- 'name': 'name', # noqa: E501
131
- 'status': 'status', # noqa: E501
132
- 'retailer_id': 'retailerId', # noqa: E501
133
- 'creative_format_type': 'creativeFormatType', # noqa: E501
134
- 'environments': 'environments', # noqa: E501
135
- 'template_variable_values': 'templateVariableValues', # noqa: E501
136
- 'brand_id': 'brandId', # noqa: E501
137
- 'associated_line_item_ids': 'associatedLineItemIds', # noqa: E501
138
- 'updated_at': 'updatedAt', # noqa: E501
139
- }
140
-
141
- read_only_vars = {
142
- }
143
-
144
- _composed_schemas = {}
145
-
146
- @classmethod
147
- @convert_js_args_to_python_args
148
- def _from_openapi_data(cls, name, status, retailer_id, creative_format_type, environments, template_variable_values, *args, **kwargs): # noqa: E501
149
- """Creative202207 - a model defined in OpenAPI
150
-
151
- Args:
152
- name (str): Name
153
- status (str): Creative Status
154
- retailer_id (int): Retailer Id
155
- creative_format_type (str): Creative format type
156
- environments ([str]): Environment type (e.g. mobile, web, app)
157
- template_variable_values ([TemplateVariableValue]): The template chosen values
158
-
159
- Keyword Args:
160
- _check_type (bool): if True, values for parameters in openapi_types
161
- will be type checked and a TypeError will be
162
- raised if the wrong type is input.
163
- Defaults to True
164
- _path_to_item (tuple/list): This is a list of keys or values to
165
- drill down to the model in received_data
166
- when deserializing a response
167
- _spec_property_naming (bool): True if the variable names in the input data
168
- are serialized names, as specified in the OpenAPI document.
169
- False if the variable names in the input data
170
- are pythonic names, e.g. snake case (default)
171
- _configuration (Configuration): the instance to use when
172
- deserializing a file_type parameter.
173
- If passed, type conversion is attempted
174
- If omitted no type conversion is done.
175
- _visited_composed_classes (tuple): This stores a tuple of
176
- classes that we have traveled through so that
177
- if we see that class again we will not use its
178
- discriminator again.
179
- When traveling through a discriminator, the
180
- composed schema that is
181
- is traveled through is added to this set.
182
- For example if Animal has a discriminator
183
- petType and we pass in "Dog", and the class Dog
184
- allOf includes Animal, we move through Animal
185
- once using the discriminator, and pick Dog.
186
- Then in Dog, we will make an instance of the
187
- Animal class but this time we won't travel
188
- through its discriminator because we passed in
189
- _visited_composed_classes = (Animal,)
190
- brand_id (int, none_type): Brand Id. [optional] # noqa: E501
191
- associated_line_item_ids ([str]): Associated Line Item Ids. [optional] # noqa: E501
192
- updated_at (datetime): Updated at time. [optional] # noqa: E501
193
- """
194
-
195
- _check_type = kwargs.pop('_check_type', True)
196
- _spec_property_naming = kwargs.pop('_spec_property_naming', True)
197
- _path_to_item = kwargs.pop('_path_to_item', ())
198
- _configuration = kwargs.pop('_configuration', None)
199
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
200
-
201
- self = super(OpenApiModel, cls).__new__(cls)
202
-
203
- if args:
204
- for arg in args:
205
- if isinstance(arg, dict):
206
- kwargs.update(arg)
207
- else:
208
- raise ApiTypeError(
209
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
210
- args,
211
- self.__class__.__name__,
212
- ),
213
- path_to_item=_path_to_item,
214
- valid_classes=(self.__class__,),
215
- )
216
-
217
- self._data_store = {}
218
- self._check_type = _check_type
219
- self._spec_property_naming = _spec_property_naming
220
- self._path_to_item = _path_to_item
221
- self._configuration = _configuration
222
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
223
-
224
- self.name = name
225
- self.status = status
226
- self.retailer_id = retailer_id
227
- self.creative_format_type = creative_format_type
228
- self.environments = environments
229
- self.template_variable_values = template_variable_values
230
- for var_name, var_value in kwargs.items():
231
- if var_name not in self.attribute_map and \
232
- self._configuration is not None and \
233
- self._configuration.discard_unknown_keys and \
234
- self.additional_properties_type is None:
235
- # discard variable.
236
- continue
237
- setattr(self, var_name, var_value)
238
- return self
239
-
240
- required_properties = set([
241
- '_data_store',
242
- '_check_type',
243
- '_spec_property_naming',
244
- '_path_to_item',
245
- '_configuration',
246
- '_visited_composed_classes',
247
- ])
248
-
249
- @convert_js_args_to_python_args
250
- def __init__(self, name, status, retailer_id, creative_format_type, environments, template_variable_values, *args, **kwargs): # noqa: E501
251
- """Creative202207 - a model defined in OpenAPI
252
-
253
- Args:
254
- name (str): Name
255
- status (str): Creative Status
256
- retailer_id (int): Retailer Id
257
- creative_format_type (str): Creative format type
258
- environments ([str]): Environment type (e.g. mobile, web, app)
259
- template_variable_values ([TemplateVariableValue]): The template chosen values
260
-
261
- Keyword Args:
262
- _check_type (bool): if True, values for parameters in openapi_types
263
- will be type checked and a TypeError will be
264
- raised if the wrong type is input.
265
- Defaults to True
266
- _path_to_item (tuple/list): This is a list of keys or values to
267
- drill down to the model in received_data
268
- when deserializing a response
269
- _spec_property_naming (bool): True if the variable names in the input data
270
- are serialized names, as specified in the OpenAPI document.
271
- False if the variable names in the input data
272
- are pythonic names, e.g. snake case (default)
273
- _configuration (Configuration): the instance to use when
274
- deserializing a file_type parameter.
275
- If passed, type conversion is attempted
276
- If omitted no type conversion is done.
277
- _visited_composed_classes (tuple): This stores a tuple of
278
- classes that we have traveled through so that
279
- if we see that class again we will not use its
280
- discriminator again.
281
- When traveling through a discriminator, the
282
- composed schema that is
283
- is traveled through is added to this set.
284
- For example if Animal has a discriminator
285
- petType and we pass in "Dog", and the class Dog
286
- allOf includes Animal, we move through Animal
287
- once using the discriminator, and pick Dog.
288
- Then in Dog, we will make an instance of the
289
- Animal class but this time we won't travel
290
- through its discriminator because we passed in
291
- _visited_composed_classes = (Animal,)
292
- brand_id (int, none_type): Brand Id. [optional] # noqa: E501
293
- associated_line_item_ids ([str]): Associated Line Item Ids. [optional] # noqa: E501
294
- updated_at (datetime): Updated at time. [optional] # noqa: E501
295
- """
296
-
297
- _check_type = kwargs.pop('_check_type', True)
298
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
299
- _path_to_item = kwargs.pop('_path_to_item', ())
300
- _configuration = kwargs.pop('_configuration', None)
301
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
302
-
303
- if args:
304
- for arg in args:
305
- if isinstance(arg, dict):
306
- kwargs.update(arg)
307
- else:
308
- raise ApiTypeError(
309
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
310
- args,
311
- self.__class__.__name__,
312
- ),
313
- path_to_item=_path_to_item,
314
- valid_classes=(self.__class__,),
315
- )
316
-
317
- self._data_store = {}
318
- self._check_type = _check_type
319
- self._spec_property_naming = _spec_property_naming
320
- self._path_to_item = _path_to_item
321
- self._configuration = _configuration
322
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
323
-
324
- self.name = name
325
- self.status = status
326
- self.retailer_id = retailer_id
327
- self.creative_format_type = creative_format_type
328
- self.environments = environments
329
- self.template_variable_values = template_variable_values
330
- for var_name, var_value in kwargs.items():
331
- if var_name not in self.attribute_map and \
332
- self._configuration is not None and \
333
- self._configuration.discard_unknown_keys and \
334
- self.additional_properties_type is None:
335
- # discard variable.
336
- continue
337
- setattr(self, var_name, var_value)
338
- if var_name in self.read_only_vars:
339
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
340
- f"class with read only attributes.")
@@ -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 CreativeCreateModel202207(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
- """CreativeCreateModel202207 - 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
- """CreativeCreateModel202207 - 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.")