criteo-api-retailmedia-sdk 0.0.250730__py3-none-any.whl → 0.0.250819__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 (59) hide show
  1. criteo_api_retailmedia_preview/__init__.py +1 -1
  2. criteo_api_retailmedia_preview/api/audience_api.py +4 -4
  3. criteo_api_retailmedia_preview/api/balance_api.py +50 -50
  4. criteo_api_retailmedia_preview/api/campaign_api.py +450 -764
  5. criteo_api_retailmedia_preview/api_client.py +1 -1
  6. criteo_api_retailmedia_preview/configuration.py +1 -1
  7. criteo_api_retailmedia_preview/model/balance_response_v2.py +6 -6
  8. criteo_api_retailmedia_preview/model/{paged_resource_collection_outcome_of_balance_response_v2.py → balance_response_v2_paged_list_response.py} +3 -3
  9. criteo_api_retailmedia_preview/model/change_dates_of_balance_v2.py +9 -9
  10. criteo_api_retailmedia_preview/model/create_balance_v2.py +6 -6
  11. criteo_api_retailmedia_preview/model/flight_leg.py +6 -6
  12. criteo_api_retailmedia_preview/model/input_resource_of_preferred_line_item_create_model_v2.py +5 -5
  13. criteo_api_retailmedia_preview/model/{external_line_item_capping_v2.py → line_item_capping_v2.py} +4 -4
  14. criteo_api_retailmedia_preview/model/{external_line_item_page_category_v2.py → line_item_page_category_v2.py} +3 -3
  15. criteo_api_retailmedia_preview/model/{external_line_item_page_v2.py → line_item_page_v2.py} +9 -9
  16. criteo_api_retailmedia_preview/model/page_metadata.py +1 -1
  17. criteo_api_retailmedia_preview/model/{external_preferred_line_item_create_model_v2.py → preferred_line_item_create_model_v2.py} +16 -16
  18. criteo_api_retailmedia_preview/model/{external_preferred_line_item_update_model_v2.py → preferred_line_item_update_model_v2.py} +16 -16
  19. criteo_api_retailmedia_preview/model/{external_preferred_line_item_v2.py → preferred_line_item_v2.py} +29 -35
  20. criteo_api_retailmedia_preview/model/product_button_request.py +30 -12
  21. criteo_api_retailmedia_preview/model/{product_button_list_request.py → product_button_request_list_request.py} +4 -4
  22. criteo_api_retailmedia_preview/model/{sku_search_request_slim_preview_request.py → product_button_request_request.py} +9 -9
  23. criteo_api_retailmedia_preview/model/{external_product_button_response.py → product_button_response.py} +3 -3
  24. criteo_api_retailmedia_preview/model/{product_button_list_response.py → product_button_response_list_response.py} +15 -15
  25. criteo_api_retailmedia_preview/model/resource_of_preferred_line_item_update_model_v2.py +5 -5
  26. criteo_api_retailmedia_preview/model/resource_of_preferred_line_item_v2.py +5 -5
  27. criteo_api_retailmedia_preview/model/resource_of_product_button_request.py +6 -6
  28. criteo_api_retailmedia_preview/model/resource_of_product_button_response.py +6 -6
  29. criteo_api_retailmedia_preview/model/{rm_audience_compute_sizes_entity_v1.py → rm_audience_compute_size_entity_v1.py} +3 -4
  30. criteo_api_retailmedia_preview/model/{rm_audience_compute_sizes_entity_v1_resource.py → rm_audience_compute_size_entity_v1_resource.py} +8 -8
  31. criteo_api_retailmedia_preview/model/rm_audience_compute_sizes_input_v1.py +5 -5
  32. criteo_api_retailmedia_preview/model/rm_audience_estimate_size_entity_v1.py +0 -1
  33. criteo_api_retailmedia_preview/model/rm_audience_segment_compute_size_entity_v1.py +0 -1
  34. criteo_api_retailmedia_preview/model/rm_audience_segment_estimate_size_entity_v1.py +0 -1
  35. criteo_api_retailmedia_preview/model/rm_events_create_v1.py +0 -2
  36. criteo_api_retailmedia_preview/model/rm_events_estimation_v1.py +0 -2
  37. criteo_api_retailmedia_preview/model/rm_events_update_v1.py +0 -2
  38. criteo_api_retailmedia_preview/model/sponsored_products_line_item.py +4 -4
  39. criteo_api_retailmedia_preview/model/sponsored_products_line_item_create_request_model.py +6 -6
  40. criteo_api_retailmedia_preview/model/sponsored_products_line_item_update_request_model.py +9 -9
  41. criteo_api_retailmedia_preview/models/__init__.py +13 -27
  42. {criteo_api_retailmedia_sdk-0.0.250730.dist-info → criteo_api_retailmedia_sdk-0.0.250819.dist-info}/METADATA +3 -3
  43. {criteo_api_retailmedia_sdk-0.0.250730.dist-info → criteo_api_retailmedia_sdk-0.0.250819.dist-info}/RECORD +45 -59
  44. criteo_api_retailmedia_preview/model/brand.py +0 -267
  45. criteo_api_retailmedia_preview/model/category.py +0 -267
  46. criteo_api_retailmedia_preview/model/external_product_button_request.py +0 -287
  47. criteo_api_retailmedia_preview/model/resource_of_sku_search_request_slim_preview.py +0 -277
  48. criteo_api_retailmedia_preview/model/resource_of_sku_search_request_slim_v2_preview.py +0 -277
  49. criteo_api_retailmedia_preview/model/resource_of_sku_slim_data_preview.py +0 -277
  50. criteo_api_retailmedia_preview/model/resource_of_sku_slim_data_v2.py +0 -277
  51. criteo_api_retailmedia_preview/model/sku_search_request_slim_preview.py +0 -275
  52. criteo_api_retailmedia_preview/model/sku_search_request_slim_v2_preview.py +0 -273
  53. criteo_api_retailmedia_preview/model/sku_search_request_slim_v2_preview_request.py +0 -269
  54. criteo_api_retailmedia_preview/model/sku_slim_data_preview.py +0 -347
  55. criteo_api_retailmedia_preview/model/sku_slim_data_preview_list_response.py +0 -281
  56. criteo_api_retailmedia_preview/model/sku_slim_data_v2.py +0 -321
  57. criteo_api_retailmedia_preview/model/sku_slim_data_v2_list_response.py +0 -281
  58. {criteo_api_retailmedia_sdk-0.0.250730.dist-info → criteo_api_retailmedia_sdk-0.0.250819.dist-info}/WHEEL +0 -0
  59. {criteo_api_retailmedia_sdk-0.0.250730.dist-info → criteo_api_retailmedia_sdk-0.0.250819.dist-info}/top_level.txt +0 -0
