criteo-api-retailmedia-sdk 0.0.240731__py3-none-any.whl → 0.0.241029__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/accounts_api.py +442 -0
- criteo_api_retailmedia_preview/api/analytics_api.py +3 -3
- criteo_api_retailmedia_preview/api/audience_api.py +89 -232
- criteo_api_retailmedia_preview/api/balance_api.py +4 -16
- criteo_api_retailmedia_preview/api/campaign_api.py +10 -574
- criteo_api_retailmedia_preview/api/on_site_recommendation_api.py +186 -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/balance_response_v2.py +10 -10
- criteo_api_retailmedia_preview/model/bot_message.py +277 -0
- criteo_api_retailmedia_preview/model/botmessage.py +329 -0
- criteo_api_retailmedia_preview/model/create_balance_v2.py +6 -6
- criteo_api_retailmedia_preview/model/{rm_legacy_audience_get_entity_v2_list_response.py → entity_resource_collection_outcome_of_retail_media_account.py} +8 -8
- criteo_api_retailmedia_preview/model/{rm_legacy_audience_get_entity_v1_resource.py → entity_resource_of_retail_media_account.py} +9 -18
- criteo_api_retailmedia_preview/model/external_account.py +4 -0
- criteo_api_retailmedia_preview/model/{rm_legacy_audience_get_entity_v2.py → external_retail_media_account.py} +54 -32
- criteo_api_retailmedia_preview/model/http_validation_error.py +269 -0
- criteo_api_retailmedia_preview/model/inbot_discussion.py +272 -0
- criteo_api_retailmedia_preview/model/{rm_legacy_segment_customer_list.py → inbot_discussion_body_model.py} +17 -17
- criteo_api_retailmedia_preview/model/{rm_legacy_audience_user_behavior_details_v2.py → inbot_discussion_data_instance_model.py} +17 -17
- criteo_api_retailmedia_preview/model/location_inner.py +259 -0
- criteo_api_retailmedia_preview/model/message.py +273 -0
- criteo_api_retailmedia_preview/model/message_body_model.py +275 -0
- criteo_api_retailmedia_preview/model/message_data_instance_model.py +279 -0
- criteo_api_retailmedia_preview/model/message_error.py +275 -0
- criteo_api_retailmedia_preview/model/product.py +4 -0
- criteo_api_retailmedia_preview/model/{rm_legacy_segment_user_behavior_v1.py → product_recommendation.py} +46 -47
- criteo_api_retailmedia_preview/model/promoted_product_resource_collection_outcome.py +6 -4
- criteo_api_retailmedia_preview/model/report_detail_warning.py +285 -0
- criteo_api_retailmedia_preview/model/report_detail_warnings.py +281 -0
- criteo_api_retailmedia_preview/model/report_ok_response.py +16 -2
- criteo_api_retailmedia_preview/model/resource_of_retail_media_account.py +270 -0
- criteo_api_retailmedia_preview/model/{value_resource_outcome_of_line_item_budget_overrides.py → resource_outcome_of_retail_media_account.py} +8 -8
- criteo_api_retailmedia_preview/model/retail_media_account.py +301 -0
- criteo_api_retailmedia_preview/model/retail_media_seller.py +261 -0
- criteo_api_retailmedia_preview/model/retail_media_seller_account_creation.py +274 -0
- criteo_api_retailmedia_preview/model/rm_algebra_node_v1.py +275 -0
- criteo_api_retailmedia_preview/model/rm_audience_entity_v1.py +307 -0
- criteo_api_retailmedia_preview/model/{rm_legacy_audience_get_entity_v2_resource.py → rm_audience_entity_v1_resource.py} +8 -8
- criteo_api_retailmedia_preview/model/{rm_legacy_audience_get_entity_v1_list_response.py → rm_audience_entity_v1_rm_audience_search_metadata_v1_list_response.py} +14 -8
- criteo_api_retailmedia_preview/model/rm_audience_search_entity_v1.py +271 -0
- criteo_api_retailmedia_preview/model/rm_audience_search_entity_v1_resource.py +273 -0
- criteo_api_retailmedia_preview/model/rm_audience_search_input_v1.py +269 -0
- criteo_api_retailmedia_preview/model/rm_audience_search_metadata_v1.py +271 -0
- criteo_api_retailmedia_preview/model/rm_audience_segment_create_entity_v1.py +17 -9
- criteo_api_retailmedia_preview/model/rm_audience_segment_entity_v1.py +11 -0
- criteo_api_retailmedia_preview/model/rm_audience_segment_search_entity_v1.py +10 -0
- criteo_api_retailmedia_preview/model/rm_contact_list_v1.py +16 -5
- criteo_api_retailmedia_preview/model/{rm_legacy_segment_user_behavior_v2.py → rm_events_v1.py} +41 -49
- criteo_api_retailmedia_preview/model/validation_error.py +287 -0
- criteo_api_retailmedia_preview/model/{value_resource_input_of_campaign_budget_overrides.py → value_resource_collection_input_of_retail_media_seller.py} +8 -8
- criteo_api_retailmedia_preview/model/{value_resource_outcome_of_campaign_budget_overrides.py → value_resource_collection_outcome_of_retail_media_seller.py} +8 -8
- criteo_api_retailmedia_preview/model/{value_resource_input_of_line_item_budget_overrides.py → value_resource_input_of_retail_media_seller_account_creation.py} +8 -8
- criteo_api_retailmedia_preview/model/{value_resource_of_campaign_budget_overrides.py → value_resource_of_retail_media_seller.py} +8 -8
- criteo_api_retailmedia_preview/model/{value_resource_of_line_item_budget_overrides.py → value_resource_of_retail_media_seller_account_creation.py} +8 -8
- criteo_api_retailmedia_preview/models/__init__.py +37 -22
- {criteo_api_retailmedia_sdk-0.0.240731.dist-info → criteo_api_retailmedia_sdk-0.0.241029.dist-info}/METADATA +3 -3
- {criteo_api_retailmedia_sdk-0.0.240731.dist-info → criteo_api_retailmedia_sdk-0.0.241029.dist-info}/RECORD +62 -46
- {criteo_api_retailmedia_sdk-0.0.240731.dist-info → criteo_api_retailmedia_sdk-0.0.241029.dist-info}/WHEEL +1 -1
- criteo_api_retailmedia_preview/model/campaign_budget_overrides.py +0 -276
- criteo_api_retailmedia_preview/model/campaign_daily_budget_override.py +0 -283
- criteo_api_retailmedia_preview/model/campaign_monthly_budget_override.py +0 -283
- criteo_api_retailmedia_preview/model/daily_line_item_budget_override.py +0 -281
- criteo_api_retailmedia_preview/model/line_item_budget_overrides.py +0 -276
- criteo_api_retailmedia_preview/model/monthly_line_item_budeget_override.py +0 -283
- criteo_api_retailmedia_preview/model/rm_legacy_audience_get_entity_v1.py +0 -291
- {criteo_api_retailmedia_sdk-0.0.240731.dist-info → criteo_api_retailmedia_sdk-0.0.241029.dist-info}/top_level.txt +0 -0
|
@@ -29,14 +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.rm_legacy_audience_user_behavior_details_v2 import RmLegacyAudienceUserBehaviorDetailsV2
|
|
34
|
-
from criteo_api_retailmedia_preview.model.rm_legacy_segment_customer_list import RmLegacySegmentCustomerList
|
|
35
|
-
globals()['RmLegacyAudienceUserBehaviorDetailsV2'] = RmLegacyAudienceUserBehaviorDetailsV2
|
|
36
|
-
globals()['RmLegacySegmentCustomerList'] = RmLegacySegmentCustomerList
|
|
37
32
|
|
|
38
|
-
|
|
39
|
-
class RmLegacyAudienceGetEntityV2(ModelNormal):
|
|
33
|
+
class ExternalRetailMediaAccount(ModelNormal):
|
|
40
34
|
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
41
35
|
Ref: https://openapi-generator.tech
|
|
42
36
|
|
|
@@ -61,6 +55,16 @@ class RmLegacyAudienceGetEntityV2(ModelNormal):
|
|
|
61
55
|
"""
|
|
62
56
|
|
|
63
57
|
allowed_values = {
|
|
58
|
+
('type',): {
|
|
59
|
+
'UNKNOWN': "Unknown",
|
|
60
|
+
'SUPPLY': "Supply",
|
|
61
|
+
'DEMAND': "Demand",
|
|
62
|
+
},
|
|
63
|
+
('sub_type',): {
|
|
64
|
+
'UNKNOWN': "Unknown",
|
|
65
|
+
'BRAND': "Brand",
|
|
66
|
+
'SELLER': "Seller",
|
|
67
|
+
},
|
|
64
68
|
}
|
|
65
69
|
|
|
66
70
|
validations = {
|
|
@@ -72,7 +76,6 @@ class RmLegacyAudienceGetEntityV2(ModelNormal):
|
|
|
72
76
|
This must be a method because a model may have properties that are
|
|
73
77
|
of type self, this must run after the class is loaded
|
|
74
78
|
"""
|
|
75
|
-
lazy_import()
|
|
76
79
|
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
|
|
77
80
|
|
|
78
81
|
_nullable = False
|
|
@@ -87,12 +90,16 @@ class RmLegacyAudienceGetEntityV2(ModelNormal):
|
|
|
87
90
|
openapi_types (dict): The key is attribute name
|
|
88
91
|
and the value is attribute type.
|
|
89
92
|
"""
|
|
90
|
-
lazy_import()
|
|
91
93
|
return {
|
|
92
|
-
'
|
|
93
|
-
'
|
|
94
|
-
'
|
|
95
|
-
'
|
|
94
|
+
'type': (str,), # noqa: E501
|
|
95
|
+
'sub_type': (str,), # noqa: E501
|
|
96
|
+
'name': (str, none_type,), # noqa: E501
|
|
97
|
+
'company_name': (str, none_type,), # noqa: E501
|
|
98
|
+
'on_behalf_company_name': (str, none_type,), # noqa: E501
|
|
99
|
+
'country_ids': ([str], none_type,), # noqa: E501
|
|
100
|
+
'currency_id': (str, none_type,), # noqa: E501
|
|
101
|
+
'parent_account_label': (str, none_type,), # noqa: E501
|
|
102
|
+
'time_zone': (str, none_type,), # noqa: E501
|
|
96
103
|
}
|
|
97
104
|
|
|
98
105
|
@cached_property
|
|
@@ -101,10 +108,15 @@ class RmLegacyAudienceGetEntityV2(ModelNormal):
|
|
|
101
108
|
|
|
102
109
|
|
|
103
110
|
attribute_map = {
|
|
104
|
-
'
|
|
111
|
+
'type': 'type', # noqa: E501
|
|
112
|
+
'sub_type': 'subType', # noqa: E501
|
|
105
113
|
'name': 'name', # noqa: E501
|
|
106
|
-
'
|
|
107
|
-
'
|
|
114
|
+
'company_name': 'companyName', # noqa: E501
|
|
115
|
+
'on_behalf_company_name': 'onBehalfCompanyName', # noqa: E501
|
|
116
|
+
'country_ids': 'countryIds', # noqa: E501
|
|
117
|
+
'currency_id': 'currencyId', # noqa: E501
|
|
118
|
+
'parent_account_label': 'parentAccountLabel', # noqa: E501
|
|
119
|
+
'time_zone': 'timeZone', # noqa: E501
|
|
108
120
|
}
|
|
109
121
|
|
|
110
122
|
read_only_vars = {
|
|
@@ -114,12 +126,12 @@ class RmLegacyAudienceGetEntityV2(ModelNormal):
|
|
|
114
126
|
|
|
115
127
|
@classmethod
|
|
116
128
|
@convert_js_args_to_python_args
|
|
117
|
-
def _from_openapi_data(cls,
|
|
118
|
-
"""
|
|
129
|
+
def _from_openapi_data(cls, type, sub_type, *args, **kwargs): # noqa: E501
|
|
130
|
+
"""ExternalRetailMediaAccount - a model defined in OpenAPI
|
|
119
131
|
|
|
120
132
|
Args:
|
|
121
|
-
|
|
122
|
-
|
|
133
|
+
type (str):
|
|
134
|
+
sub_type (str):
|
|
123
135
|
|
|
124
136
|
Keyword Args:
|
|
125
137
|
_check_type (bool): if True, values for parameters in openapi_types
|
|
@@ -152,8 +164,13 @@ class RmLegacyAudienceGetEntityV2(ModelNormal):
|
|
|
152
164
|
Animal class but this time we won't travel
|
|
153
165
|
through its discriminator because we passed in
|
|
154
166
|
_visited_composed_classes = (Animal,)
|
|
155
|
-
|
|
156
|
-
|
|
167
|
+
name (str, none_type): [optional] # noqa: E501
|
|
168
|
+
company_name (str, none_type): [optional] # noqa: E501
|
|
169
|
+
on_behalf_company_name (str, none_type): [optional] # noqa: E501
|
|
170
|
+
country_ids ([str], none_type): [optional] # noqa: E501
|
|
171
|
+
currency_id (str, none_type): [optional] # noqa: E501
|
|
172
|
+
parent_account_label (str, none_type): [optional] # noqa: E501
|
|
173
|
+
time_zone (str, none_type): [optional] # noqa: E501
|
|
157
174
|
"""
|
|
158
175
|
|
|
159
176
|
_check_type = kwargs.pop('_check_type', True)
|
|
@@ -185,8 +202,8 @@ class RmLegacyAudienceGetEntityV2(ModelNormal):
|
|
|
185
202
|
self._configuration = _configuration
|
|
186
203
|
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
187
204
|
|
|
188
|
-
self.
|
|
189
|
-
self.
|
|
205
|
+
self.type = type
|
|
206
|
+
self.sub_type = sub_type
|
|
190
207
|
for var_name, var_value in kwargs.items():
|
|
191
208
|
if var_name not in self.attribute_map and \
|
|
192
209
|
self._configuration is not None and \
|
|
@@ -207,12 +224,12 @@ class RmLegacyAudienceGetEntityV2(ModelNormal):
|
|
|
207
224
|
])
|
|
208
225
|
|
|
209
226
|
@convert_js_args_to_python_args
|
|
210
|
-
def __init__(self,
|
|
211
|
-
"""
|
|
227
|
+
def __init__(self, type, sub_type, *args, **kwargs): # noqa: E501
|
|
228
|
+
"""ExternalRetailMediaAccount - a model defined in OpenAPI
|
|
212
229
|
|
|
213
230
|
Args:
|
|
214
|
-
|
|
215
|
-
|
|
231
|
+
type (str):
|
|
232
|
+
sub_type (str):
|
|
216
233
|
|
|
217
234
|
Keyword Args:
|
|
218
235
|
_check_type (bool): if True, values for parameters in openapi_types
|
|
@@ -245,8 +262,13 @@ class RmLegacyAudienceGetEntityV2(ModelNormal):
|
|
|
245
262
|
Animal class but this time we won't travel
|
|
246
263
|
through its discriminator because we passed in
|
|
247
264
|
_visited_composed_classes = (Animal,)
|
|
248
|
-
|
|
249
|
-
|
|
265
|
+
name (str, none_type): [optional] # noqa: E501
|
|
266
|
+
company_name (str, none_type): [optional] # noqa: E501
|
|
267
|
+
on_behalf_company_name (str, none_type): [optional] # noqa: E501
|
|
268
|
+
country_ids ([str], none_type): [optional] # noqa: E501
|
|
269
|
+
currency_id (str, none_type): [optional] # noqa: E501
|
|
270
|
+
parent_account_label (str, none_type): [optional] # noqa: E501
|
|
271
|
+
time_zone (str, none_type): [optional] # noqa: E501
|
|
250
272
|
"""
|
|
251
273
|
|
|
252
274
|
_check_type = kwargs.pop('_check_type', True)
|
|
@@ -276,8 +298,8 @@ class RmLegacyAudienceGetEntityV2(ModelNormal):
|
|
|
276
298
|
self._configuration = _configuration
|
|
277
299
|
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
278
300
|
|
|
279
|
-
self.
|
|
280
|
-
self.
|
|
301
|
+
self.type = type
|
|
302
|
+
self.sub_type = sub_type
|
|
281
303
|
for var_name, var_value in kwargs.items():
|
|
282
304
|
if var_name not in self.attribute_map and \
|
|
283
305
|
self._configuration is not None and \
|
|
@@ -0,0 +1,269 @@
|
|
|
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.validation_error import ValidationError
|
|
34
|
+
globals()['ValidationError'] = ValidationError
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class HttpValidationError(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
|
+
@cached_property
|
|
68
|
+
def additional_properties_type():
|
|
69
|
+
"""
|
|
70
|
+
This must be a method because a model may have properties that are
|
|
71
|
+
of type self, this must run after the class is loaded
|
|
72
|
+
"""
|
|
73
|
+
lazy_import()
|
|
74
|
+
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
|
|
75
|
+
|
|
76
|
+
_nullable = False
|
|
77
|
+
|
|
78
|
+
@cached_property
|
|
79
|
+
def openapi_types():
|
|
80
|
+
"""
|
|
81
|
+
This must be a method because a model may have properties that are
|
|
82
|
+
of type self, this must run after the class is loaded
|
|
83
|
+
|
|
84
|
+
Returns
|
|
85
|
+
openapi_types (dict): The key is attribute name
|
|
86
|
+
and the value is attribute type.
|
|
87
|
+
"""
|
|
88
|
+
lazy_import()
|
|
89
|
+
return {
|
|
90
|
+
'detail': ([ValidationError], none_type,), # noqa: E501
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@cached_property
|
|
94
|
+
def discriminator():
|
|
95
|
+
return None
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
attribute_map = {
|
|
99
|
+
'detail': 'detail', # noqa: E501
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
read_only_vars = {
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
_composed_schemas = {}
|
|
106
|
+
|
|
107
|
+
@classmethod
|
|
108
|
+
@convert_js_args_to_python_args
|
|
109
|
+
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
|
|
110
|
+
"""HttpValidationError - a model defined in OpenAPI
|
|
111
|
+
|
|
112
|
+
Keyword Args:
|
|
113
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
114
|
+
will be type checked and a TypeError will be
|
|
115
|
+
raised if the wrong type is input.
|
|
116
|
+
Defaults to True
|
|
117
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
118
|
+
drill down to the model in received_data
|
|
119
|
+
when deserializing a response
|
|
120
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
121
|
+
are serialized names, as specified in the OpenAPI document.
|
|
122
|
+
False if the variable names in the input data
|
|
123
|
+
are pythonic names, e.g. snake case (default)
|
|
124
|
+
_configuration (Configuration): the instance to use when
|
|
125
|
+
deserializing a file_type parameter.
|
|
126
|
+
If passed, type conversion is attempted
|
|
127
|
+
If omitted no type conversion is done.
|
|
128
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
129
|
+
classes that we have traveled through so that
|
|
130
|
+
if we see that class again we will not use its
|
|
131
|
+
discriminator again.
|
|
132
|
+
When traveling through a discriminator, the
|
|
133
|
+
composed schema that is
|
|
134
|
+
is traveled through is added to this set.
|
|
135
|
+
For example if Animal has a discriminator
|
|
136
|
+
petType and we pass in "Dog", and the class Dog
|
|
137
|
+
allOf includes Animal, we move through Animal
|
|
138
|
+
once using the discriminator, and pick Dog.
|
|
139
|
+
Then in Dog, we will make an instance of the
|
|
140
|
+
Animal class but this time we won't travel
|
|
141
|
+
through its discriminator because we passed in
|
|
142
|
+
_visited_composed_classes = (Animal,)
|
|
143
|
+
detail ([ValidationError], none_type): [optional] # noqa: E501
|
|
144
|
+
"""
|
|
145
|
+
|
|
146
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
147
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
|
|
148
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
149
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
150
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
151
|
+
|
|
152
|
+
self = super(OpenApiModel, cls).__new__(cls)
|
|
153
|
+
|
|
154
|
+
if args:
|
|
155
|
+
for arg in args:
|
|
156
|
+
if isinstance(arg, dict):
|
|
157
|
+
kwargs.update(arg)
|
|
158
|
+
else:
|
|
159
|
+
raise ApiTypeError(
|
|
160
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
161
|
+
args,
|
|
162
|
+
self.__class__.__name__,
|
|
163
|
+
),
|
|
164
|
+
path_to_item=_path_to_item,
|
|
165
|
+
valid_classes=(self.__class__,),
|
|
166
|
+
)
|
|
167
|
+
|
|
168
|
+
self._data_store = {}
|
|
169
|
+
self._check_type = _check_type
|
|
170
|
+
self._spec_property_naming = _spec_property_naming
|
|
171
|
+
self._path_to_item = _path_to_item
|
|
172
|
+
self._configuration = _configuration
|
|
173
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
174
|
+
|
|
175
|
+
for var_name, var_value in kwargs.items():
|
|
176
|
+
if var_name not in self.attribute_map and \
|
|
177
|
+
self._configuration is not None and \
|
|
178
|
+
self._configuration.discard_unknown_keys and \
|
|
179
|
+
self.additional_properties_type is None:
|
|
180
|
+
# discard variable.
|
|
181
|
+
continue
|
|
182
|
+
setattr(self, var_name, var_value)
|
|
183
|
+
return self
|
|
184
|
+
|
|
185
|
+
required_properties = set([
|
|
186
|
+
'_data_store',
|
|
187
|
+
'_check_type',
|
|
188
|
+
'_spec_property_naming',
|
|
189
|
+
'_path_to_item',
|
|
190
|
+
'_configuration',
|
|
191
|
+
'_visited_composed_classes',
|
|
192
|
+
])
|
|
193
|
+
|
|
194
|
+
@convert_js_args_to_python_args
|
|
195
|
+
def __init__(self, *args, **kwargs): # noqa: E501
|
|
196
|
+
"""HttpValidationError - a model defined in OpenAPI
|
|
197
|
+
|
|
198
|
+
Keyword Args:
|
|
199
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
200
|
+
will be type checked and a TypeError will be
|
|
201
|
+
raised if the wrong type is input.
|
|
202
|
+
Defaults to True
|
|
203
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
204
|
+
drill down to the model in received_data
|
|
205
|
+
when deserializing a response
|
|
206
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
207
|
+
are serialized names, as specified in the OpenAPI document.
|
|
208
|
+
False if the variable names in the input data
|
|
209
|
+
are pythonic names, e.g. snake case (default)
|
|
210
|
+
_configuration (Configuration): the instance to use when
|
|
211
|
+
deserializing a file_type parameter.
|
|
212
|
+
If passed, type conversion is attempted
|
|
213
|
+
If omitted no type conversion is done.
|
|
214
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
215
|
+
classes that we have traveled through so that
|
|
216
|
+
if we see that class again we will not use its
|
|
217
|
+
discriminator again.
|
|
218
|
+
When traveling through a discriminator, the
|
|
219
|
+
composed schema that is
|
|
220
|
+
is traveled through is added to this set.
|
|
221
|
+
For example if Animal has a discriminator
|
|
222
|
+
petType and we pass in "Dog", and the class Dog
|
|
223
|
+
allOf includes Animal, we move through Animal
|
|
224
|
+
once using the discriminator, and pick Dog.
|
|
225
|
+
Then in Dog, we will make an instance of the
|
|
226
|
+
Animal class but this time we won't travel
|
|
227
|
+
through its discriminator because we passed in
|
|
228
|
+
_visited_composed_classes = (Animal,)
|
|
229
|
+
detail ([ValidationError], none_type): [optional] # noqa: E501
|
|
230
|
+
"""
|
|
231
|
+
|
|
232
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
233
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
234
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
235
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
236
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
237
|
+
|
|
238
|
+
if args:
|
|
239
|
+
for arg in args:
|
|
240
|
+
if isinstance(arg, dict):
|
|
241
|
+
kwargs.update(arg)
|
|
242
|
+
else:
|
|
243
|
+
raise ApiTypeError(
|
|
244
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
245
|
+
args,
|
|
246
|
+
self.__class__.__name__,
|
|
247
|
+
),
|
|
248
|
+
path_to_item=_path_to_item,
|
|
249
|
+
valid_classes=(self.__class__,),
|
|
250
|
+
)
|
|
251
|
+
|
|
252
|
+
self._data_store = {}
|
|
253
|
+
self._check_type = _check_type
|
|
254
|
+
self._spec_property_naming = _spec_property_naming
|
|
255
|
+
self._path_to_item = _path_to_item
|
|
256
|
+
self._configuration = _configuration
|
|
257
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
258
|
+
|
|
259
|
+
for var_name, var_value in kwargs.items():
|
|
260
|
+
if var_name not in self.attribute_map and \
|
|
261
|
+
self._configuration is not None and \
|
|
262
|
+
self._configuration.discard_unknown_keys and \
|
|
263
|
+
self.additional_properties_type is None:
|
|
264
|
+
# discard variable.
|
|
265
|
+
continue
|
|
266
|
+
setattr(self, var_name, var_value)
|
|
267
|
+
if var_name in self.read_only_vars:
|
|
268
|
+
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
|
269
|
+
f"class with read only attributes.")
|