criteo-api-retailmedia-sdk 0.0.231113__py3-none-any.whl → 0.0.240207__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/__init__.py +1 -1
- criteo_api_retailmedia_preview/api/accounts_api.py +767 -0
- criteo_api_retailmedia_preview/api/audience_api.py +35 -32
- criteo_api_retailmedia_preview/api_client.py +5 -5
- criteo_api_retailmedia_preview/apis/__init__.py +2 -1
- criteo_api_retailmedia_preview/configuration.py +1 -1
- criteo_api_retailmedia_preview/model/external_account.py +4 -0
- criteo_api_retailmedia_preview/model/{common_status_code_response.py → grant_consent_input.py} +9 -15
- criteo_api_retailmedia_preview/model/grant_consent_model.py +279 -0
- criteo_api_retailmedia_preview/model/grant_consent_model_value_resource.py +273 -0
- criteo_api_retailmedia_preview/model/resource_of_retail_media_account.py +270 -0
- criteo_api_retailmedia_preview/model/resource_outcome_of_retail_media_account.py +274 -0
- criteo_api_retailmedia_preview/model/retail_media_account.py +297 -0
- criteo_api_retailmedia_preview/model/retail_media_brand_account_creation.py +265 -0
- criteo_api_retailmedia_preview/model/retail_media_seller.py +261 -0
- criteo_api_retailmedia_preview/model/retail_media_seller_account_creation.py +270 -0
- criteo_api_retailmedia_preview/model/{retail_media_audience_v2_attributes.py → rm_legacy_audience_get_entity_v1.py} +23 -23
- criteo_api_retailmedia_preview/model/{retail_media_audience_v2_list_response.py → rm_legacy_audience_get_entity_v1_list_response.py} +17 -29
- criteo_api_retailmedia_preview/model/{retail_media_audience.py → rm_legacy_audience_get_entity_v1_resource.py} +22 -33
- criteo_api_retailmedia_preview/model/{retail_media_audience_attributes.py → rm_legacy_audience_get_entity_v2.py} +15 -15
- criteo_api_retailmedia_preview/model/rm_legacy_audience_get_entity_v2_list_response.py +281 -0
- criteo_api_retailmedia_preview/model/{retail_media_audience_v2.py → rm_legacy_audience_get_entity_v2_resource.py} +18 -32
- criteo_api_retailmedia_preview/model/{user_behavior_details_v2.py → rm_legacy_audience_user_behavior_details_v2.py} +11 -11
- criteo_api_retailmedia_preview/model/{customer_list_details.py → rm_legacy_segment_customer_list.py} +11 -5
- criteo_api_retailmedia_preview/model/{user_behavior_details.py → rm_legacy_segment_user_behavior_v1.py} +28 -28
- criteo_api_retailmedia_preview/model/{create_user_behavior_segment_v2.py → rm_legacy_segment_user_behavior_v2.py} +7 -5
- criteo_api_retailmedia_preview/model/value_resource_collection_outcome_of_int64.py +274 -0
- criteo_api_retailmedia_preview/model/value_resource_collection_outcome_of_retail_media_seller.py +274 -0
- criteo_api_retailmedia_preview/model/value_resource_of_int64.py +261 -0
- criteo_api_retailmedia_preview/model/value_resource_of_retail_media_seller.py +266 -0
- criteo_api_retailmedia_preview/models/__init__.py +23 -11
- {criteo_api_retailmedia_sdk-0.0.231113.dist-info → criteo_api_retailmedia_sdk-0.0.240207.dist-info}/METADATA +3 -3
- {criteo_api_retailmedia_sdk-0.0.231113.dist-info → criteo_api_retailmedia_sdk-0.0.240207.dist-info}/RECORD +36 -23
- {criteo_api_retailmedia_sdk-0.0.231113.dist-info → criteo_api_retailmedia_sdk-0.0.240207.dist-info}/WHEEL +1 -1
- criteo_api_retailmedia_preview/model/get_page_of_audiences_by_account_id_response.py +0 -295
- {criteo_api_retailmedia_sdk-0.0.231113.dist-info → criteo_api_retailmedia_sdk-0.0.240207.dist-info}/top_level.txt +0 -0
|
@@ -21,9 +21,8 @@ from criteo_api_retailmedia_preview.model_utils import ( # noqa: F401
|
|
|
21
21
|
none_type,
|
|
22
22
|
validate_and_convert_types
|
|
23
23
|
)
|
|
24
|
-
from criteo_api_retailmedia_preview.model.
|
|
25
|
-
from criteo_api_retailmedia_preview.model.
|
|
26
|
-
from criteo_api_retailmedia_preview.model.retail_media_audience_v2_list_response import RetailMediaAudienceV2ListResponse
|
|
24
|
+
from criteo_api_retailmedia_preview.model.rm_legacy_audience_get_entity_v1_list_response import RmLegacyAudienceGetEntityV1ListResponse
|
|
25
|
+
from criteo_api_retailmedia_preview.model.rm_legacy_audience_get_entity_v2_list_response import RmLegacyAudienceGetEntityV2ListResponse
|
|
27
26
|
|
|
28
27
|
|
|
29
28
|
class AudienceApi(object):
|
|
@@ -37,15 +36,15 @@ class AudienceApi(object):
|
|
|
37
36
|
if api_client is None:
|
|
38
37
|
api_client = ApiClient()
|
|
39
38
|
self.api_client = api_client
|
|
40
|
-
self.
|
|
39
|
+
self.legacy_get_audience_v1_endpoint = _Endpoint(
|
|
41
40
|
settings={
|
|
42
|
-
'response_type': (
|
|
41
|
+
'response_type': (RmLegacyAudienceGetEntityV1ListResponse,),
|
|
43
42
|
'auth': [
|
|
44
43
|
'oauth',
|
|
45
44
|
'oauth'
|
|
46
45
|
],
|
|
47
46
|
'endpoint_path': '/preview/retail-media/accounts/{accountId}/audiences',
|
|
48
|
-
'operation_id': '
|
|
47
|
+
'operation_id': 'legacy_get_audience_v1',
|
|
49
48
|
'http_method': 'GET',
|
|
50
49
|
'servers': None,
|
|
51
50
|
},
|
|
@@ -73,9 +72,9 @@ class AudienceApi(object):
|
|
|
73
72
|
},
|
|
74
73
|
'openapi_types': {
|
|
75
74
|
'account_id':
|
|
76
|
-
(
|
|
75
|
+
(int,),
|
|
77
76
|
'limit_to_id':
|
|
78
|
-
([
|
|
77
|
+
([int],),
|
|
79
78
|
'page_size':
|
|
80
79
|
(int,),
|
|
81
80
|
'page_index':
|
|
@@ -99,21 +98,23 @@ class AudienceApi(object):
|
|
|
99
98
|
},
|
|
100
99
|
headers_map={
|
|
101
100
|
'accept': [
|
|
102
|
-
'
|
|
101
|
+
'text/plain',
|
|
102
|
+
'application/json',
|
|
103
|
+
'text/json'
|
|
103
104
|
],
|
|
104
105
|
'content_type': [],
|
|
105
106
|
},
|
|
106
107
|
api_client=api_client
|
|
107
108
|
)
|
|
108
|
-
self.
|
|
109
|
+
self.legacy_get_audience_v2_endpoint = _Endpoint(
|
|
109
110
|
settings={
|
|
110
|
-
'response_type': (
|
|
111
|
+
'response_type': (RmLegacyAudienceGetEntityV2ListResponse,),
|
|
111
112
|
'auth': [
|
|
112
113
|
'oauth',
|
|
113
114
|
'oauth'
|
|
114
115
|
],
|
|
115
116
|
'endpoint_path': '/preview/retail-media/v2/accounts/{accountId}/audiences',
|
|
116
|
-
'operation_id': '
|
|
117
|
+
'operation_id': 'legacy_get_audience_v2',
|
|
117
118
|
'http_method': 'GET',
|
|
118
119
|
'servers': None,
|
|
119
120
|
},
|
|
@@ -167,34 +168,36 @@ class AudienceApi(object):
|
|
|
167
168
|
},
|
|
168
169
|
headers_map={
|
|
169
170
|
'accept': [
|
|
170
|
-
'
|
|
171
|
+
'text/plain',
|
|
172
|
+
'application/json',
|
|
173
|
+
'text/json'
|
|
171
174
|
],
|
|
172
175
|
'content_type': [],
|
|
173
176
|
},
|
|
174
177
|
api_client=api_client
|
|
175
178
|
)
|
|
176
179
|
|
|
177
|
-
def
|
|
180
|
+
def legacy_get_audience_v1(
|
|
178
181
|
self,
|
|
179
182
|
account_id,
|
|
180
183
|
**kwargs
|
|
181
184
|
):
|
|
182
|
-
"""
|
|
185
|
+
"""legacy_get_audience_v1 # noqa: E501
|
|
183
186
|
|
|
184
|
-
Get a page of
|
|
187
|
+
Get a page of Audiences. (deprecated Public API) # noqa: E501
|
|
185
188
|
This method makes a synchronous HTTP request by default. To make an
|
|
186
189
|
asynchronous HTTP request, please pass async_req=True
|
|
187
190
|
|
|
188
|
-
>>> thread = api.
|
|
191
|
+
>>> thread = api.legacy_get_audience_v1(account_id, async_req=True)
|
|
189
192
|
>>> result = thread.get()
|
|
190
193
|
|
|
191
194
|
Args:
|
|
192
|
-
account_id (
|
|
195
|
+
account_id (int): ID of the account to which this audience belongs.
|
|
193
196
|
|
|
194
197
|
Keyword Args:
|
|
195
|
-
limit_to_id ([
|
|
196
|
-
page_size (int): Specifies the maximum number of entities returned in a single page; defaults to 25 entities per page
|
|
197
|
-
page_index (int): Returns the specified page of results given a pageSize; pages are 0-indexed
|
|
198
|
+
limit_to_id ([int]): Limits results to the entity IDs specified; parameter key is repeated, eg. limitToId=1&limitToId=2. [optional]
|
|
199
|
+
page_size (int): Specifies the maximum number of entities returned in a single page; defaults to 25 entities per page.. [optional]
|
|
200
|
+
page_index (int): Returns the specified page of results given a pageSize; pages are 0-indexed.. [optional]
|
|
198
201
|
_return_http_data_only (bool): response data without head status
|
|
199
202
|
code and headers. Default is True.
|
|
200
203
|
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
@@ -227,7 +230,7 @@ class AudienceApi(object):
|
|
|
227
230
|
async_req (bool): execute request asynchronously
|
|
228
231
|
|
|
229
232
|
Returns:
|
|
230
|
-
|
|
233
|
+
RmLegacyAudienceGetEntityV1ListResponse
|
|
231
234
|
If the method is called asynchronously, returns the request
|
|
232
235
|
thread.
|
|
233
236
|
"""
|
|
@@ -258,29 +261,29 @@ class AudienceApi(object):
|
|
|
258
261
|
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
|
|
259
262
|
kwargs['account_id'] = \
|
|
260
263
|
account_id
|
|
261
|
-
return self.
|
|
264
|
+
return self.legacy_get_audience_v1_endpoint.call_with_http_info(**kwargs)
|
|
262
265
|
|
|
263
|
-
def
|
|
266
|
+
def legacy_get_audience_v2(
|
|
264
267
|
self,
|
|
265
268
|
account_id,
|
|
266
269
|
**kwargs
|
|
267
270
|
):
|
|
268
|
-
"""
|
|
271
|
+
"""legacy_get_audience_v2 # noqa: E501
|
|
269
272
|
|
|
270
|
-
Get a page of
|
|
273
|
+
Get a page of Audiences. (deprecated Public API) # noqa: E501
|
|
271
274
|
This method makes a synchronous HTTP request by default. To make an
|
|
272
275
|
asynchronous HTTP request, please pass async_req=True
|
|
273
276
|
|
|
274
|
-
>>> thread = api.
|
|
277
|
+
>>> thread = api.legacy_get_audience_v2(account_id, async_req=True)
|
|
275
278
|
>>> result = thread.get()
|
|
276
279
|
|
|
277
280
|
Args:
|
|
278
|
-
account_id (int):
|
|
281
|
+
account_id (int): ID of the account to which this audience belongs.
|
|
279
282
|
|
|
280
283
|
Keyword Args:
|
|
281
284
|
limit_to_id ([int]): Limits results to the entity IDs specified; parameter key is repeated, eg. limitToId=1&limitToId=2. [optional]
|
|
282
|
-
page_size (int): Specifies the maximum number of entities returned in a single page; defaults to 25 entities per page
|
|
283
|
-
page_index (int): Returns the specified page of results given a pageSize; pages are 0-indexed
|
|
285
|
+
page_size (int): Specifies the maximum number of entities returned in a single page; defaults to 25 entities per page.. [optional]
|
|
286
|
+
page_index (int): Returns the specified page of results given a pageSize; pages are 0-indexed.. [optional]
|
|
284
287
|
_return_http_data_only (bool): response data without head status
|
|
285
288
|
code and headers. Default is True.
|
|
286
289
|
_preload_content (bool): if False, the urllib3.HTTPResponse object
|
|
@@ -313,7 +316,7 @@ class AudienceApi(object):
|
|
|
313
316
|
async_req (bool): execute request asynchronously
|
|
314
317
|
|
|
315
318
|
Returns:
|
|
316
|
-
|
|
319
|
+
RmLegacyAudienceGetEntityV2ListResponse
|
|
317
320
|
If the method is called asynchronously, returns the request
|
|
318
321
|
thread.
|
|
319
322
|
"""
|
|
@@ -344,5 +347,5 @@ class AudienceApi(object):
|
|
|
344
347
|
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
|
|
345
348
|
kwargs['account_id'] = \
|
|
346
349
|
account_id
|
|
347
|
-
return self.
|
|
350
|
+
return self.legacy_get_audience_v2_endpoint.call_with_http_info(**kwargs)
|
|
348
351
|
|
|
@@ -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.240207/python'
|
|
80
80
|
|
|
81
81
|
def __enter__(self):
|
|
82
82
|
return self
|
|
@@ -803,11 +803,11 @@ class Endpoint(object):
|
|
|
803
803
|
""" This method is invoked when endpoints are called
|
|
804
804
|
Example:
|
|
805
805
|
|
|
806
|
-
api_instance =
|
|
807
|
-
api_instance.
|
|
808
|
-
api_instance.
|
|
806
|
+
api_instance = AccountsApi()
|
|
807
|
+
api_instance.create_private_market_demand_brand_account # this is an instance of the class Endpoint
|
|
808
|
+
api_instance.create_private_market_demand_brand_account() # this invokes api_instance.create_private_market_demand_brand_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_brand_account.callable or self.callable in this class
|
|
811
811
|
|
|
812
812
|
"""
|
|
813
813
|
return self.callable(self, *args, **kwargs)
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
# raise a `RecursionError`.
|
|
7
7
|
# In order to avoid this, import only the API that you directly need like:
|
|
8
8
|
#
|
|
9
|
-
# from criteo_api_retailmedia_preview.api.
|
|
9
|
+
# from criteo_api_retailmedia_preview.api.accounts_api import AccountsApi
|
|
10
10
|
#
|
|
11
11
|
# or import this package, but before doing it, use:
|
|
12
12
|
#
|
|
@@ -14,6 +14,7 @@
|
|
|
14
14
|
# sys.setrecursionlimit(n)
|
|
15
15
|
|
|
16
16
|
# Import APIs into API package:
|
|
17
|
+
from criteo_api_retailmedia_preview.api.accounts_api import AccountsApi
|
|
17
18
|
from criteo_api_retailmedia_preview.api.analytics_api import AnalyticsApi
|
|
18
19
|
from criteo_api_retailmedia_preview.api.audience_api import AudienceApi
|
|
19
20
|
from criteo_api_retailmedia_preview.api.campaign_api import CampaignApi
|
|
@@ -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.240207".\
|
|
399
399
|
format(env=sys.platform, pyversion=sys.version)
|
|
400
400
|
|
|
401
401
|
def get_host_settings(self):
|
|
@@ -107,6 +107,7 @@ class ExternalAccount(ModelNormal):
|
|
|
107
107
|
'parent_account_label': (str,), # noqa: E501
|
|
108
108
|
'time_zone': (str,), # noqa: E501
|
|
109
109
|
'subtype': (str, none_type,), # noqa: E501
|
|
110
|
+
'company_name': (str, none_type,), # noqa: E501
|
|
110
111
|
}
|
|
111
112
|
|
|
112
113
|
@cached_property
|
|
@@ -122,6 +123,7 @@ class ExternalAccount(ModelNormal):
|
|
|
122
123
|
'parent_account_label': 'parentAccountLabel', # noqa: E501
|
|
123
124
|
'time_zone': 'timeZone', # noqa: E501
|
|
124
125
|
'subtype': 'subtype', # noqa: E501
|
|
126
|
+
'company_name': 'companyName', # noqa: E501
|
|
125
127
|
}
|
|
126
128
|
|
|
127
129
|
read_only_vars = {
|
|
@@ -174,6 +176,7 @@ class ExternalAccount(ModelNormal):
|
|
|
174
176
|
through its discriminator because we passed in
|
|
175
177
|
_visited_composed_classes = (Animal,)
|
|
176
178
|
subtype (str, none_type): [optional] # noqa: E501
|
|
179
|
+
company_name (str, none_type): [optional] # noqa: E501
|
|
177
180
|
"""
|
|
178
181
|
|
|
179
182
|
_check_type = kwargs.pop('_check_type', True)
|
|
@@ -274,6 +277,7 @@ class ExternalAccount(ModelNormal):
|
|
|
274
277
|
through its discriminator because we passed in
|
|
275
278
|
_visited_composed_classes = (Animal,)
|
|
276
279
|
subtype (str, none_type): [optional] # noqa: E501
|
|
280
|
+
company_name (str, none_type): [optional] # noqa: E501
|
|
277
281
|
"""
|
|
278
282
|
|
|
279
283
|
_check_type = kwargs.pop('_check_type', True)
|
criteo_api_retailmedia_preview/model/{common_status_code_response.py → grant_consent_input.py}
RENAMED
|
@@ -30,11 +30,11 @@ from criteo_api_retailmedia_preview.exceptions import ApiAttributeError
|
|
|
30
30
|
|
|
31
31
|
|
|
32
32
|
def lazy_import():
|
|
33
|
-
from criteo_api_retailmedia_preview.model.
|
|
34
|
-
globals()['
|
|
33
|
+
from criteo_api_retailmedia_preview.model.grant_consent_model_value_resource import GrantConsentModelValueResource
|
|
34
|
+
globals()['GrantConsentModelValueResource'] = GrantConsentModelValueResource
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
class
|
|
37
|
+
class GrantConsentInput(ModelNormal):
|
|
38
38
|
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
39
39
|
Ref: https://openapi-generator.tech
|
|
40
40
|
|
|
@@ -87,8 +87,7 @@ class CommonStatusCodeResponse(ModelNormal):
|
|
|
87
87
|
"""
|
|
88
88
|
lazy_import()
|
|
89
89
|
return {
|
|
90
|
-
'
|
|
91
|
-
'warnings': ([CommonProblem], none_type,), # noqa: E501
|
|
90
|
+
'data': (GrantConsentModelValueResource,), # noqa: E501
|
|
92
91
|
}
|
|
93
92
|
|
|
94
93
|
@cached_property
|
|
@@ -97,13 +96,10 @@ class CommonStatusCodeResponse(ModelNormal):
|
|
|
97
96
|
|
|
98
97
|
|
|
99
98
|
attribute_map = {
|
|
100
|
-
'
|
|
101
|
-
'warnings': 'warnings', # noqa: E501
|
|
99
|
+
'data': 'data', # noqa: E501
|
|
102
100
|
}
|
|
103
101
|
|
|
104
102
|
read_only_vars = {
|
|
105
|
-
'errors', # noqa: E501
|
|
106
|
-
'warnings', # noqa: E501
|
|
107
103
|
}
|
|
108
104
|
|
|
109
105
|
_composed_schemas = {}
|
|
@@ -111,7 +107,7 @@ class CommonStatusCodeResponse(ModelNormal):
|
|
|
111
107
|
@classmethod
|
|
112
108
|
@convert_js_args_to_python_args
|
|
113
109
|
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
|
|
114
|
-
"""
|
|
110
|
+
"""GrantConsentInput - a model defined in OpenAPI
|
|
115
111
|
|
|
116
112
|
Keyword Args:
|
|
117
113
|
_check_type (bool): if True, values for parameters in openapi_types
|
|
@@ -144,8 +140,7 @@ class CommonStatusCodeResponse(ModelNormal):
|
|
|
144
140
|
Animal class but this time we won't travel
|
|
145
141
|
through its discriminator because we passed in
|
|
146
142
|
_visited_composed_classes = (Animal,)
|
|
147
|
-
|
|
148
|
-
warnings ([CommonProblem], none_type): warnings. [optional] # noqa: E501
|
|
143
|
+
data (GrantConsentModelValueResource): [optional] # noqa: E501
|
|
149
144
|
"""
|
|
150
145
|
|
|
151
146
|
_check_type = kwargs.pop('_check_type', True)
|
|
@@ -198,7 +193,7 @@ class CommonStatusCodeResponse(ModelNormal):
|
|
|
198
193
|
|
|
199
194
|
@convert_js_args_to_python_args
|
|
200
195
|
def __init__(self, *args, **kwargs): # noqa: E501
|
|
201
|
-
"""
|
|
196
|
+
"""GrantConsentInput - a model defined in OpenAPI
|
|
202
197
|
|
|
203
198
|
Keyword Args:
|
|
204
199
|
_check_type (bool): if True, values for parameters in openapi_types
|
|
@@ -231,8 +226,7 @@ class CommonStatusCodeResponse(ModelNormal):
|
|
|
231
226
|
Animal class but this time we won't travel
|
|
232
227
|
through its discriminator because we passed in
|
|
233
228
|
_visited_composed_classes = (Animal,)
|
|
234
|
-
|
|
235
|
-
warnings ([CommonProblem], none_type): warnings. [optional] # noqa: E501
|
|
229
|
+
data (GrantConsentModelValueResource): [optional] # noqa: E501
|
|
236
230
|
"""
|
|
237
231
|
|
|
238
232
|
_check_type = kwargs.pop('_check_type', True)
|
|
@@ -0,0 +1,279 @@
|
|
|
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 GrantConsentModel(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
|
+
'client_id': (str,), # noqa: E501
|
|
85
|
+
'callback_url': (str,), # noqa: E501
|
|
86
|
+
'callback_state': (str, none_type,), # noqa: E501
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
@cached_property
|
|
90
|
+
def discriminator():
|
|
91
|
+
return None
|
|
92
|
+
|
|
93
|
+
|
|
94
|
+
attribute_map = {
|
|
95
|
+
'client_id': 'clientId', # noqa: E501
|
|
96
|
+
'callback_url': 'callbackUrl', # noqa: E501
|
|
97
|
+
'callback_state': 'callbackState', # noqa: E501
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
read_only_vars = {
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
_composed_schemas = {}
|
|
104
|
+
|
|
105
|
+
@classmethod
|
|
106
|
+
@convert_js_args_to_python_args
|
|
107
|
+
def _from_openapi_data(cls, client_id, callback_url, *args, **kwargs): # noqa: E501
|
|
108
|
+
"""GrantConsentModel - a model defined in OpenAPI
|
|
109
|
+
|
|
110
|
+
Args:
|
|
111
|
+
client_id (str):
|
|
112
|
+
callback_url (str):
|
|
113
|
+
|
|
114
|
+
Keyword Args:
|
|
115
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
116
|
+
will be type checked and a TypeError will be
|
|
117
|
+
raised if the wrong type is input.
|
|
118
|
+
Defaults to True
|
|
119
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
120
|
+
drill down to the model in received_data
|
|
121
|
+
when deserializing a response
|
|
122
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
123
|
+
are serialized names, as specified in the OpenAPI document.
|
|
124
|
+
False if the variable names in the input data
|
|
125
|
+
are pythonic names, e.g. snake case (default)
|
|
126
|
+
_configuration (Configuration): the instance to use when
|
|
127
|
+
deserializing a file_type parameter.
|
|
128
|
+
If passed, type conversion is attempted
|
|
129
|
+
If omitted no type conversion is done.
|
|
130
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
131
|
+
classes that we have traveled through so that
|
|
132
|
+
if we see that class again we will not use its
|
|
133
|
+
discriminator again.
|
|
134
|
+
When traveling through a discriminator, the
|
|
135
|
+
composed schema that is
|
|
136
|
+
is traveled through is added to this set.
|
|
137
|
+
For example if Animal has a discriminator
|
|
138
|
+
petType and we pass in "Dog", and the class Dog
|
|
139
|
+
allOf includes Animal, we move through Animal
|
|
140
|
+
once using the discriminator, and pick Dog.
|
|
141
|
+
Then in Dog, we will make an instance of the
|
|
142
|
+
Animal class but this time we won't travel
|
|
143
|
+
through its discriminator because we passed in
|
|
144
|
+
_visited_composed_classes = (Animal,)
|
|
145
|
+
callback_state (str, none_type): [optional] # noqa: E501
|
|
146
|
+
"""
|
|
147
|
+
|
|
148
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
149
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
|
|
150
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
151
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
152
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
153
|
+
|
|
154
|
+
self = super(OpenApiModel, cls).__new__(cls)
|
|
155
|
+
|
|
156
|
+
if args:
|
|
157
|
+
for arg in args:
|
|
158
|
+
if isinstance(arg, dict):
|
|
159
|
+
kwargs.update(arg)
|
|
160
|
+
else:
|
|
161
|
+
raise ApiTypeError(
|
|
162
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
163
|
+
args,
|
|
164
|
+
self.__class__.__name__,
|
|
165
|
+
),
|
|
166
|
+
path_to_item=_path_to_item,
|
|
167
|
+
valid_classes=(self.__class__,),
|
|
168
|
+
)
|
|
169
|
+
|
|
170
|
+
self._data_store = {}
|
|
171
|
+
self._check_type = _check_type
|
|
172
|
+
self._spec_property_naming = _spec_property_naming
|
|
173
|
+
self._path_to_item = _path_to_item
|
|
174
|
+
self._configuration = _configuration
|
|
175
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
176
|
+
|
|
177
|
+
self.client_id = client_id
|
|
178
|
+
self.callback_url = callback_url
|
|
179
|
+
for var_name, var_value in kwargs.items():
|
|
180
|
+
if var_name not in self.attribute_map and \
|
|
181
|
+
self._configuration is not None and \
|
|
182
|
+
self._configuration.discard_unknown_keys and \
|
|
183
|
+
self.additional_properties_type is None:
|
|
184
|
+
# discard variable.
|
|
185
|
+
continue
|
|
186
|
+
setattr(self, var_name, var_value)
|
|
187
|
+
return self
|
|
188
|
+
|
|
189
|
+
required_properties = set([
|
|
190
|
+
'_data_store',
|
|
191
|
+
'_check_type',
|
|
192
|
+
'_spec_property_naming',
|
|
193
|
+
'_path_to_item',
|
|
194
|
+
'_configuration',
|
|
195
|
+
'_visited_composed_classes',
|
|
196
|
+
])
|
|
197
|
+
|
|
198
|
+
@convert_js_args_to_python_args
|
|
199
|
+
def __init__(self, client_id, callback_url, *args, **kwargs): # noqa: E501
|
|
200
|
+
"""GrantConsentModel - a model defined in OpenAPI
|
|
201
|
+
|
|
202
|
+
Args:
|
|
203
|
+
client_id (str):
|
|
204
|
+
callback_url (str):
|
|
205
|
+
|
|
206
|
+
Keyword Args:
|
|
207
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
208
|
+
will be type checked and a TypeError will be
|
|
209
|
+
raised if the wrong type is input.
|
|
210
|
+
Defaults to True
|
|
211
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
212
|
+
drill down to the model in received_data
|
|
213
|
+
when deserializing a response
|
|
214
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
215
|
+
are serialized names, as specified in the OpenAPI document.
|
|
216
|
+
False if the variable names in the input data
|
|
217
|
+
are pythonic names, e.g. snake case (default)
|
|
218
|
+
_configuration (Configuration): the instance to use when
|
|
219
|
+
deserializing a file_type parameter.
|
|
220
|
+
If passed, type conversion is attempted
|
|
221
|
+
If omitted no type conversion is done.
|
|
222
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
223
|
+
classes that we have traveled through so that
|
|
224
|
+
if we see that class again we will not use its
|
|
225
|
+
discriminator again.
|
|
226
|
+
When traveling through a discriminator, the
|
|
227
|
+
composed schema that is
|
|
228
|
+
is traveled through is added to this set.
|
|
229
|
+
For example if Animal has a discriminator
|
|
230
|
+
petType and we pass in "Dog", and the class Dog
|
|
231
|
+
allOf includes Animal, we move through Animal
|
|
232
|
+
once using the discriminator, and pick Dog.
|
|
233
|
+
Then in Dog, we will make an instance of the
|
|
234
|
+
Animal class but this time we won't travel
|
|
235
|
+
through its discriminator because we passed in
|
|
236
|
+
_visited_composed_classes = (Animal,)
|
|
237
|
+
callback_state (str, none_type): [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
|
+
self.client_id = client_id
|
|
268
|
+
self.callback_url = callback_url
|
|
269
|
+
for var_name, var_value in kwargs.items():
|
|
270
|
+
if var_name not in self.attribute_map and \
|
|
271
|
+
self._configuration is not None and \
|
|
272
|
+
self._configuration.discard_unknown_keys and \
|
|
273
|
+
self.additional_properties_type is None:
|
|
274
|
+
# discard variable.
|
|
275
|
+
continue
|
|
276
|
+
setattr(self, var_name, var_value)
|
|
277
|
+
if var_name in self.read_only_vars:
|
|
278
|
+
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
|
279
|
+
f"class with read only attributes.")
|