criteo-api-retailmedia-sdk 0.0.240808__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 +148 -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/campaign_api.py +0 -564
- criteo_api_retailmedia_preview/api/on_site_recommendation_api.py +186 -0
- criteo_api_retailmedia_preview/api_client.py +1 -1
- criteo_api_retailmedia_preview/apis/__init__.py +1 -0
- criteo_api_retailmedia_preview/configuration.py +1 -1
- criteo_api_retailmedia_preview/model/bot_message.py +277 -0
- criteo_api_retailmedia_preview/model/botmessage.py +329 -0
- 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/{value_resource_input_of_line_item_budget_overrides.py → http_validation_error.py} +17 -10
- 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/{value_resource_input_of_campaign_budget_overrides.py → location_inner.py} +10 -13
- 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/{value_resource_of_line_item_budget_overrides.py → message_data_instance_model.py} +27 -14
- 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/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/retail_media_account.py +6 -2
- criteo_api_retailmedia_preview/model/retail_media_seller_account_creation.py +6 -2
- 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/{value_resource_of_campaign_budget_overrides.py → rm_audience_search_entity_v1_resource.py} +16 -9
- 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 +7 -7
- criteo_api_retailmedia_preview/model/rm_audience_segment_search_entity_v1.py +1 -1
- criteo_api_retailmedia_preview/model/rm_contact_list_v1.py +5 -5
- criteo_api_retailmedia_preview/model/{rm_user_behavior_v1.py → rm_events_v1.py} +3 -3
- criteo_api_retailmedia_preview/model/validation_error.py +287 -0
- criteo_api_retailmedia_preview/models/__init__.py +27 -23
- {criteo_api_retailmedia_sdk-0.0.240808.dist-info → criteo_api_retailmedia_sdk-0.0.241029.dist-info}/METADATA +3 -3
- {criteo_api_retailmedia_sdk-0.0.240808.dist-info → criteo_api_retailmedia_sdk-0.0.241029.dist-info}/RECORD +50 -45
- {criteo_api_retailmedia_sdk-0.0.240808.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_preview/model/rm_legacy_segment_user_behavior_v2.py +0 -311
- criteo_api_retailmedia_preview/model/value_resource_outcome_of_campaign_budget_overrides.py +0 -274
- criteo_api_retailmedia_preview/model/value_resource_outcome_of_line_item_budget_overrides.py +0 -274
- {criteo_api_retailmedia_sdk-0.0.240808.dist-info → criteo_api_retailmedia_sdk-0.0.241029.dist-info}/top_level.txt +0 -0
|
@@ -189,6 +189,7 @@ class Product(ModelNormal):
|
|
|
189
189
|
'external_seller_name': (str, none_type,), # noqa: E501
|
|
190
190
|
'number_of_reviews': (int, none_type,), # noqa: E501
|
|
191
191
|
'product_rating': (str, none_type,), # noqa: E501
|
|
192
|
+
'badge': (str, none_type,), # noqa: E501
|
|
192
193
|
}
|
|
193
194
|
|
|
194
195
|
@cached_property
|
|
@@ -278,6 +279,7 @@ class Product(ModelNormal):
|
|
|
278
279
|
'external_seller_name': 'externalSellerName', # noqa: E501
|
|
279
280
|
'number_of_reviews': 'numberOfReviews', # noqa: E501
|
|
280
281
|
'product_rating': 'productRating', # noqa: E501
|
|
282
|
+
'badge': 'badge', # noqa: E501
|
|
281
283
|
}
|
|
282
284
|
|
|
283
285
|
read_only_vars = {
|
|
@@ -404,6 +406,7 @@ class Product(ModelNormal):
|
|
|
404
406
|
external_seller_name (str, none_type): The external name of the seller (case sensitive and 50 UTF8 characters max). This information is required by the Criteo Offsite Ads.. [optional] # noqa: E501
|
|
405
407
|
number_of_reviews (int, none_type): The number of customer reviews for the product. [optional] # noqa: E501
|
|
406
408
|
product_rating (str, none_type): The product rating for the product. [optional] # noqa: E501
|
|
409
|
+
badge (str, none_type): URL of a badge image to display on the product.. [optional] # noqa: E501
|
|
407
410
|
"""
|
|
408
411
|
|
|
409
412
|
channel = kwargs.get('channel', "online")
|
|
@@ -578,6 +581,7 @@ class Product(ModelNormal):
|
|
|
578
581
|
external_seller_name (str, none_type): The external name of the seller (case sensitive and 50 UTF8 characters max). This information is required by the Criteo Offsite Ads.. [optional] # noqa: E501
|
|
579
582
|
number_of_reviews (int, none_type): The number of customer reviews for the product. [optional] # noqa: E501
|
|
580
583
|
product_rating (str, none_type): The product rating for the product. [optional] # noqa: E501
|
|
584
|
+
badge (str, none_type): URL of a badge image to display on the product.. [optional] # noqa: E501
|
|
581
585
|
"""
|
|
582
586
|
|
|
583
587
|
channel = kwargs.get('channel', "online")
|
|
@@ -30,7 +30,7 @@ from criteo_api_retailmedia_preview.exceptions import ApiAttributeError
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
|
|
33
|
-
class
|
|
33
|
+
class ProductRecommendation(ModelNormal):
|
|
34
34
|
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
35
35
|
Ref: https://openapi-generator.tech
|
|
36
36
|
|
|
@@ -55,31 +55,16 @@ class RmLegacySegmentUserBehaviorV1(ModelNormal):
|
|
|
55
55
|
"""
|
|
56
56
|
|
|
57
57
|
allowed_values = {
|
|
58
|
-
('user_type',): {
|
|
59
|
-
'VIEWER': "viewer",
|
|
60
|
-
'BUYER': "buyer",
|
|
61
|
-
'ADDTOCARTER': "addToCarter",
|
|
62
|
-
},
|
|
63
|
-
('lookback_window',): {
|
|
64
|
-
'P7D': "P7D",
|
|
65
|
-
'P14D': "P14D",
|
|
66
|
-
'P30D': "P30D",
|
|
67
|
-
'P45D': "P45D",
|
|
68
|
-
'P60D': "P60D",
|
|
69
|
-
'P90D': "P90D",
|
|
70
|
-
'P120D': "P120D",
|
|
71
|
-
'P150D': "P150D",
|
|
72
|
-
'P180D': "P180D",
|
|
73
|
-
},
|
|
74
|
-
('target_type',): {
|
|
75
|
-
'None': None,
|
|
76
|
-
'BRAND': "brand",
|
|
77
|
-
'CATEGORY': "category",
|
|
78
|
-
},
|
|
79
58
|
}
|
|
80
59
|
|
|
81
60
|
validations = {
|
|
82
|
-
('
|
|
61
|
+
('image_url',): {
|
|
62
|
+
'max_length': 65536,
|
|
63
|
+
'min_length': 1,
|
|
64
|
+
},
|
|
65
|
+
('url',): {
|
|
66
|
+
'max_length': 65536,
|
|
67
|
+
'min_length': 1,
|
|
83
68
|
},
|
|
84
69
|
}
|
|
85
70
|
|
|
@@ -104,10 +89,14 @@ class RmLegacySegmentUserBehaviorV1(ModelNormal):
|
|
|
104
89
|
and the value is attribute type.
|
|
105
90
|
"""
|
|
106
91
|
return {
|
|
107
|
-
'
|
|
108
|
-
'
|
|
109
|
-
'
|
|
110
|
-
'
|
|
92
|
+
'rationale': (str,), # noqa: E501
|
|
93
|
+
'name': (str, none_type,), # noqa: E501
|
|
94
|
+
'description': (str, none_type,), # noqa: E501
|
|
95
|
+
'image_url': (str, none_type,), # noqa: E501
|
|
96
|
+
'url': (str, none_type,), # noqa: E501
|
|
97
|
+
'brand': (str, none_type,), # noqa: E501
|
|
98
|
+
'price': (float, none_type,), # noqa: E501
|
|
99
|
+
'currency': (str, none_type,), # noqa: E501
|
|
111
100
|
}
|
|
112
101
|
|
|
113
102
|
@cached_property
|
|
@@ -116,10 +105,14 @@ class RmLegacySegmentUserBehaviorV1(ModelNormal):
|
|
|
116
105
|
|
|
117
106
|
|
|
118
107
|
attribute_map = {
|
|
119
|
-
'
|
|
120
|
-
'
|
|
121
|
-
'
|
|
122
|
-
'
|
|
108
|
+
'rationale': 'rationale', # noqa: E501
|
|
109
|
+
'name': 'name', # noqa: E501
|
|
110
|
+
'description': 'description', # noqa: E501
|
|
111
|
+
'image_url': 'imageUrl', # noqa: E501
|
|
112
|
+
'url': 'url', # noqa: E501
|
|
113
|
+
'brand': 'brand', # noqa: E501
|
|
114
|
+
'price': 'price', # noqa: E501
|
|
115
|
+
'currency': 'currency', # noqa: E501
|
|
123
116
|
}
|
|
124
117
|
|
|
125
118
|
read_only_vars = {
|
|
@@ -129,12 +122,11 @@ class RmLegacySegmentUserBehaviorV1(ModelNormal):
|
|
|
129
122
|
|
|
130
123
|
@classmethod
|
|
131
124
|
@convert_js_args_to_python_args
|
|
132
|
-
def _from_openapi_data(cls,
|
|
133
|
-
"""
|
|
125
|
+
def _from_openapi_data(cls, rationale, *args, **kwargs): # noqa: E501
|
|
126
|
+
"""ProductRecommendation - a model defined in OpenAPI
|
|
134
127
|
|
|
135
128
|
Args:
|
|
136
|
-
|
|
137
|
-
lookback_window (str): Length of lookback window
|
|
129
|
+
rationale (str): reason for this recommendation, given by the bot
|
|
138
130
|
|
|
139
131
|
Keyword Args:
|
|
140
132
|
_check_type (bool): if True, values for parameters in openapi_types
|
|
@@ -167,8 +159,13 @@ class RmLegacySegmentUserBehaviorV1(ModelNormal):
|
|
|
167
159
|
Animal class but this time we won't travel
|
|
168
160
|
through its discriminator because we passed in
|
|
169
161
|
_visited_composed_classes = (Animal,)
|
|
170
|
-
|
|
171
|
-
|
|
162
|
+
name (str, none_type): name of the product. [optional] # noqa: E501
|
|
163
|
+
description (str, none_type): description of the product. [optional] # noqa: E501
|
|
164
|
+
image_url (str, none_type): url of the product image. [optional] # noqa: E501
|
|
165
|
+
url (str, none_type): url of the product on the retailer website. [optional] # noqa: E501
|
|
166
|
+
brand (str, none_type): brand of the product. [optional] # noqa: E501
|
|
167
|
+
price (float, none_type): numerical value of the price of the product. [optional] # noqa: E501
|
|
168
|
+
currency (str, none_type): currency of the price of the product. [optional] # noqa: E501
|
|
172
169
|
"""
|
|
173
170
|
|
|
174
171
|
_check_type = kwargs.pop('_check_type', True)
|
|
@@ -200,8 +197,7 @@ class RmLegacySegmentUserBehaviorV1(ModelNormal):
|
|
|
200
197
|
self._configuration = _configuration
|
|
201
198
|
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
202
199
|
|
|
203
|
-
self.
|
|
204
|
-
self.lookback_window = lookback_window
|
|
200
|
+
self.rationale = rationale
|
|
205
201
|
for var_name, var_value in kwargs.items():
|
|
206
202
|
if var_name not in self.attribute_map and \
|
|
207
203
|
self._configuration is not None and \
|
|
@@ -222,12 +218,11 @@ class RmLegacySegmentUserBehaviorV1(ModelNormal):
|
|
|
222
218
|
])
|
|
223
219
|
|
|
224
220
|
@convert_js_args_to_python_args
|
|
225
|
-
def __init__(self,
|
|
226
|
-
"""
|
|
221
|
+
def __init__(self, rationale, *args, **kwargs): # noqa: E501
|
|
222
|
+
"""ProductRecommendation - a model defined in OpenAPI
|
|
227
223
|
|
|
228
224
|
Args:
|
|
229
|
-
|
|
230
|
-
lookback_window (str): Length of lookback window
|
|
225
|
+
rationale (str): reason for this recommendation, given by the bot
|
|
231
226
|
|
|
232
227
|
Keyword Args:
|
|
233
228
|
_check_type (bool): if True, values for parameters in openapi_types
|
|
@@ -260,8 +255,13 @@ class RmLegacySegmentUserBehaviorV1(ModelNormal):
|
|
|
260
255
|
Animal class but this time we won't travel
|
|
261
256
|
through its discriminator because we passed in
|
|
262
257
|
_visited_composed_classes = (Animal,)
|
|
263
|
-
|
|
264
|
-
|
|
258
|
+
name (str, none_type): name of the product. [optional] # noqa: E501
|
|
259
|
+
description (str, none_type): description of the product. [optional] # noqa: E501
|
|
260
|
+
image_url (str, none_type): url of the product image. [optional] # noqa: E501
|
|
261
|
+
url (str, none_type): url of the product on the retailer website. [optional] # noqa: E501
|
|
262
|
+
brand (str, none_type): brand of the product. [optional] # noqa: E501
|
|
263
|
+
price (float, none_type): numerical value of the price of the product. [optional] # noqa: E501
|
|
264
|
+
currency (str, none_type): currency of the price of the product. [optional] # noqa: E501
|
|
265
265
|
"""
|
|
266
266
|
|
|
267
267
|
_check_type = kwargs.pop('_check_type', True)
|
|
@@ -291,8 +291,7 @@ class RmLegacySegmentUserBehaviorV1(ModelNormal):
|
|
|
291
291
|
self._configuration = _configuration
|
|
292
292
|
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
293
293
|
|
|
294
|
-
self.
|
|
295
|
-
self.lookback_window = lookback_window
|
|
294
|
+
self.rationale = rationale
|
|
296
295
|
for var_name, var_value in kwargs.items():
|
|
297
296
|
if var_name not in self.attribute_map and \
|
|
298
297
|
self._configuration is not None and \
|
|
@@ -0,0 +1,285 @@
|
|
|
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 ReportDetailWarning(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
|
+
('type',): {
|
|
59
|
+
'OVERLARGEBADGEURL': "OverlargeBadgeUrl",
|
|
60
|
+
'INVALIDBADGEURL': "InvalidBadgeUrl",
|
|
61
|
+
},
|
|
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
|
+
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
|
|
74
|
+
|
|
75
|
+
_nullable = False
|
|
76
|
+
|
|
77
|
+
@cached_property
|
|
78
|
+
def openapi_types():
|
|
79
|
+
"""
|
|
80
|
+
This must be a method because a model may have properties that are
|
|
81
|
+
of type self, this must run after the class is loaded
|
|
82
|
+
|
|
83
|
+
Returns
|
|
84
|
+
openapi_types (dict): The key is attribute name
|
|
85
|
+
and the value is attribute type.
|
|
86
|
+
"""
|
|
87
|
+
return {
|
|
88
|
+
'type': (str,), # noqa: E501
|
|
89
|
+
'message': (str,), # noqa: E501
|
|
90
|
+
'is_server_related': (bool,), # noqa: E501
|
|
91
|
+
}
|
|
92
|
+
|
|
93
|
+
@cached_property
|
|
94
|
+
def discriminator():
|
|
95
|
+
return None
|
|
96
|
+
|
|
97
|
+
|
|
98
|
+
attribute_map = {
|
|
99
|
+
'type': 'type', # noqa: E501
|
|
100
|
+
'message': 'message', # noqa: E501
|
|
101
|
+
'is_server_related': 'isServerRelated', # noqa: E501
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
read_only_vars = {
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
_composed_schemas = {}
|
|
108
|
+
|
|
109
|
+
@classmethod
|
|
110
|
+
@convert_js_args_to_python_args
|
|
111
|
+
def _from_openapi_data(cls, type, message, is_server_related, *args, **kwargs): # noqa: E501
|
|
112
|
+
"""ReportDetailWarning - a model defined in OpenAPI
|
|
113
|
+
|
|
114
|
+
Args:
|
|
115
|
+
type (str):
|
|
116
|
+
message (str):
|
|
117
|
+
is_server_related (bool):
|
|
118
|
+
|
|
119
|
+
Keyword Args:
|
|
120
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
121
|
+
will be type checked and a TypeError will be
|
|
122
|
+
raised if the wrong type is input.
|
|
123
|
+
Defaults to True
|
|
124
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
125
|
+
drill down to the model in received_data
|
|
126
|
+
when deserializing a response
|
|
127
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
128
|
+
are serialized names, as specified in the OpenAPI document.
|
|
129
|
+
False if the variable names in the input data
|
|
130
|
+
are pythonic names, e.g. snake case (default)
|
|
131
|
+
_configuration (Configuration): the instance to use when
|
|
132
|
+
deserializing a file_type parameter.
|
|
133
|
+
If passed, type conversion is attempted
|
|
134
|
+
If omitted no type conversion is done.
|
|
135
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
136
|
+
classes that we have traveled through so that
|
|
137
|
+
if we see that class again we will not use its
|
|
138
|
+
discriminator again.
|
|
139
|
+
When traveling through a discriminator, the
|
|
140
|
+
composed schema that is
|
|
141
|
+
is traveled through is added to this set.
|
|
142
|
+
For example if Animal has a discriminator
|
|
143
|
+
petType and we pass in "Dog", and the class Dog
|
|
144
|
+
allOf includes Animal, we move through Animal
|
|
145
|
+
once using the discriminator, and pick Dog.
|
|
146
|
+
Then in Dog, we will make an instance of the
|
|
147
|
+
Animal class but this time we won't travel
|
|
148
|
+
through its discriminator because we passed in
|
|
149
|
+
_visited_composed_classes = (Animal,)
|
|
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
|
+
self.type = type
|
|
182
|
+
self.message = message
|
|
183
|
+
self.is_server_related = is_server_related
|
|
184
|
+
for var_name, var_value in kwargs.items():
|
|
185
|
+
if var_name not in self.attribute_map and \
|
|
186
|
+
self._configuration is not None and \
|
|
187
|
+
self._configuration.discard_unknown_keys and \
|
|
188
|
+
self.additional_properties_type is None:
|
|
189
|
+
# discard variable.
|
|
190
|
+
continue
|
|
191
|
+
setattr(self, var_name, var_value)
|
|
192
|
+
return self
|
|
193
|
+
|
|
194
|
+
required_properties = set([
|
|
195
|
+
'_data_store',
|
|
196
|
+
'_check_type',
|
|
197
|
+
'_spec_property_naming',
|
|
198
|
+
'_path_to_item',
|
|
199
|
+
'_configuration',
|
|
200
|
+
'_visited_composed_classes',
|
|
201
|
+
])
|
|
202
|
+
|
|
203
|
+
@convert_js_args_to_python_args
|
|
204
|
+
def __init__(self, type, message, is_server_related, *args, **kwargs): # noqa: E501
|
|
205
|
+
"""ReportDetailWarning - a model defined in OpenAPI
|
|
206
|
+
|
|
207
|
+
Args:
|
|
208
|
+
type (str):
|
|
209
|
+
message (str):
|
|
210
|
+
is_server_related (bool):
|
|
211
|
+
|
|
212
|
+
Keyword Args:
|
|
213
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
214
|
+
will be type checked and a TypeError will be
|
|
215
|
+
raised if the wrong type is input.
|
|
216
|
+
Defaults to True
|
|
217
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
218
|
+
drill down to the model in received_data
|
|
219
|
+
when deserializing a response
|
|
220
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
221
|
+
are serialized names, as specified in the OpenAPI document.
|
|
222
|
+
False if the variable names in the input data
|
|
223
|
+
are pythonic names, e.g. snake case (default)
|
|
224
|
+
_configuration (Configuration): the instance to use when
|
|
225
|
+
deserializing a file_type parameter.
|
|
226
|
+
If passed, type conversion is attempted
|
|
227
|
+
If omitted no type conversion is done.
|
|
228
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
229
|
+
classes that we have traveled through so that
|
|
230
|
+
if we see that class again we will not use its
|
|
231
|
+
discriminator again.
|
|
232
|
+
When traveling through a discriminator, the
|
|
233
|
+
composed schema that is
|
|
234
|
+
is traveled through is added to this set.
|
|
235
|
+
For example if Animal has a discriminator
|
|
236
|
+
petType and we pass in "Dog", and the class Dog
|
|
237
|
+
allOf includes Animal, we move through Animal
|
|
238
|
+
once using the discriminator, and pick Dog.
|
|
239
|
+
Then in Dog, we will make an instance of the
|
|
240
|
+
Animal class but this time we won't travel
|
|
241
|
+
through its discriminator because we passed in
|
|
242
|
+
_visited_composed_classes = (Animal,)
|
|
243
|
+
"""
|
|
244
|
+
|
|
245
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
246
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
247
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
248
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
249
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
250
|
+
|
|
251
|
+
if args:
|
|
252
|
+
for arg in args:
|
|
253
|
+
if isinstance(arg, dict):
|
|
254
|
+
kwargs.update(arg)
|
|
255
|
+
else:
|
|
256
|
+
raise ApiTypeError(
|
|
257
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
258
|
+
args,
|
|
259
|
+
self.__class__.__name__,
|
|
260
|
+
),
|
|
261
|
+
path_to_item=_path_to_item,
|
|
262
|
+
valid_classes=(self.__class__,),
|
|
263
|
+
)
|
|
264
|
+
|
|
265
|
+
self._data_store = {}
|
|
266
|
+
self._check_type = _check_type
|
|
267
|
+
self._spec_property_naming = _spec_property_naming
|
|
268
|
+
self._path_to_item = _path_to_item
|
|
269
|
+
self._configuration = _configuration
|
|
270
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
271
|
+
|
|
272
|
+
self.type = type
|
|
273
|
+
self.message = message
|
|
274
|
+
self.is_server_related = is_server_related
|
|
275
|
+
for var_name, var_value in kwargs.items():
|
|
276
|
+
if var_name not in self.attribute_map and \
|
|
277
|
+
self._configuration is not None and \
|
|
278
|
+
self._configuration.discard_unknown_keys and \
|
|
279
|
+
self.additional_properties_type is None:
|
|
280
|
+
# discard variable.
|
|
281
|
+
continue
|
|
282
|
+
setattr(self, var_name, var_value)
|
|
283
|
+
if var_name in self.read_only_vars:
|
|
284
|
+
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
|
285
|
+
f"class with read only attributes.")
|