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
|
@@ -0,0 +1,186 @@
|
|
|
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.api_client import ApiClient, Endpoint as _Endpoint
|
|
15
|
+
from criteo_api_retailmedia_preview.model_utils import ( # noqa: F401
|
|
16
|
+
check_allowed_values,
|
|
17
|
+
check_validations,
|
|
18
|
+
date,
|
|
19
|
+
datetime,
|
|
20
|
+
file_type,
|
|
21
|
+
none_type,
|
|
22
|
+
validate_and_convert_types
|
|
23
|
+
)
|
|
24
|
+
from criteo_api_retailmedia_preview.model.http_validation_error import HttpValidationError
|
|
25
|
+
from criteo_api_retailmedia_preview.model.inbot_discussion_body_model import InbotDiscussionBodyModel
|
|
26
|
+
from criteo_api_retailmedia_preview.model.message_body_model import MessageBodyModel
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
class OnSiteRecommendationApi(object):
|
|
30
|
+
"""NOTE: This class is auto generated by OpenAPI Generator
|
|
31
|
+
Ref: https://openapi-generator.tech
|
|
32
|
+
|
|
33
|
+
Do not edit the class manually.
|
|
34
|
+
"""
|
|
35
|
+
|
|
36
|
+
def __init__(self, api_client=None):
|
|
37
|
+
if api_client is None:
|
|
38
|
+
api_client = ApiClient()
|
|
39
|
+
self.api_client = api_client
|
|
40
|
+
self.chatbot_product_recommendations_endpoint = _Endpoint(
|
|
41
|
+
settings={
|
|
42
|
+
'response_type': (MessageBodyModel,),
|
|
43
|
+
'auth': [
|
|
44
|
+
'oauth',
|
|
45
|
+
'oauth'
|
|
46
|
+
],
|
|
47
|
+
'endpoint_path': '/preview/retail-media/chatbot-catalogs/{catalogid}/product-recommendations',
|
|
48
|
+
'operation_id': 'chatbot_product_recommendations',
|
|
49
|
+
'http_method': 'POST',
|
|
50
|
+
'servers': None,
|
|
51
|
+
},
|
|
52
|
+
params_map={
|
|
53
|
+
'all': [
|
|
54
|
+
'catalogid',
|
|
55
|
+
'inbot_discussion_body_model',
|
|
56
|
+
],
|
|
57
|
+
'required': [
|
|
58
|
+
'catalogid',
|
|
59
|
+
'inbot_discussion_body_model',
|
|
60
|
+
],
|
|
61
|
+
'nullable': [
|
|
62
|
+
],
|
|
63
|
+
'enum': [
|
|
64
|
+
],
|
|
65
|
+
'validation': [
|
|
66
|
+
]
|
|
67
|
+
},
|
|
68
|
+
root_map={
|
|
69
|
+
'validations': {
|
|
70
|
+
},
|
|
71
|
+
'allowed_values': {
|
|
72
|
+
},
|
|
73
|
+
'openapi_types': {
|
|
74
|
+
'catalogid':
|
|
75
|
+
(int,),
|
|
76
|
+
'inbot_discussion_body_model':
|
|
77
|
+
(InbotDiscussionBodyModel,),
|
|
78
|
+
},
|
|
79
|
+
'attribute_map': {
|
|
80
|
+
'catalogid': 'catalogid',
|
|
81
|
+
},
|
|
82
|
+
'location_map': {
|
|
83
|
+
'catalogid': 'path',
|
|
84
|
+
'inbot_discussion_body_model': 'body',
|
|
85
|
+
},
|
|
86
|
+
'collection_format_map': {
|
|
87
|
+
}
|
|
88
|
+
},
|
|
89
|
+
headers_map={
|
|
90
|
+
'accept': [
|
|
91
|
+
'application/json'
|
|
92
|
+
],
|
|
93
|
+
'content_type': [
|
|
94
|
+
'application/json'
|
|
95
|
+
]
|
|
96
|
+
},
|
|
97
|
+
api_client=api_client
|
|
98
|
+
)
|
|
99
|
+
|
|
100
|
+
def chatbot_product_recommendations(
|
|
101
|
+
self,
|
|
102
|
+
catalogid,
|
|
103
|
+
inbot_discussion_body_model,
|
|
104
|
+
**kwargs
|
|
105
|
+
):
|
|
106
|
+
"""chatbot_product_recommendations # noqa: E501
|
|
107
|
+
|
|
108
|
+
Ask a chatbot for a product recommendation # noqa: E501
|
|
109
|
+
This method makes a synchronous HTTP request by default. To make an
|
|
110
|
+
asynchronous HTTP request, please pass async_req=True
|
|
111
|
+
|
|
112
|
+
>>> thread = api.chatbot_product_recommendations(catalogid, inbot_discussion_body_model, async_req=True)
|
|
113
|
+
>>> result = thread.get()
|
|
114
|
+
|
|
115
|
+
Args:
|
|
116
|
+
catalogid (int): the identifier of the catalog to query
|
|
117
|
+
inbot_discussion_body_model (InbotDiscussionBodyModel):
|
|
118
|
+
|
|
119
|
+
Keyword Args:
|
|
120
|
+
_return_http_data_only (bool): response data without head status
|
|
121
|
+
code and headers. Default is True.
|
|
122
|
+
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
123
|
+
will be returned without reading/decoding response data.
|
|
124
|
+
Default is True.
|
|
125
|
+
_request_timeout (int/float/tuple): timeout setting for this request. If
|
|
126
|
+
one number provided, it will be total request timeout. It can also
|
|
127
|
+
be a pair (tuple) of (connection, read) timeouts.
|
|
128
|
+
Default is None.
|
|
129
|
+
_check_input_type (bool): specifies if type checking
|
|
130
|
+
should be done one the data sent to the server.
|
|
131
|
+
Default is True.
|
|
132
|
+
_check_return_type (bool): specifies if type checking
|
|
133
|
+
should be done one the data received from the server.
|
|
134
|
+
Default is True.
|
|
135
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
136
|
+
are serialized names, as specified in the OpenAPI document.
|
|
137
|
+
False if the variable names in the input data
|
|
138
|
+
are pythonic names, e.g. snake case (default)
|
|
139
|
+
_content_type (str/None): force body content-type.
|
|
140
|
+
Default is None and content-type will be predicted by allowed
|
|
141
|
+
content-types and body.
|
|
142
|
+
_host_index (int/None): specifies the index of the server
|
|
143
|
+
that we want to use.
|
|
144
|
+
Default is read from the configuration.
|
|
145
|
+
_request_auths (list): set to override the auth_settings for an a single
|
|
146
|
+
request; this effectively ignores the authentication
|
|
147
|
+
in the spec for a single request.
|
|
148
|
+
Default is None
|
|
149
|
+
async_req (bool): execute request asynchronously
|
|
150
|
+
|
|
151
|
+
Returns:
|
|
152
|
+
MessageBodyModel
|
|
153
|
+
If the method is called asynchronously, returns the request
|
|
154
|
+
thread.
|
|
155
|
+
"""
|
|
156
|
+
kwargs['async_req'] = kwargs.get(
|
|
157
|
+
'async_req', False
|
|
158
|
+
)
|
|
159
|
+
kwargs['_return_http_data_only'] = kwargs.get(
|
|
160
|
+
'_return_http_data_only', True
|
|
161
|
+
)
|
|
162
|
+
kwargs['_preload_content'] = kwargs.get(
|
|
163
|
+
'_preload_content', True
|
|
164
|
+
)
|
|
165
|
+
kwargs['_request_timeout'] = kwargs.get(
|
|
166
|
+
'_request_timeout', None
|
|
167
|
+
)
|
|
168
|
+
kwargs['_check_input_type'] = kwargs.get(
|
|
169
|
+
'_check_input_type', True
|
|
170
|
+
)
|
|
171
|
+
kwargs['_check_return_type'] = kwargs.get(
|
|
172
|
+
'_check_return_type', True
|
|
173
|
+
)
|
|
174
|
+
kwargs['_spec_property_naming'] = kwargs.get(
|
|
175
|
+
'_spec_property_naming', False
|
|
176
|
+
)
|
|
177
|
+
kwargs['_content_type'] = kwargs.get(
|
|
178
|
+
'_content_type')
|
|
179
|
+
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
180
|
+
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
|
|
181
|
+
kwargs['catalogid'] = \
|
|
182
|
+
catalogid
|
|
183
|
+
kwargs['inbot_discussion_body_model'] = \
|
|
184
|
+
inbot_discussion_body_model
|
|
185
|
+
return self.chatbot_product_recommendations_endpoint.call_with_http_info(**kwargs)
|
|
186
|
+
|
|
@@ -76,7 +76,7 @@ class ApiClient(object):
|
|
|
76
76
|
self.default_headers[header_name] = header_value
|
|
77
77
|
self.cookie = cookie
|
|
78
78
|
# Set default User-Agent.
|
|
79
|
-
self.user_agent = 'OpenAPI-Generator/0.0.
|
|
79
|
+
self.user_agent = 'OpenAPI-Generator/0.0.241029/python'
|
|
80
80
|
|
|
81
81
|
def __enter__(self):
|
|
82
82
|
return self
|
|
@@ -804,10 +804,10 @@ class Endpoint(object):
|
|
|
804
804
|
Example:
|
|
805
805
|
|
|
806
806
|
api_instance = AccountsApi()
|
|
807
|
-
api_instance.
|
|
808
|
-
api_instance.
|
|
807
|
+
api_instance.create_private_market_demand_seller_account # this is an instance of the class Endpoint
|
|
808
|
+
api_instance.create_private_market_demand_seller_account() # this invokes api_instance.create_private_market_demand_seller_account.__call__()
|
|
809
809
|
which then invokes the callable functions stored in that endpoint at
|
|
810
|
-
api_instance.
|
|
810
|
+
api_instance.create_private_market_demand_seller_account.callable or self.callable in this class
|
|
811
811
|
|
|
812
812
|
"""
|
|
813
813
|
return self.callable(self, *args, **kwargs)
|
|
@@ -21,3 +21,4 @@ from criteo_api_retailmedia_preview.api.balance_api import BalanceApi
|
|
|
21
21
|
from criteo_api_retailmedia_preview.api.campaign_api import CampaignApi
|
|
22
22
|
from criteo_api_retailmedia_preview.api.catalog_api import CatalogApi
|
|
23
23
|
from criteo_api_retailmedia_preview.api.gateway_api import GatewayApi
|
|
24
|
+
from criteo_api_retailmedia_preview.api.on_site_recommendation_api import OnSiteRecommendationApi
|
|
@@ -395,7 +395,7 @@ class Configuration(object):
|
|
|
395
395
|
"OS: {env}\n"\
|
|
396
396
|
"Python Version: {pyversion}\n"\
|
|
397
397
|
"Version of the API: Preview\n"\
|
|
398
|
-
"SDK Package Version: 0.0.
|
|
398
|
+
"SDK Package Version: 0.0.241029".\
|
|
399
399
|
format(env=sys.platform, pyversion=sys.version)
|
|
400
400
|
|
|
401
401
|
def get_host_settings(self):
|
|
@@ -66,10 +66,10 @@ class BalanceResponseV2(ModelNormal):
|
|
|
66
66
|
'OFFSITEAWARENESS': "OffsiteAwareness",
|
|
67
67
|
},
|
|
68
68
|
('private_market_billing_type',): {
|
|
69
|
-
'NOTAPPLICABLE': "
|
|
70
|
-
'BILLBYRETAILER': "
|
|
71
|
-
'BILLBYCRITEO': "
|
|
72
|
-
'UNKNOWN': "
|
|
69
|
+
'NOTAPPLICABLE': "NotApplicable",
|
|
70
|
+
'BILLBYRETAILER': "BillByRetailer",
|
|
71
|
+
'BILLBYCRITEO': "BillByCriteo",
|
|
72
|
+
'UNKNOWN': "Unknown",
|
|
73
73
|
},
|
|
74
74
|
('status',): {
|
|
75
75
|
'UNKNOWN': "unknown",
|
|
@@ -104,7 +104,7 @@ class BalanceResponseV2(ModelNormal):
|
|
|
104
104
|
"""
|
|
105
105
|
return {
|
|
106
106
|
'name': (str,), # noqa: E501
|
|
107
|
-
'start_date': (
|
|
107
|
+
'start_date': (date,), # noqa: E501
|
|
108
108
|
'balance_type': (str,), # noqa: E501
|
|
109
109
|
'spend_type': (str,), # noqa: E501
|
|
110
110
|
'private_market_billing_type': (str,), # noqa: E501
|
|
@@ -113,7 +113,7 @@ class BalanceResponseV2(ModelNormal):
|
|
|
113
113
|
'deposited': (float, none_type,), # noqa: E501
|
|
114
114
|
'spent': (float, none_type,), # noqa: E501
|
|
115
115
|
'remaining': (float, none_type,), # noqa: E501
|
|
116
|
-
'end_date': (
|
|
116
|
+
'end_date': (date, none_type,), # noqa: E501
|
|
117
117
|
'status': (str,), # noqa: E501
|
|
118
118
|
'created_at': (datetime,), # noqa: E501
|
|
119
119
|
'updated_at': (datetime,), # noqa: E501
|
|
@@ -153,7 +153,7 @@ class BalanceResponseV2(ModelNormal):
|
|
|
153
153
|
|
|
154
154
|
Args:
|
|
155
155
|
name (str): Name of the balance.
|
|
156
|
-
start_date (
|
|
156
|
+
start_date (date): Start date of the balance in the format YYYY-MM-DD.
|
|
157
157
|
balance_type (str): Type of the balance.
|
|
158
158
|
spend_type (str): Spend Type of the balance.
|
|
159
159
|
private_market_billing_type (str): Billing type for Private Market of the balance.
|
|
@@ -194,7 +194,7 @@ class BalanceResponseV2(ModelNormal):
|
|
|
194
194
|
deposited (float, none_type): Amount of billable funds allotted to the balance.. [optional] # noqa: E501
|
|
195
195
|
spent (float, none_type): Amount of spent funds of the balance.. [optional] # noqa: E501
|
|
196
196
|
remaining (float, none_type): Amount of remaining funds of the balance.. [optional] # noqa: E501
|
|
197
|
-
end_date (
|
|
197
|
+
end_date (date, none_type): End date of the balance in the format YYYY-MM-DD.. [optional] # noqa: E501
|
|
198
198
|
status (str): Status of the balance.. [optional] # noqa: E501
|
|
199
199
|
created_at (datetime): Creation time of the balance.. [optional] # noqa: E501
|
|
200
200
|
updated_at (datetime): Update time of the balance.. [optional] # noqa: E501
|
|
@@ -259,7 +259,7 @@ class BalanceResponseV2(ModelNormal):
|
|
|
259
259
|
|
|
260
260
|
Args:
|
|
261
261
|
name (str): Name of the balance.
|
|
262
|
-
start_date (
|
|
262
|
+
start_date (date): Start date of the balance in the format YYYY-MM-DD.
|
|
263
263
|
balance_type (str): Type of the balance.
|
|
264
264
|
spend_type (str): Spend Type of the balance.
|
|
265
265
|
private_market_billing_type (str): Billing type for Private Market of the balance.
|
|
@@ -300,7 +300,7 @@ class BalanceResponseV2(ModelNormal):
|
|
|
300
300
|
deposited (float, none_type): Amount of billable funds allotted to the balance.. [optional] # noqa: E501
|
|
301
301
|
spent (float, none_type): Amount of spent funds of the balance.. [optional] # noqa: E501
|
|
302
302
|
remaining (float, none_type): Amount of remaining funds of the balance.. [optional] # noqa: E501
|
|
303
|
-
end_date (
|
|
303
|
+
end_date (date, none_type): End date of the balance in the format YYYY-MM-DD.. [optional] # noqa: E501
|
|
304
304
|
status (str): Status of the balance.. [optional] # noqa: E501
|
|
305
305
|
created_at (datetime): Creation time of the balance.. [optional] # noqa: E501
|
|
306
306
|
updated_at (datetime): Update time of the balance.. [optional] # noqa: E501
|
|
@@ -0,0 +1,277 @@
|
|
|
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_recommendation import ProductRecommendation
|
|
34
|
+
globals()['ProductRecommendation'] = ProductRecommendation
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class BotMessage(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
|
+
'opening': (str, none_type,), # noqa: E501
|
|
91
|
+
'product_recos': ([ProductRecommendation], none_type,), # noqa: E501
|
|
92
|
+
'closing': (str, none_type,), # noqa: E501
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
@cached_property
|
|
96
|
+
def discriminator():
|
|
97
|
+
return None
|
|
98
|
+
|
|
99
|
+
|
|
100
|
+
attribute_map = {
|
|
101
|
+
'opening': 'opening', # noqa: E501
|
|
102
|
+
'product_recos': 'productRecos', # noqa: E501
|
|
103
|
+
'closing': 'closing', # 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, *args, **kwargs): # noqa: E501
|
|
114
|
+
"""BotMessage - a model defined in OpenAPI
|
|
115
|
+
|
|
116
|
+
Keyword Args:
|
|
117
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
118
|
+
will be type checked and a TypeError will be
|
|
119
|
+
raised if the wrong type is input.
|
|
120
|
+
Defaults to True
|
|
121
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
122
|
+
drill down to the model in received_data
|
|
123
|
+
when deserializing a response
|
|
124
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
125
|
+
are serialized names, as specified in the OpenAPI document.
|
|
126
|
+
False if the variable names in the input data
|
|
127
|
+
are pythonic names, e.g. snake case (default)
|
|
128
|
+
_configuration (Configuration): the instance to use when
|
|
129
|
+
deserializing a file_type parameter.
|
|
130
|
+
If passed, type conversion is attempted
|
|
131
|
+
If omitted no type conversion is done.
|
|
132
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
133
|
+
classes that we have traveled through so that
|
|
134
|
+
if we see that class again we will not use its
|
|
135
|
+
discriminator again.
|
|
136
|
+
When traveling through a discriminator, the
|
|
137
|
+
composed schema that is
|
|
138
|
+
is traveled through is added to this set.
|
|
139
|
+
For example if Animal has a discriminator
|
|
140
|
+
petType and we pass in "Dog", and the class Dog
|
|
141
|
+
allOf includes Animal, we move through Animal
|
|
142
|
+
once using the discriminator, and pick Dog.
|
|
143
|
+
Then in Dog, we will make an instance of the
|
|
144
|
+
Animal class but this time we won't travel
|
|
145
|
+
through its discriminator because we passed in
|
|
146
|
+
_visited_composed_classes = (Animal,)
|
|
147
|
+
opening (str, none_type): opening comment from the bot, introducing the list of recommended products if relevant.. [optional] # noqa: E501
|
|
148
|
+
product_recos ([ProductRecommendation], none_type): list of recommended products. [optional] # noqa: E501
|
|
149
|
+
closing (str, none_type): closing remark from the bot. [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
|
+
"""BotMessage - 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
|
+
opening (str, none_type): opening comment from the bot, introducing the list of recommended products if relevant.. [optional] # noqa: E501
|
|
236
|
+
product_recos ([ProductRecommendation], none_type): list of recommended products. [optional] # noqa: E501
|
|
237
|
+
closing (str, none_type): closing remark from the bot. [optional] # noqa: E501
|
|
238
|
+
"""
|
|
239
|
+
|
|
240
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
241
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
242
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
243
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
244
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
245
|
+
|
|
246
|
+
if args:
|
|
247
|
+
for arg in args:
|
|
248
|
+
if isinstance(arg, dict):
|
|
249
|
+
kwargs.update(arg)
|
|
250
|
+
else:
|
|
251
|
+
raise ApiTypeError(
|
|
252
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
253
|
+
args,
|
|
254
|
+
self.__class__.__name__,
|
|
255
|
+
),
|
|
256
|
+
path_to_item=_path_to_item,
|
|
257
|
+
valid_classes=(self.__class__,),
|
|
258
|
+
)
|
|
259
|
+
|
|
260
|
+
self._data_store = {}
|
|
261
|
+
self._check_type = _check_type
|
|
262
|
+
self._spec_property_naming = _spec_property_naming
|
|
263
|
+
self._path_to_item = _path_to_item
|
|
264
|
+
self._configuration = _configuration
|
|
265
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
266
|
+
|
|
267
|
+
for var_name, var_value in kwargs.items():
|
|
268
|
+
if var_name not in self.attribute_map and \
|
|
269
|
+
self._configuration is not None and \
|
|
270
|
+
self._configuration.discard_unknown_keys and \
|
|
271
|
+
self.additional_properties_type is None:
|
|
272
|
+
# discard variable.
|
|
273
|
+
continue
|
|
274
|
+
setattr(self, var_name, var_value)
|
|
275
|
+
if var_name in self.read_only_vars:
|
|
276
|
+
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
|
277
|
+
f"class with read only attributes.")
|