criteo-api-retailmedia-sdk 0.0.251015__py3-none-any.whl → 0.0.251028__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 (48) hide show
  1. criteo_api_retailmedia_preview/__init__.py +1 -1
  2. criteo_api_retailmedia_preview/api/accounts_api.py +1 -1
  3. criteo_api_retailmedia_preview/api/campaign_api.py +332 -1203
  4. criteo_api_retailmedia_preview/api/third_party_accounts_api.py +757 -0
  5. criteo_api_retailmedia_preview/api_client.py +1 -1
  6. criteo_api_retailmedia_preview/apis/__init__.py +1 -0
  7. criteo_api_retailmedia_preview/configuration.py +1 -1
  8. criteo_api_retailmedia_preview/model/{set_bid_model.py → display_auction_min_bid_request.py} +17 -14
  9. criteo_api_retailmedia_preview/model/{keywords_model.py → display_auction_min_bid_result.py} +30 -16
  10. criteo_api_retailmedia_preview/model/{entity_resource_line_item_keyword_review_report.py → entity_resource_of_retail_media_account_v2.py} +9 -9
  11. criteo_api_retailmedia_preview/model/{value_resource_outcome_retail_media_keywords_review_result.py → entity_resource_outcome_of_retail_media_account_v2.py} +8 -8
  12. criteo_api_retailmedia_preview/model/external_retail_media_account_v2.py +301 -0
  13. criteo_api_retailmedia_preview/model/{add_remove_keyword_model.py → external_retail_media_brand_account_creation_v2.py} +19 -24
  14. criteo_api_retailmedia_preview/model/{set_bids_model.py → external_retail_media_brands.py} +16 -15
  15. criteo_api_retailmedia_preview/model/{seller_identifier_v2.py → external_retail_media_seller.py} +10 -16
  16. criteo_api_retailmedia_preview/model/{retail_media_keywords_review.py → external_retail_media_seller_account_creation_v2.py} +25 -16
  17. criteo_api_retailmedia_preview/model/{value_resource_input_retail_media_keywords_review.py → value_resource_collection_input_of_retail_media_seller.py} +8 -8
  18. criteo_api_retailmedia_preview/model/{entity_resource_collection_outcome_line_item_keyword_review_report_and_metadata.py → value_resource_collection_outcome_display_auction_min_bid_result.py} +8 -14
  19. criteo_api_retailmedia_preview/model/{resource_outcome.py → value_resource_collection_outcome_of_retail_media_seller.py} +17 -11
  20. criteo_api_retailmedia_preview/model/{keywords_model_resource.py → value_resource_display_auction_min_bid_request.py} +11 -15
  21. criteo_api_retailmedia_preview/model/{set_bids_model_resource.py → value_resource_display_auction_min_bid_result.py} +10 -14
  22. criteo_api_retailmedia_preview/model/{add_remove_keywords_model_request.py → value_resource_input_display_auction_min_bid_request.py} +8 -8
  23. criteo_api_retailmedia_preview/model/{add_remove_keywords_model.py → value_resource_input_of_retail_media_brand_account_creation_v2.py} +9 -9
  24. criteo_api_retailmedia_preview/model/{set_bids_model_request.py → value_resource_input_of_retail_media_brands.py} +8 -8
  25. criteo_api_retailmedia_preview/model/value_resource_input_of_retail_media_seller_account_creation_v2.py +262 -0
  26. criteo_api_retailmedia_preview/model/{add_remove_keywords_model_resource.py → value_resource_of_retail_media_brand_account_creation_v2.py} +10 -14
  27. criteo_api_retailmedia_preview/model/{value_resource_retail_media_keywords_review_result.py → value_resource_of_retail_media_brands.py} +8 -8
  28. criteo_api_retailmedia_preview/model/{value_resource_retail_media_keywords_review.py → value_resource_of_retail_media_seller.py} +8 -8
  29. criteo_api_retailmedia_preview/model/value_resource_of_retail_media_seller_account_creation_v2.py +266 -0
  30. criteo_api_retailmedia_preview/model/{keywords_model_response.py → value_resource_outcome_of_retail_media_brands.py} +16 -16
  31. criteo_api_retailmedia_preview/models/__init__.py +23 -33
  32. {criteo_api_retailmedia_sdk-0.0.251015.dist-info → criteo_api_retailmedia_sdk-0.0.251028.dist-info}/METADATA +3 -3
  33. {criteo_api_retailmedia_sdk-0.0.251015.dist-info → criteo_api_retailmedia_sdk-0.0.251028.dist-info}/RECORD +35 -44
  34. criteo_api_retailmedia_preview/model/brand_catalog_request_v2.py +0 -284
  35. criteo_api_retailmedia_preview/model/input_keywords_model.py +0 -265
  36. criteo_api_retailmedia_preview/model/keyword_data_model.py +0 -286
  37. criteo_api_retailmedia_preview/model/line_item_keyword_review_report.py +0 -311
  38. criteo_api_retailmedia_preview/model/match_type_model.py +0 -291
  39. criteo_api_retailmedia_preview/model/retail_media_keywords_review_result.py +0 -271
  40. criteo_api_retailmedia_preview/model/review_set_state.py +0 -278
  41. criteo_api_retailmedia_preview/model/review_state_model.py +0 -294
  42. criteo_api_retailmedia_preview/model/seller_catalog_request_v2.py +0 -286
  43. criteo_api_retailmedia_preview/model/value_resource_input_of_brand_catalog_request_v2.py +0 -269
  44. criteo_api_retailmedia_preview/model/value_resource_input_of_seller_catalog_request_v2.py +0 -269
  45. criteo_api_retailmedia_preview/model/value_resource_of_brand_catalog_request_v2.py +0 -273
  46. criteo_api_retailmedia_preview/model/value_resource_of_seller_catalog_request_v2.py +0 -273
  47. {criteo_api_retailmedia_sdk-0.0.251015.dist-info → criteo_api_retailmedia_sdk-0.0.251028.dist-info}/WHEEL +0 -0
  48. {criteo_api_retailmedia_sdk-0.0.251015.dist-info → criteo_api_retailmedia_sdk-0.0.251028.dist-info}/top_level.txt +0 -0
