criteo-api-marketingsolutions-sdk 0.0.250915__py3-none-any.whl → 0.0.251009__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-marketingsolutions-sdk might be problematic. Click here for more details.
- criteo_api_marketingsolutions_preview/__init__.py +1 -1
- criteo_api_marketingsolutions_preview/api/advertiser_api.py +12 -12
- criteo_api_marketingsolutions_preview/api/campaign_api.py +200 -200
- criteo_api_marketingsolutions_preview/api/creative_api.py +3 -3
- criteo_api_marketingsolutions_preview/api/on_site_recommendation_api.py +6 -6
- criteo_api_marketingsolutions_preview/api_client.py +4 -4
- criteo_api_marketingsolutions_preview/configuration.py +1 -1
- criteo_api_marketingsolutions_preview/model/adaptive_attributes.py +12 -12
- criteo_api_marketingsolutions_preview/model/adaptive_colors.py +1 -1
- criteo_api_marketingsolutions_preview/model/adaptive_read_attributes.py +330 -0
- criteo_api_marketingsolutions_preview/model/creative_read.py +327 -0
- criteo_api_marketingsolutions_preview/model/{resource_collection_outcome_of_creative.py → resource_collection_outcome_of_creative_read.py} +8 -8
- criteo_api_marketingsolutions_preview/model/resource_of_creative_read.py +277 -0
- criteo_api_marketingsolutions_preview/models/__init__.py +4 -1
- {criteo_api_marketingsolutions_sdk-0.0.250915.dist-info → criteo_api_marketingsolutions_sdk-0.0.251009.dist-info}/METADATA +3 -3
- {criteo_api_marketingsolutions_sdk-0.0.250915.dist-info → criteo_api_marketingsolutions_sdk-0.0.251009.dist-info}/RECORD +18 -15
- {criteo_api_marketingsolutions_sdk-0.0.250915.dist-info → criteo_api_marketingsolutions_sdk-0.0.251009.dist-info}/WHEEL +0 -0
- {criteo_api_marketingsolutions_sdk-0.0.250915.dist-info → criteo_api_marketingsolutions_sdk-0.0.251009.dist-info}/top_level.txt +0 -0
|
@@ -23,7 +23,7 @@ from criteo_api_marketingsolutions_preview.model_utils import ( # noqa: F401
|
|
|
23
23
|
)
|
|
24
24
|
from criteo_api_marketingsolutions_preview.model.resource_collection_outcome_of_ad import ResourceCollectionOutcomeOfAd
|
|
25
25
|
from criteo_api_marketingsolutions_preview.model.resource_collection_outcome_of_coupon import ResourceCollectionOutcomeOfCoupon
|
|
26
|
-
from criteo_api_marketingsolutions_preview.model.
|
|
26
|
+
from criteo_api_marketingsolutions_preview.model.resource_collection_outcome_of_creative_read import ResourceCollectionOutcomeOfCreativeRead
|
|
27
27
|
from criteo_api_marketingsolutions_preview.model.resource_input_of_ad_write import ResourceInputOfAdWrite
|
|
28
28
|
from criteo_api_marketingsolutions_preview.model.resource_input_of_create_coupon import ResourceInputOfCreateCoupon
|
|
29
29
|
from criteo_api_marketingsolutions_preview.model.resource_input_of_creative_write import ResourceInputOfCreativeWrite
|
|
@@ -931,7 +931,7 @@ class CreativeApi(object):
|
|
|
931
931
|
)
|
|
932
932
|
self.get_advertiser_creatives_endpoint = _Endpoint(
|
|
933
933
|
settings={
|
|
934
|
-
'response_type': (
|
|
934
|
+
'response_type': (ResourceCollectionOutcomeOfCreativeRead,),
|
|
935
935
|
'auth': [
|
|
936
936
|
'oauth',
|
|
937
937
|
'oauth'
|
|
@@ -2388,7 +2388,7 @@ class CreativeApi(object):
|
|
|
2388
2388
|
async_req (bool): execute request asynchronously
|
|
2389
2389
|
|
|
2390
2390
|
Returns:
|
|
2391
|
-
|
|
2391
|
+
ResourceCollectionOutcomeOfCreativeRead
|
|
2392
2392
|
If the method is called asynchronously, returns the request
|
|
2393
2393
|
thread.
|
|
2394
2394
|
"""
|
|
@@ -36,7 +36,7 @@ class OnSiteRecommendationApi(object):
|
|
|
36
36
|
if api_client is None:
|
|
37
37
|
api_client = ApiClient()
|
|
38
38
|
self.api_client = api_client
|
|
39
|
-
self.
|
|
39
|
+
self.search_recommended_products_endpoint = _Endpoint(
|
|
40
40
|
settings={
|
|
41
41
|
'response_type': (OnSiteRecoResponse,),
|
|
42
42
|
'auth': [
|
|
@@ -44,7 +44,7 @@ class OnSiteRecommendationApi(object):
|
|
|
44
44
|
'oauth'
|
|
45
45
|
],
|
|
46
46
|
'endpoint_path': '/preview/recommendation/search',
|
|
47
|
-
'operation_id': '
|
|
47
|
+
'operation_id': 'search_recommended_products',
|
|
48
48
|
'http_method': 'POST',
|
|
49
49
|
'servers': None,
|
|
50
50
|
},
|
|
@@ -88,17 +88,17 @@ class OnSiteRecommendationApi(object):
|
|
|
88
88
|
api_client=api_client
|
|
89
89
|
)
|
|
90
90
|
|
|
91
|
-
def
|
|
91
|
+
def search_recommended_products(
|
|
92
92
|
self,
|
|
93
93
|
**kwargs
|
|
94
94
|
):
|
|
95
|
-
"""
|
|
95
|
+
"""search_recommended_products # noqa: E501
|
|
96
96
|
|
|
97
97
|
Retrieves a list of products recommended for the given user. This end point can either rely on a Criteo UserId, or a list of user events to perform the recommendation. # noqa: E501
|
|
98
98
|
This method makes a synchronous HTTP request by default. To make an
|
|
99
99
|
asynchronous HTTP request, please pass async_req=True
|
|
100
100
|
|
|
101
|
-
>>> thread = api.
|
|
101
|
+
>>> thread = api.search_recommended_products(async_req=True)
|
|
102
102
|
>>> result = thread.get()
|
|
103
103
|
|
|
104
104
|
|
|
@@ -165,5 +165,5 @@ class OnSiteRecommendationApi(object):
|
|
|
165
165
|
'_content_type')
|
|
166
166
|
kwargs['_host_index'] = kwargs.get('_host_index')
|
|
167
167
|
kwargs['_request_auths'] = kwargs.get('_request_auths', None)
|
|
168
|
-
return self.
|
|
168
|
+
return self.search_recommended_products_endpoint.call_with_http_info(**kwargs)
|
|
169
169
|
|
|
@@ -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.251009/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 = AdvertiserApi()
|
|
807
|
-
api_instance.
|
|
808
|
-
api_instance.
|
|
807
|
+
api_instance.list_advertisers # this is an instance of the class Endpoint
|
|
808
|
+
api_instance.list_advertisers() # this invokes api_instance.list_advertisers.__call__()
|
|
809
809
|
which then invokes the callable functions stored in that endpoint at
|
|
810
|
-
api_instance.
|
|
810
|
+
api_instance.list_advertisers.callable or self.callable in this class
|
|
811
811
|
|
|
812
812
|
"""
|
|
813
813
|
return self.callable(self, *args, **kwargs)
|
|
@@ -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.251009".\
|
|
399
399
|
format(env=sys.platform, pyversion=sys.version)
|
|
400
400
|
|
|
401
401
|
def get_host_settings(self):
|
|
@@ -105,10 +105,10 @@ class AdaptiveAttributes(ModelNormal):
|
|
|
105
105
|
return {
|
|
106
106
|
'calls_to_action': ([str],), # noqa: E501
|
|
107
107
|
'colors': (AdaptiveColors,), # noqa: E501
|
|
108
|
-
'description_font': (str,
|
|
109
|
-
'description_text': (str,
|
|
110
|
-
'headline_font': (str,
|
|
111
|
-
'headline_text': (str,
|
|
108
|
+
'description_font': (str,), # noqa: E501
|
|
109
|
+
'description_text': (str,), # noqa: E501
|
|
110
|
+
'headline_font': (str,), # noqa: E501
|
|
111
|
+
'headline_text': (str,), # noqa: E501
|
|
112
112
|
'landing_page_url': (str,), # noqa: E501
|
|
113
113
|
'layouts': ([str],), # noqa: E501
|
|
114
114
|
'logos': ([ImageShape],), # noqa: E501
|
|
@@ -150,10 +150,10 @@ class AdaptiveAttributes(ModelNormal):
|
|
|
150
150
|
Args:
|
|
151
151
|
calls_to_action ([str]): A Call-to-Action (CTA) is an action-driven instruction to your audience intended to provoke an immediate response, such as “Buy now” or “Go!”.
|
|
152
152
|
colors (AdaptiveColors):
|
|
153
|
-
description_font (str
|
|
154
|
-
description_text (str
|
|
155
|
-
headline_font (str
|
|
156
|
-
headline_text (str
|
|
153
|
+
description_font (str): Font of the description Valid supported font like \"Arial\"
|
|
154
|
+
description_text (str): The description text of the banner
|
|
155
|
+
headline_font (str): Font of the headline Valid supported font like \"Arial\"
|
|
156
|
+
headline_text (str): The headline text of the banner
|
|
157
157
|
landing_page_url (str): Web redirection of the landing page url
|
|
158
158
|
layouts ([str]): The Adaptive layouts that are enabled. It can contain any of the following values: \"Editorial\", “Montage“, \"InBannerVideo\".
|
|
159
159
|
logos ([ImageShape]): Logo images uploaded on demostatic.criteo.com when deploying and then static.criteo.net
|
|
@@ -258,10 +258,10 @@ class AdaptiveAttributes(ModelNormal):
|
|
|
258
258
|
Args:
|
|
259
259
|
calls_to_action ([str]): A Call-to-Action (CTA) is an action-driven instruction to your audience intended to provoke an immediate response, such as “Buy now” or “Go!”.
|
|
260
260
|
colors (AdaptiveColors):
|
|
261
|
-
description_font (str
|
|
262
|
-
description_text (str
|
|
263
|
-
headline_font (str
|
|
264
|
-
headline_text (str
|
|
261
|
+
description_font (str): Font of the description Valid supported font like \"Arial\"
|
|
262
|
+
description_text (str): The description text of the banner
|
|
263
|
+
headline_font (str): Font of the headline Valid supported font like \"Arial\"
|
|
264
|
+
headline_text (str): The headline text of the banner
|
|
265
265
|
landing_page_url (str): Web redirection of the landing page url
|
|
266
266
|
layouts ([str]): The Adaptive layouts that are enabled. It can contain any of the following values: \"Editorial\", “Montage“, \"InBannerVideo\".
|
|
267
267
|
logos ([ImageShape]): Logo images uploaded on demostatic.criteo.com when deploying and then static.criteo.net
|
|
@@ -0,0 +1,330 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Criteo API
|
|
3
|
+
|
|
4
|
+
Criteo API - MarketingSolutions # 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_marketingsolutions_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_marketingsolutions_preview.exceptions import ApiAttributeError
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def lazy_import():
|
|
33
|
+
from criteo_api_marketingsolutions_preview.model.adaptive_colors import AdaptiveColors
|
|
34
|
+
from criteo_api_marketingsolutions_preview.model.image_set import ImageSet
|
|
35
|
+
from criteo_api_marketingsolutions_preview.model.image_shape import ImageShape
|
|
36
|
+
from criteo_api_marketingsolutions_preview.model.video_detail import VideoDetail
|
|
37
|
+
globals()['AdaptiveColors'] = AdaptiveColors
|
|
38
|
+
globals()['ImageSet'] = ImageSet
|
|
39
|
+
globals()['ImageShape'] = ImageShape
|
|
40
|
+
globals()['VideoDetail'] = VideoDetail
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class AdaptiveReadAttributes(ModelNormal):
|
|
44
|
+
"""NOTE: This class is auto generated by OpenAPI Generator.
|
|
45
|
+
Ref: https://openapi-generator.tech
|
|
46
|
+
|
|
47
|
+
Do not edit the class manually.
|
|
48
|
+
|
|
49
|
+
Attributes:
|
|
50
|
+
allowed_values (dict): The key is the tuple path to the attribute
|
|
51
|
+
and the for var_name this is (var_name,). The value is a dict
|
|
52
|
+
with a capitalized key describing the allowed value and an allowed
|
|
53
|
+
value. These dicts store the allowed enum values.
|
|
54
|
+
attribute_map (dict): The key is attribute name
|
|
55
|
+
and the value is json key in definition.
|
|
56
|
+
discriminator_value_class_map (dict): A dict to go from the discriminator
|
|
57
|
+
variable value to the discriminator class name.
|
|
58
|
+
validations (dict): The key is the tuple path to the attribute
|
|
59
|
+
and the for var_name this is (var_name,). The value is a dict
|
|
60
|
+
that stores validations for max_length, min_length, max_items,
|
|
61
|
+
min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
|
|
62
|
+
inclusive_minimum, and regex.
|
|
63
|
+
additional_properties_type (tuple): A tuple of classes accepted
|
|
64
|
+
as additional properties values.
|
|
65
|
+
"""
|
|
66
|
+
|
|
67
|
+
allowed_values = {
|
|
68
|
+
('image_display',): {
|
|
69
|
+
'None': None,
|
|
70
|
+
'SHOWFULLIMAGE': "ShowFullImage",
|
|
71
|
+
'ZOOMONIMAGE': "ZoomOnImage",
|
|
72
|
+
},
|
|
73
|
+
('layouts',): {
|
|
74
|
+
'None': None,
|
|
75
|
+
'EDITORIAL': "Editorial",
|
|
76
|
+
'MONTAGE': "Montage",
|
|
77
|
+
'INBANNERVIDEO': "InBannerVideo",
|
|
78
|
+
},
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
validations = {
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
@cached_property
|
|
85
|
+
def additional_properties_type():
|
|
86
|
+
"""
|
|
87
|
+
This must be a method because a model may have properties that are
|
|
88
|
+
of type self, this must run after the class is loaded
|
|
89
|
+
"""
|
|
90
|
+
lazy_import()
|
|
91
|
+
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
|
|
92
|
+
|
|
93
|
+
_nullable = True
|
|
94
|
+
|
|
95
|
+
@cached_property
|
|
96
|
+
def openapi_types():
|
|
97
|
+
"""
|
|
98
|
+
This must be a method because a model may have properties that are
|
|
99
|
+
of type self, this must run after the class is loaded
|
|
100
|
+
|
|
101
|
+
Returns
|
|
102
|
+
openapi_types (dict): The key is attribute name
|
|
103
|
+
and the value is attribute type.
|
|
104
|
+
"""
|
|
105
|
+
lazy_import()
|
|
106
|
+
return {
|
|
107
|
+
'calls_to_action': ([str], none_type,), # noqa: E501
|
|
108
|
+
'colors': (AdaptiveColors,), # noqa: E501
|
|
109
|
+
'description_font': (str, none_type,), # noqa: E501
|
|
110
|
+
'description_text': (str, none_type,), # noqa: E501
|
|
111
|
+
'headline_font': (str, none_type,), # noqa: E501
|
|
112
|
+
'headline_text': (str, none_type,), # noqa: E501
|
|
113
|
+
'image_display': (str, none_type,), # noqa: E501
|
|
114
|
+
'image_sets': ([ImageSet], none_type,), # noqa: E501
|
|
115
|
+
'landing_page_url': (str, none_type,), # noqa: E501
|
|
116
|
+
'layouts': ([str], none_type,), # noqa: E501
|
|
117
|
+
'logos': ([ImageShape], none_type,), # noqa: E501
|
|
118
|
+
'videos': ([VideoDetail], none_type,), # noqa: E501
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
@cached_property
|
|
122
|
+
def discriminator():
|
|
123
|
+
return None
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
attribute_map = {
|
|
127
|
+
'calls_to_action': 'callsToAction', # noqa: E501
|
|
128
|
+
'colors': 'colors', # noqa: E501
|
|
129
|
+
'description_font': 'descriptionFont', # noqa: E501
|
|
130
|
+
'description_text': 'descriptionText', # noqa: E501
|
|
131
|
+
'headline_font': 'headlineFont', # noqa: E501
|
|
132
|
+
'headline_text': 'headlineText', # noqa: E501
|
|
133
|
+
'image_display': 'imageDisplay', # noqa: E501
|
|
134
|
+
'image_sets': 'imageSets', # noqa: E501
|
|
135
|
+
'landing_page_url': 'landingPageUrl', # noqa: E501
|
|
136
|
+
'layouts': 'layouts', # noqa: E501
|
|
137
|
+
'logos': 'logos', # noqa: E501
|
|
138
|
+
'videos': 'videos', # noqa: E501
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
read_only_vars = {
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
_composed_schemas = {}
|
|
145
|
+
|
|
146
|
+
@classmethod
|
|
147
|
+
@convert_js_args_to_python_args
|
|
148
|
+
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
|
|
149
|
+
"""AdaptiveReadAttributes - a model defined in OpenAPI
|
|
150
|
+
|
|
151
|
+
Keyword Args:
|
|
152
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
153
|
+
will be type checked and a TypeError will be
|
|
154
|
+
raised if the wrong type is input.
|
|
155
|
+
Defaults to True
|
|
156
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
157
|
+
drill down to the model in received_data
|
|
158
|
+
when deserializing a response
|
|
159
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
160
|
+
are serialized names, as specified in the OpenAPI document.
|
|
161
|
+
False if the variable names in the input data
|
|
162
|
+
are pythonic names, e.g. snake case (default)
|
|
163
|
+
_configuration (Configuration): the instance to use when
|
|
164
|
+
deserializing a file_type parameter.
|
|
165
|
+
If passed, type conversion is attempted
|
|
166
|
+
If omitted no type conversion is done.
|
|
167
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
168
|
+
classes that we have traveled through so that
|
|
169
|
+
if we see that class again we will not use its
|
|
170
|
+
discriminator again.
|
|
171
|
+
When traveling through a discriminator, the
|
|
172
|
+
composed schema that is
|
|
173
|
+
is traveled through is added to this set.
|
|
174
|
+
For example if Animal has a discriminator
|
|
175
|
+
petType and we pass in "Dog", and the class Dog
|
|
176
|
+
allOf includes Animal, we move through Animal
|
|
177
|
+
once using the discriminator, and pick Dog.
|
|
178
|
+
Then in Dog, we will make an instance of the
|
|
179
|
+
Animal class but this time we won't travel
|
|
180
|
+
through its discriminator because we passed in
|
|
181
|
+
_visited_composed_classes = (Animal,)
|
|
182
|
+
calls_to_action ([str], none_type): A Call-to-Action (CTA) is an action-driven instruction to your audience intended to provoke an immediate response, such as “Buy now” or “Go!”.. [optional] # noqa: E501
|
|
183
|
+
colors (AdaptiveColors): [optional] # noqa: E501
|
|
184
|
+
description_font (str, none_type): Font of the description Valid supported font like \"Arial\". [optional] # noqa: E501
|
|
185
|
+
description_text (str, none_type): The description text of the banner. [optional] # noqa: E501
|
|
186
|
+
headline_font (str, none_type): Font of the headline Valid supported font like \"Arial\". [optional] # noqa: E501
|
|
187
|
+
headline_text (str, none_type): The headline text of the banner. [optional] # noqa: E501
|
|
188
|
+
image_display (str, none_type): Value can be \"ShowFullImage\" or \"ZoomOnImage\". Choose whether your image set should fit inside the allocated space (\"ShowFullImage\") or whether it should fill that space (\"ZoomOnImage\"). If you choose ZoomOnImage, there may be some image cropping.. [optional] # noqa: E501
|
|
189
|
+
image_sets ([ImageSet], none_type): Multiple image sets, each image set consists of multiple images and a headline text.. [optional] # noqa: E501
|
|
190
|
+
landing_page_url (str, none_type): Web redirection of the landing page url. [optional] # noqa: E501
|
|
191
|
+
layouts ([str], none_type): The Adaptive layouts that are enabled. It can contain any of the following values: \"Editorial\", “Montage“, \"InBannerVideo\".. [optional] # noqa: E501
|
|
192
|
+
logos ([ImageShape], none_type): Logo images uploaded on demostatic.criteo.com when deploying and then static.criteo.net. [optional] # noqa: E501
|
|
193
|
+
videos ([VideoDetail], none_type): Multiple videos potentially in different shapes.. [optional] # noqa: E501
|
|
194
|
+
"""
|
|
195
|
+
|
|
196
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
197
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
|
|
198
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
199
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
200
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
201
|
+
|
|
202
|
+
self = super(OpenApiModel, cls).__new__(cls)
|
|
203
|
+
|
|
204
|
+
if args:
|
|
205
|
+
for arg in args:
|
|
206
|
+
if isinstance(arg, dict):
|
|
207
|
+
kwargs.update(arg)
|
|
208
|
+
else:
|
|
209
|
+
raise ApiTypeError(
|
|
210
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
211
|
+
args,
|
|
212
|
+
self.__class__.__name__,
|
|
213
|
+
),
|
|
214
|
+
path_to_item=_path_to_item,
|
|
215
|
+
valid_classes=(self.__class__,),
|
|
216
|
+
)
|
|
217
|
+
|
|
218
|
+
self._data_store = {}
|
|
219
|
+
self._check_type = _check_type
|
|
220
|
+
self._spec_property_naming = _spec_property_naming
|
|
221
|
+
self._path_to_item = _path_to_item
|
|
222
|
+
self._configuration = _configuration
|
|
223
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
224
|
+
|
|
225
|
+
for var_name, var_value in kwargs.items():
|
|
226
|
+
if var_name not in self.attribute_map and \
|
|
227
|
+
self._configuration is not None and \
|
|
228
|
+
self._configuration.discard_unknown_keys and \
|
|
229
|
+
self.additional_properties_type is None:
|
|
230
|
+
# discard variable.
|
|
231
|
+
continue
|
|
232
|
+
setattr(self, var_name, var_value)
|
|
233
|
+
return self
|
|
234
|
+
|
|
235
|
+
required_properties = set([
|
|
236
|
+
'_data_store',
|
|
237
|
+
'_check_type',
|
|
238
|
+
'_spec_property_naming',
|
|
239
|
+
'_path_to_item',
|
|
240
|
+
'_configuration',
|
|
241
|
+
'_visited_composed_classes',
|
|
242
|
+
])
|
|
243
|
+
|
|
244
|
+
@convert_js_args_to_python_args
|
|
245
|
+
def __init__(self, *args, **kwargs): # noqa: E501
|
|
246
|
+
"""AdaptiveReadAttributes - a model defined in OpenAPI
|
|
247
|
+
|
|
248
|
+
Keyword Args:
|
|
249
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
250
|
+
will be type checked and a TypeError will be
|
|
251
|
+
raised if the wrong type is input.
|
|
252
|
+
Defaults to True
|
|
253
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
254
|
+
drill down to the model in received_data
|
|
255
|
+
when deserializing a response
|
|
256
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
257
|
+
are serialized names, as specified in the OpenAPI document.
|
|
258
|
+
False if the variable names in the input data
|
|
259
|
+
are pythonic names, e.g. snake case (default)
|
|
260
|
+
_configuration (Configuration): the instance to use when
|
|
261
|
+
deserializing a file_type parameter.
|
|
262
|
+
If passed, type conversion is attempted
|
|
263
|
+
If omitted no type conversion is done.
|
|
264
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
265
|
+
classes that we have traveled through so that
|
|
266
|
+
if we see that class again we will not use its
|
|
267
|
+
discriminator again.
|
|
268
|
+
When traveling through a discriminator, the
|
|
269
|
+
composed schema that is
|
|
270
|
+
is traveled through is added to this set.
|
|
271
|
+
For example if Animal has a discriminator
|
|
272
|
+
petType and we pass in "Dog", and the class Dog
|
|
273
|
+
allOf includes Animal, we move through Animal
|
|
274
|
+
once using the discriminator, and pick Dog.
|
|
275
|
+
Then in Dog, we will make an instance of the
|
|
276
|
+
Animal class but this time we won't travel
|
|
277
|
+
through its discriminator because we passed in
|
|
278
|
+
_visited_composed_classes = (Animal,)
|
|
279
|
+
calls_to_action ([str], none_type): A Call-to-Action (CTA) is an action-driven instruction to your audience intended to provoke an immediate response, such as “Buy now” or “Go!”.. [optional] # noqa: E501
|
|
280
|
+
colors (AdaptiveColors): [optional] # noqa: E501
|
|
281
|
+
description_font (str, none_type): Font of the description Valid supported font like \"Arial\". [optional] # noqa: E501
|
|
282
|
+
description_text (str, none_type): The description text of the banner. [optional] # noqa: E501
|
|
283
|
+
headline_font (str, none_type): Font of the headline Valid supported font like \"Arial\". [optional] # noqa: E501
|
|
284
|
+
headline_text (str, none_type): The headline text of the banner. [optional] # noqa: E501
|
|
285
|
+
image_display (str, none_type): Value can be \"ShowFullImage\" or \"ZoomOnImage\". Choose whether your image set should fit inside the allocated space (\"ShowFullImage\") or whether it should fill that space (\"ZoomOnImage\"). If you choose ZoomOnImage, there may be some image cropping.. [optional] # noqa: E501
|
|
286
|
+
image_sets ([ImageSet], none_type): Multiple image sets, each image set consists of multiple images and a headline text.. [optional] # noqa: E501
|
|
287
|
+
landing_page_url (str, none_type): Web redirection of the landing page url. [optional] # noqa: E501
|
|
288
|
+
layouts ([str], none_type): The Adaptive layouts that are enabled. It can contain any of the following values: \"Editorial\", “Montage“, \"InBannerVideo\".. [optional] # noqa: E501
|
|
289
|
+
logos ([ImageShape], none_type): Logo images uploaded on demostatic.criteo.com when deploying and then static.criteo.net. [optional] # noqa: E501
|
|
290
|
+
videos ([VideoDetail], none_type): Multiple videos potentially in different shapes.. [optional] # noqa: E501
|
|
291
|
+
"""
|
|
292
|
+
|
|
293
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
294
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
295
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
296
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
297
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
298
|
+
|
|
299
|
+
if args:
|
|
300
|
+
for arg in args:
|
|
301
|
+
if isinstance(arg, dict):
|
|
302
|
+
kwargs.update(arg)
|
|
303
|
+
else:
|
|
304
|
+
raise ApiTypeError(
|
|
305
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
306
|
+
args,
|
|
307
|
+
self.__class__.__name__,
|
|
308
|
+
),
|
|
309
|
+
path_to_item=_path_to_item,
|
|
310
|
+
valid_classes=(self.__class__,),
|
|
311
|
+
)
|
|
312
|
+
|
|
313
|
+
self._data_store = {}
|
|
314
|
+
self._check_type = _check_type
|
|
315
|
+
self._spec_property_naming = _spec_property_naming
|
|
316
|
+
self._path_to_item = _path_to_item
|
|
317
|
+
self._configuration = _configuration
|
|
318
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
319
|
+
|
|
320
|
+
for var_name, var_value in kwargs.items():
|
|
321
|
+
if var_name not in self.attribute_map and \
|
|
322
|
+
self._configuration is not None and \
|
|
323
|
+
self._configuration.discard_unknown_keys and \
|
|
324
|
+
self.additional_properties_type is None:
|
|
325
|
+
# discard variable.
|
|
326
|
+
continue
|
|
327
|
+
setattr(self, var_name, var_value)
|
|
328
|
+
if var_name in self.read_only_vars:
|
|
329
|
+
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
|
330
|
+
f"class with read only attributes.")
|