criteo-api-marketingsolutions-sdk 0.0.250915__py3-none-any.whl → 0.0.251014__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.

Files changed (19) hide show
  1. criteo_api_marketingsolutions_preview/__init__.py +1 -1
  2. criteo_api_marketingsolutions_preview/api/advertiser_api.py +12 -12
  3. criteo_api_marketingsolutions_preview/api/audience_api.py +394 -394
  4. criteo_api_marketingsolutions_preview/api/campaign_api.py +200 -200
  5. criteo_api_marketingsolutions_preview/api/creative_api.py +3 -3
  6. criteo_api_marketingsolutions_preview/api/on_site_recommendation_api.py +6 -6
  7. criteo_api_marketingsolutions_preview/api_client.py +4 -4
  8. criteo_api_marketingsolutions_preview/configuration.py +1 -1
  9. criteo_api_marketingsolutions_preview/model/adaptive_attributes.py +12 -12
  10. criteo_api_marketingsolutions_preview/model/adaptive_colors.py +1 -1
  11. criteo_api_marketingsolutions_preview/model/adaptive_read_attributes.py +330 -0
  12. criteo_api_marketingsolutions_preview/model/creative_read.py +327 -0
  13. criteo_api_marketingsolutions_preview/model/{resource_collection_outcome_of_creative.py → resource_collection_outcome_of_creative_read.py} +8 -8
  14. criteo_api_marketingsolutions_preview/model/resource_of_creative_read.py +277 -0
  15. criteo_api_marketingsolutions_preview/models/__init__.py +4 -1
  16. {criteo_api_marketingsolutions_sdk-0.0.250915.dist-info → criteo_api_marketingsolutions_sdk-0.0.251014.dist-info}/METADATA +3 -3
  17. {criteo_api_marketingsolutions_sdk-0.0.250915.dist-info → criteo_api_marketingsolutions_sdk-0.0.251014.dist-info}/RECORD +19 -16
  18. {criteo_api_marketingsolutions_sdk-0.0.250915.dist-info → criteo_api_marketingsolutions_sdk-0.0.251014.dist-info}/WHEEL +0 -0
  19. {criteo_api_marketingsolutions_sdk-0.0.250915.dist-info → criteo_api_marketingsolutions_sdk-0.0.251014.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,327 @@
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_read_attributes import AdaptiveReadAttributes
34
+ from criteo_api_marketingsolutions_preview.model.dynamic_attributes import DynamicAttributes
35
+ from criteo_api_marketingsolutions_preview.model.html_tag_attributes import HtmlTagAttributes
36
+ from criteo_api_marketingsolutions_preview.model.image_attributes import ImageAttributes
37
+ globals()['AdaptiveReadAttributes'] = AdaptiveReadAttributes
38
+ globals()['DynamicAttributes'] = DynamicAttributes
39
+ globals()['HtmlTagAttributes'] = HtmlTagAttributes
40
+ globals()['ImageAttributes'] = ImageAttributes
41
+
42
+
43
+ class CreativeRead(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
+ }
69
+
70
+ validations = {
71
+ }
72
+
73
+ @cached_property
74
+ def additional_properties_type():
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
+ lazy_import()
80
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
81
+
82
+ _nullable = True
83
+
84
+ @cached_property
85
+ def openapi_types():
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
+ Returns
91
+ openapi_types (dict): The key is attribute name
92
+ and the value is attribute type.
93
+ """
94
+ lazy_import()
95
+ return {
96
+ 'advertiser_id': (str,), # noqa: E501
97
+ 'author': (str,), # noqa: E501
98
+ 'name': (str,), # noqa: E501
99
+ 'status': (str,), # noqa: E501
100
+ 'adaptive_attributes': (AdaptiveReadAttributes,), # noqa: E501
101
+ 'dataset_id': (str, none_type,), # noqa: E501
102
+ 'description': (str, none_type,), # noqa: E501
103
+ 'dynamic_attributes': (DynamicAttributes,), # noqa: E501
104
+ 'format': (str, none_type,), # noqa: E501
105
+ 'html_tag_attributes': (HtmlTagAttributes,), # noqa: E501
106
+ 'image_attributes': (ImageAttributes,), # noqa: E501
107
+ }
108
+
109
+ @cached_property
110
+ def discriminator():
111
+ return None
112
+
113
+
114
+ attribute_map = {
115
+ 'advertiser_id': 'advertiserId', # noqa: E501
116
+ 'author': 'author', # noqa: E501
117
+ 'name': 'name', # noqa: E501
118
+ 'status': 'status', # noqa: E501
119
+ 'adaptive_attributes': 'adaptiveAttributes', # noqa: E501
120
+ 'dataset_id': 'datasetId', # noqa: E501
121
+ 'description': 'description', # noqa: E501
122
+ 'dynamic_attributes': 'dynamicAttributes', # noqa: E501
123
+ 'format': 'format', # noqa: E501
124
+ 'html_tag_attributes': 'htmlTagAttributes', # noqa: E501
125
+ 'image_attributes': 'imageAttributes', # noqa: E501
126
+ }
127
+
128
+ read_only_vars = {
129
+ }
130
+
131
+ _composed_schemas = {}
132
+
133
+ @classmethod
134
+ @convert_js_args_to_python_args
135
+ def _from_openapi_data(cls, advertiser_id, author, name, status, *args, **kwargs): # noqa: E501
136
+ """CreativeRead - a model defined in OpenAPI
137
+
138
+ Args:
139
+ advertiser_id (str): Advertiser linked to the Creative
140
+ author (str): The login of the person who created this creative (
141
+ name (str): The name of the creative
142
+ status (str): The status of the creative
143
+
144
+ Keyword Args:
145
+ _check_type (bool): if True, values for parameters in openapi_types
146
+ will be type checked and a TypeError will be
147
+ raised if the wrong type is input.
148
+ Defaults to True
149
+ _path_to_item (tuple/list): This is a list of keys or values to
150
+ drill down to the model in received_data
151
+ when deserializing a response
152
+ _spec_property_naming (bool): True if the variable names in the input data
153
+ are serialized names, as specified in the OpenAPI document.
154
+ False if the variable names in the input data
155
+ are pythonic names, e.g. snake case (default)
156
+ _configuration (Configuration): the instance to use when
157
+ deserializing a file_type parameter.
158
+ If passed, type conversion is attempted
159
+ If omitted no type conversion is done.
160
+ _visited_composed_classes (tuple): This stores a tuple of
161
+ classes that we have traveled through so that
162
+ if we see that class again we will not use its
163
+ discriminator again.
164
+ When traveling through a discriminator, the
165
+ composed schema that is
166
+ is traveled through is added to this set.
167
+ For example if Animal has a discriminator
168
+ petType and we pass in "Dog", and the class Dog
169
+ allOf includes Animal, we move through Animal
170
+ once using the discriminator, and pick Dog.
171
+ Then in Dog, we will make an instance of the
172
+ Animal class but this time we won't travel
173
+ through its discriminator because we passed in
174
+ _visited_composed_classes = (Animal,)
175
+ adaptive_attributes (AdaptiveReadAttributes): [optional] # noqa: E501
176
+ dataset_id (str, none_type): Data set id linked to the Creative. [optional] # noqa: E501
177
+ description (str, none_type): The description of the creative. [optional] # noqa: E501
178
+ dynamic_attributes (DynamicAttributes): [optional] # noqa: E501
179
+ format (str, none_type): The format of the creative. [optional] # noqa: E501
180
+ html_tag_attributes (HtmlTagAttributes): [optional] # noqa: E501
181
+ image_attributes (ImageAttributes): [optional] # noqa: E501
182
+ """
183
+
184
+ _check_type = kwargs.pop('_check_type', True)
185
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
186
+ _path_to_item = kwargs.pop('_path_to_item', ())
187
+ _configuration = kwargs.pop('_configuration', None)
188
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
189
+
190
+ self = super(OpenApiModel, cls).__new__(cls)
191
+
192
+ if args:
193
+ for arg in args:
194
+ if isinstance(arg, dict):
195
+ kwargs.update(arg)
196
+ else:
197
+ raise ApiTypeError(
198
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
199
+ args,
200
+ self.__class__.__name__,
201
+ ),
202
+ path_to_item=_path_to_item,
203
+ valid_classes=(self.__class__,),
204
+ )
205
+
206
+ self._data_store = {}
207
+ self._check_type = _check_type
208
+ self._spec_property_naming = _spec_property_naming
209
+ self._path_to_item = _path_to_item
210
+ self._configuration = _configuration
211
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
212
+
213
+ self.advertiser_id = advertiser_id
214
+ self.author = author
215
+ self.name = name
216
+ self.status = status
217
+ for var_name, var_value in kwargs.items():
218
+ if var_name not in self.attribute_map and \
219
+ self._configuration is not None and \
220
+ self._configuration.discard_unknown_keys and \
221
+ self.additional_properties_type is None:
222
+ # discard variable.
223
+ continue
224
+ setattr(self, var_name, var_value)
225
+ return self
226
+
227
+ required_properties = set([
228
+ '_data_store',
229
+ '_check_type',
230
+ '_spec_property_naming',
231
+ '_path_to_item',
232
+ '_configuration',
233
+ '_visited_composed_classes',
234
+ ])
235
+
236
+ @convert_js_args_to_python_args
237
+ def __init__(self, advertiser_id, author, name, status, *args, **kwargs): # noqa: E501
238
+ """CreativeRead - a model defined in OpenAPI
239
+
240
+ Args:
241
+ advertiser_id (str): Advertiser linked to the Creative
242
+ author (str): The login of the person who created this creative (
243
+ name (str): The name of the creative
244
+ status (str): The status of the creative
245
+
246
+ Keyword Args:
247
+ _check_type (bool): if True, values for parameters in openapi_types
248
+ will be type checked and a TypeError will be
249
+ raised if the wrong type is input.
250
+ Defaults to True
251
+ _path_to_item (tuple/list): This is a list of keys or values to
252
+ drill down to the model in received_data
253
+ when deserializing a response
254
+ _spec_property_naming (bool): True if the variable names in the input data
255
+ are serialized names, as specified in the OpenAPI document.
256
+ False if the variable names in the input data
257
+ are pythonic names, e.g. snake case (default)
258
+ _configuration (Configuration): the instance to use when
259
+ deserializing a file_type parameter.
260
+ If passed, type conversion is attempted
261
+ If omitted no type conversion is done.
262
+ _visited_composed_classes (tuple): This stores a tuple of
263
+ classes that we have traveled through so that
264
+ if we see that class again we will not use its
265
+ discriminator again.
266
+ When traveling through a discriminator, the
267
+ composed schema that is
268
+ is traveled through is added to this set.
269
+ For example if Animal has a discriminator
270
+ petType and we pass in "Dog", and the class Dog
271
+ allOf includes Animal, we move through Animal
272
+ once using the discriminator, and pick Dog.
273
+ Then in Dog, we will make an instance of the
274
+ Animal class but this time we won't travel
275
+ through its discriminator because we passed in
276
+ _visited_composed_classes = (Animal,)
277
+ adaptive_attributes (AdaptiveReadAttributes): [optional] # noqa: E501
278
+ dataset_id (str, none_type): Data set id linked to the Creative. [optional] # noqa: E501
279
+ description (str, none_type): The description of the creative. [optional] # noqa: E501
280
+ dynamic_attributes (DynamicAttributes): [optional] # noqa: E501
281
+ format (str, none_type): The format of the creative. [optional] # noqa: E501
282
+ html_tag_attributes (HtmlTagAttributes): [optional] # noqa: E501
283
+ image_attributes (ImageAttributes): [optional] # noqa: E501
284
+ """
285
+
286
+ _check_type = kwargs.pop('_check_type', True)
287
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
288
+ _path_to_item = kwargs.pop('_path_to_item', ())
289
+ _configuration = kwargs.pop('_configuration', None)
290
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
291
+
292
+ if args:
293
+ for arg in args:
294
+ if isinstance(arg, dict):
295
+ kwargs.update(arg)
296
+ else:
297
+ raise ApiTypeError(
298
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
299
+ args,
300
+ self.__class__.__name__,
301
+ ),
302
+ path_to_item=_path_to_item,
303
+ valid_classes=(self.__class__,),
304
+ )
305
+
306
+ self._data_store = {}
307
+ self._check_type = _check_type
308
+ self._spec_property_naming = _spec_property_naming
309
+ self._path_to_item = _path_to_item
310
+ self._configuration = _configuration
311
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
312
+
313
+ self.advertiser_id = advertiser_id
314
+ self.author = author
315
+ self.name = name
316
+ self.status = status
317
+ for var_name, var_value in kwargs.items():
318
+ if var_name not in self.attribute_map and \
319
+ self._configuration is not None and \
320
+ self._configuration.discard_unknown_keys and \
321
+ self.additional_properties_type is None:
322
+ # discard variable.
323
+ continue
324
+ setattr(self, var_name, var_value)
325
+ if var_name in self.read_only_vars:
326
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
327
+ f"class with read only attributes.")
@@ -31,12 +31,12 @@ from criteo_api_marketingsolutions_preview.exceptions import ApiAttributeError
31
31
 
32
32
  def lazy_import():
33
33
  from criteo_api_marketingsolutions_preview.model.common_problem import CommonProblem
34
- from criteo_api_marketingsolutions_preview.model.resource_of_creative import ResourceOfCreative
34
+ from criteo_api_marketingsolutions_preview.model.resource_of_creative_read import ResourceOfCreativeRead
35
35
  globals()['CommonProblem'] = CommonProblem
36
- globals()['ResourceOfCreative'] = ResourceOfCreative
36
+ globals()['ResourceOfCreativeRead'] = ResourceOfCreativeRead
37
37
 
38
38
 
39
- class ResourceCollectionOutcomeOfCreative(ModelNormal):
39
+ class ResourceCollectionOutcomeOfCreativeRead(ModelNormal):
40
40
  """NOTE: This class is auto generated by OpenAPI Generator.
41
41
  Ref: https://openapi-generator.tech
42
42
 
@@ -89,7 +89,7 @@ class ResourceCollectionOutcomeOfCreative(ModelNormal):
89
89
  """
90
90
  lazy_import()
91
91
  return {
92
- 'data': ([ResourceOfCreative], none_type,), # noqa: E501
92
+ 'data': ([ResourceOfCreativeRead], none_type,), # noqa: E501
93
93
  'errors': ([CommonProblem], none_type,), # noqa: E501
94
94
  'warnings': ([CommonProblem], none_type,), # noqa: E501
95
95
  }
@@ -115,7 +115,7 @@ class ResourceCollectionOutcomeOfCreative(ModelNormal):
115
115
  @classmethod
116
116
  @convert_js_args_to_python_args
117
117
  def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
118
- """ResourceCollectionOutcomeOfCreative - a model defined in OpenAPI
118
+ """ResourceCollectionOutcomeOfCreativeRead - a model defined in OpenAPI
119
119
 
120
120
  Keyword Args:
121
121
  _check_type (bool): if True, values for parameters in openapi_types
@@ -148,7 +148,7 @@ class ResourceCollectionOutcomeOfCreative(ModelNormal):
148
148
  Animal class but this time we won't travel
149
149
  through its discriminator because we passed in
150
150
  _visited_composed_classes = (Animal,)
151
- data ([ResourceOfCreative], none_type): [optional] # noqa: E501
151
+ data ([ResourceOfCreativeRead], none_type): [optional] # noqa: E501
152
152
  errors ([CommonProblem], none_type): [optional] # noqa: E501
153
153
  warnings ([CommonProblem], none_type): [optional] # noqa: E501
154
154
  """
@@ -203,7 +203,7 @@ class ResourceCollectionOutcomeOfCreative(ModelNormal):
203
203
 
204
204
  @convert_js_args_to_python_args
205
205
  def __init__(self, *args, **kwargs): # noqa: E501
206
- """ResourceCollectionOutcomeOfCreative - a model defined in OpenAPI
206
+ """ResourceCollectionOutcomeOfCreativeRead - a model defined in OpenAPI
207
207
 
208
208
  Keyword Args:
209
209
  _check_type (bool): if True, values for parameters in openapi_types
@@ -236,7 +236,7 @@ class ResourceCollectionOutcomeOfCreative(ModelNormal):
236
236
  Animal class but this time we won't travel
237
237
  through its discriminator because we passed in
238
238
  _visited_composed_classes = (Animal,)
239
- data ([ResourceOfCreative], none_type): [optional] # noqa: E501
239
+ data ([ResourceOfCreativeRead], none_type): [optional] # noqa: E501
240
240
  errors ([CommonProblem], none_type): [optional] # noqa: E501
241
241
  warnings ([CommonProblem], none_type): [optional] # noqa: E501
242
242
  """
@@ -0,0 +1,277 @@
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.creative_read import CreativeRead
34
+ globals()['CreativeRead'] = CreativeRead
35
+
36
+
37
+ class ResourceOfCreativeRead(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
+ 'attributes': (CreativeRead,), # noqa: E501
91
+ 'id': (str, none_type,), # noqa: E501
92
+ 'type': (str, none_type,), # noqa: E501
93
+ }
94
+
95
+ @cached_property
96
+ def discriminator():
97
+ return None
98
+
99
+
100
+ attribute_map = {
101
+ 'attributes': 'attributes', # noqa: E501
102
+ 'id': 'id', # noqa: E501
103
+ 'type': 'type', # 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
+ """ResourceOfCreativeRead - 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
+ attributes (CreativeRead): [optional] # noqa: E501
148
+ id (str, none_type): Unique identifier of this resource.. [optional] # noqa: E501
149
+ type (str, none_type): [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
+ """ResourceOfCreativeRead - 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
+ attributes (CreativeRead): [optional] # noqa: E501
236
+ id (str, none_type): Unique identifier of this resource.. [optional] # noqa: E501
237
+ type (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
+ 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.")