criteo-api-retailmedia-sdk 0.0.240207__py3-none-any.whl → 0.0.240515__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.
Files changed (131) hide show
  1. criteo_api_retailmedia_preview/__init__.py +1 -1
  2. criteo_api_retailmedia_preview/api/accounts_api.py +181 -35
  3. criteo_api_retailmedia_preview/api/analytics_api.py +142 -0
  4. criteo_api_retailmedia_preview/api/audience_api.py +284 -0
  5. criteo_api_retailmedia_preview/api/campaign_api.py +1678 -902
  6. criteo_api_retailmedia_preview/api/catalog_api.py +312 -0
  7. criteo_api_retailmedia_preview/api_client.py +4 -4
  8. criteo_api_retailmedia_preview/apis/__init__.py +1 -0
  9. criteo_api_retailmedia_preview/configuration.py +1 -1
  10. criteo_api_retailmedia_preview/model/{retail_media_externalv1_add_remove_keyword_model.py → add_remove_keyword_model.py} +12 -19
  11. criteo_api_retailmedia_preview/model/add_remove_keywords_model.py +262 -0
  12. criteo_api_retailmedia_preview/model/add_remove_keywords_model_request.py +262 -0
  13. criteo_api_retailmedia_preview/model/add_remove_keywords_model_resource.py +270 -0
  14. criteo_api_retailmedia_preview/model/approval_status_model.py +292 -0
  15. criteo_api_retailmedia_preview/model/async_accounts_report.py +421 -0
  16. criteo_api_retailmedia_preview/model/{external_catalog_request_preview.py → async_accounts_report_request.py} +13 -10
  17. criteo_api_retailmedia_preview/model/async_accounts_report_resource.py +273 -0
  18. criteo_api_retailmedia_preview/model/async_campaigns_report.py +74 -59
  19. criteo_api_retailmedia_preview/model/async_line_items_report.py +74 -60
  20. criteo_api_retailmedia_preview/model/audience_error.py +310 -0
  21. criteo_api_retailmedia_preview/model/{template_variable.py → audience_warning.py} +48 -46
  22. criteo_api_retailmedia_preview/model/{hyperlink_variable_value.py → batch_accepted_response.py} +11 -11
  23. criteo_api_retailmedia_preview/model/change_details.py +275 -0
  24. criteo_api_retailmedia_preview/model/{creative202210_list_response.py → creative_v2_list_response.py} +16 -16
  25. criteo_api_retailmedia_preview/model/{value_resource_collection_outcome_of_int64.py → creative_v2_response.py} +16 -9
  26. criteo_api_retailmedia_preview/model/custom_attribute.py +275 -0
  27. criteo_api_retailmedia_preview/model/error_code_response.py +281 -0
  28. criteo_api_retailmedia_preview/model/export_report_column.py +2 -2
  29. criteo_api_retailmedia_preview/model/{choice_variable_value.py → external_choice_variable_value.py} +3 -3
  30. criteo_api_retailmedia_preview/model/{color_variable_value.py → external_color_variable_value.py} +8 -14
  31. criteo_api_retailmedia_preview/model/{creative_update_model202207.py → external_creative_create_model_v2.py} +11 -11
  32. criteo_api_retailmedia_preview/model/{creative_create_model202207.py → external_creative_update_model_v2.py} +11 -11
  33. criteo_api_retailmedia_preview/model/{creative202210.py → external_creative_v2.py} +34 -28
  34. criteo_api_retailmedia_preview/model/{files_variable_value.py → external_files_variable_value.py} +4 -3
  35. criteo_api_retailmedia_preview/model/{text_variable_specification.py → external_hyperlink_variable_value.py} +7 -7
  36. criteo_api_retailmedia_preview/model/{line_item_bid_multipliers.py → external_line_item_bid_multipliers_v2.py} +41 -29
  37. criteo_api_retailmedia_preview/model/external_line_item_capping_v2.py +280 -0
  38. criteo_api_retailmedia_preview/model/external_line_item_page_category_v2.py +273 -0
  39. criteo_api_retailmedia_preview/model/{choice_variable_specification.py → external_line_item_page_v2.py} +36 -21
  40. criteo_api_retailmedia_preview/model/{page_type_environment.py → external_page_type_environment.py} +15 -9
  41. criteo_api_retailmedia_preview/model/external_preferred_line_item_create_model_v2.py +345 -0
  42. criteo_api_retailmedia_preview/model/{external_catalog_status.py → external_preferred_line_item_update_model_v2.py} +70 -47
  43. criteo_api_retailmedia_preview/model/{template.py → external_preferred_line_item_v2.py} +93 -70
  44. criteo_api_retailmedia_preview/model/{template_variable_value.py → external_template_variable_value.py} +36 -30
  45. criteo_api_retailmedia_preview/model/{text_variable_value.py → external_text_variable_value.py} +8 -14
  46. criteo_api_retailmedia_preview/model/external_video_variable_value.py +293 -0
  47. criteo_api_retailmedia_preview/model/{choice_option.py → fail_response.py} +21 -19
  48. criteo_api_retailmedia_preview/model/{retail_media_externalv1_input_keywords_model.py → input_keywords_model.py} +4 -16
  49. criteo_api_retailmedia_preview/model/{retail_media_externalv1_add_remove_keywords_model.py → input_resource_of_preferred_line_item_create_model_v2.py} +13 -11
  50. criteo_api_retailmedia_preview/model/insertion_order_history_change_data_capture.py +303 -0
  51. criteo_api_retailmedia_preview/model/{retail_media_externalv1_set_bids_model.py → installment.py} +13 -11
  52. criteo_api_retailmedia_preview/model/{json_api_body_with_id_of_int64_and_line_item_bid_multipliers_and_line_item_bid_multipliers.py → json_api_body_with_id_of_int64_and_line_item_bid_multipliers_v2_and_line_item_bid_multipliers_v2.py} +8 -8
  53. criteo_api_retailmedia_preview/model/{json_api_single_response_of_line_item_bid_multipliers.py → json_api_single_response_of_line_item_bid_multipliers_v2.py} +14 -14
  54. criteo_api_retailmedia_preview/model/{retail_media_externalv1_keyword_data_model.py → keyword_data_model.py} +19 -37
  55. criteo_api_retailmedia_preview/model/{retail_media_externalv1_keywords_model.py → keywords_model.py} +9 -18
  56. criteo_api_retailmedia_preview/model/keywords_model_resource.py +270 -0
  57. criteo_api_retailmedia_preview/model/keywords_model_response.py +274 -0
  58. criteo_api_retailmedia_preview/model/{line_item_bid_multipliers_request.py → line_item_bid_multipliers_v2_request.py} +8 -8
  59. criteo_api_retailmedia_preview/model/{line_item_bid_multipliers_response.py → line_item_bid_multipliers_v2_response.py} +16 -16
  60. criteo_api_retailmedia_preview/model/line_item_product_status.py +291 -0
  61. criteo_api_retailmedia_preview/model/loyalty_points.py +271 -0
  62. criteo_api_retailmedia_preview/model/match_type_model.py +291 -0
  63. criteo_api_retailmedia_preview/model/metadata.py +273 -0
  64. criteo_api_retailmedia_preview/model/negotiation_state_model.py +293 -0
  65. criteo_api_retailmedia_preview/model/page_of_insertion_order_history_change_data_capture.py +276 -0
  66. criteo_api_retailmedia_preview/model/{json_api_request_of_catalog_request_preview.py → preferred_line_item_create_model_v2_request.py} +8 -8
  67. criteo_api_retailmedia_preview/model/{retail_media_externalv1_set_bids_model_request.py → preferred_line_item_update_model_v2_request.py} +8 -8
  68. criteo_api_retailmedia_preview/model/{creative202210_response.py → preferred_line_item_v2_paged_list_response.py} +22 -16
  69. criteo_api_retailmedia_preview/model/{template_response.py → preferred_line_item_v2_response.py} +16 -16
  70. criteo_api_retailmedia_preview/model/price.py +267 -0
  71. criteo_api_retailmedia_preview/model/product.py +626 -0
  72. criteo_api_retailmedia_preview/model/product_importer_error.py +299 -0
  73. criteo_api_retailmedia_preview/model/product_importer_warning.py +299 -0
  74. criteo_api_retailmedia_preview/model/product_metadata.py +269 -0
  75. criteo_api_retailmedia_preview/model/product_resource_outcome.py +266 -0
  76. criteo_api_retailmedia_preview/model/{retail_media_externalv1_keywords_model_response.py → product_shipping.py} +33 -25
  77. criteo_api_retailmedia_preview/model/product_shipping_dimension.py +267 -0
  78. criteo_api_retailmedia_preview/model/product_shipping_weight.py +267 -0
  79. criteo_api_retailmedia_preview/model/product_tax.py +283 -0
  80. criteo_api_retailmedia_preview/model/product_unit_pricing_base_measure.py +267 -0
  81. criteo_api_retailmedia_preview/model/product_unit_pricing_measure.py +267 -0
  82. criteo_api_retailmedia_preview/model/{section.py → products_custom_batch_request.py} +13 -19
  83. criteo_api_retailmedia_preview/model/products_custom_batch_request_entry.py +305 -0
  84. criteo_api_retailmedia_preview/model/promoted_product.py +270 -0
  85. criteo_api_retailmedia_preview/model/promoted_product_resource.py +270 -0
  86. criteo_api_retailmedia_preview/model/promoted_product_resource_collection_input.py +262 -0
  87. criteo_api_retailmedia_preview/model/promoted_product_resource_collection_outcome.py +278 -0
  88. criteo_api_retailmedia_preview/model/{retail_media_externalv1_proposal_status_model.py → proposal_status_model.py} +22 -50
  89. criteo_api_retailmedia_preview/model/proposal_status_model_resource.py +270 -0
  90. criteo_api_retailmedia_preview/model/{template_list_response.py → proposal_status_model_response.py} +20 -27
  91. criteo_api_retailmedia_preview/model/report_detail_error.py +299 -0
  92. criteo_api_retailmedia_preview/model/{retail_media_externalv1_add_remove_keywords_model_request.py → report_detail_errors.py} +23 -11
  93. criteo_api_retailmedia_preview/model/{retail_media_externalv1_keywords_model_resource.py → report_ok_response.py} +56 -21
  94. criteo_api_retailmedia_preview/model/{resource_of_creative202210.py → resource_of_creative_v2.py} +8 -8
  95. criteo_api_retailmedia_preview/model/{resource_of_template.py → resource_of_line_item_bid_multipliers_v2.py} +8 -8
  96. criteo_api_retailmedia_preview/model/{retail_media_externalv1_add_remove_keywords_model_resource.py → resource_of_preferred_line_item_update_model_v2.py} +16 -22
  97. criteo_api_retailmedia_preview/model/{resource_of_line_item_bid_multipliers.py → resource_of_preferred_line_item_v2.py} +9 -9
  98. criteo_api_retailmedia_preview/model/resource_outcome.py +268 -0
  99. criteo_api_retailmedia_preview/model/retail_media_account.py +6 -6
  100. criteo_api_retailmedia_preview/model/retail_media_brands.py +257 -0
  101. criteo_api_retailmedia_preview/model/{json_api_body_without_id_of_catalog_request_and_catalog_request_preview.py → retail_media_contactlist_amendment.py} +16 -16
  102. criteo_api_retailmedia_preview/model/{retail_media_externalv1_set_bids_model_resource.py → retail_media_contactlist_amendment_attributes.py} +34 -25
  103. criteo_api_retailmedia_preview/model/retail_media_contactlist_amendment_request.py +275 -0
  104. criteo_api_retailmedia_preview/model/{json_api_single_response_of_catalog_status.py → retail_media_contactlist_operation.py} +24 -20
  105. criteo_api_retailmedia_preview/model/{json_api_body_with_id_of_int64_and_catalog_status_and_catalog_status.py → retail_media_contactlist_operation_response_attributes.py} +14 -18
  106. criteo_api_retailmedia_preview/model/retail_media_contactlist_operation_response_attributes_attributes.py +297 -0
  107. criteo_api_retailmedia_preview/model/review_state_model.py +294 -0
  108. criteo_api_retailmedia_preview/model/{retail_media_externalv1_problem_details.py → rmca_common_problem.py} +41 -30
  109. criteo_api_retailmedia_preview/model/{retail_media_externalv1_set_bid_model.py → set_bid_model.py} +4 -10
  110. criteo_api_retailmedia_preview/model/set_bids_model.py +262 -0
  111. criteo_api_retailmedia_preview/model/set_bids_model_request.py +262 -0
  112. criteo_api_retailmedia_preview/model/set_bids_model_resource.py +270 -0
  113. criteo_api_retailmedia_preview/model/sync_attributed_transactions_report.py +47 -45
  114. criteo_api_retailmedia_preview/model/sync_campaigns_report.py +68 -53
  115. criteo_api_retailmedia_preview/model/sync_line_items_report.py +70 -56
  116. criteo_api_retailmedia_preview/model/value_resource_collection_input_of_retail_media_seller.py +262 -0
  117. criteo_api_retailmedia_preview/model/value_resource_input_of_retail_media_brand_account_creation.py +262 -0
  118. criteo_api_retailmedia_preview/model/value_resource_input_of_retail_media_brands.py +262 -0
  119. criteo_api_retailmedia_preview/model/value_resource_input_of_retail_media_seller_account_creation.py +262 -0
  120. criteo_api_retailmedia_preview/model/value_resource_of_retail_media_brand_account_creation.py +266 -0
  121. criteo_api_retailmedia_preview/model/{value_resource_of_int64.py → value_resource_of_retail_media_brands.py} +11 -6
  122. criteo_api_retailmedia_preview/model/value_resource_of_retail_media_seller_account_creation.py +266 -0
  123. criteo_api_retailmedia_preview/models/__init__.py +106 -55
  124. {criteo_api_retailmedia_sdk-0.0.240207.dist-info → criteo_api_retailmedia_sdk-0.0.240515.dist-info}/METADATA +3 -3
  125. {criteo_api_retailmedia_sdk-0.0.240207.dist-info → criteo_api_retailmedia_sdk-0.0.240515.dist-info}/RECORD +127 -75
  126. {criteo_api_retailmedia_sdk-0.0.240207.dist-info → criteo_api_retailmedia_sdk-0.0.240515.dist-info}/WHEEL +1 -1
  127. criteo_api_retailmedia_preview/model/files_variables_specification.py +0 -290
  128. criteo_api_retailmedia_preview/model/retail_media_externalv1_proposal_status_model_resource.py +0 -283
  129. criteo_api_retailmedia_preview/model/retail_media_externalv1_proposal_status_model_response.py +0 -285
  130. criteo_api_retailmedia_preview/model/retail_media_externalv1_resource_outcome.py +0 -279
  131. {criteo_api_retailmedia_sdk-0.0.240207.dist-info → criteo_api_retailmedia_sdk-0.0.240515.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,262 @@
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.promoted_product_resource import PromotedProductResource
34
+ globals()['PromotedProductResource'] = PromotedProductResource
35
+
36
+
37
+ class PromotedProductResourceCollectionInput(ModelNormal):
38
+ """NOTE: This class is auto generated by OpenAPI Generator.
39
+ Ref: https://openapi-generator.tech
40
+
41
+ Do not edit the class manually.
42
+
43
+ Attributes:
44
+ allowed_values (dict): The key is the tuple path to the attribute
45
+ and the for var_name this is (var_name,). The value is a dict
46
+ with a capitalized key describing the allowed value and an allowed
47
+ value. These dicts store the allowed enum values.
48
+ attribute_map (dict): The key is attribute name
49
+ and the value is json key in definition.
50
+ discriminator_value_class_map (dict): A dict to go from the discriminator
51
+ variable value to the discriminator class name.
52
+ validations (dict): The key is the tuple path to the attribute
53
+ and the for var_name this is (var_name,). The value is a dict
54
+ that stores validations for max_length, min_length, max_items,
55
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
56
+ inclusive_minimum, and regex.
57
+ additional_properties_type (tuple): A tuple of classes accepted
58
+ as additional properties values.
59
+ """
60
+
61
+ allowed_values = {
62
+ }
63
+
64
+ validations = {
65
+ }
66
+
67
+ 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
+ lazy_import()
82
+ return {
83
+ 'data': ([PromotedProductResource], none_type,), # noqa: E501
84
+ }
85
+
86
+ @cached_property
87
+ def discriminator():
88
+ return None
89
+
90
+
91
+ attribute_map = {
92
+ 'data': 'data', # noqa: E501
93
+ }
94
+
95
+ read_only_vars = {
96
+ }
97
+
98
+ _composed_schemas = {}
99
+
100
+ @classmethod
101
+ @convert_js_args_to_python_args
102
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
103
+ """PromotedProductResourceCollectionInput - a model defined in OpenAPI
104
+
105
+ Keyword Args:
106
+ _check_type (bool): if True, values for parameters in openapi_types
107
+ will be type checked and a TypeError will be
108
+ raised if the wrong type is input.
109
+ Defaults to True
110
+ _path_to_item (tuple/list): This is a list of keys or values to
111
+ drill down to the model in received_data
112
+ when deserializing a response
113
+ _spec_property_naming (bool): True if the variable names in the input data
114
+ are serialized names, as specified in the OpenAPI document.
115
+ False if the variable names in the input data
116
+ are pythonic names, e.g. snake case (default)
117
+ _configuration (Configuration): the instance to use when
118
+ deserializing a file_type parameter.
119
+ If passed, type conversion is attempted
120
+ If omitted no type conversion is done.
121
+ _visited_composed_classes (tuple): This stores a tuple of
122
+ classes that we have traveled through so that
123
+ if we see that class again we will not use its
124
+ discriminator again.
125
+ When traveling through a discriminator, the
126
+ composed schema that is
127
+ is traveled through is added to this set.
128
+ For example if Animal has a discriminator
129
+ petType and we pass in "Dog", and the class Dog
130
+ allOf includes Animal, we move through Animal
131
+ once using the discriminator, and pick Dog.
132
+ Then in Dog, we will make an instance of the
133
+ Animal class but this time we won't travel
134
+ through its discriminator because we passed in
135
+ _visited_composed_classes = (Animal,)
136
+ data ([PromotedProductResource], none_type): [optional] # noqa: E501
137
+ """
138
+
139
+ _check_type = kwargs.pop('_check_type', True)
140
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
141
+ _path_to_item = kwargs.pop('_path_to_item', ())
142
+ _configuration = kwargs.pop('_configuration', None)
143
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
144
+
145
+ self = super(OpenApiModel, cls).__new__(cls)
146
+
147
+ if args:
148
+ for arg in args:
149
+ if isinstance(arg, dict):
150
+ kwargs.update(arg)
151
+ else:
152
+ raise ApiTypeError(
153
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
154
+ args,
155
+ self.__class__.__name__,
156
+ ),
157
+ path_to_item=_path_to_item,
158
+ valid_classes=(self.__class__,),
159
+ )
160
+
161
+ self._data_store = {}
162
+ self._check_type = _check_type
163
+ self._spec_property_naming = _spec_property_naming
164
+ self._path_to_item = _path_to_item
165
+ self._configuration = _configuration
166
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
167
+
168
+ for var_name, var_value in kwargs.items():
169
+ if var_name not in self.attribute_map and \
170
+ self._configuration is not None and \
171
+ self._configuration.discard_unknown_keys and \
172
+ self.additional_properties_type is None:
173
+ # discard variable.
174
+ continue
175
+ setattr(self, var_name, var_value)
176
+ return self
177
+
178
+ required_properties = set([
179
+ '_data_store',
180
+ '_check_type',
181
+ '_spec_property_naming',
182
+ '_path_to_item',
183
+ '_configuration',
184
+ '_visited_composed_classes',
185
+ ])
186
+
187
+ @convert_js_args_to_python_args
188
+ def __init__(self, *args, **kwargs): # noqa: E501
189
+ """PromotedProductResourceCollectionInput - a model defined in OpenAPI
190
+
191
+ Keyword Args:
192
+ _check_type (bool): if True, values for parameters in openapi_types
193
+ will be type checked and a TypeError will be
194
+ raised if the wrong type is input.
195
+ Defaults to True
196
+ _path_to_item (tuple/list): This is a list of keys or values to
197
+ drill down to the model in received_data
198
+ when deserializing a response
199
+ _spec_property_naming (bool): True if the variable names in the input data
200
+ are serialized names, as specified in the OpenAPI document.
201
+ False if the variable names in the input data
202
+ are pythonic names, e.g. snake case (default)
203
+ _configuration (Configuration): the instance to use when
204
+ deserializing a file_type parameter.
205
+ If passed, type conversion is attempted
206
+ If omitted no type conversion is done.
207
+ _visited_composed_classes (tuple): This stores a tuple of
208
+ classes that we have traveled through so that
209
+ if we see that class again we will not use its
210
+ discriminator again.
211
+ When traveling through a discriminator, the
212
+ composed schema that is
213
+ is traveled through is added to this set.
214
+ For example if Animal has a discriminator
215
+ petType and we pass in "Dog", and the class Dog
216
+ allOf includes Animal, we move through Animal
217
+ once using the discriminator, and pick Dog.
218
+ Then in Dog, we will make an instance of the
219
+ Animal class but this time we won't travel
220
+ through its discriminator because we passed in
221
+ _visited_composed_classes = (Animal,)
222
+ data ([PromotedProductResource], none_type): [optional] # noqa: E501
223
+ """
224
+
225
+ _check_type = kwargs.pop('_check_type', True)
226
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
227
+ _path_to_item = kwargs.pop('_path_to_item', ())
228
+ _configuration = kwargs.pop('_configuration', None)
229
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
230
+
231
+ if args:
232
+ for arg in args:
233
+ if isinstance(arg, dict):
234
+ kwargs.update(arg)
235
+ else:
236
+ raise ApiTypeError(
237
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
238
+ args,
239
+ self.__class__.__name__,
240
+ ),
241
+ path_to_item=_path_to_item,
242
+ valid_classes=(self.__class__,),
243
+ )
244
+
245
+ self._data_store = {}
246
+ self._check_type = _check_type
247
+ self._spec_property_naming = _spec_property_naming
248
+ self._path_to_item = _path_to_item
249
+ self._configuration = _configuration
250
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
251
+
252
+ for var_name, var_value in kwargs.items():
253
+ if var_name not in self.attribute_map and \
254
+ self._configuration is not None and \
255
+ self._configuration.discard_unknown_keys and \
256
+ self.additional_properties_type is None:
257
+ # discard variable.
258
+ continue
259
+ setattr(self, var_name, var_value)
260
+ if var_name in self.read_only_vars:
261
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
262
+ f"class with read only attributes.")
@@ -0,0 +1,278 @@
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.product_metadata import ProductMetadata
34
+ from criteo_api_retailmedia_preview.model.promoted_product_resource import PromotedProductResource
35
+ from criteo_api_retailmedia_preview.model.rmca_common_problem import RmcaCommonProblem
36
+ globals()['ProductMetadata'] = ProductMetadata
37
+ globals()['PromotedProductResource'] = PromotedProductResource
38
+ globals()['RmcaCommonProblem'] = RmcaCommonProblem
39
+
40
+
41
+ class PromotedProductResourceCollectionOutcome(ModelNormal):
42
+ """NOTE: This class is auto generated by OpenAPI Generator.
43
+ Ref: https://openapi-generator.tech
44
+
45
+ Do not edit the class manually.
46
+
47
+ Attributes:
48
+ allowed_values (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
+ with a capitalized key describing the allowed value and an allowed
51
+ value. These dicts store the allowed enum values.
52
+ attribute_map (dict): The key is attribute name
53
+ and the value is json key in definition.
54
+ discriminator_value_class_map (dict): A dict to go from the discriminator
55
+ variable value to the discriminator class name.
56
+ validations (dict): The key is the tuple path to the attribute
57
+ and the for var_name this is (var_name,). The value is a dict
58
+ that stores validations for max_length, min_length, max_items,
59
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
60
+ inclusive_minimum, and regex.
61
+ additional_properties_type (tuple): A tuple of classes accepted
62
+ as additional properties values.
63
+ """
64
+
65
+ allowed_values = {
66
+ }
67
+
68
+ validations = {
69
+ }
70
+
71
+ additional_properties_type = None
72
+
73
+ _nullable = False
74
+
75
+ @cached_property
76
+ def openapi_types():
77
+ """
78
+ This must be a method because a model may have properties that are
79
+ of type self, this must run after the class is loaded
80
+
81
+ Returns
82
+ openapi_types (dict): The key is attribute name
83
+ and the value is attribute type.
84
+ """
85
+ lazy_import()
86
+ return {
87
+ 'errors': ([RmcaCommonProblem], none_type,), # noqa: E501
88
+ 'warnings': ([RmcaCommonProblem], none_type,), # noqa: E501
89
+ 'meta': (ProductMetadata,), # noqa: E501
90
+ 'data': ([PromotedProductResource], none_type,), # noqa: E501
91
+ }
92
+
93
+ @cached_property
94
+ def discriminator():
95
+ return None
96
+
97
+
98
+ attribute_map = {
99
+ 'errors': 'errors', # noqa: E501
100
+ 'warnings': 'warnings', # noqa: E501
101
+ 'meta': 'meta', # noqa: E501
102
+ 'data': 'data', # noqa: E501
103
+ }
104
+
105
+ read_only_vars = {
106
+ }
107
+
108
+ _composed_schemas = {}
109
+
110
+ @classmethod
111
+ @convert_js_args_to_python_args
112
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
113
+ """PromotedProductResourceCollectionOutcome - a model defined in OpenAPI
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
+ errors ([RmcaCommonProblem], none_type): [optional] # noqa: E501
147
+ warnings ([RmcaCommonProblem], none_type): [optional] # noqa: E501
148
+ meta (ProductMetadata): [optional] # noqa: E501
149
+ data ([PromotedProductResource], none_type): [optional] # noqa: E501
150
+ """
151
+
152
+ _check_type = kwargs.pop('_check_type', True)
153
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
154
+ _path_to_item = kwargs.pop('_path_to_item', ())
155
+ _configuration = kwargs.pop('_configuration', None)
156
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
157
+
158
+ self = super(OpenApiModel, cls).__new__(cls)
159
+
160
+ if args:
161
+ for arg in args:
162
+ if isinstance(arg, dict):
163
+ kwargs.update(arg)
164
+ else:
165
+ raise ApiTypeError(
166
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
167
+ args,
168
+ self.__class__.__name__,
169
+ ),
170
+ path_to_item=_path_to_item,
171
+ valid_classes=(self.__class__,),
172
+ )
173
+
174
+ self._data_store = {}
175
+ self._check_type = _check_type
176
+ self._spec_property_naming = _spec_property_naming
177
+ self._path_to_item = _path_to_item
178
+ self._configuration = _configuration
179
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
180
+
181
+ for var_name, var_value in kwargs.items():
182
+ if var_name not in self.attribute_map and \
183
+ self._configuration is not None and \
184
+ self._configuration.discard_unknown_keys and \
185
+ self.additional_properties_type is None:
186
+ # discard variable.
187
+ continue
188
+ setattr(self, var_name, var_value)
189
+ return self
190
+
191
+ required_properties = set([
192
+ '_data_store',
193
+ '_check_type',
194
+ '_spec_property_naming',
195
+ '_path_to_item',
196
+ '_configuration',
197
+ '_visited_composed_classes',
198
+ ])
199
+
200
+ @convert_js_args_to_python_args
201
+ def __init__(self, *args, **kwargs): # noqa: E501
202
+ """PromotedProductResourceCollectionOutcome - a model defined in OpenAPI
203
+
204
+ Keyword Args:
205
+ _check_type (bool): if True, values for parameters in openapi_types
206
+ will be type checked and a TypeError will be
207
+ raised if the wrong type is input.
208
+ Defaults to True
209
+ _path_to_item (tuple/list): This is a list of keys or values to
210
+ drill down to the model in received_data
211
+ when deserializing a response
212
+ _spec_property_naming (bool): True if the variable names in the input data
213
+ are serialized names, as specified in the OpenAPI document.
214
+ False if the variable names in the input data
215
+ are pythonic names, e.g. snake case (default)
216
+ _configuration (Configuration): the instance to use when
217
+ deserializing a file_type parameter.
218
+ If passed, type conversion is attempted
219
+ If omitted no type conversion is done.
220
+ _visited_composed_classes (tuple): This stores a tuple of
221
+ classes that we have traveled through so that
222
+ if we see that class again we will not use its
223
+ discriminator again.
224
+ When traveling through a discriminator, the
225
+ composed schema that is
226
+ is traveled through is added to this set.
227
+ For example if Animal has a discriminator
228
+ petType and we pass in "Dog", and the class Dog
229
+ allOf includes Animal, we move through Animal
230
+ once using the discriminator, and pick Dog.
231
+ Then in Dog, we will make an instance of the
232
+ Animal class but this time we won't travel
233
+ through its discriminator because we passed in
234
+ _visited_composed_classes = (Animal,)
235
+ errors ([RmcaCommonProblem], none_type): [optional] # noqa: E501
236
+ warnings ([RmcaCommonProblem], none_type): [optional] # noqa: E501
237
+ meta (ProductMetadata): [optional] # noqa: E501
238
+ data ([PromotedProductResource], none_type): [optional] # noqa: E501
239
+ """
240
+
241
+ _check_type = kwargs.pop('_check_type', True)
242
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
243
+ _path_to_item = kwargs.pop('_path_to_item', ())
244
+ _configuration = kwargs.pop('_configuration', None)
245
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
246
+
247
+ if args:
248
+ for arg in args:
249
+ if isinstance(arg, dict):
250
+ kwargs.update(arg)
251
+ else:
252
+ raise ApiTypeError(
253
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
254
+ args,
255
+ self.__class__.__name__,
256
+ ),
257
+ path_to_item=_path_to_item,
258
+ valid_classes=(self.__class__,),
259
+ )
260
+
261
+ self._data_store = {}
262
+ self._check_type = _check_type
263
+ self._spec_property_naming = _spec_property_naming
264
+ self._path_to_item = _path_to_item
265
+ self._configuration = _configuration
266
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
267
+
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.")
@@ -29,8 +29,14 @@ from criteo_api_retailmedia_preview.model_utils import ( # noqa: F401
29
29
  from criteo_api_retailmedia_preview.exceptions import ApiAttributeError
30
30
 
31
31
 
32
+ def lazy_import():
33
+ from criteo_api_retailmedia_preview.model.approval_status_model import ApprovalStatusModel
34
+ from criteo_api_retailmedia_preview.model.negotiation_state_model import NegotiationStateModel
35
+ globals()['ApprovalStatusModel'] = ApprovalStatusModel
36
+ globals()['NegotiationStateModel'] = NegotiationStateModel
32
37
 
33
- class RetailMediaExternalv1ProposalStatusModel(ModelNormal):
38
+
39
+ class ProposalStatusModel(ModelNormal):
34
40
  """NOTE: This class is auto generated by OpenAPI Generator.
35
41
  Ref: https://openapi-generator.tech
36
42
 
@@ -55,37 +61,12 @@ class RetailMediaExternalv1ProposalStatusModel(ModelNormal):
55
61
  """
56
62
 
57
63
  allowed_values = {
58
- ('negotiation_state',): {
59
- 'INVALID': "Invalid",
60
- 'MODIFIED': "Modified",
61
- 'SUBMITTED': "Submitted",
62
- 'REVIEWED': "Reviewed",
63
- 'APPROVED': "Approved",
64
- },
65
- ('booking_status',): {
66
- 'NOTSUBMITTED': "NotSubmitted",
67
- 'SUBMITTED': "Submitted",
68
- 'REJECTED': "Rejected",
69
- 'APPROVED': "Approved",
70
- },
71
- ('runnable_status',): {
72
- 'NOTSUBMITTED': "NotSubmitted",
73
- 'SUBMITTED': "Submitted",
74
- 'REJECTED': "Rejected",
75
- 'APPROVED': "Approved",
76
- },
77
64
  }
78
65
 
79
66
  validations = {
80
67
  }
81
68
 
82
- @cached_property
83
- def additional_properties_type():
84
- """
85
- This must be a method because a model may have properties that are
86
- of type self, this must run after the class is loaded
87
- """
88
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
69
+ additional_properties_type = None
89
70
 
90
71
  _nullable = False
91
72
 
@@ -99,10 +80,11 @@ class RetailMediaExternalv1ProposalStatusModel(ModelNormal):
99
80
  openapi_types (dict): The key is attribute name
100
81
  and the value is attribute type.
101
82
  """
83
+ lazy_import()
102
84
  return {
103
- 'negotiation_state': (str,), # noqa: E501
104
- 'booking_status': (str,), # noqa: E501
105
- 'runnable_status': (str,), # noqa: E501
85
+ 'negotiation_state': (NegotiationStateModel,), # noqa: E501
86
+ 'booking_status': (ApprovalStatusModel,), # noqa: E501
87
+ 'runnable_status': (ApprovalStatusModel,), # noqa: E501
106
88
  'comment': (str, none_type,), # noqa: E501
107
89
  'created_at': (datetime, none_type,), # noqa: E501
108
90
  'updated_at': (datetime, none_type,), # noqa: E501
@@ -129,13 +111,8 @@ class RetailMediaExternalv1ProposalStatusModel(ModelNormal):
129
111
 
130
112
  @classmethod
131
113
  @convert_js_args_to_python_args
132
- def _from_openapi_data(cls, negotiation_state, booking_status, runnable_status, *args, **kwargs): # noqa: E501
133
- """RetailMediaExternalv1ProposalStatusModel - a model defined in OpenAPI
134
-
135
- Args:
136
- negotiation_state (str):
137
- booking_status (str):
138
- runnable_status (str):
114
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
115
+ """ProposalStatusModel - a model defined in OpenAPI
139
116
 
140
117
  Keyword Args:
141
118
  _check_type (bool): if True, values for parameters in openapi_types
@@ -168,6 +145,9 @@ class RetailMediaExternalv1ProposalStatusModel(ModelNormal):
168
145
  Animal class but this time we won't travel
169
146
  through its discriminator because we passed in
170
147
  _visited_composed_classes = (Animal,)
148
+ negotiation_state (NegotiationStateModel): [optional] # noqa: E501
149
+ booking_status (ApprovalStatusModel): [optional] # noqa: E501
150
+ runnable_status (ApprovalStatusModel): [optional] # noqa: E501
171
151
  comment (str, none_type): [optional] # noqa: E501
172
152
  created_at (datetime, none_type): [optional] # noqa: E501
173
153
  updated_at (datetime, none_type): [optional] # noqa: E501
@@ -202,9 +182,6 @@ class RetailMediaExternalv1ProposalStatusModel(ModelNormal):
202
182
  self._configuration = _configuration
203
183
  self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
204
184
 
205
- self.negotiation_state = negotiation_state
206
- self.booking_status = booking_status
207
- self.runnable_status = runnable_status
208
185
  for var_name, var_value in kwargs.items():
209
186
  if var_name not in self.attribute_map and \
210
187
  self._configuration is not None and \
@@ -225,13 +202,8 @@ class RetailMediaExternalv1ProposalStatusModel(ModelNormal):
225
202
  ])
226
203
 
227
204
  @convert_js_args_to_python_args
228
- def __init__(self, negotiation_state, booking_status, runnable_status, *args, **kwargs): # noqa: E501
229
- """RetailMediaExternalv1ProposalStatusModel - a model defined in OpenAPI
230
-
231
- Args:
232
- negotiation_state (str):
233
- booking_status (str):
234
- runnable_status (str):
205
+ def __init__(self, *args, **kwargs): # noqa: E501
206
+ """ProposalStatusModel - a model defined in OpenAPI
235
207
 
236
208
  Keyword Args:
237
209
  _check_type (bool): if True, values for parameters in openapi_types
@@ -264,6 +236,9 @@ class RetailMediaExternalv1ProposalStatusModel(ModelNormal):
264
236
  Animal class but this time we won't travel
265
237
  through its discriminator because we passed in
266
238
  _visited_composed_classes = (Animal,)
239
+ negotiation_state (NegotiationStateModel): [optional] # noqa: E501
240
+ booking_status (ApprovalStatusModel): [optional] # noqa: E501
241
+ runnable_status (ApprovalStatusModel): [optional] # noqa: E501
267
242
  comment (str, none_type): [optional] # noqa: E501
268
243
  created_at (datetime, none_type): [optional] # noqa: E501
269
244
  updated_at (datetime, none_type): [optional] # noqa: E501
@@ -296,9 +271,6 @@ class RetailMediaExternalv1ProposalStatusModel(ModelNormal):
296
271
  self._configuration = _configuration
297
272
  self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
298
273
 
299
- self.negotiation_state = negotiation_state
300
- self.booking_status = booking_status
301
- self.runnable_status = runnable_status
302
274
  for var_name, var_value in kwargs.items():
303
275
  if var_name not in self.attribute_map and \
304
276
  self._configuration is not None and \