criteo-api-retailmedia-sdk 2024.7.0.240808__py3-none-any.whl → 2024.7.0.250129__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 (68) hide show
  1. {criteo_api_retailmedia_sdk-2024.7.0.240808.dist-info → criteo_api_retailmedia_sdk-2024.7.0.250129.dist-info}/METADATA +14 -5
  2. {criteo_api_retailmedia_sdk-2024.7.0.240808.dist-info → criteo_api_retailmedia_sdk-2024.7.0.250129.dist-info}/RECORD +65 -68
  3. {criteo_api_retailmedia_sdk-2024.7.0.240808.dist-info → criteo_api_retailmedia_sdk-2024.7.0.250129.dist-info}/WHEEL +1 -1
  4. criteo_api_retailmedia_v2024_07/__init__.py +1 -1
  5. criteo_api_retailmedia_v2024_07/api/accounts_api.py +30 -41
  6. criteo_api_retailmedia_v2024_07/api/analytics_api.py +3 -3
  7. criteo_api_retailmedia_v2024_07/api/campaign_api.py +21 -278
  8. criteo_api_retailmedia_v2024_07/api_client.py +1 -1
  9. criteo_api_retailmedia_v2024_07/configuration.py +1 -1
  10. criteo_api_retailmedia_v2024_07/model/async_campaigns_report.py +40 -0
  11. criteo_api_retailmedia_v2024_07/model/async_line_items_report.py +40 -0
  12. criteo_api_retailmedia_v2024_07/model/async_revenue_report.py +29 -2
  13. criteo_api_retailmedia_v2024_07/model/balance_response_v2_response.py +1 -1
  14. criteo_api_retailmedia_v2024_07/model/campaign_attributes_v202301.py +4 -0
  15. criteo_api_retailmedia_v2024_07/model/campaign_v202301.py +4 -0
  16. criteo_api_retailmedia_v2024_07/model/change_details_v1.py +8 -18
  17. criteo_api_retailmedia_v2024_07/model/choice_option.py +1 -8
  18. criteo_api_retailmedia_v2024_07/model/choice_variable_specification.py +1 -8
  19. criteo_api_retailmedia_v2024_07/model/choice_variable_value.py +1 -7
  20. criteo_api_retailmedia_v2024_07/model/color_variable_value.py +7 -19
  21. criteo_api_retailmedia_v2024_07/model/creative202110.py +7 -13
  22. criteo_api_retailmedia_v2024_07/model/creative202110_list_response.py +13 -20
  23. criteo_api_retailmedia_v2024_07/model/creative202210.py +12 -19
  24. criteo_api_retailmedia_v2024_07/model/creative202210_list_response.py +13 -20
  25. criteo_api_retailmedia_v2024_07/model/creative202210_response.py +10 -17
  26. criteo_api_retailmedia_v2024_07/model/creative_create_model202207.py +4 -11
  27. criteo_api_retailmedia_v2024_07/model/creative_update_model202207.py +4 -11
  28. criteo_api_retailmedia_v2024_07/model/editable_campaign_attributes_v202301.py +4 -0
  29. criteo_api_retailmedia_v2024_07/model/{proposal_status_model_resource.py → entity_resource_of_retail_media_account.py} +17 -10
  30. criteo_api_retailmedia_v2024_07/model/{proposal_status_model_response.py → entity_resource_outcome_of_retail_media_account.py} +28 -21
  31. criteo_api_retailmedia_v2024_07/model/external_account.py +4 -0
  32. criteo_api_retailmedia_v2024_07/model/{retail_media_account.py → external_retail_media_account.py} +31 -21
  33. criteo_api_retailmedia_v2024_07/model/{retail_media_brand_account_creation.py → external_retail_media_brand_account_creation.py} +20 -10
  34. criteo_api_retailmedia_v2024_07/model/{retail_media_brands.py → external_retail_media_brands.py} +13 -7
  35. criteo_api_retailmedia_v2024_07/model/{retail_media_seller.py → external_retail_media_seller.py} +17 -11
  36. criteo_api_retailmedia_v2024_07/model/{retail_media_seller_account_creation.py → external_retail_media_seller_account_creation.py} +25 -14
  37. criteo_api_retailmedia_v2024_07/model/files_variable_value.py +2 -7
  38. criteo_api_retailmedia_v2024_07/model/files_variables_specification.py +7 -15
  39. criteo_api_retailmedia_v2024_07/model/hyperlink_variable_value.py +7 -19
  40. criteo_api_retailmedia_v2024_07/model/{page_type_environment.py → page_type_environment202210.py} +12 -16
  41. criteo_api_retailmedia_v2024_07/model/resource_of_creative202110.py +6 -13
  42. criteo_api_retailmedia_v2024_07/model/resource_of_creative202210.py +2 -9
  43. criteo_api_retailmedia_v2024_07/model/resource_of_template.py +2 -9
  44. criteo_api_retailmedia_v2024_07/model/rm_legacy_audience_get_entity_v1_resource.py +4 -4
  45. criteo_api_retailmedia_v2024_07/model/section.py +12 -17
  46. criteo_api_retailmedia_v2024_07/model/template.py +13 -24
  47. criteo_api_retailmedia_v2024_07/model/template_list_response.py +13 -20
  48. criteo_api_retailmedia_v2024_07/model/template_response.py +10 -17
  49. criteo_api_retailmedia_v2024_07/model/template_variable.py +1 -8
  50. criteo_api_retailmedia_v2024_07/model/template_variable_value.py +7 -8
  51. criteo_api_retailmedia_v2024_07/model/text_variable_specification.py +2 -8
  52. criteo_api_retailmedia_v2024_07/model/text_variable_value.py +7 -19
  53. criteo_api_retailmedia_v2024_07/model/value_resource_collection_input_of_retail_media_seller.py +12 -5
  54. criteo_api_retailmedia_v2024_07/model/value_resource_collection_outcome_of_retail_media_seller.py +9 -2
  55. criteo_api_retailmedia_v2024_07/model/value_resource_input_of_retail_media_brand_account_creation.py +8 -1
  56. criteo_api_retailmedia_v2024_07/model/value_resource_input_of_retail_media_brands.py +9 -2
  57. criteo_api_retailmedia_v2024_07/model/value_resource_input_of_retail_media_seller_account_creation.py +9 -2
  58. criteo_api_retailmedia_v2024_07/model/value_resource_of_retail_media_brand_account_creation.py +13 -6
  59. criteo_api_retailmedia_v2024_07/model/value_resource_of_retail_media_brands.py +14 -7
  60. criteo_api_retailmedia_v2024_07/model/value_resource_of_retail_media_seller.py +14 -7
  61. criteo_api_retailmedia_v2024_07/model/value_resource_of_retail_media_seller_account_creation.py +14 -7
  62. criteo_api_retailmedia_v2024_07/model/{resource_outcome_of_retail_media_account.py → value_resource_outcome_of_retail_media_brands.py} +17 -10
  63. criteo_api_retailmedia_v2024_07/model/{resource_of_retail_media_account.py → video_variable_value.py} +39 -22
  64. criteo_api_retailmedia_v2024_07/models/__init__.py +10 -13
  65. criteo_api_retailmedia_v2024_07/model/approval_status_model.py +0 -292
  66. criteo_api_retailmedia_v2024_07/model/negotiation_state_model.py +0 -293
  67. criteo_api_retailmedia_v2024_07/model/proposal_status_model.py +0 -284
  68. {criteo_api_retailmedia_sdk-2024.7.0.240808.dist-info → criteo_api_retailmedia_sdk-2024.7.0.250129.dist-info}/top_level.txt +0 -0
