criteo-api-retailmedia-sdk 0.0.240626__py3-none-any.whl → 0.0.240808__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 (81) hide show
  1. criteo_api_retailmedia_preview/__init__.py +1 -1
  2. criteo_api_retailmedia_preview/api/accounts_api.py +50 -343
  3. criteo_api_retailmedia_preview/api/audience_api.py +835 -58
  4. criteo_api_retailmedia_preview/api/balance_api.py +1134 -0
  5. criteo_api_retailmedia_preview/api/campaign_api.py +175 -168
  6. criteo_api_retailmedia_preview/api_client.py +4 -4
  7. criteo_api_retailmedia_preview/apis/__init__.py +1 -0
  8. criteo_api_retailmedia_preview/configuration.py +1 -1
  9. criteo_api_retailmedia_preview/model/add_funds_to_balance_v2.py +277 -0
  10. criteo_api_retailmedia_preview/model/{value_resource_input_of_retail_media_brand_account_creation.py → add_funds_to_balance_v2_request.py} +16 -9
  11. criteo_api_retailmedia_preview/model/application_summary_model_response.py +0 -4
  12. criteo_api_retailmedia_preview/model/async_accounts_report.py +2 -0
  13. criteo_api_retailmedia_preview/model/async_campaigns_report.py +2 -0
  14. criteo_api_retailmedia_preview/model/async_line_items_report.py +2 -0
  15. criteo_api_retailmedia_preview/model/{insertion_order_history_change_data_capture.py → balance_history_change_data_capture_v1.py} +11 -11
  16. criteo_api_retailmedia_preview/model/balance_response_v2.py +351 -0
  17. criteo_api_retailmedia_preview/model/balance_response_v2_response.py +281 -0
  18. criteo_api_retailmedia_preview/model/change_dates_of_balance_v2.py +271 -0
  19. criteo_api_retailmedia_preview/model/change_dates_of_balance_v2_request.py +269 -0
  20. criteo_api_retailmedia_preview/model/{change_details.py → change_details_v1.py} +3 -3
  21. criteo_api_retailmedia_preview/model/change_details_v2.py +275 -0
  22. criteo_api_retailmedia_preview/model/common_problem.py +2 -2
  23. criteo_api_retailmedia_preview/model/create_balance_v2.py +302 -0
  24. criteo_api_retailmedia_preview/model/{value_resource_input_of_retail_media_brands.py → create_balance_v2_request.py} +16 -9
  25. criteo_api_retailmedia_preview/model/external_catalog_status.py +312 -0
  26. criteo_api_retailmedia_preview/model/insertion_order_history_change_data_capture_v2.py +303 -0
  27. criteo_api_retailmedia_preview/model/json_api_body_with_id_of_int64_and_catalog_status_and_catalog_status.py +285 -0
  28. criteo_api_retailmedia_preview/model/json_api_body_without_id_of_seller_catalog_request_and_seller_catalog_request.py +279 -0
  29. criteo_api_retailmedia_preview/model/json_api_page_response_of_account.py +8 -6
  30. criteo_api_retailmedia_preview/model/json_api_page_response_of_brand.py +8 -6
  31. criteo_api_retailmedia_preview/model/json_api_page_response_of_retailer.py +8 -6
  32. criteo_api_retailmedia_preview/model/json_api_request_of_seller_catalog_request.py +269 -0
  33. criteo_api_retailmedia_preview/model/json_api_single_response_of_catalog_status.py +287 -0
  34. criteo_api_retailmedia_preview/model/{retail_media_brands.py → nillable_string.py} +14 -8
  35. criteo_api_retailmedia_preview/model/page_of_balance_history_change_data_capture_v1.py +276 -0
  36. criteo_api_retailmedia_preview/model/{page_of_insertion_order_history_change_data_capture.py → page_of_insertion_order_history_change_data_capture_v2.py} +8 -8
  37. criteo_api_retailmedia_preview/model/paged_resource_collection_outcome_of_balance_response_v2.py +287 -0
  38. criteo_api_retailmedia_preview/model/promoted_product_resource_collection_outcome.py +6 -4
  39. criteo_api_retailmedia_preview/model/resource_of_add_funds_to_balance_v2.py +277 -0
  40. criteo_api_retailmedia_preview/model/resource_of_balance_response_v2.py +277 -0
  41. criteo_api_retailmedia_preview/model/resource_of_change_dates_of_balance_v2.py +277 -0
  42. criteo_api_retailmedia_preview/model/resource_of_create_balance_v2.py +277 -0
  43. criteo_api_retailmedia_preview/model/resource_of_update_balance_model_v2.py +277 -0
  44. criteo_api_retailmedia_preview/model/retail_media_contactlist_amendment_attributes.py +6 -6
  45. criteo_api_retailmedia_preview/model/rm_audience_segment_bulk_create_input_v1.py +269 -0
  46. criteo_api_retailmedia_preview/model/rm_audience_segment_bulk_delete_input_v1.py +269 -0
  47. criteo_api_retailmedia_preview/model/rm_audience_segment_bulk_update_input_v1.py +269 -0
  48. criteo_api_retailmedia_preview/model/rm_audience_segment_create_entity_v1.py +281 -0
  49. criteo_api_retailmedia_preview/model/{value_resource_of_retail_media_brand_account_creation.py → rm_audience_segment_create_entity_v1_resource.py} +16 -9
  50. criteo_api_retailmedia_preview/model/rm_audience_segment_delete_entity_v1_resource.py +271 -0
  51. criteo_api_retailmedia_preview/model/rm_audience_segment_entity_v1.py +323 -0
  52. criteo_api_retailmedia_preview/model/rm_audience_segment_entity_v1_list_response.py +281 -0
  53. criteo_api_retailmedia_preview/model/rm_audience_segment_entity_v1_resource.py +277 -0
  54. criteo_api_retailmedia_preview/model/rm_audience_segment_entity_v1_rm_audience_segment_search_metadata_v1_list_response.py +287 -0
  55. criteo_api_retailmedia_preview/model/rm_audience_segment_id_entity_v1_list_response.py +281 -0
  56. criteo_api_retailmedia_preview/model/rm_audience_segment_id_entity_v1_resource.py +271 -0
  57. criteo_api_retailmedia_preview/model/rm_audience_segment_search_entity_v1.py +277 -0
  58. criteo_api_retailmedia_preview/model/rm_audience_segment_search_entity_v1_resource.py +273 -0
  59. criteo_api_retailmedia_preview/model/rm_audience_segment_search_input_v1.py +269 -0
  60. criteo_api_retailmedia_preview/model/{retail_media_brand_account_creation.py → rm_audience_segment_search_metadata_v1.py} +22 -16
  61. criteo_api_retailmedia_preview/model/rm_audience_segment_update_entity_v1.py +277 -0
  62. criteo_api_retailmedia_preview/model/rm_audience_segment_update_entity_v1_resource.py +277 -0
  63. criteo_api_retailmedia_preview/model/rm_contact_list_create_v1.py +270 -0
  64. criteo_api_retailmedia_preview/model/rm_contact_list_statistics_entity_v1.py +271 -0
  65. criteo_api_retailmedia_preview/model/rm_contact_list_statistics_entity_v1_resource.py +277 -0
  66. criteo_api_retailmedia_preview/model/rm_contact_list_statistics_entity_v1_response.py +281 -0
  67. criteo_api_retailmedia_preview/model/rm_contact_list_v1.py +286 -0
  68. criteo_api_retailmedia_preview/model/rm_user_behavior_v1.py +303 -0
  69. criteo_api_retailmedia_preview/model/seller_catalog_request.py +269 -0
  70. criteo_api_retailmedia_preview/model/seller_identifier.py +275 -0
  71. criteo_api_retailmedia_preview/model/sku_data_preview.py +8 -6
  72. criteo_api_retailmedia_preview/model/sku_slim_data_preview.py +8 -6
  73. criteo_api_retailmedia_preview/model/sync_campaigns_report.py +2 -0
  74. criteo_api_retailmedia_preview/model/sync_line_items_report.py +2 -0
  75. criteo_api_retailmedia_preview/model/update_balance_model_v2.py +279 -0
  76. criteo_api_retailmedia_preview/model/{value_resource_of_retail_media_brands.py → update_balance_model_v2_request.py} +17 -14
  77. criteo_api_retailmedia_preview/models/__init__.py +54 -9
  78. {criteo_api_retailmedia_sdk-0.0.240626.dist-info → criteo_api_retailmedia_sdk-0.0.240808.dist-info}/METADATA +3 -3
  79. {criteo_api_retailmedia_sdk-0.0.240626.dist-info → criteo_api_retailmedia_sdk-0.0.240808.dist-info}/RECORD +81 -35
  80. {criteo_api_retailmedia_sdk-0.0.240626.dist-info → criteo_api_retailmedia_sdk-0.0.240808.dist-info}/WHEEL +1 -1
  81. {criteo_api_retailmedia_sdk-0.0.240626.dist-info → criteo_api_retailmedia_sdk-0.0.240808.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,351 @@
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 BalanceResponseV2(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
+ ('balance_type',): {
59
+ 'UNKNOWN': "unknown",
60
+ 'CAPPED': "capped",
61
+ 'UNCAPPED': "uncapped",
62
+ },
63
+ ('spend_type',): {
64
+ 'ONSITE': "Onsite",
65
+ 'OFFSITE': "Offsite",
66
+ 'OFFSITEAWARENESS': "OffsiteAwareness",
67
+ },
68
+ ('private_market_billing_type',): {
69
+ 'NOTAPPLICABLE': "NotApplicable",
70
+ 'BILLBYRETAILER': "BillByRetailer",
71
+ 'BILLBYCRITEO': "BillByCriteo",
72
+ 'UNKNOWN': "Unknown",
73
+ },
74
+ ('status',): {
75
+ 'UNKNOWN': "unknown",
76
+ 'SCHEDULED': "scheduled",
77
+ 'ACTIVE': "active",
78
+ 'ENDED': "ended",
79
+ },
80
+ }
81
+
82
+ validations = {
83
+ }
84
+
85
+ @cached_property
86
+ def additional_properties_type():
87
+ """
88
+ This must be a method because a model may have properties that are
89
+ of type self, this must run after the class is loaded
90
+ """
91
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
92
+
93
+ _nullable = False
94
+
95
+ @cached_property
96
+ def openapi_types():
97
+ """
98
+ This must be a method because a model may have properties that are
99
+ of type self, this must run after the class is loaded
100
+
101
+ Returns
102
+ openapi_types (dict): The key is attribute name
103
+ and the value is attribute type.
104
+ """
105
+ return {
106
+ 'name': (str,), # noqa: E501
107
+ 'start_date': (date,), # noqa: E501
108
+ 'balance_type': (str,), # noqa: E501
109
+ 'spend_type': (str,), # noqa: E501
110
+ 'private_market_billing_type': (str,), # noqa: E501
111
+ 'po_number': (str, none_type,), # noqa: E501
112
+ 'memo': (str, none_type,), # noqa: E501
113
+ 'deposited': (float, none_type,), # noqa: E501
114
+ 'spent': (float, none_type,), # noqa: E501
115
+ 'remaining': (float, none_type,), # noqa: E501
116
+ 'end_date': (date, none_type,), # noqa: E501
117
+ 'status': (str,), # noqa: E501
118
+ 'created_at': (datetime,), # noqa: E501
119
+ 'updated_at': (datetime,), # noqa: E501
120
+ }
121
+
122
+ @cached_property
123
+ def discriminator():
124
+ return None
125
+
126
+
127
+ attribute_map = {
128
+ 'name': 'name', # noqa: E501
129
+ 'start_date': 'startDate', # noqa: E501
130
+ 'balance_type': 'balanceType', # noqa: E501
131
+ 'spend_type': 'spendType', # noqa: E501
132
+ 'private_market_billing_type': 'privateMarketBillingType', # noqa: E501
133
+ 'po_number': 'poNumber', # noqa: E501
134
+ 'memo': 'memo', # noqa: E501
135
+ 'deposited': 'deposited', # noqa: E501
136
+ 'spent': 'spent', # noqa: E501
137
+ 'remaining': 'remaining', # noqa: E501
138
+ 'end_date': 'endDate', # noqa: E501
139
+ 'status': 'status', # noqa: E501
140
+ 'created_at': 'createdAt', # noqa: E501
141
+ 'updated_at': 'updatedAt', # noqa: E501
142
+ }
143
+
144
+ read_only_vars = {
145
+ }
146
+
147
+ _composed_schemas = {}
148
+
149
+ @classmethod
150
+ @convert_js_args_to_python_args
151
+ def _from_openapi_data(cls, name, start_date, balance_type, spend_type, private_market_billing_type, *args, **kwargs): # noqa: E501
152
+ """BalanceResponseV2 - a model defined in OpenAPI
153
+
154
+ Args:
155
+ name (str): Name of the balance.
156
+ start_date (date): Start date of the balance in the format YYYY-MM-DD.
157
+ balance_type (str): Type of the balance.
158
+ spend_type (str): Spend Type of the balance.
159
+ private_market_billing_type (str): Billing type for Private Market of the balance.
160
+
161
+ Keyword Args:
162
+ _check_type (bool): if True, values for parameters in openapi_types
163
+ will be type checked and a TypeError will be
164
+ raised if the wrong type is input.
165
+ Defaults to True
166
+ _path_to_item (tuple/list): This is a list of keys or values to
167
+ drill down to the model in received_data
168
+ when deserializing a response
169
+ _spec_property_naming (bool): True if the variable names in the input data
170
+ are serialized names, as specified in the OpenAPI document.
171
+ False if the variable names in the input data
172
+ are pythonic names, e.g. snake case (default)
173
+ _configuration (Configuration): the instance to use when
174
+ deserializing a file_type parameter.
175
+ If passed, type conversion is attempted
176
+ If omitted no type conversion is done.
177
+ _visited_composed_classes (tuple): This stores a tuple of
178
+ classes that we have traveled through so that
179
+ if we see that class again we will not use its
180
+ discriminator again.
181
+ When traveling through a discriminator, the
182
+ composed schema that is
183
+ is traveled through is added to this set.
184
+ For example if Animal has a discriminator
185
+ petType and we pass in "Dog", and the class Dog
186
+ allOf includes Animal, we move through Animal
187
+ once using the discriminator, and pick Dog.
188
+ Then in Dog, we will make an instance of the
189
+ Animal class but this time we won't travel
190
+ through its discriminator because we passed in
191
+ _visited_composed_classes = (Animal,)
192
+ po_number (str, none_type): Purchase Order number.. [optional] # noqa: E501
193
+ memo (str, none_type): Memo.. [optional] # noqa: E501
194
+ deposited (float, none_type): Amount of billable funds allotted to the balance.. [optional] # noqa: E501
195
+ spent (float, none_type): Amount of spent funds of the balance.. [optional] # noqa: E501
196
+ remaining (float, none_type): Amount of remaining funds of the balance.. [optional] # noqa: E501
197
+ end_date (date, none_type): End date of the balance in the format YYYY-MM-DD.. [optional] # noqa: E501
198
+ status (str): Status of the balance.. [optional] # noqa: E501
199
+ created_at (datetime): Creation time of the balance.. [optional] # noqa: E501
200
+ updated_at (datetime): Update time of the balance.. [optional] # noqa: E501
201
+ """
202
+
203
+ _check_type = kwargs.pop('_check_type', True)
204
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
205
+ _path_to_item = kwargs.pop('_path_to_item', ())
206
+ _configuration = kwargs.pop('_configuration', None)
207
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
208
+
209
+ self = super(OpenApiModel, cls).__new__(cls)
210
+
211
+ if args:
212
+ for arg in args:
213
+ if isinstance(arg, dict):
214
+ kwargs.update(arg)
215
+ else:
216
+ raise ApiTypeError(
217
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
218
+ args,
219
+ self.__class__.__name__,
220
+ ),
221
+ path_to_item=_path_to_item,
222
+ valid_classes=(self.__class__,),
223
+ )
224
+
225
+ self._data_store = {}
226
+ self._check_type = _check_type
227
+ self._spec_property_naming = _spec_property_naming
228
+ self._path_to_item = _path_to_item
229
+ self._configuration = _configuration
230
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
231
+
232
+ self.name = name
233
+ self.start_date = start_date
234
+ self.balance_type = balance_type
235
+ self.spend_type = spend_type
236
+ self.private_market_billing_type = private_market_billing_type
237
+ for var_name, var_value in kwargs.items():
238
+ if var_name not in self.attribute_map and \
239
+ self._configuration is not None and \
240
+ self._configuration.discard_unknown_keys and \
241
+ self.additional_properties_type is None:
242
+ # discard variable.
243
+ continue
244
+ setattr(self, var_name, var_value)
245
+ return self
246
+
247
+ required_properties = set([
248
+ '_data_store',
249
+ '_check_type',
250
+ '_spec_property_naming',
251
+ '_path_to_item',
252
+ '_configuration',
253
+ '_visited_composed_classes',
254
+ ])
255
+
256
+ @convert_js_args_to_python_args
257
+ def __init__(self, name, start_date, balance_type, spend_type, private_market_billing_type, *args, **kwargs): # noqa: E501
258
+ """BalanceResponseV2 - a model defined in OpenAPI
259
+
260
+ Args:
261
+ name (str): Name of the balance.
262
+ start_date (date): Start date of the balance in the format YYYY-MM-DD.
263
+ balance_type (str): Type of the balance.
264
+ spend_type (str): Spend Type of the balance.
265
+ private_market_billing_type (str): Billing type for Private Market of the balance.
266
+
267
+ Keyword Args:
268
+ _check_type (bool): if True, values for parameters in openapi_types
269
+ will be type checked and a TypeError will be
270
+ raised if the wrong type is input.
271
+ Defaults to True
272
+ _path_to_item (tuple/list): This is a list of keys or values to
273
+ drill down to the model in received_data
274
+ when deserializing a response
275
+ _spec_property_naming (bool): True if the variable names in the input data
276
+ are serialized names, as specified in the OpenAPI document.
277
+ False if the variable names in the input data
278
+ are pythonic names, e.g. snake case (default)
279
+ _configuration (Configuration): the instance to use when
280
+ deserializing a file_type parameter.
281
+ If passed, type conversion is attempted
282
+ If omitted no type conversion is done.
283
+ _visited_composed_classes (tuple): This stores a tuple of
284
+ classes that we have traveled through so that
285
+ if we see that class again we will not use its
286
+ discriminator again.
287
+ When traveling through a discriminator, the
288
+ composed schema that is
289
+ is traveled through is added to this set.
290
+ For example if Animal has a discriminator
291
+ petType and we pass in "Dog", and the class Dog
292
+ allOf includes Animal, we move through Animal
293
+ once using the discriminator, and pick Dog.
294
+ Then in Dog, we will make an instance of the
295
+ Animal class but this time we won't travel
296
+ through its discriminator because we passed in
297
+ _visited_composed_classes = (Animal,)
298
+ po_number (str, none_type): Purchase Order number.. [optional] # noqa: E501
299
+ memo (str, none_type): Memo.. [optional] # noqa: E501
300
+ deposited (float, none_type): Amount of billable funds allotted to the balance.. [optional] # noqa: E501
301
+ spent (float, none_type): Amount of spent funds of the balance.. [optional] # noqa: E501
302
+ remaining (float, none_type): Amount of remaining funds of the balance.. [optional] # noqa: E501
303
+ end_date (date, none_type): End date of the balance in the format YYYY-MM-DD.. [optional] # noqa: E501
304
+ status (str): Status of the balance.. [optional] # noqa: E501
305
+ created_at (datetime): Creation time of the balance.. [optional] # noqa: E501
306
+ updated_at (datetime): Update time of the balance.. [optional] # noqa: E501
307
+ """
308
+
309
+ _check_type = kwargs.pop('_check_type', True)
310
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
311
+ _path_to_item = kwargs.pop('_path_to_item', ())
312
+ _configuration = kwargs.pop('_configuration', None)
313
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
314
+
315
+ if args:
316
+ for arg in args:
317
+ if isinstance(arg, dict):
318
+ kwargs.update(arg)
319
+ else:
320
+ raise ApiTypeError(
321
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
322
+ args,
323
+ self.__class__.__name__,
324
+ ),
325
+ path_to_item=_path_to_item,
326
+ valid_classes=(self.__class__,),
327
+ )
328
+
329
+ self._data_store = {}
330
+ self._check_type = _check_type
331
+ self._spec_property_naming = _spec_property_naming
332
+ self._path_to_item = _path_to_item
333
+ self._configuration = _configuration
334
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
335
+
336
+ self.name = name
337
+ self.start_date = start_date
338
+ self.balance_type = balance_type
339
+ self.spend_type = spend_type
340
+ self.private_market_billing_type = private_market_billing_type
341
+ for var_name, var_value in kwargs.items():
342
+ if var_name not in self.attribute_map and \
343
+ self._configuration is not None and \
344
+ self._configuration.discard_unknown_keys and \
345
+ self.additional_properties_type is None:
346
+ # discard variable.
347
+ continue
348
+ setattr(self, var_name, var_value)
349
+ if var_name in self.read_only_vars:
350
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
351
+ f"class with read only attributes.")
@@ -0,0 +1,281 @@
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
+ def lazy_import():
33
+ from criteo_api_retailmedia_preview.model.common_problem import CommonProblem
34
+ from criteo_api_retailmedia_preview.model.resource_of_balance_response_v2 import ResourceOfBalanceResponseV2
35
+ globals()['CommonProblem'] = CommonProblem
36
+ globals()['ResourceOfBalanceResponseV2'] = ResourceOfBalanceResponseV2
37
+
38
+
39
+ class BalanceResponseV2Response(ModelNormal):
40
+ """NOTE: This class is auto generated by OpenAPI Generator.
41
+ Ref: https://openapi-generator.tech
42
+
43
+ Do not edit the class manually.
44
+
45
+ Attributes:
46
+ allowed_values (dict): The key is the tuple path to the attribute
47
+ and the for var_name this is (var_name,). The value is a dict
48
+ with a capitalized key describing the allowed value and an allowed
49
+ value. These dicts store the allowed enum values.
50
+ attribute_map (dict): The key is attribute name
51
+ and the value is json key in definition.
52
+ discriminator_value_class_map (dict): A dict to go from the discriminator
53
+ variable value to the discriminator class name.
54
+ validations (dict): The key is the tuple path to the attribute
55
+ and the for var_name this is (var_name,). The value is a dict
56
+ that stores validations for max_length, min_length, max_items,
57
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
58
+ inclusive_minimum, and regex.
59
+ additional_properties_type (tuple): A tuple of classes accepted
60
+ as additional properties values.
61
+ """
62
+
63
+ allowed_values = {
64
+ }
65
+
66
+ validations = {
67
+ }
68
+
69
+ @cached_property
70
+ def additional_properties_type():
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
+ lazy_import()
76
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
77
+
78
+ _nullable = False
79
+
80
+ @cached_property
81
+ def openapi_types():
82
+ """
83
+ This must be a method because a model may have properties that are
84
+ of type self, this must run after the class is loaded
85
+
86
+ Returns
87
+ openapi_types (dict): The key is attribute name
88
+ and the value is attribute type.
89
+ """
90
+ lazy_import()
91
+ return {
92
+ 'data': (ResourceOfBalanceResponseV2,), # noqa: E501
93
+ 'warnings': ([CommonProblem],), # noqa: E501
94
+ 'errors': ([CommonProblem],), # noqa: E501
95
+ }
96
+
97
+ @cached_property
98
+ def discriminator():
99
+ return None
100
+
101
+
102
+ attribute_map = {
103
+ 'data': 'data', # noqa: E501
104
+ 'warnings': 'warnings', # noqa: E501
105
+ 'errors': 'errors', # noqa: E501
106
+ }
107
+
108
+ read_only_vars = {
109
+ 'warnings', # noqa: E501
110
+ 'errors', # noqa: E501
111
+ }
112
+
113
+ _composed_schemas = {}
114
+
115
+ @classmethod
116
+ @convert_js_args_to_python_args
117
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
118
+ """BalanceResponseV2Response - a model defined in OpenAPI
119
+
120
+ Keyword Args:
121
+ _check_type (bool): if True, values for parameters in openapi_types
122
+ will be type checked and a TypeError will be
123
+ raised if the wrong type is input.
124
+ Defaults to True
125
+ _path_to_item (tuple/list): This is a list of keys or values to
126
+ drill down to the model in received_data
127
+ when deserializing a response
128
+ _spec_property_naming (bool): True if the variable names in the input data
129
+ are serialized names, as specified in the OpenAPI document.
130
+ False if the variable names in the input data
131
+ are pythonic names, e.g. snake case (default)
132
+ _configuration (Configuration): the instance to use when
133
+ deserializing a file_type parameter.
134
+ If passed, type conversion is attempted
135
+ If omitted no type conversion is done.
136
+ _visited_composed_classes (tuple): This stores a tuple of
137
+ classes that we have traveled through so that
138
+ if we see that class again we will not use its
139
+ discriminator again.
140
+ When traveling through a discriminator, the
141
+ composed schema that is
142
+ is traveled through is added to this set.
143
+ For example if Animal has a discriminator
144
+ petType and we pass in "Dog", and the class Dog
145
+ allOf includes Animal, we move through Animal
146
+ once using the discriminator, and pick Dog.
147
+ Then in Dog, we will make an instance of the
148
+ Animal class but this time we won't travel
149
+ through its discriminator because we passed in
150
+ _visited_composed_classes = (Animal,)
151
+ data (ResourceOfBalanceResponseV2): [optional] # noqa: E501
152
+ warnings ([CommonProblem]): [optional] # noqa: E501
153
+ errors ([CommonProblem]): [optional] # noqa: E501
154
+ """
155
+
156
+ _check_type = kwargs.pop('_check_type', True)
157
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
158
+ _path_to_item = kwargs.pop('_path_to_item', ())
159
+ _configuration = kwargs.pop('_configuration', None)
160
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
161
+
162
+ self = super(OpenApiModel, cls).__new__(cls)
163
+
164
+ if args:
165
+ for arg in args:
166
+ if isinstance(arg, dict):
167
+ kwargs.update(arg)
168
+ else:
169
+ raise ApiTypeError(
170
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
171
+ args,
172
+ self.__class__.__name__,
173
+ ),
174
+ path_to_item=_path_to_item,
175
+ valid_classes=(self.__class__,),
176
+ )
177
+
178
+ self._data_store = {}
179
+ self._check_type = _check_type
180
+ self._spec_property_naming = _spec_property_naming
181
+ self._path_to_item = _path_to_item
182
+ self._configuration = _configuration
183
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
184
+
185
+ for var_name, var_value in kwargs.items():
186
+ if var_name not in self.attribute_map and \
187
+ self._configuration is not None and \
188
+ self._configuration.discard_unknown_keys and \
189
+ self.additional_properties_type is None:
190
+ # discard variable.
191
+ continue
192
+ setattr(self, var_name, var_value)
193
+ return self
194
+
195
+ required_properties = set([
196
+ '_data_store',
197
+ '_check_type',
198
+ '_spec_property_naming',
199
+ '_path_to_item',
200
+ '_configuration',
201
+ '_visited_composed_classes',
202
+ ])
203
+
204
+ @convert_js_args_to_python_args
205
+ def __init__(self, *args, **kwargs): # noqa: E501
206
+ """BalanceResponseV2Response - a model defined in OpenAPI
207
+
208
+ Keyword Args:
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
+ data (ResourceOfBalanceResponseV2): [optional] # noqa: E501
240
+ warnings ([CommonProblem]): [optional] # noqa: E501
241
+ errors ([CommonProblem]): [optional] # noqa: E501
242
+ """
243
+
244
+ _check_type = kwargs.pop('_check_type', True)
245
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
246
+ _path_to_item = kwargs.pop('_path_to_item', ())
247
+ _configuration = kwargs.pop('_configuration', None)
248
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
249
+
250
+ if args:
251
+ for arg in args:
252
+ if isinstance(arg, dict):
253
+ kwargs.update(arg)
254
+ else:
255
+ raise ApiTypeError(
256
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
257
+ args,
258
+ self.__class__.__name__,
259
+ ),
260
+ path_to_item=_path_to_item,
261
+ valid_classes=(self.__class__,),
262
+ )
263
+
264
+ self._data_store = {}
265
+ self._check_type = _check_type
266
+ self._spec_property_naming = _spec_property_naming
267
+ self._path_to_item = _path_to_item
268
+ self._configuration = _configuration
269
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
270
+
271
+ for var_name, var_value in kwargs.items():
272
+ if var_name not in self.attribute_map and \
273
+ self._configuration is not None and \
274
+ self._configuration.discard_unknown_keys and \
275
+ self.additional_properties_type is None:
276
+ # discard variable.
277
+ continue
278
+ setattr(self, var_name, var_value)
279
+ if var_name in self.read_only_vars:
280
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
281
+ f"class with read only attributes.")