criteo-api-retailmedia-sdk 0.0.240404__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.
- criteo_api_retailmedia_preview/__init__.py +1 -1
- criteo_api_retailmedia_preview/api/audience_api.py +284 -0
- criteo_api_retailmedia_preview/api/campaign_api.py +1755 -448
- criteo_api_retailmedia_preview/api_client.py +1 -1
- criteo_api_retailmedia_preview/configuration.py +1 -1
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_add_remove_keyword_model.py → add_remove_keyword_model.py} +12 -19
- criteo_api_retailmedia_preview/model/add_remove_keywords_model.py +262 -0
- criteo_api_retailmedia_preview/model/add_remove_keywords_model_request.py +262 -0
- criteo_api_retailmedia_preview/model/add_remove_keywords_model_resource.py +270 -0
- criteo_api_retailmedia_preview/model/approval_status_model.py +292 -0
- criteo_api_retailmedia_preview/model/async_accounts_report.py +39 -27
- criteo_api_retailmedia_preview/model/async_campaigns_report.py +24 -13
- criteo_api_retailmedia_preview/model/async_line_items_report.py +24 -13
- criteo_api_retailmedia_preview/model/audience_error.py +310 -0
- criteo_api_retailmedia_preview/model/audience_warning.py +312 -0
- criteo_api_retailmedia_preview/model/{line_item_bid_multipliers_response.py → creative_v2_list_response.py} +16 -16
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_resource_outcome.py → creative_v2_response.py} +19 -17
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_add_remove_keywords_model_request.py → error_code_response.py} +23 -11
- criteo_api_retailmedia_preview/model/external_choice_variable_value.py +269 -0
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_set_bids_model.py → external_color_variable_value.py} +11 -14
- criteo_api_retailmedia_preview/model/external_creative_create_model_v2.py +297 -0
- criteo_api_retailmedia_preview/model/external_creative_update_model_v2.py +297 -0
- criteo_api_retailmedia_preview/model/external_creative_v2.py +361 -0
- criteo_api_retailmedia_preview/model/external_files_variable_value.py +272 -0
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_set_bids_model_request.py → external_hyperlink_variable_value.py} +7 -13
- criteo_api_retailmedia_preview/model/{line_item_bid_multipliers.py → external_line_item_bid_multipliers_v2.py} +41 -29
- criteo_api_retailmedia_preview/model/external_page_type_environment.py +293 -0
- criteo_api_retailmedia_preview/model/external_template_variable_value.py +309 -0
- criteo_api_retailmedia_preview/model/external_text_variable_value.py +263 -0
- criteo_api_retailmedia_preview/model/external_video_variable_value.py +293 -0
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_input_keywords_model.py → input_keywords_model.py} +4 -16
- 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
- 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
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_keyword_data_model.py → keyword_data_model.py} +19 -37
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_keywords_model.py → keywords_model.py} +9 -18
- criteo_api_retailmedia_preview/model/keywords_model_resource.py +270 -0
- criteo_api_retailmedia_preview/model/keywords_model_response.py +274 -0
- criteo_api_retailmedia_preview/model/{line_item_bid_multipliers_request.py → line_item_bid_multipliers_v2_request.py} +8 -8
- criteo_api_retailmedia_preview/model/line_item_bid_multipliers_v2_response.py +281 -0
- criteo_api_retailmedia_preview/model/line_item_product_status.py +291 -0
- criteo_api_retailmedia_preview/model/match_type_model.py +291 -0
- criteo_api_retailmedia_preview/model/negotiation_state_model.py +293 -0
- criteo_api_retailmedia_preview/model/product_metadata.py +269 -0
- criteo_api_retailmedia_preview/model/product_resource_outcome.py +266 -0
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_add_remove_keywords_model.py → promoted_product.py} +18 -19
- criteo_api_retailmedia_preview/model/promoted_product_resource.py +270 -0
- criteo_api_retailmedia_preview/model/promoted_product_resource_collection_input.py +262 -0
- criteo_api_retailmedia_preview/model/promoted_product_resource_collection_outcome.py +278 -0
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_proposal_status_model.py → proposal_status_model.py} +22 -50
- criteo_api_retailmedia_preview/model/proposal_status_model_resource.py +270 -0
- criteo_api_retailmedia_preview/model/proposal_status_model_response.py +274 -0
- criteo_api_retailmedia_preview/model/{resource_of_line_item_bid_multipliers.py → resource_of_creative_v2.py} +8 -8
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_keywords_model_resource.py → resource_of_line_item_bid_multipliers_v2.py} +17 -23
- criteo_api_retailmedia_preview/model/resource_outcome.py +268 -0
- criteo_api_retailmedia_preview/model/retail_media_account.py +6 -6
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_set_bids_model_resource.py → retail_media_contactlist_amendment.py} +16 -20
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_add_remove_keywords_model_resource.py → retail_media_contactlist_amendment_attributes.py} +34 -25
- criteo_api_retailmedia_preview/model/retail_media_contactlist_amendment_request.py +275 -0
- criteo_api_retailmedia_preview/model/retail_media_contactlist_operation.py +291 -0
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_proposal_status_model_resource.py → retail_media_contactlist_operation_response_attributes.py} +14 -16
- criteo_api_retailmedia_preview/model/retail_media_contactlist_operation_response_attributes_attributes.py +297 -0
- criteo_api_retailmedia_preview/model/review_state_model.py +294 -0
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_problem_details.py → rmca_common_problem.py} +41 -30
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_set_bid_model.py → set_bid_model.py} +4 -10
- criteo_api_retailmedia_preview/model/set_bids_model.py +262 -0
- criteo_api_retailmedia_preview/model/set_bids_model_request.py +262 -0
- criteo_api_retailmedia_preview/model/set_bids_model_resource.py +270 -0
- criteo_api_retailmedia_preview/model/sync_attributed_transactions_report.py +12 -10
- criteo_api_retailmedia_preview/model/sync_campaigns_report.py +24 -13
- criteo_api_retailmedia_preview/model/sync_line_items_report.py +24 -13
- criteo_api_retailmedia_preview/models/__init__.py +58 -24
- {criteo_api_retailmedia_sdk-0.0.240404.dist-info → criteo_api_retailmedia_sdk-0.0.240515.dist-info}/METADATA +3 -3
- {criteo_api_retailmedia_sdk-0.0.240404.dist-info → criteo_api_retailmedia_sdk-0.0.240515.dist-info}/RECORD +75 -41
- criteo_api_retailmedia_preview/model/retail_media_externalv1_keywords_model_response.py +0 -285
- criteo_api_retailmedia_preview/model/retail_media_externalv1_proposal_status_model_response.py +0 -285
- {criteo_api_retailmedia_sdk-0.0.240404.dist-info → criteo_api_retailmedia_sdk-0.0.240515.dist-info}/WHEEL +0 -0
- {criteo_api_retailmedia_sdk-0.0.240404.dist-info → criteo_api_retailmedia_sdk-0.0.240515.dist-info}/top_level.txt +0 -0
|
@@ -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
|
-
|
|
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
|
-
|
|
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': (
|
|
104
|
-
'booking_status': (
|
|
105
|
-
'runnable_status': (
|
|
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,
|
|
133
|
-
"""
|
|
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,
|
|
229
|
-
"""
|
|
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 \
|
|
@@ -0,0 +1,270 @@
|
|
|
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.proposal_status_model import ProposalStatusModel
|
|
34
|
+
globals()['ProposalStatusModel'] = ProposalStatusModel
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class ProposalStatusModelResource(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
|
+
'id': (str, none_type,), # noqa: E501
|
|
84
|
+
'type': (str, none_type,), # noqa: E501
|
|
85
|
+
'attributes': (ProposalStatusModel,), # noqa: E501
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@cached_property
|
|
89
|
+
def discriminator():
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
attribute_map = {
|
|
94
|
+
'id': 'id', # noqa: E501
|
|
95
|
+
'type': 'type', # noqa: E501
|
|
96
|
+
'attributes': 'attributes', # noqa: E501
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
read_only_vars = {
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
_composed_schemas = {}
|
|
103
|
+
|
|
104
|
+
@classmethod
|
|
105
|
+
@convert_js_args_to_python_args
|
|
106
|
+
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
|
|
107
|
+
"""ProposalStatusModelResource - a model defined in OpenAPI
|
|
108
|
+
|
|
109
|
+
Keyword Args:
|
|
110
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
111
|
+
will be type checked and a TypeError will be
|
|
112
|
+
raised if the wrong type is input.
|
|
113
|
+
Defaults to True
|
|
114
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
115
|
+
drill down to the model in received_data
|
|
116
|
+
when deserializing a response
|
|
117
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
118
|
+
are serialized names, as specified in the OpenAPI document.
|
|
119
|
+
False if the variable names in the input data
|
|
120
|
+
are pythonic names, e.g. snake case (default)
|
|
121
|
+
_configuration (Configuration): the instance to use when
|
|
122
|
+
deserializing a file_type parameter.
|
|
123
|
+
If passed, type conversion is attempted
|
|
124
|
+
If omitted no type conversion is done.
|
|
125
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
126
|
+
classes that we have traveled through so that
|
|
127
|
+
if we see that class again we will not use its
|
|
128
|
+
discriminator again.
|
|
129
|
+
When traveling through a discriminator, the
|
|
130
|
+
composed schema that is
|
|
131
|
+
is traveled through is added to this set.
|
|
132
|
+
For example if Animal has a discriminator
|
|
133
|
+
petType and we pass in "Dog", and the class Dog
|
|
134
|
+
allOf includes Animal, we move through Animal
|
|
135
|
+
once using the discriminator, and pick Dog.
|
|
136
|
+
Then in Dog, we will make an instance of the
|
|
137
|
+
Animal class but this time we won't travel
|
|
138
|
+
through its discriminator because we passed in
|
|
139
|
+
_visited_composed_classes = (Animal,)
|
|
140
|
+
id (str, none_type): [optional] # noqa: E501
|
|
141
|
+
type (str, none_type): [optional] # noqa: E501
|
|
142
|
+
attributes (ProposalStatusModel): [optional] # noqa: E501
|
|
143
|
+
"""
|
|
144
|
+
|
|
145
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
146
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
|
|
147
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
148
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
149
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
150
|
+
|
|
151
|
+
self = super(OpenApiModel, cls).__new__(cls)
|
|
152
|
+
|
|
153
|
+
if args:
|
|
154
|
+
for arg in args:
|
|
155
|
+
if isinstance(arg, dict):
|
|
156
|
+
kwargs.update(arg)
|
|
157
|
+
else:
|
|
158
|
+
raise ApiTypeError(
|
|
159
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
160
|
+
args,
|
|
161
|
+
self.__class__.__name__,
|
|
162
|
+
),
|
|
163
|
+
path_to_item=_path_to_item,
|
|
164
|
+
valid_classes=(self.__class__,),
|
|
165
|
+
)
|
|
166
|
+
|
|
167
|
+
self._data_store = {}
|
|
168
|
+
self._check_type = _check_type
|
|
169
|
+
self._spec_property_naming = _spec_property_naming
|
|
170
|
+
self._path_to_item = _path_to_item
|
|
171
|
+
self._configuration = _configuration
|
|
172
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
173
|
+
|
|
174
|
+
for var_name, var_value in kwargs.items():
|
|
175
|
+
if var_name not in self.attribute_map and \
|
|
176
|
+
self._configuration is not None and \
|
|
177
|
+
self._configuration.discard_unknown_keys and \
|
|
178
|
+
self.additional_properties_type is None:
|
|
179
|
+
# discard variable.
|
|
180
|
+
continue
|
|
181
|
+
setattr(self, var_name, var_value)
|
|
182
|
+
return self
|
|
183
|
+
|
|
184
|
+
required_properties = set([
|
|
185
|
+
'_data_store',
|
|
186
|
+
'_check_type',
|
|
187
|
+
'_spec_property_naming',
|
|
188
|
+
'_path_to_item',
|
|
189
|
+
'_configuration',
|
|
190
|
+
'_visited_composed_classes',
|
|
191
|
+
])
|
|
192
|
+
|
|
193
|
+
@convert_js_args_to_python_args
|
|
194
|
+
def __init__(self, *args, **kwargs): # noqa: E501
|
|
195
|
+
"""ProposalStatusModelResource - a model defined in OpenAPI
|
|
196
|
+
|
|
197
|
+
Keyword Args:
|
|
198
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
199
|
+
will be type checked and a TypeError will be
|
|
200
|
+
raised if the wrong type is input.
|
|
201
|
+
Defaults to True
|
|
202
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
203
|
+
drill down to the model in received_data
|
|
204
|
+
when deserializing a response
|
|
205
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
206
|
+
are serialized names, as specified in the OpenAPI document.
|
|
207
|
+
False if the variable names in the input data
|
|
208
|
+
are pythonic names, e.g. snake case (default)
|
|
209
|
+
_configuration (Configuration): the instance to use when
|
|
210
|
+
deserializing a file_type parameter.
|
|
211
|
+
If passed, type conversion is attempted
|
|
212
|
+
If omitted no type conversion is done.
|
|
213
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
214
|
+
classes that we have traveled through so that
|
|
215
|
+
if we see that class again we will not use its
|
|
216
|
+
discriminator again.
|
|
217
|
+
When traveling through a discriminator, the
|
|
218
|
+
composed schema that is
|
|
219
|
+
is traveled through is added to this set.
|
|
220
|
+
For example if Animal has a discriminator
|
|
221
|
+
petType and we pass in "Dog", and the class Dog
|
|
222
|
+
allOf includes Animal, we move through Animal
|
|
223
|
+
once using the discriminator, and pick Dog.
|
|
224
|
+
Then in Dog, we will make an instance of the
|
|
225
|
+
Animal class but this time we won't travel
|
|
226
|
+
through its discriminator because we passed in
|
|
227
|
+
_visited_composed_classes = (Animal,)
|
|
228
|
+
id (str, none_type): [optional] # noqa: E501
|
|
229
|
+
type (str, none_type): [optional] # noqa: E501
|
|
230
|
+
attributes (ProposalStatusModel): [optional] # noqa: E501
|
|
231
|
+
"""
|
|
232
|
+
|
|
233
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
234
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
235
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
236
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
237
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
238
|
+
|
|
239
|
+
if args:
|
|
240
|
+
for arg in args:
|
|
241
|
+
if isinstance(arg, dict):
|
|
242
|
+
kwargs.update(arg)
|
|
243
|
+
else:
|
|
244
|
+
raise ApiTypeError(
|
|
245
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
246
|
+
args,
|
|
247
|
+
self.__class__.__name__,
|
|
248
|
+
),
|
|
249
|
+
path_to_item=_path_to_item,
|
|
250
|
+
valid_classes=(self.__class__,),
|
|
251
|
+
)
|
|
252
|
+
|
|
253
|
+
self._data_store = {}
|
|
254
|
+
self._check_type = _check_type
|
|
255
|
+
self._spec_property_naming = _spec_property_naming
|
|
256
|
+
self._path_to_item = _path_to_item
|
|
257
|
+
self._configuration = _configuration
|
|
258
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
259
|
+
|
|
260
|
+
for var_name, var_value in kwargs.items():
|
|
261
|
+
if var_name not in self.attribute_map and \
|
|
262
|
+
self._configuration is not None and \
|
|
263
|
+
self._configuration.discard_unknown_keys and \
|
|
264
|
+
self.additional_properties_type is None:
|
|
265
|
+
# discard variable.
|
|
266
|
+
continue
|
|
267
|
+
setattr(self, var_name, var_value)
|
|
268
|
+
if var_name in self.read_only_vars:
|
|
269
|
+
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
|
270
|
+
f"class with read only attributes.")
|