@@ -1,278 +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 ReviewSetState(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
- ('review_state',): {
59
- 'UNKNOWN': "Unknown",
60
- 'INREVIEW': "InReview",
61
- 'RECOMMENDED': "Recommended",
62
- 'APPROVED': "Approved",
63
- 'AUTOAPPROVED': "AutoApproved",
64
- 'REJECTED': "Rejected",
65
- 'AUTOREJECTED': "AutoRejected",
66
- },
67
- }
68
-
69
- validations = {
70
- }
71
-
72
- additional_properties_type = None
73
-
74
- _nullable = False
75
-
76
- @cached_property
77
- def openapi_types():
78
- """
79
- This must be a method because a model may have properties that are
80
- of type self, this must run after the class is loaded
81
-
82
- Returns
83
- openapi_types (dict): The key is attribute name
84
- and the value is attribute type.
85
- """
86
- return {
87
- 'phrase': (str,), # noqa: E501
88
- 'review_state': (str,), # noqa: E501
89
- }
90
-
91
- @cached_property
92
- def discriminator():
93
- return None
94
-
95
-
96
- attribute_map = {
97
- 'phrase': 'phrase', # noqa: E501
98
- 'review_state': 'reviewState', # noqa: E501
99
- }
100
-
101
- read_only_vars = {
102
- }
103
-
104
- _composed_schemas = {}
105
-
106
- @classmethod
107
- @convert_js_args_to_python_args
108
- def _from_openapi_data(cls, phrase, review_state, *args, **kwargs): # noqa: E501
109
- """ReviewSetState - a model defined in OpenAPI
110
-
111
- Args:
112
- phrase (str): Normalized key phrase for keyword review to update
113
- review_state (str): Keyword review state to set for a phrase
114
-
115
- Keyword Args:
116
- _check_type (bool): if True, values for parameters in openapi_types
117
- will be type checked and a TypeError will be
118
- raised if the wrong type is input.
119
- Defaults to True
120
- _path_to_item (tuple/list): This is a list of keys or values to
121
- drill down to the model in received_data
122
- when deserializing a response
123
- _spec_property_naming (bool): True if the variable names in the input data
124
- are serialized names, as specified in the OpenAPI document.
125
- False if the variable names in the input data
126
- are pythonic names, e.g. snake case (default)
127
- _configuration (Configuration): the instance to use when
128
- deserializing a file_type parameter.
129
- If passed, type conversion is attempted
130
- If omitted no type conversion is done.
131
- _visited_composed_classes (tuple): This stores a tuple of
132
- classes that we have traveled through so that
133
- if we see that class again we will not use its
134
- discriminator again.
135
- When traveling through a discriminator, the
136
- composed schema that is
137
- is traveled through is added to this set.
138
- For example if Animal has a discriminator
139
- petType and we pass in "Dog", and the class Dog
140
- allOf includes Animal, we move through Animal
141
- once using the discriminator, and pick Dog.
142
- Then in Dog, we will make an instance of the
143
- Animal class but this time we won't travel
144
- through its discriminator because we passed in
145
- _visited_composed_classes = (Animal,)
146
- """
147
-
148
- _check_type = kwargs.pop('_check_type', True)
149
- _spec_property_naming = kwargs.pop('_spec_property_naming', True)
150
- _path_to_item = kwargs.pop('_path_to_item', ())
151
- _configuration = kwargs.pop('_configuration', None)
152
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
153
-
154
- self = super(OpenApiModel, cls).__new__(cls)
155
-
156
- if args:
157
- for arg in args:
158
- if isinstance(arg, dict):
159
- kwargs.update(arg)
160
- else:
161
- raise ApiTypeError(
162
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
163
- args,
164
- self.__class__.__name__,
165
- ),
166
- path_to_item=_path_to_item,
167
- valid_classes=(self.__class__,),
168
- )
169
-
170
- self._data_store = {}
171
- self._check_type = _check_type
172
- self._spec_property_naming = _spec_property_naming
173
- self._path_to_item = _path_to_item
174
- self._configuration = _configuration
175
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
176
-
177
- self.phrase = phrase
178
- self.review_state = review_state
179
- for var_name, var_value in kwargs.items():
180
- if var_name not in self.attribute_map and \
181
- self._configuration is not None and \
182
- self._configuration.discard_unknown_keys and \
183
- self.additional_properties_type is None:
184
- # discard variable.
185
- continue
186
- setattr(self, var_name, var_value)
187
- return self
188
-
189
- required_properties = set([
190
- '_data_store',
191
- '_check_type',
192
- '_spec_property_naming',
193
- '_path_to_item',
194
- '_configuration',
195
- '_visited_composed_classes',
196
- ])
197
-
198
- @convert_js_args_to_python_args
199
- def __init__(self, phrase, review_state, *args, **kwargs): # noqa: E501
200
- """ReviewSetState - a model defined in OpenAPI
201
-
202
- Args:
203
- phrase (str): Normalized key phrase for keyword review to update
204
- review_state (str): Keyword review state to set for a phrase
205
-
206
- Keyword Args:
207
- _check_type (bool): if True, values for parameters in openapi_types
208
- will be type checked and a TypeError will be
209
- raised if the wrong type is input.
210
- Defaults to True
211
- _path_to_item (tuple/list): This is a list of keys or values to
212
- drill down to the model in received_data
213
- when deserializing a response
214
- _spec_property_naming (bool): True if the variable names in the input data
215
- are serialized names, as specified in the OpenAPI document.
216
- False if the variable names in the input data
217
- are pythonic names, e.g. snake case (default)
218
- _configuration (Configuration): the instance to use when
219
- deserializing a file_type parameter.
220
- If passed, type conversion is attempted
221
- If omitted no type conversion is done.
222
- _visited_composed_classes (tuple): This stores a tuple of
223
- classes that we have traveled through so that
224
- if we see that class again we will not use its
225
- discriminator again.
226
- When traveling through a discriminator, the
227
- composed schema that is
228
- is traveled through is added to this set.
229
- For example if Animal has a discriminator
230
- petType and we pass in "Dog", and the class Dog
231
- allOf includes Animal, we move through Animal
232
- once using the discriminator, and pick Dog.
233
- Then in Dog, we will make an instance of the
234
- Animal class but this time we won't travel
235
- through its discriminator because we passed in
236
- _visited_composed_classes = (Animal,)
237
- """
238
-
239
- _check_type = kwargs.pop('_check_type', True)
240
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
241
- _path_to_item = kwargs.pop('_path_to_item', ())
242
- _configuration = kwargs.pop('_configuration', None)
243
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
244
-
245
- if args:
246
- for arg in args:
247
- if isinstance(arg, dict):
248
- kwargs.update(arg)
249
- else:
250
- raise ApiTypeError(
251
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
252
- args,
253
- self.__class__.__name__,
254
- ),
255
- path_to_item=_path_to_item,
256
- valid_classes=(self.__class__,),
257
- )
258
-
259
- self._data_store = {}
260
- self._check_type = _check_type
261
- self._spec_property_naming = _spec_property_naming
262
- self._path_to_item = _path_to_item
263
- self._configuration = _configuration
264
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
265
-
266
- self.phrase = phrase
267
- self.review_state = review_state
268
- for var_name, var_value in kwargs.items():
269
- if var_name not in self.attribute_map and \
270
- self._configuration is not None and \
271
- self._configuration.discard_unknown_keys and \
272
- self.additional_properties_type is None:
273
- # discard variable.
274
- continue
275
- setattr(self, var_name, var_value)
276
- if var_name in self.read_only_vars:
277
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
278
- f"class with read only attributes.")
@@ -1,294 +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 ReviewStateModel(ModelSimple):
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
- validations (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
- that stores validations for max_length, min_length, max_items,
47
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
48
- inclusive_minimum, and regex.
49
- additional_properties_type (tuple): A tuple of classes accepted
50
- as additional properties values.
51
- """
52
-
53
- allowed_values = {
54
- ('value',): {
55
- 'INREVIEW': "InReview",
56
- 'RECOMMENDED': "Recommended",
57
- 'APPROVED': "Approved",
58
- 'AUTOAPPROVED': "AutoApproved",
59
- 'REJECTED': "Rejected",
60
- 'AUTOREJECTED': "AutoRejected",
61
- },
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
- return {
82
- 'value': (str,),
83
- }
84
-
85
- @cached_property
86
- def discriminator():
87
- return None
88
-
89
-
90
- attribute_map = {}
91
-
92
- read_only_vars = set()
93
-
94
- _composed_schemas = None
95
-
96
- required_properties = set([
97
- '_data_store',
98
- '_check_type',
99
- '_spec_property_naming',
100
- '_path_to_item',
101
- '_configuration',
102
- '_visited_composed_classes',
103
- ])
104
-
105
- @convert_js_args_to_python_args
106
- def __init__(self, *args, **kwargs):
107
- """ReviewStateModel - a model defined in OpenAPI
108
-
109
- Note that value can be passed either in args or in kwargs, but not in both.
110
-
111
- Args:
112
- args[0] (str): The state of a keyword in the context of a line item.., must be one of ["InReview", "Recommended", "Approved", "AutoApproved", "Rejected", "AutoRejected", ] # noqa: E501
113
-
114
- Keyword Args:
115
- value (str): The state of a keyword in the context of a line item.., must be one of ["InReview", "Recommended", "Approved", "AutoApproved", "Rejected", "AutoRejected", ] # noqa: E501
116
- _check_type (bool): if True, values for parameters in openapi_types
117
- will be type checked and a TypeError will be
118
- raised if the wrong type is input.
119
- Defaults to True
120
- _path_to_item (tuple/list): This is a list of keys or values to
121
- drill down to the model in received_data
122
- when deserializing a response
123
- _spec_property_naming (bool): True if the variable names in the input data
124
- are serialized names, as specified in the OpenAPI document.
125
- False if the variable names in the input data
126
- are pythonic names, e.g. snake case (default)
127
- _configuration (Configuration): the instance to use when
128
- deserializing a file_type parameter.
129
- If passed, type conversion is attempted
130
- If omitted no type conversion is done.
131
- _visited_composed_classes (tuple): This stores a tuple of
132
- classes that we have traveled through so that
133
- if we see that class again we will not use its
134
- discriminator again.
135
- When traveling through a discriminator, the
136
- composed schema that is
137
- is traveled through is added to this set.
138
- For example if Animal has a discriminator
139
- petType and we pass in "Dog", and the class Dog
140
- allOf includes Animal, we move through Animal
141
- once using the discriminator, and pick Dog.
142
- Then in Dog, we will make an instance of the
143
- Animal class but this time we won't travel
144
- through its discriminator because we passed in
145
- _visited_composed_classes = (Animal,)
146
- """
147
- # required up here when default value is not given
148
- _path_to_item = kwargs.pop('_path_to_item', ())
149
-
150
- if 'value' in kwargs:
151
- value = kwargs.pop('value')
152
- elif args:
153
- args = list(args)
154
- value = args.pop(0)
155
- else:
156
- raise ApiTypeError(
157
- "value is required, but not passed in args or kwargs and doesn't have default",
158
- path_to_item=_path_to_item,
159
- valid_classes=(self.__class__,),
160
- )
161
-
162
- _check_type = kwargs.pop('_check_type', True)
163
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
164
- _configuration = kwargs.pop('_configuration', None)
165
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
166
-
167
- if args:
168
- for arg in args:
169
- if isinstance(arg, dict):
170
- kwargs.update(arg)
171
- else:
172
- raise ApiTypeError(
173
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
174
- args,
175
- self.__class__.__name__,
176
- ),
177
- path_to_item=_path_to_item,
178
- valid_classes=(self.__class__,),
179
- )
180
-
181
- self._data_store = {}
182
- self._check_type = _check_type
183
- self._spec_property_naming = _spec_property_naming
184
- self._path_to_item = _path_to_item
185
- self._configuration = _configuration
186
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
187
- self.value = value
188
- if kwargs:
189
- raise ApiTypeError(
190
- "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
191
- kwargs,
192
- self.__class__.__name__,
193
- ),
194
- path_to_item=_path_to_item,
195
- valid_classes=(self.__class__,),
196
- )
197
-
198
- @classmethod
199
- @convert_js_args_to_python_args
200
- def _from_openapi_data(cls, *args, **kwargs):
201
- """ReviewStateModel - a model defined in OpenAPI
202
-
203
- Note that value can be passed either in args or in kwargs, but not in both.
204
-
205
- Args:
206
- args[0] (str): The state of a keyword in the context of a line item.., must be one of ["InReview", "Recommended", "Approved", "AutoApproved", "Rejected", "AutoRejected", ] # noqa: E501
207
-
208
- Keyword Args:
209
- value (str): The state of a keyword in the context of a line item.., must be one of ["InReview", "Recommended", "Approved", "AutoApproved", "Rejected", "AutoRejected", ] # noqa: E501
210
- _check_type (bool): if True, values for parameters in openapi_types
211
- will be type checked and a TypeError will be
212
- raised if the wrong type is input.
213
- Defaults to True
214
- _path_to_item (tuple/list): This is a list of keys or values to
215
- drill down to the model in received_data
216
- when deserializing a response
217
- _spec_property_naming (bool): True if the variable names in the input data
218
- are serialized names, as specified in the OpenAPI document.
219
- False if the variable names in the input data
220
- are pythonic names, e.g. snake case (default)
221
- _configuration (Configuration): the instance to use when
222
- deserializing a file_type parameter.
223
- If passed, type conversion is attempted
224
- If omitted no type conversion is done.
225
- _visited_composed_classes (tuple): This stores a tuple of
226
- classes that we have traveled through so that
227
- if we see that class again we will not use its
228
- discriminator again.
229
- When traveling through a discriminator, the
230
- composed schema that is
231
- is traveled through is added to this set.
232
- For example if Animal has a discriminator
233
- petType and we pass in "Dog", and the class Dog
234
- allOf includes Animal, we move through Animal
235
- once using the discriminator, and pick Dog.
236
- Then in Dog, we will make an instance of the
237
- Animal class but this time we won't travel
238
- through its discriminator because we passed in
239
- _visited_composed_classes = (Animal,)
240
- """
241
- # required up here when default value is not given
242
- _path_to_item = kwargs.pop('_path_to_item', ())
243
-
244
- self = super(OpenApiModel, cls).__new__(cls)
245
-
246
- if 'value' in kwargs:
247
- value = kwargs.pop('value')
248
- elif args:
249
- args = list(args)
250
- value = args.pop(0)
251
- else:
252
- raise ApiTypeError(
253
- "value is required, but not passed in args or kwargs and doesn't have default",
254
- path_to_item=_path_to_item,
255
- valid_classes=(self.__class__,),
256
- )
257
-
258
- _check_type = kwargs.pop('_check_type', True)
259
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
260
- _configuration = kwargs.pop('_configuration', None)
261
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
262
-
263
- if args:
264
- for arg in args:
265
- if isinstance(arg, dict):
266
- kwargs.update(arg)
267
- else:
268
- raise ApiTypeError(
269
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
270
- args,
271
- self.__class__.__name__,
272
- ),
273
- path_to_item=_path_to_item,
274
- valid_classes=(self.__class__,),
275
- )
276
-
277
- self._data_store = {}
278
- self._check_type = _check_type
279
- self._spec_property_naming = _spec_property_naming
280
- self._path_to_item = _path_to_item
281
- self._configuration = _configuration
282
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
283
- self.value = value
284
- if kwargs:
285
- raise ApiTypeError(
286
- "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
287
- kwargs,
288
- self.__class__.__name__,
289
- ),
290
- path_to_item=_path_to_item,
291
- valid_classes=(self.__class__,),
292
- )
293
-
294
- return self