@@ -1,267 +0,0 @@
1
- """
2
- Criteo API
3
-
4
- Criteo API - RetailMedia # 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_retailmedia_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_retailmedia_preview.exceptions import ApiAttributeError
30
-
31
-
32
-
33
- class Category(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
- ('text',): {
62
- 'max_length': 1000,
63
- 'min_length': 0,
64
- },
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
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
74
-
75
- _nullable = False
76
-
77
- @cached_property
78
- def openapi_types():
79
- """
80
- This must be a method because a model may have properties that are
81
- of type self, this must run after the class is loaded
82
-
83
- Returns
84
- openapi_types (dict): The key is attribute name
85
- and the value is attribute type.
86
- """
87
- return {
88
- 'text': (str, none_type,), # noqa: E501
89
- }
90
-
91
- @cached_property
92
- def discriminator():
93
- return None
94
-
95
-
96
- attribute_map = {
97
- 'text': 'text', # noqa: E501
98
- }
99
-
100
- read_only_vars = {
101
- }
102
-
103
- _composed_schemas = {}
104
-
105
- @classmethod
106
- @convert_js_args_to_python_args
107
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
108
- """Category - a model defined in OpenAPI
109
-
110
- Keyword Args:
111
- _check_type (bool): if True, values for parameters in openapi_types
112
- will be type checked and a TypeError will be
113
- raised if the wrong type is input.
114
- Defaults to True
115
- _path_to_item (tuple/list): This is a list of keys or values to
116
- drill down to the model in received_data
117
- when deserializing a response
118
- _spec_property_naming (bool): True if the variable names in the input data
119
- are serialized names, as specified in the OpenAPI document.
120
- False if the variable names in the input data
121
- are pythonic names, e.g. snake case (default)
122
- _configuration (Configuration): the instance to use when
123
- deserializing a file_type parameter.
124
- If passed, type conversion is attempted
125
- If omitted no type conversion is done.
126
- _visited_composed_classes (tuple): This stores a tuple of
127
- classes that we have traveled through so that
128
- if we see that class again we will not use its
129
- discriminator again.
130
- When traveling through a discriminator, the
131
- composed schema that is
132
- is traveled through is added to this set.
133
- For example if Animal has a discriminator
134
- petType and we pass in "Dog", and the class Dog
135
- allOf includes Animal, we move through Animal
136
- once using the discriminator, and pick Dog.
137
- Then in Dog, we will make an instance of the
138
- Animal class but this time we won't travel
139
- through its discriminator because we passed in
140
- _visited_composed_classes = (Animal,)
141
- text (str, none_type): The full category breadcrumb in the retailers catalog.. [optional] # noqa: E501
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
- for var_name, var_value in kwargs.items():
174
- if var_name not in self.attribute_map and \
175
- self._configuration is not None and \
176
- self._configuration.discard_unknown_keys and \
177
- self.additional_properties_type is None:
178
- # discard variable.
179
- continue
180
- setattr(self, var_name, var_value)
181
- return self
182
-
183
- required_properties = set([
184
- '_data_store',
185
- '_check_type',
186
- '_spec_property_naming',
187
- '_path_to_item',
188
- '_configuration',
189
- '_visited_composed_classes',
190
- ])
191
-
192
- @convert_js_args_to_python_args
193
- def __init__(self, *args, **kwargs): # noqa: E501
194
- """Category - a model defined in OpenAPI
195
-
196
- Keyword Args:
197
- _check_type (bool): if True, values for parameters in openapi_types
198
- will be type checked and a TypeError will be
199
- raised if the wrong type is input.
200
- Defaults to True
201
- _path_to_item (tuple/list): This is a list of keys or values to
202
- drill down to the model in received_data
203
- when deserializing a response
204
- _spec_property_naming (bool): True if the variable names in the input data
205
- are serialized names, as specified in the OpenAPI document.
206
- False if the variable names in the input data
207
- are pythonic names, e.g. snake case (default)
208
- _configuration (Configuration): the instance to use when
209
- deserializing a file_type parameter.
210
- If passed, type conversion is attempted
211
- If omitted no type conversion is done.
212
- _visited_composed_classes (tuple): This stores a tuple of
213
- classes that we have traveled through so that
214
- if we see that class again we will not use its
215
- discriminator again.
216
- When traveling through a discriminator, the
217
- composed schema that is
218
- is traveled through is added to this set.
219
- For example if Animal has a discriminator
220
- petType and we pass in "Dog", and the class Dog
221
- allOf includes Animal, we move through Animal
222
- once using the discriminator, and pick Dog.
223
- Then in Dog, we will make an instance of the
224
- Animal class but this time we won't travel
225
- through its discriminator because we passed in
226
- _visited_composed_classes = (Animal,)
227
- text (str, none_type): The full category breadcrumb in the retailers catalog.. [optional] # noqa: E501
228
- """
229
-
230
- _check_type = kwargs.pop('_check_type', True)
231
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
232
- _path_to_item = kwargs.pop('_path_to_item', ())
233
- _configuration = kwargs.pop('_configuration', None)
234
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
235
-
236
- if args:
237
- for arg in args:
238
- if isinstance(arg, dict):
239
- kwargs.update(arg)
240
- else:
241
- raise ApiTypeError(
242
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
243
- args,
244
- self.__class__.__name__,
245
- ),
246
- path_to_item=_path_to_item,
247
- valid_classes=(self.__class__,),
248
- )
249
-
250
- self._data_store = {}
251
- self._check_type = _check_type
252
- self._spec_property_naming = _spec_property_naming
253
- self._path_to_item = _path_to_item
254
- self._configuration = _configuration
255
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
256
-
257
- for var_name, var_value in kwargs.items():
258
- if var_name not in self.attribute_map and \
259
- self._configuration is not None and \
260
- self._configuration.discard_unknown_keys and \
261
- self.additional_properties_type is None:
262
- # discard variable.
263
- continue
264
- setattr(self, var_name, var_value)
265
- if var_name in self.read_only_vars:
266
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
267
- f"class with read only attributes.")
@@ -1,287 +0,0 @@
1
- """
2
- Criteo API
3
-
4
- Criteo API - RetailMedia # 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_retailmedia_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_retailmedia_preview.exceptions import ApiAttributeError
30
-
31
-
32
-
33
- class ExternalProductButtonRequest(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
- @cached_property
64
- def additional_properties_type():
65
- """
66
- This must be a method because a model may have properties that are
67
- of type self, this must run after the class is loaded
68
- """
69
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
70
-
71
- _nullable = False
72
-
73
- @cached_property
74
- def openapi_types():
75
- """
76
- This must be a method because a model may have properties that are
77
- of type self, this must run after the class is loaded
78
-
79
- Returns
80
- openapi_types (dict): The key is attribute name
81
- and the value is attribute type.
82
- """
83
- return {
84
- 'background_image': (str,), # noqa: E501
85
- 'is_mandatory': (int,), # noqa: E501
86
- 'name': (str,), # noqa: E501
87
- 'skus': ([str],), # noqa: E501
88
- }
89
-
90
- @cached_property
91
- def discriminator():
92
- return None
93
-
94
-
95
- attribute_map = {
96
- 'background_image': 'backgroundImage', # noqa: E501
97
- 'is_mandatory': 'isMandatory', # noqa: E501
98
- 'name': 'name', # noqa: E501
99
- 'skus': 'skus', # noqa: E501
100
- }
101
-
102
- read_only_vars = {
103
- }
104
-
105
- _composed_schemas = {}
106
-
107
- @classmethod
108
- @convert_js_args_to_python_args
109
- def _from_openapi_data(cls, background_image, is_mandatory, name, skus, *args, **kwargs): # noqa: E501
110
- """ExternalProductButtonRequest - a model defined in OpenAPI
111
-
112
- Args:
113
- background_image (str): URL of the background image
114
- is_mandatory (int): If the Product Button is Mandatory
115
- name (str): Name of the Product Button
116
- skus ([str]): List of skus on the Product Button
117
-
118
- Keyword Args:
119
- _check_type (bool): if True, values for parameters in openapi_types
120
- will be type checked and a TypeError will be
121
- raised if the wrong type is input.
122
- Defaults to True
123
- _path_to_item (tuple/list): This is a list of keys or values to
124
- drill down to the model in received_data
125
- when deserializing a response
126
- _spec_property_naming (bool): True if the variable names in the input data
127
- are serialized names, as specified in the OpenAPI document.
128
- False if the variable names in the input data
129
- are pythonic names, e.g. snake case (default)
130
- _configuration (Configuration): the instance to use when
131
- deserializing a file_type parameter.
132
- If passed, type conversion is attempted
133
- If omitted no type conversion is done.
134
- _visited_composed_classes (tuple): This stores a tuple of
135
- classes that we have traveled through so that
136
- if we see that class again we will not use its
137
- discriminator again.
138
- When traveling through a discriminator, the
139
- composed schema that is
140
- is traveled through is added to this set.
141
- For example if Animal has a discriminator
142
- petType and we pass in "Dog", and the class Dog
143
- allOf includes Animal, we move through Animal
144
- once using the discriminator, and pick Dog.
145
- Then in Dog, we will make an instance of the
146
- Animal class but this time we won't travel
147
- through its discriminator because we passed in
148
- _visited_composed_classes = (Animal,)
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
- self.background_image = background_image
181
- self.is_mandatory = is_mandatory
182
- self.name = name
183
- self.skus = skus
184
- for var_name, var_value in kwargs.items():
185
- if var_name not in self.attribute_map and \
186
- self._configuration is not None and \
187
- self._configuration.discard_unknown_keys and \
188
- self.additional_properties_type is None:
189
- # discard variable.
190
- continue
191
- setattr(self, var_name, var_value)
192
- return self
193
-
194
- required_properties = set([
195
- '_data_store',
196
- '_check_type',
197
- '_spec_property_naming',
198
- '_path_to_item',
199
- '_configuration',
200
- '_visited_composed_classes',
201
- ])
202
-
203
- @convert_js_args_to_python_args
204
- def __init__(self, background_image, is_mandatory, name, skus, *args, **kwargs): # noqa: E501
205
- """ExternalProductButtonRequest - a model defined in OpenAPI
206
-
207
- Args:
208
- background_image (str): URL of the background image
209
- is_mandatory (int): If the Product Button is Mandatory
210
- name (str): Name of the Product Button
211
- skus ([str]): List of skus on the Product Button
212
-
213
- Keyword Args:
214
- _check_type (bool): if True, values for parameters in openapi_types
215
- will be type checked and a TypeError will be
216
- raised if the wrong type is input.
217
- Defaults to True
218
- _path_to_item (tuple/list): This is a list of keys or values to
219
- drill down to the model in received_data
220
- when deserializing a response
221
- _spec_property_naming (bool): True if the variable names in the input data
222
- are serialized names, as specified in the OpenAPI document.
223
- False if the variable names in the input data
224
- are pythonic names, e.g. snake case (default)
225
- _configuration (Configuration): the instance to use when
226
- deserializing a file_type parameter.
227
- If passed, type conversion is attempted
228
- If omitted no type conversion is done.
229
- _visited_composed_classes (tuple): This stores a tuple of
230
- classes that we have traveled through so that
231
- if we see that class again we will not use its
232
- discriminator again.
233
- When traveling through a discriminator, the
234
- composed schema that is
235
- is traveled through is added to this set.
236
- For example if Animal has a discriminator
237
- petType and we pass in "Dog", and the class Dog
238
- allOf includes Animal, we move through Animal
239
- once using the discriminator, and pick Dog.
240
- Then in Dog, we will make an instance of the
241
- Animal class but this time we won't travel
242
- through its discriminator because we passed in
243
- _visited_composed_classes = (Animal,)
244
- """
245
-
246
- _check_type = kwargs.pop('_check_type', True)
247
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
248
- _path_to_item = kwargs.pop('_path_to_item', ())
249
- _configuration = kwargs.pop('_configuration', None)
250
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
251
-
252
- if args:
253
- for arg in args:
254
- if isinstance(arg, dict):
255
- kwargs.update(arg)
256
- else:
257
- raise ApiTypeError(
258
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
259
- args,
260
- self.__class__.__name__,
261
- ),
262
- path_to_item=_path_to_item,
263
- valid_classes=(self.__class__,),
264
- )
265
-
266
- self._data_store = {}
267
- self._check_type = _check_type
268
- self._spec_property_naming = _spec_property_naming
269
- self._path_to_item = _path_to_item
270
- self._configuration = _configuration
271
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
272
-
273
- self.background_image = background_image
274
- self.is_mandatory = is_mandatory
275
- self.name = name
276
- self.skus = skus
277
- for var_name, var_value in kwargs.items():
278
- if var_name not in self.attribute_map and \
279
- self._configuration is not None and \
280
- self._configuration.discard_unknown_keys and \
281
- self.additional_properties_type is None:
282
- # discard variable.
283
- continue
284
- setattr(self, var_name, var_value)
285
- if var_name in self.read_only_vars:
286
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
287
- f"class with read only attributes.")