criteo-api-retailmedia-sdk 0.0.250425__py3-none-any.whl → 0.0.250618__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.

Files changed (77) hide show
  1. criteo_api_retailmedia_preview/__init__.py +1 -1
  2. criteo_api_retailmedia_preview/api/audience_api.py +1204 -135
  3. criteo_api_retailmedia_preview/api/campaign_api.py +1205 -147
  4. criteo_api_retailmedia_preview/api_client.py +1 -1
  5. criteo_api_retailmedia_preview/configuration.py +1 -1
  6. criteo_api_retailmedia_preview/model/async_accounts_report.py +11 -0
  7. criteo_api_retailmedia_preview/model/async_campaigns_report.py +11 -0
  8. criteo_api_retailmedia_preview/model/async_line_items_report.py +11 -0
  9. criteo_api_retailmedia_preview/model/categories_search_request_v1.py +270 -0
  10. criteo_api_retailmedia_preview/model/entity_resource_category202204.py +277 -0
  11. criteo_api_retailmedia_preview/model/entity_resource_collection_outcome_category202204.py +281 -0
  12. criteo_api_retailmedia_preview/model/entity_resource_collection_outcome_category202204_metadata.py +287 -0
  13. criteo_api_retailmedia_preview/model/entity_resource_of_sponsored_products_line_item.py +270 -0
  14. criteo_api_retailmedia_preview/model/entity_resource_outcome_of_sponsored_products_line_item.py +274 -0
  15. criteo_api_retailmedia_preview/model/flight_leg.py +287 -0
  16. criteo_api_retailmedia_preview/model/flight_schedule.py +262 -0
  17. criteo_api_retailmedia_preview/model/nillable_decimal.py +263 -0
  18. criteo_api_retailmedia_preview/model/page_of_sponsored_products_line_item.py +276 -0
  19. criteo_api_retailmedia_preview/model/recommended_categories_request_v1.py +272 -0
  20. criteo_api_retailmedia_preview/model/recommended_keywords_request_v1.py +266 -0
  21. criteo_api_retailmedia_preview/model/recommended_keywords_response_v1.py +263 -0
  22. criteo_api_retailmedia_preview/model/rm_audience_bulk_create_input_v1.py +269 -0
  23. criteo_api_retailmedia_preview/model/rm_audience_bulk_delete_input_v1.py +269 -0
  24. criteo_api_retailmedia_preview/model/rm_audience_bulk_update_input_v1.py +269 -0
  25. criteo_api_retailmedia_preview/model/rm_audience_compute_sizes_entity_v1.py +272 -0
  26. criteo_api_retailmedia_preview/model/rm_audience_compute_sizes_entity_v1_resource.py +273 -0
  27. criteo_api_retailmedia_preview/model/rm_audience_compute_sizes_input_v1.py +269 -0
  28. criteo_api_retailmedia_preview/model/rm_audience_create_entity_v1.py +291 -0
  29. criteo_api_retailmedia_preview/model/rm_audience_create_entity_v1_resource.py +273 -0
  30. criteo_api_retailmedia_preview/model/rm_audience_delete_entity_v1_resource.py +271 -0
  31. criteo_api_retailmedia_preview/model/rm_audience_entity_v1_list_response.py +281 -0
  32. criteo_api_retailmedia_preview/model/rm_audience_estimate_size_entity_v1.py +282 -0
  33. criteo_api_retailmedia_preview/model/rm_audience_estimate_size_entity_v1_resource.py +273 -0
  34. criteo_api_retailmedia_preview/model/rm_audience_estimate_size_input_v1.py +269 -0
  35. criteo_api_retailmedia_preview/model/rm_audience_segment_compute_size_entity_v1.py +272 -0
  36. criteo_api_retailmedia_preview/model/rm_audience_segment_compute_size_entity_v1_resource.py +273 -0
  37. criteo_api_retailmedia_preview/model/rm_audience_segment_compute_sizes_input_v1.py +269 -0
  38. criteo_api_retailmedia_preview/model/rm_audience_segment_create_entity_v1.py +6 -0
  39. criteo_api_retailmedia_preview/model/rm_audience_segment_estimate_size_entity_v1.py +282 -0
  40. criteo_api_retailmedia_preview/model/rm_audience_segment_estimate_size_entity_v1_resource.py +273 -0
  41. criteo_api_retailmedia_preview/model/rm_audience_segment_estimate_size_input_v1.py +269 -0
  42. criteo_api_retailmedia_preview/model/rm_audience_segment_size_entity_v1.py +267 -0
  43. criteo_api_retailmedia_preview/model/rm_audience_segment_size_entity_v1_list_response.py +281 -0
  44. criteo_api_retailmedia_preview/model/rm_audience_segment_size_entity_v1_resource.py +277 -0
  45. criteo_api_retailmedia_preview/model/rm_audience_segment_size_estimation_v1.py +267 -0
  46. criteo_api_retailmedia_preview/model/rm_audience_segment_size_estimation_v1_resource.py +273 -0
  47. criteo_api_retailmedia_preview/model/rm_audience_segment_size_estimation_v1_response.py +281 -0
  48. criteo_api_retailmedia_preview/model/rm_audience_segment_update_entity_v1.py +6 -0
  49. criteo_api_retailmedia_preview/model/rm_audience_size_entity_v1.py +267 -0
  50. criteo_api_retailmedia_preview/model/rm_audience_size_entity_v1_list_response.py +281 -0
  51. criteo_api_retailmedia_preview/model/rm_audience_size_entity_v1_resource.py +277 -0
  52. criteo_api_retailmedia_preview/model/rm_audience_size_estimation_v1.py +267 -0
  53. criteo_api_retailmedia_preview/model/rm_audience_size_estimation_v1_resource.py +273 -0
  54. criteo_api_retailmedia_preview/model/rm_audience_size_estimation_v1_response.py +281 -0
  55. criteo_api_retailmedia_preview/model/rm_audience_update_entity_v1.py +279 -0
  56. criteo_api_retailmedia_preview/model/rm_audience_update_entity_v1_resource.py +277 -0
  57. criteo_api_retailmedia_preview/model/rm_events_create_v1.py +305 -0
  58. criteo_api_retailmedia_preview/model/rm_events_estimation_v1.py +305 -0
  59. criteo_api_retailmedia_preview/model/rm_events_update_v1.py +307 -0
  60. criteo_api_retailmedia_preview/model/sponsored_products_line_item.py +387 -0
  61. criteo_api_retailmedia_preview/model/sponsored_products_line_item_create_request_model.py +335 -0
  62. criteo_api_retailmedia_preview/model/sponsored_products_line_item_update_request_model.py +335 -0
  63. criteo_api_retailmedia_preview/model/value_resource_categories_search_request_v1.py +273 -0
  64. criteo_api_retailmedia_preview/model/value_resource_input_categories_search_request_v1.py +269 -0
  65. criteo_api_retailmedia_preview/model/value_resource_input_of_sponsored_products_line_item_update_request_model.py +262 -0
  66. criteo_api_retailmedia_preview/model/value_resource_input_recommended_categories_request_v1.py +269 -0
  67. criteo_api_retailmedia_preview/model/value_resource_input_recommended_keywords_request_v1.py +262 -0
  68. criteo_api_retailmedia_preview/model/value_resource_of_sponsored_products_line_item_update_request_model.py +266 -0
  69. criteo_api_retailmedia_preview/model/value_resource_outcome_recommended_keywords_response_v1.py +274 -0
  70. criteo_api_retailmedia_preview/model/value_resource_recommended_categories_request_v1.py +273 -0
  71. criteo_api_retailmedia_preview/model/value_resource_recommended_keywords_request_v1.py +266 -0
  72. criteo_api_retailmedia_preview/model/value_resource_recommended_keywords_response_v1.py +266 -0
  73. criteo_api_retailmedia_preview/models/__init__.py +62 -0
  74. {criteo_api_retailmedia_sdk-0.0.250425.dist-info → criteo_api_retailmedia_sdk-0.0.250618.dist-info}/METADATA +3 -3
  75. {criteo_api_retailmedia_sdk-0.0.250425.dist-info → criteo_api_retailmedia_sdk-0.0.250618.dist-info}/RECORD +77 -15
  76. {criteo_api_retailmedia_sdk-0.0.250425.dist-info → criteo_api_retailmedia_sdk-0.0.250618.dist-info}/WHEEL +1 -1
  77. {criteo_api_retailmedia_sdk-0.0.250425.dist-info → criteo_api_retailmedia_sdk-0.0.250618.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,387 @@
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.flight_schedule import FlightSchedule
34
+ globals()['FlightSchedule'] = FlightSchedule
35
+
36
+
37
+ class SponsoredProductsLineItem(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
+ ('bid_strategy',): {
63
+ 'None': None,
64
+ 'UNKNOWN': "Unknown",
65
+ 'CONVERSION': "Conversion",
66
+ 'CLICKS': "Clicks",
67
+ 'REVENUE': "Revenue",
68
+ },
69
+ ('buy_type',): {
70
+ 'None': None,
71
+ 'UNKNOWN': "Unknown",
72
+ 'AUCTION': "Auction",
73
+ 'PREFERRED': "Preferred",
74
+ },
75
+ ('status',): {
76
+ 'None': None,
77
+ 'UNKNOWN': "Unknown",
78
+ 'ACTIVE': "Active",
79
+ 'SCHEDULED': "Scheduled",
80
+ 'DRAFT': "Draft",
81
+ 'PAUSED': "Paused",
82
+ 'BUDGETHIT': "BudgetHit",
83
+ 'ENDED': "Ended",
84
+ 'ARCHIVED': "Archived",
85
+ 'NOFUNDS': "NoFunds",
86
+ },
87
+ }
88
+
89
+ validations = {
90
+ ('name',): {
91
+ 'max_length': 255,
92
+ 'min_length': 0,
93
+ },
94
+ }
95
+
96
+ additional_properties_type = None
97
+
98
+ _nullable = True
99
+
100
+ @cached_property
101
+ def openapi_types():
102
+ """
103
+ This must be a method because a model may have properties that are
104
+ of type self, this must run after the class is loaded
105
+
106
+ Returns
107
+ openapi_types (dict): The key is attribute name
108
+ and the value is attribute type.
109
+ """
110
+ lazy_import()
111
+ return {
112
+ 'budget_remaining': (float, none_type,), # noqa: E501
113
+ 'campaign_id': (int,), # noqa: E501
114
+ 'created_at': (datetime,), # noqa: E501
115
+ 'external_line_item_id': (int,), # noqa: E501
116
+ 'name': (str,), # noqa: E501
117
+ 'start_date': (datetime,), # noqa: E501
118
+ 'target_retailer_id': (int,), # noqa: E501
119
+ 'updated_at': (datetime,), # noqa: E501
120
+ 'bid_strategy': (str, none_type,), # noqa: E501
121
+ 'budget': (float, none_type,), # noqa: E501
122
+ 'budget_spent': (float, none_type,), # noqa: E501
123
+ 'buy_type': (str, none_type,), # noqa: E501
124
+ 'daily_pacing': (float, none_type,), # noqa: E501
125
+ 'end_date': (datetime, none_type,), # noqa: E501
126
+ 'flight_schedule': (FlightSchedule,), # noqa: E501
127
+ 'is_auto_daily_pacing': (bool, none_type,), # noqa: E501
128
+ 'max_bid': (float, none_type,), # noqa: E501
129
+ 'monthly_pacing': (float, none_type,), # noqa: E501
130
+ 'status': (str, none_type,), # noqa: E501
131
+ 'target_bid': (float, none_type,), # noqa: E501
132
+ }
133
+
134
+ @cached_property
135
+ def discriminator():
136
+ return None
137
+
138
+
139
+ attribute_map = {
140
+ 'budget_remaining': 'budgetRemaining', # noqa: E501
141
+ 'campaign_id': 'campaignId', # noqa: E501
142
+ 'created_at': 'createdAt', # noqa: E501
143
+ 'external_line_item_id': 'externalLineItemId', # noqa: E501
144
+ 'name': 'name', # noqa: E501
145
+ 'start_date': 'startDate', # noqa: E501
146
+ 'target_retailer_id': 'targetRetailerId', # noqa: E501
147
+ 'updated_at': 'updatedAt', # noqa: E501
148
+ 'bid_strategy': 'bidStrategy', # noqa: E501
149
+ 'budget': 'budget', # noqa: E501
150
+ 'budget_spent': 'budgetSpent', # noqa: E501
151
+ 'buy_type': 'buyType', # noqa: E501
152
+ 'daily_pacing': 'dailyPacing', # noqa: E501
153
+ 'end_date': 'endDate', # noqa: E501
154
+ 'flight_schedule': 'flightSchedule', # noqa: E501
155
+ 'is_auto_daily_pacing': 'isAutoDailyPacing', # noqa: E501
156
+ 'max_bid': 'maxBid', # noqa: E501
157
+ 'monthly_pacing': 'monthlyPacing', # noqa: E501
158
+ 'status': 'status', # noqa: E501
159
+ 'target_bid': 'targetBid', # noqa: E501
160
+ }
161
+
162
+ read_only_vars = {
163
+ }
164
+
165
+ _composed_schemas = {}
166
+
167
+ @classmethod
168
+ @convert_js_args_to_python_args
169
+ def _from_openapi_data(cls, budget_remaining, campaign_id, created_at, external_line_item_id, name, start_date, target_retailer_id, updated_at, *args, **kwargs): # noqa: E501
170
+ """SponsoredProductsLineItem - a model defined in OpenAPI
171
+
172
+ Args:
173
+ budget_remaining (float, none_type):
174
+ campaign_id (int):
175
+ created_at (datetime):
176
+ external_line_item_id (int):
177
+ name (str):
178
+ start_date (datetime):
179
+ target_retailer_id (int):
180
+ updated_at (datetime):
181
+
182
+ Keyword Args:
183
+ _check_type (bool): if True, values for parameters in openapi_types
184
+ will be type checked and a TypeError will be
185
+ raised if the wrong type is input.
186
+ Defaults to True
187
+ _path_to_item (tuple/list): This is a list of keys or values to
188
+ drill down to the model in received_data
189
+ when deserializing a response
190
+ _spec_property_naming (bool): True if the variable names in the input data
191
+ are serialized names, as specified in the OpenAPI document.
192
+ False if the variable names in the input data
193
+ are pythonic names, e.g. snake case (default)
194
+ _configuration (Configuration): the instance to use when
195
+ deserializing a file_type parameter.
196
+ If passed, type conversion is attempted
197
+ If omitted no type conversion is done.
198
+ _visited_composed_classes (tuple): This stores a tuple of
199
+ classes that we have traveled through so that
200
+ if we see that class again we will not use its
201
+ discriminator again.
202
+ When traveling through a discriminator, the
203
+ composed schema that is
204
+ is traveled through is added to this set.
205
+ For example if Animal has a discriminator
206
+ petType and we pass in "Dog", and the class Dog
207
+ allOf includes Animal, we move through Animal
208
+ once using the discriminator, and pick Dog.
209
+ Then in Dog, we will make an instance of the
210
+ Animal class but this time we won't travel
211
+ through its discriminator because we passed in
212
+ _visited_composed_classes = (Animal,)
213
+ bid_strategy (str, none_type): [optional] # noqa: E501
214
+ budget (float, none_type): [optional] # noqa: E501
215
+ budget_spent (float, none_type): [optional] # noqa: E501
216
+ buy_type (str, none_type): [optional] # noqa: E501
217
+ daily_pacing (float, none_type): [optional] # noqa: E501
218
+ end_date (datetime, none_type): [optional] # noqa: E501
219
+ flight_schedule (FlightSchedule): [optional] # noqa: E501
220
+ is_auto_daily_pacing (bool, none_type): [optional] # noqa: E501
221
+ max_bid (float, none_type): [optional] # noqa: E501
222
+ monthly_pacing (float, none_type): [optional] # noqa: E501
223
+ status (str, none_type): Status of a line item.. [optional] # noqa: E501
224
+ target_bid (float, none_type): [optional] # noqa: E501
225
+ """
226
+
227
+ _check_type = kwargs.pop('_check_type', True)
228
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
229
+ _path_to_item = kwargs.pop('_path_to_item', ())
230
+ _configuration = kwargs.pop('_configuration', None)
231
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
232
+
233
+ self = super(OpenApiModel, cls).__new__(cls)
234
+
235
+ if args:
236
+ for arg in args:
237
+ if isinstance(arg, dict):
238
+ kwargs.update(arg)
239
+ else:
240
+ raise ApiTypeError(
241
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
242
+ args,
243
+ self.__class__.__name__,
244
+ ),
245
+ path_to_item=_path_to_item,
246
+ valid_classes=(self.__class__,),
247
+ )
248
+
249
+ self._data_store = {}
250
+ self._check_type = _check_type
251
+ self._spec_property_naming = _spec_property_naming
252
+ self._path_to_item = _path_to_item
253
+ self._configuration = _configuration
254
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
255
+
256
+ self.budget_remaining = budget_remaining
257
+ self.campaign_id = campaign_id
258
+ self.created_at = created_at
259
+ self.external_line_item_id = external_line_item_id
260
+ self.name = name
261
+ self.start_date = start_date
262
+ self.target_retailer_id = target_retailer_id
263
+ self.updated_at = updated_at
264
+ for var_name, var_value in kwargs.items():
265
+ if var_name not in self.attribute_map and \
266
+ self._configuration is not None and \
267
+ self._configuration.discard_unknown_keys and \
268
+ self.additional_properties_type is None:
269
+ # discard variable.
270
+ continue
271
+ setattr(self, var_name, var_value)
272
+ return self
273
+
274
+ required_properties = set([
275
+ '_data_store',
276
+ '_check_type',
277
+ '_spec_property_naming',
278
+ '_path_to_item',
279
+ '_configuration',
280
+ '_visited_composed_classes',
281
+ ])
282
+
283
+ @convert_js_args_to_python_args
284
+ def __init__(self, budget_remaining, campaign_id, created_at, external_line_item_id, name, start_date, target_retailer_id, updated_at, *args, **kwargs): # noqa: E501
285
+ """SponsoredProductsLineItem - a model defined in OpenAPI
286
+
287
+ Args:
288
+ budget_remaining (float, none_type):
289
+ campaign_id (int):
290
+ created_at (datetime):
291
+ external_line_item_id (int):
292
+ name (str):
293
+ start_date (datetime):
294
+ target_retailer_id (int):
295
+ updated_at (datetime):
296
+
297
+ Keyword Args:
298
+ _check_type (bool): if True, values for parameters in openapi_types
299
+ will be type checked and a TypeError will be
300
+ raised if the wrong type is input.
301
+ Defaults to True
302
+ _path_to_item (tuple/list): This is a list of keys or values to
303
+ drill down to the model in received_data
304
+ when deserializing a response
305
+ _spec_property_naming (bool): True if the variable names in the input data
306
+ are serialized names, as specified in the OpenAPI document.
307
+ False if the variable names in the input data
308
+ are pythonic names, e.g. snake case (default)
309
+ _configuration (Configuration): the instance to use when
310
+ deserializing a file_type parameter.
311
+ If passed, type conversion is attempted
312
+ If omitted no type conversion is done.
313
+ _visited_composed_classes (tuple): This stores a tuple of
314
+ classes that we have traveled through so that
315
+ if we see that class again we will not use its
316
+ discriminator again.
317
+ When traveling through a discriminator, the
318
+ composed schema that is
319
+ is traveled through is added to this set.
320
+ For example if Animal has a discriminator
321
+ petType and we pass in "Dog", and the class Dog
322
+ allOf includes Animal, we move through Animal
323
+ once using the discriminator, and pick Dog.
324
+ Then in Dog, we will make an instance of the
325
+ Animal class but this time we won't travel
326
+ through its discriminator because we passed in
327
+ _visited_composed_classes = (Animal,)
328
+ bid_strategy (str, none_type): [optional] # noqa: E501
329
+ budget (float, none_type): [optional] # noqa: E501
330
+ budget_spent (float, none_type): [optional] # noqa: E501
331
+ buy_type (str, none_type): [optional] # noqa: E501
332
+ daily_pacing (float, none_type): [optional] # noqa: E501
333
+ end_date (datetime, none_type): [optional] # noqa: E501
334
+ flight_schedule (FlightSchedule): [optional] # noqa: E501
335
+ is_auto_daily_pacing (bool, none_type): [optional] # noqa: E501
336
+ max_bid (float, none_type): [optional] # noqa: E501
337
+ monthly_pacing (float, none_type): [optional] # noqa: E501
338
+ status (str, none_type): Status of a line item.. [optional] # noqa: E501
339
+ target_bid (float, none_type): [optional] # noqa: E501
340
+ """
341
+
342
+ _check_type = kwargs.pop('_check_type', True)
343
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
344
+ _path_to_item = kwargs.pop('_path_to_item', ())
345
+ _configuration = kwargs.pop('_configuration', None)
346
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
347
+
348
+ if args:
349
+ for arg in args:
350
+ if isinstance(arg, dict):
351
+ kwargs.update(arg)
352
+ else:
353
+ raise ApiTypeError(
354
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
355
+ args,
356
+ self.__class__.__name__,
357
+ ),
358
+ path_to_item=_path_to_item,
359
+ valid_classes=(self.__class__,),
360
+ )
361
+
362
+ self._data_store = {}
363
+ self._check_type = _check_type
364
+ self._spec_property_naming = _spec_property_naming
365
+ self._path_to_item = _path_to_item
366
+ self._configuration = _configuration
367
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
368
+
369
+ self.budget_remaining = budget_remaining
370
+ self.campaign_id = campaign_id
371
+ self.created_at = created_at
372
+ self.external_line_item_id = external_line_item_id
373
+ self.name = name
374
+ self.start_date = start_date
375
+ self.target_retailer_id = target_retailer_id
376
+ self.updated_at = updated_at
377
+ for var_name, var_value in kwargs.items():
378
+ if var_name not in self.attribute_map and \
379
+ self._configuration is not None and \
380
+ self._configuration.discard_unknown_keys and \
381
+ self.additional_properties_type is None:
382
+ # discard variable.
383
+ continue
384
+ setattr(self, var_name, var_value)
385
+ if var_name in self.read_only_vars:
386
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
387
+ f"class with read only attributes.")