criteo-api-retailmedia-sdk 0.0.240118__py3-none-any.whl → 0.0.240404__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.
- criteo_api_retailmedia_preview/__init__.py +1 -1
- criteo_api_retailmedia_preview/api/accounts_api.py +181 -35
- criteo_api_retailmedia_preview/api/analytics_api.py +142 -0
- criteo_api_retailmedia_preview/api/audience_api.py +2 -313
- criteo_api_retailmedia_preview/api/campaign_api.py +443 -974
- criteo_api_retailmedia_preview/api/catalog_api.py +312 -0
- criteo_api_retailmedia_preview/api_client.py +4 -4
- criteo_api_retailmedia_preview/apis/__init__.py +1 -0
- criteo_api_retailmedia_preview/configuration.py +1 -1
- criteo_api_retailmedia_preview/model/{creative202210.py → async_accounts_report.py} +149 -95
- criteo_api_retailmedia_preview/model/{external_catalog_request_preview.py → async_accounts_report_request.py} +13 -10
- criteo_api_retailmedia_preview/model/async_accounts_report_resource.py +273 -0
- criteo_api_retailmedia_preview/model/async_campaigns_report.py +57 -53
- criteo_api_retailmedia_preview/model/async_line_items_report.py +57 -54
- criteo_api_retailmedia_preview/model/{customer_list_details.py → batch_accepted_response.py} +11 -11
- criteo_api_retailmedia_preview/model/{value_resource_collection_outcome_of_int64.py → change_details.py} +27 -26
- criteo_api_retailmedia_preview/model/{color_variable_value.py → custom_attribute.py} +17 -16
- criteo_api_retailmedia_preview/model/export_report_column.py +2 -2
- criteo_api_retailmedia_preview/model/external_account.py +4 -0
- criteo_api_retailmedia_preview/model/{files_variable_value.py → external_line_item_capping_v2.py} +22 -13
- criteo_api_retailmedia_preview/model/external_line_item_page_category_v2.py +273 -0
- criteo_api_retailmedia_preview/model/{page_type_environment.py → external_line_item_page_v2.py} +40 -29
- criteo_api_retailmedia_preview/model/{retail_media_audience_attributes.py → external_preferred_line_item_create_model_v2.py} +79 -25
- criteo_api_retailmedia_preview/model/{external_catalog_status.py → external_preferred_line_item_update_model_v2.py} +70 -47
- criteo_api_retailmedia_preview/model/{template.py → external_preferred_line_item_v2.py} +93 -70
- criteo_api_retailmedia_preview/model/{json_api_body_with_id_of_int64_and_catalog_status_and_catalog_status.py → fail_response.py} +21 -23
- criteo_api_retailmedia_preview/model/input_resource_of_preferred_line_item_create_model_v2.py +273 -0
- criteo_api_retailmedia_preview/model/{retail_media_audience.py → insertion_order_history_change_data_capture.py} +48 -42
- criteo_api_retailmedia_preview/model/installment.py +273 -0
- criteo_api_retailmedia_preview/model/{creative202210_response.py → loyalty_points.py} +15 -25
- criteo_api_retailmedia_preview/model/metadata.py +273 -0
- criteo_api_retailmedia_preview/model/page_of_insertion_order_history_change_data_capture.py +276 -0
- criteo_api_retailmedia_preview/model/{json_api_request_of_catalog_request_preview.py → preferred_line_item_create_model_v2_request.py} +8 -8
- criteo_api_retailmedia_preview/model/{common_status_code_response.py → preferred_line_item_update_model_v2_request.py} +9 -15
- criteo_api_retailmedia_preview/model/{retail_media_audience_v2_list_response.py → preferred_line_item_v2_paged_list_response.py} +21 -27
- criteo_api_retailmedia_preview/model/{creative202210_list_response.py → preferred_line_item_v2_response.py} +16 -16
- criteo_api_retailmedia_preview/model/price.py +267 -0
- criteo_api_retailmedia_preview/model/product.py +626 -0
- criteo_api_retailmedia_preview/model/{retail_media_audience_v2.py → product_importer_error.py} +37 -29
- criteo_api_retailmedia_preview/model/product_importer_warning.py +299 -0
- criteo_api_retailmedia_preview/model/product_shipping.py +293 -0
- criteo_api_retailmedia_preview/model/product_shipping_dimension.py +267 -0
- criteo_api_retailmedia_preview/model/product_shipping_weight.py +267 -0
- criteo_api_retailmedia_preview/model/product_tax.py +283 -0
- criteo_api_retailmedia_preview/model/{choice_variable_value.py → product_unit_pricing_base_measure.py} +13 -15
- criteo_api_retailmedia_preview/model/{text_variable_specification.py → product_unit_pricing_measure.py} +11 -7
- criteo_api_retailmedia_preview/model/{section.py → products_custom_batch_request.py} +13 -19
- criteo_api_retailmedia_preview/model/{retail_media_audience_v2_attributes.py → products_custom_batch_request_entry.py} +43 -29
- criteo_api_retailmedia_preview/model/{json_api_body_without_id_of_catalog_request_and_catalog_request_preview.py → report_detail_error.py} +35 -15
- criteo_api_retailmedia_preview/model/report_detail_errors.py +281 -0
- criteo_api_retailmedia_preview/model/{template_variable_value.py → report_ok_response.py} +58 -43
- criteo_api_retailmedia_preview/model/{resource_of_creative202210.py → resource_of_preferred_line_item_update_model_v2.py} +9 -9
- criteo_api_retailmedia_preview/model/{resource_of_template.py → resource_of_preferred_line_item_v2.py} +9 -9
- criteo_api_retailmedia_preview/model/retail_media_account.py +4 -0
- criteo_api_retailmedia_preview/model/retail_media_brand_account_creation.py +4 -0
- criteo_api_retailmedia_preview/model/{text_variable_value.py → retail_media_brands.py} +10 -22
- criteo_api_retailmedia_preview/model/retail_media_seller_account_creation.py +4 -0
- criteo_api_retailmedia_preview/model/rm_legacy_audience_get_entity_v2.py +3 -3
- criteo_api_retailmedia_preview/model/sync_attributed_transactions_report.py +37 -37
- criteo_api_retailmedia_preview/model/sync_campaigns_report.py +51 -47
- criteo_api_retailmedia_preview/model/sync_line_items_report.py +53 -50
- criteo_api_retailmedia_preview/model/value_resource_collection_input_of_retail_media_seller.py +262 -0
- criteo_api_retailmedia_preview/model/value_resource_input_of_retail_media_brand_account_creation.py +262 -0
- criteo_api_retailmedia_preview/model/{hyperlink_variable_value.py → value_resource_input_of_retail_media_brands.py} +15 -22
- criteo_api_retailmedia_preview/model/value_resource_input_of_retail_media_seller_account_creation.py +262 -0
- criteo_api_retailmedia_preview/model/value_resource_of_retail_media_brand_account_creation.py +266 -0
- criteo_api_retailmedia_preview/model/{value_resource_of_int64.py → value_resource_of_retail_media_brands.py} +11 -6
- criteo_api_retailmedia_preview/model/value_resource_of_retail_media_seller_account_creation.py +266 -0
- criteo_api_retailmedia_preview/models/__init__.py +48 -42
- {criteo_api_retailmedia_sdk-0.0.240118.dist-info → criteo_api_retailmedia_sdk-0.0.240404.dist-info}/METADATA +3 -3
- {criteo_api_retailmedia_sdk-0.0.240118.dist-info → criteo_api_retailmedia_sdk-0.0.240404.dist-info}/RECORD +73 -66
- {criteo_api_retailmedia_sdk-0.0.240118.dist-info → criteo_api_retailmedia_sdk-0.0.240404.dist-info}/WHEEL +1 -1
- criteo_api_retailmedia_preview/model/choice_option.py +0 -281
- criteo_api_retailmedia_preview/model/choice_variable_specification.py +0 -283
- criteo_api_retailmedia_preview/model/create_user_behavior_segment_v2.py +0 -309
- criteo_api_retailmedia_preview/model/creative_create_model202207.py +0 -297
- criteo_api_retailmedia_preview/model/creative_update_model202207.py +0 -297
- criteo_api_retailmedia_preview/model/files_variables_specification.py +0 -290
- criteo_api_retailmedia_preview/model/get_page_of_audiences_by_account_id_response.py +0 -295
- criteo_api_retailmedia_preview/model/json_api_single_response_of_catalog_status.py +0 -287
- criteo_api_retailmedia_preview/model/template_list_response.py +0 -281
- criteo_api_retailmedia_preview/model/template_response.py +0 -281
- criteo_api_retailmedia_preview/model/template_variable.py +0 -310
- criteo_api_retailmedia_preview/model/user_behavior_details.py +0 -306
- criteo_api_retailmedia_preview/model/user_behavior_details_v2.py +0 -279
- {criteo_api_retailmedia_sdk-0.0.240118.dist-info → criteo_api_retailmedia_sdk-0.0.240404.dist-info}/top_level.txt +0 -0
criteo_api_retailmedia_preview/model/{retail_media_audience_v2.py → product_importer_error.py}
RENAMED
|
@@ -29,12 +29,8 @@ 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.retail_media_audience_v2_attributes import RetailMediaAudienceV2Attributes
|
|
34
|
-
globals()['RetailMediaAudienceV2Attributes'] = RetailMediaAudienceV2Attributes
|
|
35
32
|
|
|
36
|
-
|
|
37
|
-
class RetailMediaAudienceV2(ModelNormal):
|
|
33
|
+
class ProductImporterError(ModelNormal):
|
|
38
34
|
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
39
35
|
Ref: https://openapi-generator.tech
|
|
40
36
|
|
|
@@ -59,10 +55,6 @@ class RetailMediaAudienceV2(ModelNormal):
|
|
|
59
55
|
"""
|
|
60
56
|
|
|
61
57
|
allowed_values = {
|
|
62
|
-
('type',): {
|
|
63
|
-
'CUSTOMERLIST': "customerList",
|
|
64
|
-
'USERBEHAVIOR': "userBehavior",
|
|
65
|
-
},
|
|
66
58
|
}
|
|
67
59
|
|
|
68
60
|
validations = {
|
|
@@ -74,7 +66,6 @@ class RetailMediaAudienceV2(ModelNormal):
|
|
|
74
66
|
This must be a method because a model may have properties that are
|
|
75
67
|
of type self, this must run after the class is loaded
|
|
76
68
|
"""
|
|
77
|
-
lazy_import()
|
|
78
69
|
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
|
|
79
70
|
|
|
80
71
|
_nullable = False
|
|
@@ -89,11 +80,13 @@ class RetailMediaAudienceV2(ModelNormal):
|
|
|
89
80
|
openapi_types (dict): The key is attribute name
|
|
90
81
|
and the value is attribute type.
|
|
91
82
|
"""
|
|
92
|
-
lazy_import()
|
|
93
83
|
return {
|
|
84
|
+
'trace_id': (str,), # noqa: E501
|
|
94
85
|
'type': (str,), # noqa: E501
|
|
95
|
-
'
|
|
96
|
-
'
|
|
86
|
+
'code': (str,), # noqa: E501
|
|
87
|
+
'instance': (str,), # noqa: E501
|
|
88
|
+
'title': (str,), # noqa: E501
|
|
89
|
+
'detail': (str,), # noqa: E501
|
|
97
90
|
}
|
|
98
91
|
|
|
99
92
|
@cached_property
|
|
@@ -102,9 +95,12 @@ class RetailMediaAudienceV2(ModelNormal):
|
|
|
102
95
|
|
|
103
96
|
|
|
104
97
|
attribute_map = {
|
|
98
|
+
'trace_id': 'traceId', # noqa: E501
|
|
105
99
|
'type': 'type', # noqa: E501
|
|
106
|
-
'
|
|
107
|
-
'
|
|
100
|
+
'code': 'code', # noqa: E501
|
|
101
|
+
'instance': 'instance', # noqa: E501
|
|
102
|
+
'title': 'title', # noqa: E501
|
|
103
|
+
'detail': 'detail', # noqa: E501
|
|
108
104
|
}
|
|
109
105
|
|
|
110
106
|
read_only_vars = {
|
|
@@ -114,13 +110,16 @@ class RetailMediaAudienceV2(ModelNormal):
|
|
|
114
110
|
|
|
115
111
|
@classmethod
|
|
116
112
|
@convert_js_args_to_python_args
|
|
117
|
-
def _from_openapi_data(cls, type,
|
|
118
|
-
"""
|
|
113
|
+
def _from_openapi_data(cls, trace_id, type, code, instance, title, detail, *args, **kwargs): # noqa: E501
|
|
114
|
+
"""ProductImporterError - a model defined in OpenAPI
|
|
119
115
|
|
|
120
116
|
Args:
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
117
|
+
trace_id (str): The MACHINE-READABLE correlation ID provided by the gateway
|
|
118
|
+
type (str): A MACHINE-READABLE code specifying error category. This information is used on client side to focus on certain type of error, to either retry some processing or display only certain type of errors.
|
|
119
|
+
code (str): A MACHINE-READABLE error code string in kebab-case. Unique across Criteo
|
|
120
|
+
instance (str): A MACHINE-READABLE URI reference that identifies the specific occurrence of the problem. This could be useful when we want to the return the API Endpoint identifying the exact resource related to the error.
|
|
121
|
+
title (str): A short, HUMAN-READABLE summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization.
|
|
122
|
+
detail (str): A HUMAN-READABLE detailed explanation specific to this occurrence of the problem. This should not be more that 1 paragraph
|
|
124
123
|
|
|
125
124
|
Keyword Args:
|
|
126
125
|
_check_type (bool): if True, values for parameters in openapi_types
|
|
@@ -184,9 +183,12 @@ class RetailMediaAudienceV2(ModelNormal):
|
|
|
184
183
|
self._configuration = _configuration
|
|
185
184
|
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
186
185
|
|
|
186
|
+
self.trace_id = trace_id
|
|
187
187
|
self.type = type
|
|
188
|
-
self.
|
|
189
|
-
self.
|
|
188
|
+
self.code = code
|
|
189
|
+
self.instance = instance
|
|
190
|
+
self.title = title
|
|
191
|
+
self.detail = detail
|
|
190
192
|
for var_name, var_value in kwargs.items():
|
|
191
193
|
if var_name not in self.attribute_map and \
|
|
192
194
|
self._configuration is not None and \
|
|
@@ -207,13 +209,16 @@ class RetailMediaAudienceV2(ModelNormal):
|
|
|
207
209
|
])
|
|
208
210
|
|
|
209
211
|
@convert_js_args_to_python_args
|
|
210
|
-
def __init__(self, type,
|
|
211
|
-
"""
|
|
212
|
+
def __init__(self, trace_id, type, code, instance, title, detail, *args, **kwargs): # noqa: E501
|
|
213
|
+
"""ProductImporterError - a model defined in OpenAPI
|
|
212
214
|
|
|
213
215
|
Args:
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
216
|
+
trace_id (str): The MACHINE-READABLE correlation ID provided by the gateway
|
|
217
|
+
type (str): A MACHINE-READABLE code specifying error category. This information is used on client side to focus on certain type of error, to either retry some processing or display only certain type of errors.
|
|
218
|
+
code (str): A MACHINE-READABLE error code string in kebab-case. Unique across Criteo
|
|
219
|
+
instance (str): A MACHINE-READABLE URI reference that identifies the specific occurrence of the problem. This could be useful when we want to the return the API Endpoint identifying the exact resource related to the error.
|
|
220
|
+
title (str): A short, HUMAN-READABLE summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization.
|
|
221
|
+
detail (str): A HUMAN-READABLE detailed explanation specific to this occurrence of the problem. This should not be more that 1 paragraph
|
|
217
222
|
|
|
218
223
|
Keyword Args:
|
|
219
224
|
_check_type (bool): if True, values for parameters in openapi_types
|
|
@@ -275,9 +280,12 @@ class RetailMediaAudienceV2(ModelNormal):
|
|
|
275
280
|
self._configuration = _configuration
|
|
276
281
|
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
277
282
|
|
|
283
|
+
self.trace_id = trace_id
|
|
278
284
|
self.type = type
|
|
279
|
-
self.
|
|
280
|
-
self.
|
|
285
|
+
self.code = code
|
|
286
|
+
self.instance = instance
|
|
287
|
+
self.title = title
|
|
288
|
+
self.detail = detail
|
|
281
289
|
for var_name, var_value in kwargs.items():
|
|
282
290
|
if var_name not in self.attribute_map and \
|
|
283
291
|
self._configuration is not None and \
|
|
@@ -0,0 +1,299 @@
|
|
|
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 ProductImporterWarning(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
|
+
}
|
|
59
|
+
|
|
60
|
+
validations = {
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
@cached_property
|
|
64
|
+
def additional_properties_type():
|
|
65
|
+
"""
|
|
66
|
+
This must be a method because a model may have properties that are
|
|
67
|
+
of type self, this must run after the class is loaded
|
|
68
|
+
"""
|
|
69
|
+
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
|
|
70
|
+
|
|
71
|
+
_nullable = False
|
|
72
|
+
|
|
73
|
+
@cached_property
|
|
74
|
+
def openapi_types():
|
|
75
|
+
"""
|
|
76
|
+
This must be a method because a model may have properties that are
|
|
77
|
+
of type self, this must run after the class is loaded
|
|
78
|
+
|
|
79
|
+
Returns
|
|
80
|
+
openapi_types (dict): The key is attribute name
|
|
81
|
+
and the value is attribute type.
|
|
82
|
+
"""
|
|
83
|
+
return {
|
|
84
|
+
'trace_id': (str,), # noqa: E501
|
|
85
|
+
'type': (str,), # noqa: E501
|
|
86
|
+
'code': (str,), # noqa: E501
|
|
87
|
+
'instance': (str,), # noqa: E501
|
|
88
|
+
'title': (str,), # noqa: E501
|
|
89
|
+
'detail': (str,), # noqa: E501
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@cached_property
|
|
93
|
+
def discriminator():
|
|
94
|
+
return None
|
|
95
|
+
|
|
96
|
+
|
|
97
|
+
attribute_map = {
|
|
98
|
+
'trace_id': 'traceId', # noqa: E501
|
|
99
|
+
'type': 'type', # noqa: E501
|
|
100
|
+
'code': 'code', # noqa: E501
|
|
101
|
+
'instance': 'instance', # noqa: E501
|
|
102
|
+
'title': 'title', # noqa: E501
|
|
103
|
+
'detail': 'detail', # noqa: E501
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
read_only_vars = {
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
_composed_schemas = {}
|
|
110
|
+
|
|
111
|
+
@classmethod
|
|
112
|
+
@convert_js_args_to_python_args
|
|
113
|
+
def _from_openapi_data(cls, trace_id, type, code, instance, title, detail, *args, **kwargs): # noqa: E501
|
|
114
|
+
"""ProductImporterWarning - a model defined in OpenAPI
|
|
115
|
+
|
|
116
|
+
Args:
|
|
117
|
+
trace_id (str): The MACHINE-READABLE correlation ID provided by the gateway
|
|
118
|
+
type (str): A MACHINE-READABLE code specifying error category. This information is used on client side to focus on certain type of error, to either retry some processing or display only certain type of errors.
|
|
119
|
+
code (str): A MACHINE-READABLE error code string in kebab-case. Unique across Criteo
|
|
120
|
+
instance (str): A MACHINE-READABLE URI reference that identifies the specific occurrence of the problem. This could be useful when we want to the return the API Endpoint identifying the exact resource related to the error.
|
|
121
|
+
title (str): A short, HUMAN-READABLE summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization.
|
|
122
|
+
detail (str): A HUMAN-READABLE detailed explanation specific to this occurrence of the problem. This should not be more that 1 paragraph
|
|
123
|
+
|
|
124
|
+
Keyword Args:
|
|
125
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
126
|
+
will be type checked and a TypeError will be
|
|
127
|
+
raised if the wrong type is input.
|
|
128
|
+
Defaults to True
|
|
129
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
130
|
+
drill down to the model in received_data
|
|
131
|
+
when deserializing a response
|
|
132
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
133
|
+
are serialized names, as specified in the OpenAPI document.
|
|
134
|
+
False if the variable names in the input data
|
|
135
|
+
are pythonic names, e.g. snake case (default)
|
|
136
|
+
_configuration (Configuration): the instance to use when
|
|
137
|
+
deserializing a file_type parameter.
|
|
138
|
+
If passed, type conversion is attempted
|
|
139
|
+
If omitted no type conversion is done.
|
|
140
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
141
|
+
classes that we have traveled through so that
|
|
142
|
+
if we see that class again we will not use its
|
|
143
|
+
discriminator again.
|
|
144
|
+
When traveling through a discriminator, the
|
|
145
|
+
composed schema that is
|
|
146
|
+
is traveled through is added to this set.
|
|
147
|
+
For example if Animal has a discriminator
|
|
148
|
+
petType and we pass in "Dog", and the class Dog
|
|
149
|
+
allOf includes Animal, we move through Animal
|
|
150
|
+
once using the discriminator, and pick Dog.
|
|
151
|
+
Then in Dog, we will make an instance of the
|
|
152
|
+
Animal class but this time we won't travel
|
|
153
|
+
through its discriminator because we passed in
|
|
154
|
+
_visited_composed_classes = (Animal,)
|
|
155
|
+
"""
|
|
156
|
+
|
|
157
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
158
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
|
|
159
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
160
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
161
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
162
|
+
|
|
163
|
+
self = super(OpenApiModel, cls).__new__(cls)
|
|
164
|
+
|
|
165
|
+
if args:
|
|
166
|
+
for arg in args:
|
|
167
|
+
if isinstance(arg, dict):
|
|
168
|
+
kwargs.update(arg)
|
|
169
|
+
else:
|
|
170
|
+
raise ApiTypeError(
|
|
171
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
172
|
+
args,
|
|
173
|
+
self.__class__.__name__,
|
|
174
|
+
),
|
|
175
|
+
path_to_item=_path_to_item,
|
|
176
|
+
valid_classes=(self.__class__,),
|
|
177
|
+
)
|
|
178
|
+
|
|
179
|
+
self._data_store = {}
|
|
180
|
+
self._check_type = _check_type
|
|
181
|
+
self._spec_property_naming = _spec_property_naming
|
|
182
|
+
self._path_to_item = _path_to_item
|
|
183
|
+
self._configuration = _configuration
|
|
184
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
185
|
+
|
|
186
|
+
self.trace_id = trace_id
|
|
187
|
+
self.type = type
|
|
188
|
+
self.code = code
|
|
189
|
+
self.instance = instance
|
|
190
|
+
self.title = title
|
|
191
|
+
self.detail = detail
|
|
192
|
+
for var_name, var_value in kwargs.items():
|
|
193
|
+
if var_name not in self.attribute_map and \
|
|
194
|
+
self._configuration is not None and \
|
|
195
|
+
self._configuration.discard_unknown_keys and \
|
|
196
|
+
self.additional_properties_type is None:
|
|
197
|
+
# discard variable.
|
|
198
|
+
continue
|
|
199
|
+
setattr(self, var_name, var_value)
|
|
200
|
+
return self
|
|
201
|
+
|
|
202
|
+
required_properties = set([
|
|
203
|
+
'_data_store',
|
|
204
|
+
'_check_type',
|
|
205
|
+
'_spec_property_naming',
|
|
206
|
+
'_path_to_item',
|
|
207
|
+
'_configuration',
|
|
208
|
+
'_visited_composed_classes',
|
|
209
|
+
])
|
|
210
|
+
|
|
211
|
+
@convert_js_args_to_python_args
|
|
212
|
+
def __init__(self, trace_id, type, code, instance, title, detail, *args, **kwargs): # noqa: E501
|
|
213
|
+
"""ProductImporterWarning - a model defined in OpenAPI
|
|
214
|
+
|
|
215
|
+
Args:
|
|
216
|
+
trace_id (str): The MACHINE-READABLE correlation ID provided by the gateway
|
|
217
|
+
type (str): A MACHINE-READABLE code specifying error category. This information is used on client side to focus on certain type of error, to either retry some processing or display only certain type of errors.
|
|
218
|
+
code (str): A MACHINE-READABLE error code string in kebab-case. Unique across Criteo
|
|
219
|
+
instance (str): A MACHINE-READABLE URI reference that identifies the specific occurrence of the problem. This could be useful when we want to the return the API Endpoint identifying the exact resource related to the error.
|
|
220
|
+
title (str): A short, HUMAN-READABLE summary of the problem type. It should not change from occurrence to occurrence of the problem, except for purposes of localization.
|
|
221
|
+
detail (str): A HUMAN-READABLE detailed explanation specific to this occurrence of the problem. This should not be more that 1 paragraph
|
|
222
|
+
|
|
223
|
+
Keyword Args:
|
|
224
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
225
|
+
will be type checked and a TypeError will be
|
|
226
|
+
raised if the wrong type is input.
|
|
227
|
+
Defaults to True
|
|
228
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
229
|
+
drill down to the model in received_data
|
|
230
|
+
when deserializing a response
|
|
231
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
232
|
+
are serialized names, as specified in the OpenAPI document.
|
|
233
|
+
False if the variable names in the input data
|
|
234
|
+
are pythonic names, e.g. snake case (default)
|
|
235
|
+
_configuration (Configuration): the instance to use when
|
|
236
|
+
deserializing a file_type parameter.
|
|
237
|
+
If passed, type conversion is attempted
|
|
238
|
+
If omitted no type conversion is done.
|
|
239
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
240
|
+
classes that we have traveled through so that
|
|
241
|
+
if we see that class again we will not use its
|
|
242
|
+
discriminator again.
|
|
243
|
+
When traveling through a discriminator, the
|
|
244
|
+
composed schema that is
|
|
245
|
+
is traveled through is added to this set.
|
|
246
|
+
For example if Animal has a discriminator
|
|
247
|
+
petType and we pass in "Dog", and the class Dog
|
|
248
|
+
allOf includes Animal, we move through Animal
|
|
249
|
+
once using the discriminator, and pick Dog.
|
|
250
|
+
Then in Dog, we will make an instance of the
|
|
251
|
+
Animal class but this time we won't travel
|
|
252
|
+
through its discriminator because we passed in
|
|
253
|
+
_visited_composed_classes = (Animal,)
|
|
254
|
+
"""
|
|
255
|
+
|
|
256
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
257
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
258
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
259
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
260
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
261
|
+
|
|
262
|
+
if args:
|
|
263
|
+
for arg in args:
|
|
264
|
+
if isinstance(arg, dict):
|
|
265
|
+
kwargs.update(arg)
|
|
266
|
+
else:
|
|
267
|
+
raise ApiTypeError(
|
|
268
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
269
|
+
args,
|
|
270
|
+
self.__class__.__name__,
|
|
271
|
+
),
|
|
272
|
+
path_to_item=_path_to_item,
|
|
273
|
+
valid_classes=(self.__class__,),
|
|
274
|
+
)
|
|
275
|
+
|
|
276
|
+
self._data_store = {}
|
|
277
|
+
self._check_type = _check_type
|
|
278
|
+
self._spec_property_naming = _spec_property_naming
|
|
279
|
+
self._path_to_item = _path_to_item
|
|
280
|
+
self._configuration = _configuration
|
|
281
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
282
|
+
|
|
283
|
+
self.trace_id = trace_id
|
|
284
|
+
self.type = type
|
|
285
|
+
self.code = code
|
|
286
|
+
self.instance = instance
|
|
287
|
+
self.title = title
|
|
288
|
+
self.detail = detail
|
|
289
|
+
for var_name, var_value in kwargs.items():
|
|
290
|
+
if var_name not in self.attribute_map and \
|
|
291
|
+
self._configuration is not None and \
|
|
292
|
+
self._configuration.discard_unknown_keys and \
|
|
293
|
+
self.additional_properties_type is None:
|
|
294
|
+
# discard variable.
|
|
295
|
+
continue
|
|
296
|
+
setattr(self, var_name, var_value)
|
|
297
|
+
if var_name in self.read_only_vars:
|
|
298
|
+
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
|
299
|
+
f"class with read only attributes.")
|