@@ -1,292 +0,0 @@
1
- """
2
- Criteo API
3
-
4
- Criteo API - RetailMedia # noqa: E501
5
-
6
- The version of the OpenAPI document: 2024-07
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_v2024_07.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_v2024_07.exceptions import ApiAttributeError
30
-
31
-
32
-
33
- class ApprovalStatusModel(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
- 'NOTSUBMITTED': "NotSubmitted",
56
- 'SUBMITTED': "Submitted",
57
- 'REJECTED': "Rejected",
58
- 'APPROVED': "Approved",
59
- },
60
- }
61
-
62
- validations = {
63
- }
64
-
65
- additional_properties_type = None
66
-
67
- _nullable = False
68
-
69
- @cached_property
70
- def openapi_types():
71
- """
72
- This must be a method because a model may have properties that are
73
- of type self, this must run after the class is loaded
74
-
75
- Returns
76
- openapi_types (dict): The key is attribute name
77
- and the value is attribute type.
78
- """
79
- return {
80
- 'value': (str,),
81
- }
82
-
83
- @cached_property
84
- def discriminator():
85
- return None
86
-
87
-
88
- attribute_map = {}
89
-
90
- read_only_vars = set()
91
-
92
- _composed_schemas = None
93
-
94
- required_properties = set([
95
- '_data_store',
96
- '_check_type',
97
- '_spec_property_naming',
98
- '_path_to_item',
99
- '_configuration',
100
- '_visited_composed_classes',
101
- ])
102
-
103
- @convert_js_args_to_python_args
104
- def __init__(self, *args, **kwargs):
105
- """ApprovalStatusModel - a model defined in OpenAPI
106
-
107
- Note that value can be passed either in args or in kwargs, but not in both.
108
-
109
- Args:
110
- args[0] (str): The status of a booking or runnable in the context of a line item.., must be one of ["NotSubmitted", "Submitted", "Rejected", "Approved", ] # noqa: E501
111
-
112
- Keyword Args:
113
- value (str): The status of a booking or runnable in the context of a line item.., must be one of ["NotSubmitted", "Submitted", "Rejected", "Approved", ] # noqa: E501
114
- _check_type (bool): if True, values for parameters in openapi_types
115
- will be type checked and a TypeError will be
116
- raised if the wrong type is input.
117
- Defaults to True
118
- _path_to_item (tuple/list): This is a list of keys or values to
119
- drill down to the model in received_data
120
- when deserializing a response
121
- _spec_property_naming (bool): True if the variable names in the input data
122
- are serialized names, as specified in the OpenAPI document.
123
- False if the variable names in the input data
124
- are pythonic names, e.g. snake case (default)
125
- _configuration (Configuration): the instance to use when
126
- deserializing a file_type parameter.
127
- If passed, type conversion is attempted
128
- If omitted no type conversion is done.
129
- _visited_composed_classes (tuple): This stores a tuple of
130
- classes that we have traveled through so that
131
- if we see that class again we will not use its
132
- discriminator again.
133
- When traveling through a discriminator, the
134
- composed schema that is
135
- is traveled through is added to this set.
136
- For example if Animal has a discriminator
137
- petType and we pass in "Dog", and the class Dog
138
- allOf includes Animal, we move through Animal
139
- once using the discriminator, and pick Dog.
140
- Then in Dog, we will make an instance of the
141
- Animal class but this time we won't travel
142
- through its discriminator because we passed in
143
- _visited_composed_classes = (Animal,)
144
- """
145
- # required up here when default value is not given
146
- _path_to_item = kwargs.pop('_path_to_item', ())
147
-
148
- if 'value' in kwargs:
149
- value = kwargs.pop('value')
150
- elif args:
151
- args = list(args)
152
- value = args.pop(0)
153
- else:
154
- raise ApiTypeError(
155
- "value is required, but not passed in args or kwargs and doesn't have default",
156
- path_to_item=_path_to_item,
157
- valid_classes=(self.__class__,),
158
- )
159
-
160
- _check_type = kwargs.pop('_check_type', True)
161
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
162
- _configuration = kwargs.pop('_configuration', None)
163
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
164
-
165
- if args:
166
- for arg in args:
167
- if isinstance(arg, dict):
168
- kwargs.update(arg)
169
- else:
170
- raise ApiTypeError(
171
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
172
- args,
173
- self.__class__.__name__,
174
- ),
175
- path_to_item=_path_to_item,
176
- valid_classes=(self.__class__,),
177
- )
178
-
179
- self._data_store = {}
180
- self._check_type = _check_type
181
- self._spec_property_naming = _spec_property_naming
182
- self._path_to_item = _path_to_item
183
- self._configuration = _configuration
184
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
185
- self.value = value
186
- if kwargs:
187
- raise ApiTypeError(
188
- "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
189
- kwargs,
190
- self.__class__.__name__,
191
- ),
192
- path_to_item=_path_to_item,
193
- valid_classes=(self.__class__,),
194
- )
195
-
196
- @classmethod
197
- @convert_js_args_to_python_args
198
- def _from_openapi_data(cls, *args, **kwargs):
199
- """ApprovalStatusModel - a model defined in OpenAPI
200
-
201
- Note that value can be passed either in args or in kwargs, but not in both.
202
-
203
- Args:
204
- args[0] (str): The status of a booking or runnable in the context of a line item.., must be one of ["NotSubmitted", "Submitted", "Rejected", "Approved", ] # noqa: E501
205
-
206
- Keyword Args:
207
- value (str): The status of a booking or runnable in the context of a line item.., must be one of ["NotSubmitted", "Submitted", "Rejected", "Approved", ] # noqa: E501
208
- _check_type (bool): if True, values for parameters in openapi_types
209
- will be type checked and a TypeError will be
210
- raised if the wrong type is input.
211
- Defaults to True
212
- _path_to_item (tuple/list): This is a list of keys or values to
213
- drill down to the model in received_data
214
- when deserializing a response
215
- _spec_property_naming (bool): True if the variable names in the input data
216
- are serialized names, as specified in the OpenAPI document.
217
- False if the variable names in the input data
218
- are pythonic names, e.g. snake case (default)
219
- _configuration (Configuration): the instance to use when
220
- deserializing a file_type parameter.
221
- If passed, type conversion is attempted
222
- If omitted no type conversion is done.
223
- _visited_composed_classes (tuple): This stores a tuple of
224
- classes that we have traveled through so that
225
- if we see that class again we will not use its
226
- discriminator again.
227
- When traveling through a discriminator, the
228
- composed schema that is
229
- is traveled through is added to this set.
230
- For example if Animal has a discriminator
231
- petType and we pass in "Dog", and the class Dog
232
- allOf includes Animal, we move through Animal
233
- once using the discriminator, and pick Dog.
234
- Then in Dog, we will make an instance of the
235
- Animal class but this time we won't travel
236
- through its discriminator because we passed in
237
- _visited_composed_classes = (Animal,)
238
- """
239
- # required up here when default value is not given
240
- _path_to_item = kwargs.pop('_path_to_item', ())
241
-
242
- self = super(OpenApiModel, cls).__new__(cls)
243
-
244
- if 'value' in kwargs:
245
- value = kwargs.pop('value')
246
- elif args:
247
- args = list(args)
248
- value = args.pop(0)
249
- else:
250
- raise ApiTypeError(
251
- "value is required, but not passed in args or kwargs and doesn't have default",
252
- path_to_item=_path_to_item,
253
- valid_classes=(self.__class__,),
254
- )
255
-
256
- _check_type = kwargs.pop('_check_type', True)
257
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
258
- _configuration = kwargs.pop('_configuration', None)
259
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
260
-
261
- if args:
262
- for arg in args:
263
- if isinstance(arg, dict):
264
- kwargs.update(arg)
265
- else:
266
- raise ApiTypeError(
267
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
268
- args,
269
- self.__class__.__name__,
270
- ),
271
- path_to_item=_path_to_item,
272
- valid_classes=(self.__class__,),
273
- )
274
-
275
- self._data_store = {}
276
- self._check_type = _check_type
277
- self._spec_property_naming = _spec_property_naming
278
- self._path_to_item = _path_to_item
279
- self._configuration = _configuration
280
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
281
- self.value = value
282
- if kwargs:
283
- raise ApiTypeError(
284
- "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
285
- kwargs,
286
- self.__class__.__name__,
287
- ),
288
- path_to_item=_path_to_item,
289
- valid_classes=(self.__class__,),
290
- )
291
-
292
- return self
@@ -1,293 +0,0 @@
1
- """
2
- Criteo API
3
-
4
- Criteo API - RetailMedia # noqa: E501
5
-
6
- The version of the OpenAPI document: 2024-07
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_v2024_07.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_v2024_07.exceptions import ApiAttributeError
30
-
31
-
32
-
33
- class NegotiationStateModel(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
- 'INVALID': "Invalid",
56
- 'MODIFIED': "Modified",
57
- 'SUBMITTED': "Submitted",
58
- 'REVIEWED': "Reviewed",
59
- 'APPROVED': "Approved",
60
- },
61
- }
62
-
63
- validations = {
64
- }
65
-
66
- additional_properties_type = None
67
-
68
- _nullable = False
69
-
70
- @cached_property
71
- def openapi_types():
72
- """
73
- This must be a method because a model may have properties that are
74
- of type self, this must run after the class is loaded
75
-
76
- Returns
77
- openapi_types (dict): The key is attribute name
78
- and the value is attribute type.
79
- """
80
- return {
81
- 'value': (str,),
82
- }
83
-
84
- @cached_property
85
- def discriminator():
86
- return None
87
-
88
-
89
- attribute_map = {}
90
-
91
- read_only_vars = set()
92
-
93
- _composed_schemas = None
94
-
95
- required_properties = set([
96
- '_data_store',
97
- '_check_type',
98
- '_spec_property_naming',
99
- '_path_to_item',
100
- '_configuration',
101
- '_visited_composed_classes',
102
- ])
103
-
104
- @convert_js_args_to_python_args
105
- def __init__(self, *args, **kwargs):
106
- """NegotiationStateModel - a model defined in OpenAPI
107
-
108
- Note that value can be passed either in args or in kwargs, but not in both.
109
-
110
- Args:
111
- args[0] (str): The state of a negotiation in the context of a line item.., must be one of ["Invalid", "Modified", "Submitted", "Reviewed", "Approved", ] # noqa: E501
112
-
113
- Keyword Args:
114
- value (str): The state of a negotiation in the context of a line item.., must be one of ["Invalid", "Modified", "Submitted", "Reviewed", "Approved", ] # noqa: E501
115
- _check_type (bool): if True, values for parameters in openapi_types
116
- will be type checked and a TypeError will be
117
- raised if the wrong type is input.
118
- Defaults to True
119
- _path_to_item (tuple/list): This is a list of keys or values to
120
- drill down to the model in received_data
121
- when deserializing a response
122
- _spec_property_naming (bool): True if the variable names in the input data
123
- are serialized names, as specified in the OpenAPI document.
124
- False if the variable names in the input data
125
- are pythonic names, e.g. snake case (default)
126
- _configuration (Configuration): the instance to use when
127
- deserializing a file_type parameter.
128
- If passed, type conversion is attempted
129
- If omitted no type conversion is done.
130
- _visited_composed_classes (tuple): This stores a tuple of
131
- classes that we have traveled through so that
132
- if we see that class again we will not use its
133
- discriminator again.
134
- When traveling through a discriminator, the
135
- composed schema that is
136
- is traveled through is added to this set.
137
- For example if Animal has a discriminator
138
- petType and we pass in "Dog", and the class Dog
139
- allOf includes Animal, we move through Animal
140
- once using the discriminator, and pick Dog.
141
- Then in Dog, we will make an instance of the
142
- Animal class but this time we won't travel
143
- through its discriminator because we passed in
144
- _visited_composed_classes = (Animal,)
145
- """
146
- # required up here when default value is not given
147
- _path_to_item = kwargs.pop('_path_to_item', ())
148
-
149
- if 'value' in kwargs:
150
- value = kwargs.pop('value')
151
- elif args:
152
- args = list(args)
153
- value = args.pop(0)
154
- else:
155
- raise ApiTypeError(
156
- "value is required, but not passed in args or kwargs and doesn't have default",
157
- path_to_item=_path_to_item,
158
- valid_classes=(self.__class__,),
159
- )
160
-
161
- _check_type = kwargs.pop('_check_type', True)
162
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
163
- _configuration = kwargs.pop('_configuration', None)
164
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
165
-
166
- if args:
167
- for arg in args:
168
- if isinstance(arg, dict):
169
- kwargs.update(arg)
170
- else:
171
- raise ApiTypeError(
172
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
173
- args,
174
- self.__class__.__name__,
175
- ),
176
- path_to_item=_path_to_item,
177
- valid_classes=(self.__class__,),
178
- )
179
-
180
- self._data_store = {}
181
- self._check_type = _check_type
182
- self._spec_property_naming = _spec_property_naming
183
- self._path_to_item = _path_to_item
184
- self._configuration = _configuration
185
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
186
- self.value = value
187
- if kwargs:
188
- raise ApiTypeError(
189
- "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
190
- kwargs,
191
- self.__class__.__name__,
192
- ),
193
- path_to_item=_path_to_item,
194
- valid_classes=(self.__class__,),
195
- )
196
-
197
- @classmethod
198
- @convert_js_args_to_python_args
199
- def _from_openapi_data(cls, *args, **kwargs):
200
- """NegotiationStateModel - a model defined in OpenAPI
201
-
202
- Note that value can be passed either in args or in kwargs, but not in both.
203
-
204
- Args:
205
- args[0] (str): The state of a negotiation in the context of a line item.., must be one of ["Invalid", "Modified", "Submitted", "Reviewed", "Approved", ] # noqa: E501
206
-
207
- Keyword Args:
208
- value (str): The state of a negotiation in the context of a line item.., must be one of ["Invalid", "Modified", "Submitted", "Reviewed", "Approved", ] # noqa: E501
209
- _check_type (bool): if True, values for parameters in openapi_types
210
- will be type checked and a TypeError will be
211
- raised if the wrong type is input.
212
- Defaults to True
213
- _path_to_item (tuple/list): This is a list of keys or values to
214
- drill down to the model in received_data
215
- when deserializing a response
216
- _spec_property_naming (bool): True if the variable names in the input data
217
- are serialized names, as specified in the OpenAPI document.
218
- False if the variable names in the input data
219
- are pythonic names, e.g. snake case (default)
220
- _configuration (Configuration): the instance to use when
221
- deserializing a file_type parameter.
222
- If passed, type conversion is attempted
223
- If omitted no type conversion is done.
224
- _visited_composed_classes (tuple): This stores a tuple of
225
- classes that we have traveled through so that
226
- if we see that class again we will not use its
227
- discriminator again.
228
- When traveling through a discriminator, the
229
- composed schema that is
230
- is traveled through is added to this set.
231
- For example if Animal has a discriminator
232
- petType and we pass in "Dog", and the class Dog
233
- allOf includes Animal, we move through Animal
234
- once using the discriminator, and pick Dog.
235
- Then in Dog, we will make an instance of the
236
- Animal class but this time we won't travel
237
- through its discriminator because we passed in
238
- _visited_composed_classes = (Animal,)
239
- """
240
- # required up here when default value is not given
241
- _path_to_item = kwargs.pop('_path_to_item', ())
242
-
243
- self = super(OpenApiModel, cls).__new__(cls)
244
-
245
- if 'value' in kwargs:
246
- value = kwargs.pop('value')
247
- elif args:
248
- args = list(args)
249
- value = args.pop(0)
250
- else:
251
- raise ApiTypeError(
252
- "value is required, but not passed in args or kwargs and doesn't have default",
253
- path_to_item=_path_to_item,
254
- valid_classes=(self.__class__,),
255
- )
256
-
257
- _check_type = kwargs.pop('_check_type', True)
258
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
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
- self.value = value
283
- if kwargs:
284
- raise ApiTypeError(
285
- "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
286
- kwargs,
287
- self.__class__.__name__,
288
- ),
289
- path_to_item=_path_to_item,
290
- valid_classes=(self.__class__,),
291
- )
292
-
293
- return self