criteo-api-retailmedia-sdk 0.0.240207__py3-none-any.whl → 0.0.240515__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- criteo_api_retailmedia_preview/__init__.py +1 -1
- criteo_api_retailmedia_preview/api/accounts_api.py +181 -35
- criteo_api_retailmedia_preview/api/analytics_api.py +142 -0
- criteo_api_retailmedia_preview/api/audience_api.py +284 -0
- criteo_api_retailmedia_preview/api/campaign_api.py +1678 -902
- criteo_api_retailmedia_preview/api/catalog_api.py +312 -0
- criteo_api_retailmedia_preview/api_client.py +4 -4
- criteo_api_retailmedia_preview/apis/__init__.py +1 -0
- criteo_api_retailmedia_preview/configuration.py +1 -1
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_add_remove_keyword_model.py → add_remove_keyword_model.py} +12 -19
- criteo_api_retailmedia_preview/model/add_remove_keywords_model.py +262 -0
- criteo_api_retailmedia_preview/model/add_remove_keywords_model_request.py +262 -0
- criteo_api_retailmedia_preview/model/add_remove_keywords_model_resource.py +270 -0
- criteo_api_retailmedia_preview/model/approval_status_model.py +292 -0
- criteo_api_retailmedia_preview/model/async_accounts_report.py +421 -0
- criteo_api_retailmedia_preview/model/{external_catalog_request_preview.py → async_accounts_report_request.py} +13 -10
- criteo_api_retailmedia_preview/model/async_accounts_report_resource.py +273 -0
- criteo_api_retailmedia_preview/model/async_campaigns_report.py +74 -59
- criteo_api_retailmedia_preview/model/async_line_items_report.py +74 -60
- criteo_api_retailmedia_preview/model/audience_error.py +310 -0
- criteo_api_retailmedia_preview/model/{template_variable.py → audience_warning.py} +48 -46
- criteo_api_retailmedia_preview/model/{hyperlink_variable_value.py → batch_accepted_response.py} +11 -11
- criteo_api_retailmedia_preview/model/change_details.py +275 -0
- criteo_api_retailmedia_preview/model/{creative202210_list_response.py → creative_v2_list_response.py} +16 -16
- criteo_api_retailmedia_preview/model/{value_resource_collection_outcome_of_int64.py → creative_v2_response.py} +16 -9
- criteo_api_retailmedia_preview/model/custom_attribute.py +275 -0
- criteo_api_retailmedia_preview/model/error_code_response.py +281 -0
- criteo_api_retailmedia_preview/model/export_report_column.py +2 -2
- criteo_api_retailmedia_preview/model/{choice_variable_value.py → external_choice_variable_value.py} +3 -3
- criteo_api_retailmedia_preview/model/{color_variable_value.py → external_color_variable_value.py} +8 -14
- criteo_api_retailmedia_preview/model/{creative_update_model202207.py → external_creative_create_model_v2.py} +11 -11
- criteo_api_retailmedia_preview/model/{creative_create_model202207.py → external_creative_update_model_v2.py} +11 -11
- criteo_api_retailmedia_preview/model/{creative202210.py → external_creative_v2.py} +34 -28
- criteo_api_retailmedia_preview/model/{files_variable_value.py → external_files_variable_value.py} +4 -3
- criteo_api_retailmedia_preview/model/{text_variable_specification.py → external_hyperlink_variable_value.py} +7 -7
- criteo_api_retailmedia_preview/model/{line_item_bid_multipliers.py → external_line_item_bid_multipliers_v2.py} +41 -29
- criteo_api_retailmedia_preview/model/external_line_item_capping_v2.py +280 -0
- criteo_api_retailmedia_preview/model/external_line_item_page_category_v2.py +273 -0
- criteo_api_retailmedia_preview/model/{choice_variable_specification.py → external_line_item_page_v2.py} +36 -21
- criteo_api_retailmedia_preview/model/{page_type_environment.py → external_page_type_environment.py} +15 -9
- criteo_api_retailmedia_preview/model/external_preferred_line_item_create_model_v2.py +345 -0
- criteo_api_retailmedia_preview/model/{external_catalog_status.py → external_preferred_line_item_update_model_v2.py} +70 -47
- criteo_api_retailmedia_preview/model/{template.py → external_preferred_line_item_v2.py} +93 -70
- criteo_api_retailmedia_preview/model/{template_variable_value.py → external_template_variable_value.py} +36 -30
- criteo_api_retailmedia_preview/model/{text_variable_value.py → external_text_variable_value.py} +8 -14
- criteo_api_retailmedia_preview/model/external_video_variable_value.py +293 -0
- criteo_api_retailmedia_preview/model/{choice_option.py → fail_response.py} +21 -19
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_input_keywords_model.py → input_keywords_model.py} +4 -16
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_add_remove_keywords_model.py → input_resource_of_preferred_line_item_create_model_v2.py} +13 -11
- criteo_api_retailmedia_preview/model/insertion_order_history_change_data_capture.py +303 -0
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_set_bids_model.py → installment.py} +13 -11
- criteo_api_retailmedia_preview/model/{json_api_body_with_id_of_int64_and_line_item_bid_multipliers_and_line_item_bid_multipliers.py → json_api_body_with_id_of_int64_and_line_item_bid_multipliers_v2_and_line_item_bid_multipliers_v2.py} +8 -8
- criteo_api_retailmedia_preview/model/{json_api_single_response_of_line_item_bid_multipliers.py → json_api_single_response_of_line_item_bid_multipliers_v2.py} +14 -14
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_keyword_data_model.py → keyword_data_model.py} +19 -37
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_keywords_model.py → keywords_model.py} +9 -18
- criteo_api_retailmedia_preview/model/keywords_model_resource.py +270 -0
- criteo_api_retailmedia_preview/model/keywords_model_response.py +274 -0
- criteo_api_retailmedia_preview/model/{line_item_bid_multipliers_request.py → line_item_bid_multipliers_v2_request.py} +8 -8
- criteo_api_retailmedia_preview/model/{line_item_bid_multipliers_response.py → line_item_bid_multipliers_v2_response.py} +16 -16
- criteo_api_retailmedia_preview/model/line_item_product_status.py +291 -0
- criteo_api_retailmedia_preview/model/loyalty_points.py +271 -0
- criteo_api_retailmedia_preview/model/match_type_model.py +291 -0
- criteo_api_retailmedia_preview/model/metadata.py +273 -0
- criteo_api_retailmedia_preview/model/negotiation_state_model.py +293 -0
- criteo_api_retailmedia_preview/model/page_of_insertion_order_history_change_data_capture.py +276 -0
- criteo_api_retailmedia_preview/model/{json_api_request_of_catalog_request_preview.py → preferred_line_item_create_model_v2_request.py} +8 -8
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_set_bids_model_request.py → preferred_line_item_update_model_v2_request.py} +8 -8
- criteo_api_retailmedia_preview/model/{creative202210_response.py → preferred_line_item_v2_paged_list_response.py} +22 -16
- criteo_api_retailmedia_preview/model/{template_response.py → preferred_line_item_v2_response.py} +16 -16
- criteo_api_retailmedia_preview/model/price.py +267 -0
- criteo_api_retailmedia_preview/model/product.py +626 -0
- criteo_api_retailmedia_preview/model/product_importer_error.py +299 -0
- criteo_api_retailmedia_preview/model/product_importer_warning.py +299 -0
- criteo_api_retailmedia_preview/model/product_metadata.py +269 -0
- criteo_api_retailmedia_preview/model/product_resource_outcome.py +266 -0
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_keywords_model_response.py → product_shipping.py} +33 -25
- criteo_api_retailmedia_preview/model/product_shipping_dimension.py +267 -0
- criteo_api_retailmedia_preview/model/product_shipping_weight.py +267 -0
- criteo_api_retailmedia_preview/model/product_tax.py +283 -0
- criteo_api_retailmedia_preview/model/product_unit_pricing_base_measure.py +267 -0
- criteo_api_retailmedia_preview/model/product_unit_pricing_measure.py +267 -0
- criteo_api_retailmedia_preview/model/{section.py → products_custom_batch_request.py} +13 -19
- criteo_api_retailmedia_preview/model/products_custom_batch_request_entry.py +305 -0
- criteo_api_retailmedia_preview/model/promoted_product.py +270 -0
- criteo_api_retailmedia_preview/model/promoted_product_resource.py +270 -0
- criteo_api_retailmedia_preview/model/promoted_product_resource_collection_input.py +262 -0
- criteo_api_retailmedia_preview/model/promoted_product_resource_collection_outcome.py +278 -0
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_proposal_status_model.py → proposal_status_model.py} +22 -50
- criteo_api_retailmedia_preview/model/proposal_status_model_resource.py +270 -0
- criteo_api_retailmedia_preview/model/{template_list_response.py → proposal_status_model_response.py} +20 -27
- criteo_api_retailmedia_preview/model/report_detail_error.py +299 -0
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_add_remove_keywords_model_request.py → report_detail_errors.py} +23 -11
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_keywords_model_resource.py → report_ok_response.py} +56 -21
- criteo_api_retailmedia_preview/model/{resource_of_creative202210.py → resource_of_creative_v2.py} +8 -8
- criteo_api_retailmedia_preview/model/{resource_of_template.py → resource_of_line_item_bid_multipliers_v2.py} +8 -8
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_add_remove_keywords_model_resource.py → resource_of_preferred_line_item_update_model_v2.py} +16 -22
- criteo_api_retailmedia_preview/model/{resource_of_line_item_bid_multipliers.py → resource_of_preferred_line_item_v2.py} +9 -9
- criteo_api_retailmedia_preview/model/resource_outcome.py +268 -0
- criteo_api_retailmedia_preview/model/retail_media_account.py +6 -6
- criteo_api_retailmedia_preview/model/retail_media_brands.py +257 -0
- criteo_api_retailmedia_preview/model/{json_api_body_without_id_of_catalog_request_and_catalog_request_preview.py → retail_media_contactlist_amendment.py} +16 -16
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_set_bids_model_resource.py → retail_media_contactlist_amendment_attributes.py} +34 -25
- criteo_api_retailmedia_preview/model/retail_media_contactlist_amendment_request.py +275 -0
- criteo_api_retailmedia_preview/model/{json_api_single_response_of_catalog_status.py → retail_media_contactlist_operation.py} +24 -20
- criteo_api_retailmedia_preview/model/{json_api_body_with_id_of_int64_and_catalog_status_and_catalog_status.py → retail_media_contactlist_operation_response_attributes.py} +14 -18
- criteo_api_retailmedia_preview/model/retail_media_contactlist_operation_response_attributes_attributes.py +297 -0
- criteo_api_retailmedia_preview/model/review_state_model.py +294 -0
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_problem_details.py → rmca_common_problem.py} +41 -30
- criteo_api_retailmedia_preview/model/{retail_media_externalv1_set_bid_model.py → set_bid_model.py} +4 -10
- criteo_api_retailmedia_preview/model/set_bids_model.py +262 -0
- criteo_api_retailmedia_preview/model/set_bids_model_request.py +262 -0
- criteo_api_retailmedia_preview/model/set_bids_model_resource.py +270 -0
- criteo_api_retailmedia_preview/model/sync_attributed_transactions_report.py +47 -45
- criteo_api_retailmedia_preview/model/sync_campaigns_report.py +68 -53
- criteo_api_retailmedia_preview/model/sync_line_items_report.py +70 -56
- criteo_api_retailmedia_preview/model/value_resource_collection_input_of_retail_media_seller.py +262 -0
- criteo_api_retailmedia_preview/model/value_resource_input_of_retail_media_brand_account_creation.py +262 -0
- criteo_api_retailmedia_preview/model/value_resource_input_of_retail_media_brands.py +262 -0
- criteo_api_retailmedia_preview/model/value_resource_input_of_retail_media_seller_account_creation.py +262 -0
- criteo_api_retailmedia_preview/model/value_resource_of_retail_media_brand_account_creation.py +266 -0
- criteo_api_retailmedia_preview/model/{value_resource_of_int64.py → value_resource_of_retail_media_brands.py} +11 -6
- criteo_api_retailmedia_preview/model/value_resource_of_retail_media_seller_account_creation.py +266 -0
- criteo_api_retailmedia_preview/models/__init__.py +106 -55
- {criteo_api_retailmedia_sdk-0.0.240207.dist-info → criteo_api_retailmedia_sdk-0.0.240515.dist-info}/METADATA +3 -3
- {criteo_api_retailmedia_sdk-0.0.240207.dist-info → criteo_api_retailmedia_sdk-0.0.240515.dist-info}/RECORD +127 -75
- {criteo_api_retailmedia_sdk-0.0.240207.dist-info → criteo_api_retailmedia_sdk-0.0.240515.dist-info}/WHEEL +1 -1
- criteo_api_retailmedia_preview/model/files_variables_specification.py +0 -290
- criteo_api_retailmedia_preview/model/retail_media_externalv1_proposal_status_model_resource.py +0 -283
- criteo_api_retailmedia_preview/model/retail_media_externalv1_proposal_status_model_response.py +0 -285
- criteo_api_retailmedia_preview/model/retail_media_externalv1_resource_outcome.py +0 -279
- {criteo_api_retailmedia_sdk-0.0.240207.dist-info → criteo_api_retailmedia_sdk-0.0.240515.dist-info}/top_level.txt +0 -0
|
@@ -0,0 +1,267 @@
|
|
|
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 ProductUnitPricingMeasure(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
|
+
'value': (float, none_type,), # noqa: E501
|
|
85
|
+
'unit': (str, none_type,), # noqa: E501
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
@cached_property
|
|
89
|
+
def discriminator():
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
attribute_map = {
|
|
94
|
+
'value': 'value', # noqa: E501
|
|
95
|
+
'unit': 'unit', # noqa: E501
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
read_only_vars = {
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
_composed_schemas = {}
|
|
102
|
+
|
|
103
|
+
@classmethod
|
|
104
|
+
@convert_js_args_to_python_args
|
|
105
|
+
def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
|
|
106
|
+
"""ProductUnitPricingMeasure - a model defined in OpenAPI
|
|
107
|
+
|
|
108
|
+
Keyword Args:
|
|
109
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
110
|
+
will be type checked and a TypeError will be
|
|
111
|
+
raised if the wrong type is input.
|
|
112
|
+
Defaults to True
|
|
113
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
114
|
+
drill down to the model in received_data
|
|
115
|
+
when deserializing a response
|
|
116
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
117
|
+
are serialized names, as specified in the OpenAPI document.
|
|
118
|
+
False if the variable names in the input data
|
|
119
|
+
are pythonic names, e.g. snake case (default)
|
|
120
|
+
_configuration (Configuration): the instance to use when
|
|
121
|
+
deserializing a file_type parameter.
|
|
122
|
+
If passed, type conversion is attempted
|
|
123
|
+
If omitted no type conversion is done.
|
|
124
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
125
|
+
classes that we have traveled through so that
|
|
126
|
+
if we see that class again we will not use its
|
|
127
|
+
discriminator again.
|
|
128
|
+
When traveling through a discriminator, the
|
|
129
|
+
composed schema that is
|
|
130
|
+
is traveled through is added to this set.
|
|
131
|
+
For example if Animal has a discriminator
|
|
132
|
+
petType and we pass in "Dog", and the class Dog
|
|
133
|
+
allOf includes Animal, we move through Animal
|
|
134
|
+
once using the discriminator, and pick Dog.
|
|
135
|
+
Then in Dog, we will make an instance of the
|
|
136
|
+
Animal class but this time we won't travel
|
|
137
|
+
through its discriminator because we passed in
|
|
138
|
+
_visited_composed_classes = (Animal,)
|
|
139
|
+
value (float, none_type): The measurement of an item.. [optional] # noqa: E501
|
|
140
|
+
unit (str, none_type): The unit of measure.. [optional] # noqa: E501
|
|
141
|
+
"""
|
|
142
|
+
|
|
143
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
144
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
|
|
145
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
146
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
147
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
148
|
+
|
|
149
|
+
self = super(OpenApiModel, cls).__new__(cls)
|
|
150
|
+
|
|
151
|
+
if args:
|
|
152
|
+
for arg in args:
|
|
153
|
+
if isinstance(arg, dict):
|
|
154
|
+
kwargs.update(arg)
|
|
155
|
+
else:
|
|
156
|
+
raise ApiTypeError(
|
|
157
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
158
|
+
args,
|
|
159
|
+
self.__class__.__name__,
|
|
160
|
+
),
|
|
161
|
+
path_to_item=_path_to_item,
|
|
162
|
+
valid_classes=(self.__class__,),
|
|
163
|
+
)
|
|
164
|
+
|
|
165
|
+
self._data_store = {}
|
|
166
|
+
self._check_type = _check_type
|
|
167
|
+
self._spec_property_naming = _spec_property_naming
|
|
168
|
+
self._path_to_item = _path_to_item
|
|
169
|
+
self._configuration = _configuration
|
|
170
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
171
|
+
|
|
172
|
+
for var_name, var_value in kwargs.items():
|
|
173
|
+
if var_name not in self.attribute_map and \
|
|
174
|
+
self._configuration is not None and \
|
|
175
|
+
self._configuration.discard_unknown_keys and \
|
|
176
|
+
self.additional_properties_type is None:
|
|
177
|
+
# discard variable.
|
|
178
|
+
continue
|
|
179
|
+
setattr(self, var_name, var_value)
|
|
180
|
+
return self
|
|
181
|
+
|
|
182
|
+
required_properties = set([
|
|
183
|
+
'_data_store',
|
|
184
|
+
'_check_type',
|
|
185
|
+
'_spec_property_naming',
|
|
186
|
+
'_path_to_item',
|
|
187
|
+
'_configuration',
|
|
188
|
+
'_visited_composed_classes',
|
|
189
|
+
])
|
|
190
|
+
|
|
191
|
+
@convert_js_args_to_python_args
|
|
192
|
+
def __init__(self, *args, **kwargs): # noqa: E501
|
|
193
|
+
"""ProductUnitPricingMeasure - a model defined in OpenAPI
|
|
194
|
+
|
|
195
|
+
Keyword Args:
|
|
196
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
197
|
+
will be type checked and a TypeError will be
|
|
198
|
+
raised if the wrong type is input.
|
|
199
|
+
Defaults to True
|
|
200
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
201
|
+
drill down to the model in received_data
|
|
202
|
+
when deserializing a response
|
|
203
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
204
|
+
are serialized names, as specified in the OpenAPI document.
|
|
205
|
+
False if the variable names in the input data
|
|
206
|
+
are pythonic names, e.g. snake case (default)
|
|
207
|
+
_configuration (Configuration): the instance to use when
|
|
208
|
+
deserializing a file_type parameter.
|
|
209
|
+
If passed, type conversion is attempted
|
|
210
|
+
If omitted no type conversion is done.
|
|
211
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
212
|
+
classes that we have traveled through so that
|
|
213
|
+
if we see that class again we will not use its
|
|
214
|
+
discriminator again.
|
|
215
|
+
When traveling through a discriminator, the
|
|
216
|
+
composed schema that is
|
|
217
|
+
is traveled through is added to this set.
|
|
218
|
+
For example if Animal has a discriminator
|
|
219
|
+
petType and we pass in "Dog", and the class Dog
|
|
220
|
+
allOf includes Animal, we move through Animal
|
|
221
|
+
once using the discriminator, and pick Dog.
|
|
222
|
+
Then in Dog, we will make an instance of the
|
|
223
|
+
Animal class but this time we won't travel
|
|
224
|
+
through its discriminator because we passed in
|
|
225
|
+
_visited_composed_classes = (Animal,)
|
|
226
|
+
value (float, none_type): The measurement of an item.. [optional] # noqa: E501
|
|
227
|
+
unit (str, none_type): The unit of measure.. [optional] # noqa: E501
|
|
228
|
+
"""
|
|
229
|
+
|
|
230
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
231
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
232
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
233
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
234
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
235
|
+
|
|
236
|
+
if args:
|
|
237
|
+
for arg in args:
|
|
238
|
+
if isinstance(arg, dict):
|
|
239
|
+
kwargs.update(arg)
|
|
240
|
+
else:
|
|
241
|
+
raise ApiTypeError(
|
|
242
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
243
|
+
args,
|
|
244
|
+
self.__class__.__name__,
|
|
245
|
+
),
|
|
246
|
+
path_to_item=_path_to_item,
|
|
247
|
+
valid_classes=(self.__class__,),
|
|
248
|
+
)
|
|
249
|
+
|
|
250
|
+
self._data_store = {}
|
|
251
|
+
self._check_type = _check_type
|
|
252
|
+
self._spec_property_naming = _spec_property_naming
|
|
253
|
+
self._path_to_item = _path_to_item
|
|
254
|
+
self._configuration = _configuration
|
|
255
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
256
|
+
|
|
257
|
+
for var_name, var_value in kwargs.items():
|
|
258
|
+
if var_name not in self.attribute_map and \
|
|
259
|
+
self._configuration is not None and \
|
|
260
|
+
self._configuration.discard_unknown_keys and \
|
|
261
|
+
self.additional_properties_type is None:
|
|
262
|
+
# discard variable.
|
|
263
|
+
continue
|
|
264
|
+
setattr(self, var_name, var_value)
|
|
265
|
+
if var_name in self.read_only_vars:
|
|
266
|
+
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
|
267
|
+
f"class with read only attributes.")
|
|
@@ -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.products_custom_batch_request_entry import ProductsCustomBatchRequestEntry
|
|
34
|
+
globals()['ProductsCustomBatchRequestEntry'] = ProductsCustomBatchRequestEntry
|
|
35
35
|
|
|
36
36
|
|
|
37
|
-
class
|
|
37
|
+
class ProductsCustomBatchRequest(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 Section(ModelNormal):
|
|
|
87
87
|
"""
|
|
88
88
|
lazy_import()
|
|
89
89
|
return {
|
|
90
|
-
'
|
|
91
|
-
'template_variables': ([TemplateVariable],), # noqa: E501
|
|
90
|
+
'entries': ([ProductsCustomBatchRequestEntry],), # noqa: E501
|
|
92
91
|
}
|
|
93
92
|
|
|
94
93
|
@cached_property
|
|
@@ -97,8 +96,7 @@ class Section(ModelNormal):
|
|
|
97
96
|
|
|
98
97
|
|
|
99
98
|
attribute_map = {
|
|
100
|
-
'
|
|
101
|
-
'template_variables': 'templateVariables', # noqa: E501
|
|
99
|
+
'entries': 'entries', # noqa: E501
|
|
102
100
|
}
|
|
103
101
|
|
|
104
102
|
read_only_vars = {
|
|
@@ -108,12 +106,11 @@ class Section(ModelNormal):
|
|
|
108
106
|
|
|
109
107
|
@classmethod
|
|
110
108
|
@convert_js_args_to_python_args
|
|
111
|
-
def _from_openapi_data(cls,
|
|
112
|
-
"""
|
|
109
|
+
def _from_openapi_data(cls, entries, *args, **kwargs): # noqa: E501
|
|
110
|
+
"""ProductsCustomBatchRequest - a model defined in OpenAPI
|
|
113
111
|
|
|
114
112
|
Args:
|
|
115
|
-
|
|
116
|
-
template_variables ([TemplateVariable]):
|
|
113
|
+
entries ([ProductsCustomBatchRequestEntry]): The request entries to be processed in the batch.
|
|
117
114
|
|
|
118
115
|
Keyword Args:
|
|
119
116
|
_check_type (bool): if True, values for parameters in openapi_types
|
|
@@ -177,8 +174,7 @@ class Section(ModelNormal):
|
|
|
177
174
|
self._configuration = _configuration
|
|
178
175
|
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
179
176
|
|
|
180
|
-
self.
|
|
181
|
-
self.template_variables = template_variables
|
|
177
|
+
self.entries = entries
|
|
182
178
|
for var_name, var_value in kwargs.items():
|
|
183
179
|
if var_name not in self.attribute_map and \
|
|
184
180
|
self._configuration is not None and \
|
|
@@ -199,12 +195,11 @@ class Section(ModelNormal):
|
|
|
199
195
|
])
|
|
200
196
|
|
|
201
197
|
@convert_js_args_to_python_args
|
|
202
|
-
def __init__(self,
|
|
203
|
-
"""
|
|
198
|
+
def __init__(self, entries, *args, **kwargs): # noqa: E501
|
|
199
|
+
"""ProductsCustomBatchRequest - a model defined in OpenAPI
|
|
204
200
|
|
|
205
201
|
Args:
|
|
206
|
-
|
|
207
|
-
template_variables ([TemplateVariable]):
|
|
202
|
+
entries ([ProductsCustomBatchRequestEntry]): The request entries to be processed in the batch.
|
|
208
203
|
|
|
209
204
|
Keyword Args:
|
|
210
205
|
_check_type (bool): if True, values for parameters in openapi_types
|
|
@@ -266,8 +261,7 @@ class Section(ModelNormal):
|
|
|
266
261
|
self._configuration = _configuration
|
|
267
262
|
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
268
263
|
|
|
269
|
-
self.
|
|
270
|
-
self.template_variables = template_variables
|
|
264
|
+
self.entries = entries
|
|
271
265
|
for var_name, var_value in kwargs.items():
|
|
272
266
|
if var_name not in self.attribute_map and \
|
|
273
267
|
self._configuration is not None and \
|
|
@@ -0,0 +1,305 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Criteo API
|
|
3
|
+
|
|
4
|
+
Criteo API - RetailMedia # noqa: E501
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: Preview
|
|
7
|
+
Generated by: https://openapi-generator.tech
|
|
8
|
+
"""
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
import re # noqa: F401
|
|
12
|
+
import sys # noqa: F401
|
|
13
|
+
|
|
14
|
+
from criteo_api_retailmedia_preview.model_utils import ( # noqa: F401
|
|
15
|
+
ApiTypeError,
|
|
16
|
+
ModelComposed,
|
|
17
|
+
ModelNormal,
|
|
18
|
+
ModelSimple,
|
|
19
|
+
cached_property,
|
|
20
|
+
change_keys_js_to_python,
|
|
21
|
+
convert_js_args_to_python_args,
|
|
22
|
+
date,
|
|
23
|
+
datetime,
|
|
24
|
+
file_type,
|
|
25
|
+
none_type,
|
|
26
|
+
validate_get_composed_info,
|
|
27
|
+
OpenApiModel
|
|
28
|
+
)
|
|
29
|
+
from criteo_api_retailmedia_preview.exceptions import ApiAttributeError
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
def lazy_import():
|
|
33
|
+
from criteo_api_retailmedia_preview.model.product import Product
|
|
34
|
+
globals()['Product'] = Product
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
class ProductsCustomBatchRequestEntry(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
|
+
('method',): {
|
|
63
|
+
'DELETE': "delete",
|
|
64
|
+
'INSERT': "insert",
|
|
65
|
+
},
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
validations = {
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
@cached_property
|
|
72
|
+
def additional_properties_type():
|
|
73
|
+
"""
|
|
74
|
+
This must be a method because a model may have properties that are
|
|
75
|
+
of type self, this must run after the class is loaded
|
|
76
|
+
"""
|
|
77
|
+
lazy_import()
|
|
78
|
+
return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
|
|
79
|
+
|
|
80
|
+
_nullable = False
|
|
81
|
+
|
|
82
|
+
@cached_property
|
|
83
|
+
def openapi_types():
|
|
84
|
+
"""
|
|
85
|
+
This must be a method because a model may have properties that are
|
|
86
|
+
of type self, this must run after the class is loaded
|
|
87
|
+
|
|
88
|
+
Returns
|
|
89
|
+
openapi_types (dict): The key is attribute name
|
|
90
|
+
and the value is attribute type.
|
|
91
|
+
"""
|
|
92
|
+
lazy_import()
|
|
93
|
+
return {
|
|
94
|
+
'merchant_id': (int,), # noqa: E501
|
|
95
|
+
'method': (str,), # noqa: E501
|
|
96
|
+
'batch_id': (int, none_type,), # noqa: E501
|
|
97
|
+
'product_id': (str, none_type,), # noqa: E501
|
|
98
|
+
'item_group_id': (str, none_type,), # noqa: E501
|
|
99
|
+
'product': (Product,), # noqa: E501
|
|
100
|
+
'feed_id': (str, none_type,), # noqa: E501
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
@cached_property
|
|
104
|
+
def discriminator():
|
|
105
|
+
return None
|
|
106
|
+
|
|
107
|
+
|
|
108
|
+
attribute_map = {
|
|
109
|
+
'merchant_id': 'merchantId', # noqa: E501
|
|
110
|
+
'method': 'method', # noqa: E501
|
|
111
|
+
'batch_id': 'batchId', # noqa: E501
|
|
112
|
+
'product_id': 'productId', # noqa: E501
|
|
113
|
+
'item_group_id': 'itemGroupId', # noqa: E501
|
|
114
|
+
'product': 'product', # noqa: E501
|
|
115
|
+
'feed_id': 'feedId', # noqa: E501
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
read_only_vars = {
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
_composed_schemas = {}
|
|
122
|
+
|
|
123
|
+
@classmethod
|
|
124
|
+
@convert_js_args_to_python_args
|
|
125
|
+
def _from_openapi_data(cls, merchant_id, method, *args, **kwargs): # noqa: E501
|
|
126
|
+
"""ProductsCustomBatchRequestEntry - a model defined in OpenAPI
|
|
127
|
+
|
|
128
|
+
Args:
|
|
129
|
+
merchant_id (int): The ID of the managing account. Criteo: the partnerId.
|
|
130
|
+
method (str): The method of the batch entry.
|
|
131
|
+
|
|
132
|
+
Keyword Args:
|
|
133
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
134
|
+
will be type checked and a TypeError will be
|
|
135
|
+
raised if the wrong type is input.
|
|
136
|
+
Defaults to True
|
|
137
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
138
|
+
drill down to the model in received_data
|
|
139
|
+
when deserializing a response
|
|
140
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
141
|
+
are serialized names, as specified in the OpenAPI document.
|
|
142
|
+
False if the variable names in the input data
|
|
143
|
+
are pythonic names, e.g. snake case (default)
|
|
144
|
+
_configuration (Configuration): the instance to use when
|
|
145
|
+
deserializing a file_type parameter.
|
|
146
|
+
If passed, type conversion is attempted
|
|
147
|
+
If omitted no type conversion is done.
|
|
148
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
149
|
+
classes that we have traveled through so that
|
|
150
|
+
if we see that class again we will not use its
|
|
151
|
+
discriminator again.
|
|
152
|
+
When traveling through a discriminator, the
|
|
153
|
+
composed schema that is
|
|
154
|
+
is traveled through is added to this set.
|
|
155
|
+
For example if Animal has a discriminator
|
|
156
|
+
petType and we pass in "Dog", and the class Dog
|
|
157
|
+
allOf includes Animal, we move through Animal
|
|
158
|
+
once using the discriminator, and pick Dog.
|
|
159
|
+
Then in Dog, we will make an instance of the
|
|
160
|
+
Animal class but this time we won't travel
|
|
161
|
+
through its discriminator because we passed in
|
|
162
|
+
_visited_composed_classes = (Animal,)
|
|
163
|
+
batch_id (int, none_type): An entry ID, unique within the batch request.. [optional] # noqa: E501
|
|
164
|
+
product_id (str, none_type): The Product ID to delete. Only defined if the method is delete.. [optional] # noqa: E501
|
|
165
|
+
item_group_id (str, none_type): Deprecated (providing this information is no more needed, this field will be removed in next release). The itemGroupId of the product to delete. To be defined when the method is delete and the product is a variant.. [optional] # noqa: E501
|
|
166
|
+
product (Product): [optional] # noqa: E501
|
|
167
|
+
feed_id (str, none_type): Not used by Criteo.. [optional] # noqa: E501
|
|
168
|
+
"""
|
|
169
|
+
|
|
170
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
171
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', True)
|
|
172
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
173
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
174
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
175
|
+
|
|
176
|
+
self = super(OpenApiModel, cls).__new__(cls)
|
|
177
|
+
|
|
178
|
+
if args:
|
|
179
|
+
for arg in args:
|
|
180
|
+
if isinstance(arg, dict):
|
|
181
|
+
kwargs.update(arg)
|
|
182
|
+
else:
|
|
183
|
+
raise ApiTypeError(
|
|
184
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
185
|
+
args,
|
|
186
|
+
self.__class__.__name__,
|
|
187
|
+
),
|
|
188
|
+
path_to_item=_path_to_item,
|
|
189
|
+
valid_classes=(self.__class__,),
|
|
190
|
+
)
|
|
191
|
+
|
|
192
|
+
self._data_store = {}
|
|
193
|
+
self._check_type = _check_type
|
|
194
|
+
self._spec_property_naming = _spec_property_naming
|
|
195
|
+
self._path_to_item = _path_to_item
|
|
196
|
+
self._configuration = _configuration
|
|
197
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
198
|
+
|
|
199
|
+
self.merchant_id = merchant_id
|
|
200
|
+
self.method = method
|
|
201
|
+
for var_name, var_value in kwargs.items():
|
|
202
|
+
if var_name not in self.attribute_map and \
|
|
203
|
+
self._configuration is not None and \
|
|
204
|
+
self._configuration.discard_unknown_keys and \
|
|
205
|
+
self.additional_properties_type is None:
|
|
206
|
+
# discard variable.
|
|
207
|
+
continue
|
|
208
|
+
setattr(self, var_name, var_value)
|
|
209
|
+
return self
|
|
210
|
+
|
|
211
|
+
required_properties = set([
|
|
212
|
+
'_data_store',
|
|
213
|
+
'_check_type',
|
|
214
|
+
'_spec_property_naming',
|
|
215
|
+
'_path_to_item',
|
|
216
|
+
'_configuration',
|
|
217
|
+
'_visited_composed_classes',
|
|
218
|
+
])
|
|
219
|
+
|
|
220
|
+
@convert_js_args_to_python_args
|
|
221
|
+
def __init__(self, merchant_id, method, *args, **kwargs): # noqa: E501
|
|
222
|
+
"""ProductsCustomBatchRequestEntry - a model defined in OpenAPI
|
|
223
|
+
|
|
224
|
+
Args:
|
|
225
|
+
merchant_id (int): The ID of the managing account. Criteo: the partnerId.
|
|
226
|
+
method (str): The method of the batch entry.
|
|
227
|
+
|
|
228
|
+
Keyword Args:
|
|
229
|
+
_check_type (bool): if True, values for parameters in openapi_types
|
|
230
|
+
will be type checked and a TypeError will be
|
|
231
|
+
raised if the wrong type is input.
|
|
232
|
+
Defaults to True
|
|
233
|
+
_path_to_item (tuple/list): This is a list of keys or values to
|
|
234
|
+
drill down to the model in received_data
|
|
235
|
+
when deserializing a response
|
|
236
|
+
_spec_property_naming (bool): True if the variable names in the input data
|
|
237
|
+
are serialized names, as specified in the OpenAPI document.
|
|
238
|
+
False if the variable names in the input data
|
|
239
|
+
are pythonic names, e.g. snake case (default)
|
|
240
|
+
_configuration (Configuration): the instance to use when
|
|
241
|
+
deserializing a file_type parameter.
|
|
242
|
+
If passed, type conversion is attempted
|
|
243
|
+
If omitted no type conversion is done.
|
|
244
|
+
_visited_composed_classes (tuple): This stores a tuple of
|
|
245
|
+
classes that we have traveled through so that
|
|
246
|
+
if we see that class again we will not use its
|
|
247
|
+
discriminator again.
|
|
248
|
+
When traveling through a discriminator, the
|
|
249
|
+
composed schema that is
|
|
250
|
+
is traveled through is added to this set.
|
|
251
|
+
For example if Animal has a discriminator
|
|
252
|
+
petType and we pass in "Dog", and the class Dog
|
|
253
|
+
allOf includes Animal, we move through Animal
|
|
254
|
+
once using the discriminator, and pick Dog.
|
|
255
|
+
Then in Dog, we will make an instance of the
|
|
256
|
+
Animal class but this time we won't travel
|
|
257
|
+
through its discriminator because we passed in
|
|
258
|
+
_visited_composed_classes = (Animal,)
|
|
259
|
+
batch_id (int, none_type): An entry ID, unique within the batch request.. [optional] # noqa: E501
|
|
260
|
+
product_id (str, none_type): The Product ID to delete. Only defined if the method is delete.. [optional] # noqa: E501
|
|
261
|
+
item_group_id (str, none_type): Deprecated (providing this information is no more needed, this field will be removed in next release). The itemGroupId of the product to delete. To be defined when the method is delete and the product is a variant.. [optional] # noqa: E501
|
|
262
|
+
product (Product): [optional] # noqa: E501
|
|
263
|
+
feed_id (str, none_type): Not used by Criteo.. [optional] # noqa: E501
|
|
264
|
+
"""
|
|
265
|
+
|
|
266
|
+
_check_type = kwargs.pop('_check_type', True)
|
|
267
|
+
_spec_property_naming = kwargs.pop('_spec_property_naming', False)
|
|
268
|
+
_path_to_item = kwargs.pop('_path_to_item', ())
|
|
269
|
+
_configuration = kwargs.pop('_configuration', None)
|
|
270
|
+
_visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
|
|
271
|
+
|
|
272
|
+
if args:
|
|
273
|
+
for arg in args:
|
|
274
|
+
if isinstance(arg, dict):
|
|
275
|
+
kwargs.update(arg)
|
|
276
|
+
else:
|
|
277
|
+
raise ApiTypeError(
|
|
278
|
+
"Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
|
|
279
|
+
args,
|
|
280
|
+
self.__class__.__name__,
|
|
281
|
+
),
|
|
282
|
+
path_to_item=_path_to_item,
|
|
283
|
+
valid_classes=(self.__class__,),
|
|
284
|
+
)
|
|
285
|
+
|
|
286
|
+
self._data_store = {}
|
|
287
|
+
self._check_type = _check_type
|
|
288
|
+
self._spec_property_naming = _spec_property_naming
|
|
289
|
+
self._path_to_item = _path_to_item
|
|
290
|
+
self._configuration = _configuration
|
|
291
|
+
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
|
|
292
|
+
|
|
293
|
+
self.merchant_id = merchant_id
|
|
294
|
+
self.method = method
|
|
295
|
+
for var_name, var_value in kwargs.items():
|
|
296
|
+
if var_name not in self.attribute_map and \
|
|
297
|
+
self._configuration is not None and \
|
|
298
|
+
self._configuration.discard_unknown_keys and \
|
|
299
|
+
self.additional_properties_type is None:
|
|
300
|
+
# discard variable.
|
|
301
|
+
continue
|
|
302
|
+
setattr(self, var_name, var_value)
|
|
303
|
+
if var_name in self.read_only_vars:
|
|
304
|
+
raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
|
|
305
|
+
f"class with read only attributes.")
|