ultracart-rest-sdk 4.1.14__py3-none-any.whl → 4.1.15__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.
@@ -0,0 +1,310 @@
1
+ """
2
+ UltraCart Rest API V2
3
+
4
+ UltraCart REST API Version 2 # noqa: E501
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ """
10
+
11
+
12
+ import re # noqa: F401
13
+ import sys # noqa: F401
14
+
15
+ from ultracart.model_utils import ( # noqa: F401
16
+ ApiTypeError,
17
+ ModelComposed,
18
+ ModelNormal,
19
+ ModelSimple,
20
+ cached_property,
21
+ change_keys_js_to_python,
22
+ convert_js_args_to_python_args,
23
+ date,
24
+ datetime,
25
+ file_type,
26
+ none_type,
27
+ validate_get_composed_info,
28
+ OpenApiModel
29
+ )
30
+ from ultracart.exceptions import ApiAttributeError
31
+
32
+
33
+ def lazy_import():
34
+ from ultracart.model.custom_report_parameter import CustomReportParameter
35
+ from ultracart.model.custom_report_query import CustomReportQuery
36
+ from ultracart.model.custom_report_tooltip import CustomReportTooltip
37
+ globals()['CustomReportParameter'] = CustomReportParameter
38
+ globals()['CustomReportQuery'] = CustomReportQuery
39
+ globals()['CustomReportTooltip'] = CustomReportTooltip
40
+
41
+
42
+ class CustomReport(ModelNormal):
43
+ """NOTE: This class is auto generated by OpenAPI Generator.
44
+ Ref: https://openapi-generator.tech
45
+
46
+ Do not edit the class manually.
47
+
48
+ Attributes:
49
+ allowed_values (dict): The key is the tuple path to the attribute
50
+ and the for var_name this is (var_name,). The value is a dict
51
+ with a capitalized key describing the allowed value and an allowed
52
+ value. These dicts store the allowed enum values.
53
+ attribute_map (dict): The key is attribute name
54
+ and the value is json key in definition.
55
+ discriminator_value_class_map (dict): A dict to go from the discriminator
56
+ variable value to the discriminator class name.
57
+ validations (dict): The key is the tuple path to the attribute
58
+ and the for var_name this is (var_name,). The value is a dict
59
+ that stores validations for max_length, min_length, max_items,
60
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
61
+ inclusive_minimum, and regex.
62
+ additional_properties_type (tuple): A tuple of classes accepted
63
+ as additional properties values.
64
+ """
65
+
66
+ allowed_values = {
67
+ }
68
+
69
+ validations = {
70
+ }
71
+
72
+ @cached_property
73
+ def additional_properties_type():
74
+ """
75
+ This must be a method because a model may have properties that are
76
+ of type self, this must run after the class is loaded
77
+ """
78
+ lazy_import()
79
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
80
+
81
+ _nullable = False
82
+
83
+ @cached_property
84
+ def openapi_types():
85
+ """
86
+ This must be a method because a model may have properties that are
87
+ of type self, this must run after the class is loaded
88
+
89
+ Returns
90
+ openapi_types (dict): The key is attribute name
91
+ and the value is attribute type.
92
+ """
93
+ lazy_import()
94
+ return {
95
+ 'chart_javascript': (str,), # noqa: E501
96
+ 'chart_javascript_url': (str,), # noqa: E501
97
+ 'data_warehouse_report_config_oid': (int,), # noqa: E501
98
+ 'dataset_security_level': (str,), # noqa: E501
99
+ 'group_name': (str,), # noqa: E501
100
+ 'merchant_id': (str,), # noqa: E501
101
+ 'name': (str,), # noqa: E501
102
+ 'parameters': ([CustomReportParameter],), # noqa: E501
103
+ 'queries': ([CustomReportQuery],), # noqa: E501
104
+ 'tooltips': ([CustomReportTooltip],), # noqa: E501
105
+ }
106
+
107
+ @cached_property
108
+ def discriminator():
109
+ return None
110
+
111
+
112
+ attribute_map = {
113
+ 'chart_javascript': 'chart_javascript', # noqa: E501
114
+ 'chart_javascript_url': 'chart_javascript_url', # noqa: E501
115
+ 'data_warehouse_report_config_oid': 'data_warehouse_report_config_oid', # noqa: E501
116
+ 'dataset_security_level': 'dataset_security_level', # noqa: E501
117
+ 'group_name': 'group_name', # noqa: E501
118
+ 'merchant_id': 'merchant_id', # noqa: E501
119
+ 'name': 'name', # noqa: E501
120
+ 'parameters': 'parameters', # noqa: E501
121
+ 'queries': 'queries', # noqa: E501
122
+ 'tooltips': 'tooltips', # noqa: E501
123
+ }
124
+
125
+ read_only_vars = {
126
+ }
127
+
128
+ _composed_schemas = {}
129
+
130
+ @classmethod
131
+ @convert_js_args_to_python_args
132
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
133
+ """CustomReport - a model defined in OpenAPI
134
+
135
+ Keyword Args:
136
+ _check_type (bool): if True, values for parameters in openapi_types
137
+ will be type checked and a TypeError will be
138
+ raised if the wrong type is input.
139
+ Defaults to True
140
+ _path_to_item (tuple/list): This is a list of keys or values to
141
+ drill down to the model in received_data
142
+ when deserializing a response
143
+ _spec_property_naming (bool): True if the variable names in the input data
144
+ are serialized names, as specified in the OpenAPI document.
145
+ False if the variable names in the input data
146
+ are pythonic names, e.g. snake case (default)
147
+ _configuration (Configuration): the instance to use when
148
+ deserializing a file_type parameter.
149
+ If passed, type conversion is attempted
150
+ If omitted no type conversion is done.
151
+ _visited_composed_classes (tuple): This stores a tuple of
152
+ classes that we have traveled through so that
153
+ if we see that class again we will not use its
154
+ discriminator again.
155
+ When traveling through a discriminator, the
156
+ composed schema that is
157
+ is traveled through is added to this set.
158
+ For example if Animal has a discriminator
159
+ petType and we pass in "Dog", and the class Dog
160
+ allOf includes Animal, we move through Animal
161
+ once using the discriminator, and pick Dog.
162
+ Then in Dog, we will make an instance of the
163
+ Animal class but this time we won't travel
164
+ through its discriminator because we passed in
165
+ _visited_composed_classes = (Animal,)
166
+ chart_javascript (str): [optional] # noqa: E501
167
+ chart_javascript_url (str): [optional] # noqa: E501
168
+ data_warehouse_report_config_oid (int): [optional] # noqa: E501
169
+ dataset_security_level (str): [optional] # noqa: E501
170
+ group_name (str): [optional] # noqa: E501
171
+ merchant_id (str): [optional] # noqa: E501
172
+ name (str): [optional] # noqa: E501
173
+ parameters ([CustomReportParameter]): [optional] # noqa: E501
174
+ queries ([CustomReportQuery]): [optional] # noqa: E501
175
+ tooltips ([CustomReportTooltip]): [optional] # noqa: E501
176
+ """
177
+
178
+ _check_type = kwargs.pop('_check_type', True)
179
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
180
+ _path_to_item = kwargs.pop('_path_to_item', ())
181
+ _configuration = kwargs.pop('_configuration', None)
182
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
183
+
184
+ self = super(OpenApiModel, cls).__new__(cls)
185
+
186
+ if args:
187
+ for arg in args:
188
+ if isinstance(arg, dict):
189
+ kwargs.update(arg)
190
+ else:
191
+ raise ApiTypeError(
192
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
193
+ args,
194
+ self.__class__.__name__,
195
+ ),
196
+ path_to_item=_path_to_item,
197
+ valid_classes=(self.__class__,),
198
+ )
199
+
200
+ self._data_store = {}
201
+ self._check_type = _check_type
202
+ self._spec_property_naming = _spec_property_naming
203
+ self._path_to_item = _path_to_item
204
+ self._configuration = _configuration
205
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
206
+
207
+ for var_name, var_value in kwargs.items():
208
+ if var_name not in self.attribute_map and \
209
+ self._configuration is not None and \
210
+ self._configuration.discard_unknown_keys and \
211
+ self.additional_properties_type is None:
212
+ # discard variable.
213
+ continue
214
+ setattr(self, var_name, var_value)
215
+ return self
216
+
217
+ required_properties = set([
218
+ '_data_store',
219
+ '_check_type',
220
+ '_spec_property_naming',
221
+ '_path_to_item',
222
+ '_configuration',
223
+ '_visited_composed_classes',
224
+ ])
225
+
226
+ @convert_js_args_to_python_args
227
+ def __init__(self, *args, **kwargs): # noqa: E501
228
+ """CustomReport - a model defined in OpenAPI
229
+
230
+ Keyword Args:
231
+ _check_type (bool): if True, values for parameters in openapi_types
232
+ will be type checked and a TypeError will be
233
+ raised if the wrong type is input.
234
+ Defaults to True
235
+ _path_to_item (tuple/list): This is a list of keys or values to
236
+ drill down to the model in received_data
237
+ when deserializing a response
238
+ _spec_property_naming (bool): True if the variable names in the input data
239
+ are serialized names, as specified in the OpenAPI document.
240
+ False if the variable names in the input data
241
+ are pythonic names, e.g. snake case (default)
242
+ _configuration (Configuration): the instance to use when
243
+ deserializing a file_type parameter.
244
+ If passed, type conversion is attempted
245
+ If omitted no type conversion is done.
246
+ _visited_composed_classes (tuple): This stores a tuple of
247
+ classes that we have traveled through so that
248
+ if we see that class again we will not use its
249
+ discriminator again.
250
+ When traveling through a discriminator, the
251
+ composed schema that is
252
+ is traveled through is added to this set.
253
+ For example if Animal has a discriminator
254
+ petType and we pass in "Dog", and the class Dog
255
+ allOf includes Animal, we move through Animal
256
+ once using the discriminator, and pick Dog.
257
+ Then in Dog, we will make an instance of the
258
+ Animal class but this time we won't travel
259
+ through its discriminator because we passed in
260
+ _visited_composed_classes = (Animal,)
261
+ chart_javascript (str): [optional] # noqa: E501
262
+ chart_javascript_url (str): [optional] # noqa: E501
263
+ data_warehouse_report_config_oid (int): [optional] # noqa: E501
264
+ dataset_security_level (str): [optional] # noqa: E501
265
+ group_name (str): [optional] # noqa: E501
266
+ merchant_id (str): [optional] # noqa: E501
267
+ name (str): [optional] # noqa: E501
268
+ parameters ([CustomReportParameter]): [optional] # noqa: E501
269
+ queries ([CustomReportQuery]): [optional] # noqa: E501
270
+ tooltips ([CustomReportTooltip]): [optional] # noqa: E501
271
+ """
272
+
273
+ _check_type = kwargs.pop('_check_type', True)
274
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
275
+ _path_to_item = kwargs.pop('_path_to_item', ())
276
+ _configuration = kwargs.pop('_configuration', None)
277
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
278
+
279
+ if args:
280
+ for arg in args:
281
+ if isinstance(arg, dict):
282
+ kwargs.update(arg)
283
+ else:
284
+ raise ApiTypeError(
285
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
286
+ args,
287
+ self.__class__.__name__,
288
+ ),
289
+ path_to_item=_path_to_item,
290
+ valid_classes=(self.__class__,),
291
+ )
292
+
293
+ self._data_store = {}
294
+ self._check_type = _check_type
295
+ self._spec_property_naming = _spec_property_naming
296
+ self._path_to_item = _path_to_item
297
+ self._configuration = _configuration
298
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
299
+
300
+ for var_name, var_value in kwargs.items():
301
+ if var_name not in self.attribute_map and \
302
+ self._configuration is not None and \
303
+ self._configuration.discard_unknown_keys and \
304
+ self.additional_properties_type is None:
305
+ # discard variable.
306
+ continue
307
+ setattr(self, var_name, var_value)
308
+ if var_name in self.read_only_vars:
309
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
310
+ f"class with read only attributes.")
@@ -0,0 +1,296 @@
1
+ """
2
+ UltraCart Rest API V2
3
+
4
+ UltraCart REST API Version 2 # noqa: E501
5
+
6
+ The version of the OpenAPI document: 2.0.0
7
+ Contact: support@ultracart.com
8
+ Generated by: https://openapi-generator.tech
9
+ """
10
+
11
+
12
+ import re # noqa: F401
13
+ import sys # noqa: F401
14
+
15
+ from ultracart.model_utils import ( # noqa: F401
16
+ ApiTypeError,
17
+ ModelComposed,
18
+ ModelNormal,
19
+ ModelSimple,
20
+ cached_property,
21
+ change_keys_js_to_python,
22
+ convert_js_args_to_python_args,
23
+ date,
24
+ datetime,
25
+ file_type,
26
+ none_type,
27
+ validate_get_composed_info,
28
+ OpenApiModel
29
+ )
30
+ from ultracart.exceptions import ApiAttributeError
31
+
32
+
33
+
34
+ class CustomReportAccountConfig(ModelNormal):
35
+ """NOTE: This class is auto generated by OpenAPI Generator.
36
+ Ref: https://openapi-generator.tech
37
+
38
+ Do not edit the class manually.
39
+
40
+ Attributes:
41
+ allowed_values (dict): The key is the tuple path to the attribute
42
+ and the for var_name this is (var_name,). The value is a dict
43
+ with a capitalized key describing the allowed value and an allowed
44
+ value. These dicts store the allowed enum values.
45
+ attribute_map (dict): The key is attribute name
46
+ and the value is json key in definition.
47
+ discriminator_value_class_map (dict): A dict to go from the discriminator
48
+ variable value to the discriminator class name.
49
+ validations (dict): The key is the tuple path to the attribute
50
+ and the for var_name this is (var_name,). The value is a dict
51
+ that stores validations for max_length, min_length, max_items,
52
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
53
+ inclusive_minimum, and regex.
54
+ additional_properties_type (tuple): A tuple of classes accepted
55
+ as additional properties values.
56
+ """
57
+
58
+ allowed_values = {
59
+ }
60
+
61
+ validations = {
62
+ }
63
+
64
+ @cached_property
65
+ def additional_properties_type():
66
+ """
67
+ This must be a method because a model may have properties that are
68
+ of type self, this must run after the class is loaded
69
+ """
70
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
71
+
72
+ _nullable = False
73
+
74
+ @cached_property
75
+ def openapi_types():
76
+ """
77
+ This must be a method because a model may have properties that are
78
+ of type self, this must run after the class is loaded
79
+
80
+ Returns
81
+ openapi_types (dict): The key is attribute name
82
+ and the value is attribute type.
83
+ """
84
+ return {
85
+ 'ai_budget': (float,), # noqa: E501
86
+ 'ai_usage': (float,), # noqa: E501
87
+ 'merchant_id': (str,), # noqa: E501
88
+ 'novice_sql_comments': (bool,), # noqa: E501
89
+ 'opt_in': (bool,), # noqa: E501
90
+ 'opt_in_by_user': (str,), # noqa: E501
91
+ 'opt_in_date': (str,), # noqa: E501
92
+ 'sql_budget': (float,), # noqa: E501
93
+ 'sql_usage': (float,), # noqa: E501
94
+ }
95
+
96
+ @cached_property
97
+ def discriminator():
98
+ return None
99
+
100
+
101
+ attribute_map = {
102
+ 'ai_budget': 'ai_budget', # noqa: E501
103
+ 'ai_usage': 'ai_usage', # noqa: E501
104
+ 'merchant_id': 'merchant_id', # noqa: E501
105
+ 'novice_sql_comments': 'novice_sql_comments', # noqa: E501
106
+ 'opt_in': 'opt_in', # noqa: E501
107
+ 'opt_in_by_user': 'opt_in_by_user', # noqa: E501
108
+ 'opt_in_date': 'opt_in_date', # noqa: E501
109
+ 'sql_budget': 'sql_budget', # noqa: E501
110
+ 'sql_usage': 'sql_usage', # noqa: E501
111
+ }
112
+
113
+ read_only_vars = {
114
+ }
115
+
116
+ _composed_schemas = {}
117
+
118
+ @classmethod
119
+ @convert_js_args_to_python_args
120
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
121
+ """CustomReportAccountConfig - a model defined in OpenAPI
122
+
123
+ Keyword Args:
124
+ _check_type (bool): if True, values for parameters in openapi_types
125
+ will be type checked and a TypeError will be
126
+ raised if the wrong type is input.
127
+ Defaults to True
128
+ _path_to_item (tuple/list): This is a list of keys or values to
129
+ drill down to the model in received_data
130
+ when deserializing a response
131
+ _spec_property_naming (bool): True if the variable names in the input data
132
+ are serialized names, as specified in the OpenAPI document.
133
+ False if the variable names in the input data
134
+ are pythonic names, e.g. snake case (default)
135
+ _configuration (Configuration): the instance to use when
136
+ deserializing a file_type parameter.
137
+ If passed, type conversion is attempted
138
+ If omitted no type conversion is done.
139
+ _visited_composed_classes (tuple): This stores a tuple of
140
+ classes that we have traveled through so that
141
+ if we see that class again we will not use its
142
+ discriminator again.
143
+ When traveling through a discriminator, the
144
+ composed schema that is
145
+ is traveled through is added to this set.
146
+ For example if Animal has a discriminator
147
+ petType and we pass in "Dog", and the class Dog
148
+ allOf includes Animal, we move through Animal
149
+ once using the discriminator, and pick Dog.
150
+ Then in Dog, we will make an instance of the
151
+ Animal class but this time we won't travel
152
+ through its discriminator because we passed in
153
+ _visited_composed_classes = (Animal,)
154
+ ai_budget (float): [optional] # noqa: E501
155
+ ai_usage (float): Current AI usage creating reports. [optional] # noqa: E501
156
+ merchant_id (str): Current BigQuery SQL usage running reports. [optional] # noqa: E501
157
+ novice_sql_comments (bool): [optional] # noqa: E501
158
+ opt_in (bool): True if they have opted into custom reports. [optional] # noqa: E501
159
+ opt_in_by_user (str): User that opted into custom reporting. [optional] # noqa: E501
160
+ opt_in_date (str): Date/time that custom reporting was opted in to. [optional] # noqa: E501
161
+ sql_budget (float): [optional] # noqa: E501
162
+ sql_usage (float): [optional] # noqa: E501
163
+ """
164
+
165
+ _check_type = kwargs.pop('_check_type', True)
166
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
167
+ _path_to_item = kwargs.pop('_path_to_item', ())
168
+ _configuration = kwargs.pop('_configuration', None)
169
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
170
+
171
+ self = super(OpenApiModel, cls).__new__(cls)
172
+
173
+ if args:
174
+ for arg in args:
175
+ if isinstance(arg, dict):
176
+ kwargs.update(arg)
177
+ else:
178
+ raise ApiTypeError(
179
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
180
+ args,
181
+ self.__class__.__name__,
182
+ ),
183
+ path_to_item=_path_to_item,
184
+ valid_classes=(self.__class__,),
185
+ )
186
+
187
+ self._data_store = {}
188
+ self._check_type = _check_type
189
+ self._spec_property_naming = _spec_property_naming
190
+ self._path_to_item = _path_to_item
191
+ self._configuration = _configuration
192
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
193
+
194
+ for var_name, var_value in kwargs.items():
195
+ if var_name not in self.attribute_map and \
196
+ self._configuration is not None and \
197
+ self._configuration.discard_unknown_keys and \
198
+ self.additional_properties_type is None:
199
+ # discard variable.
200
+ continue
201
+ setattr(self, var_name, var_value)
202
+ return self
203
+
204
+ required_properties = set([
205
+ '_data_store',
206
+ '_check_type',
207
+ '_spec_property_naming',
208
+ '_path_to_item',
209
+ '_configuration',
210
+ '_visited_composed_classes',
211
+ ])
212
+
213
+ @convert_js_args_to_python_args
214
+ def __init__(self, *args, **kwargs): # noqa: E501
215
+ """CustomReportAccountConfig - a model defined in OpenAPI
216
+
217
+ Keyword Args:
218
+ _check_type (bool): if True, values for parameters in openapi_types
219
+ will be type checked and a TypeError will be
220
+ raised if the wrong type is input.
221
+ Defaults to True
222
+ _path_to_item (tuple/list): This is a list of keys or values to
223
+ drill down to the model in received_data
224
+ when deserializing a response
225
+ _spec_property_naming (bool): True if the variable names in the input data
226
+ are serialized names, as specified in the OpenAPI document.
227
+ False if the variable names in the input data
228
+ are pythonic names, e.g. snake case (default)
229
+ _configuration (Configuration): the instance to use when
230
+ deserializing a file_type parameter.
231
+ If passed, type conversion is attempted
232
+ If omitted no type conversion is done.
233
+ _visited_composed_classes (tuple): This stores a tuple of
234
+ classes that we have traveled through so that
235
+ if we see that class again we will not use its
236
+ discriminator again.
237
+ When traveling through a discriminator, the
238
+ composed schema that is
239
+ is traveled through is added to this set.
240
+ For example if Animal has a discriminator
241
+ petType and we pass in "Dog", and the class Dog
242
+ allOf includes Animal, we move through Animal
243
+ once using the discriminator, and pick Dog.
244
+ Then in Dog, we will make an instance of the
245
+ Animal class but this time we won't travel
246
+ through its discriminator because we passed in
247
+ _visited_composed_classes = (Animal,)
248
+ ai_budget (float): [optional] # noqa: E501
249
+ ai_usage (float): Current AI usage creating reports. [optional] # noqa: E501
250
+ merchant_id (str): Current BigQuery SQL usage running reports. [optional] # noqa: E501
251
+ novice_sql_comments (bool): [optional] # noqa: E501
252
+ opt_in (bool): True if they have opted into custom reports. [optional] # noqa: E501
253
+ opt_in_by_user (str): User that opted into custom reporting. [optional] # noqa: E501
254
+ opt_in_date (str): Date/time that custom reporting was opted in to. [optional] # noqa: E501
255
+ sql_budget (float): [optional] # noqa: E501
256
+ sql_usage (float): [optional] # noqa: E501
257
+ """
258
+
259
+ _check_type = kwargs.pop('_check_type', True)
260
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
261
+ _path_to_item = kwargs.pop('_path_to_item', ())
262
+ _configuration = kwargs.pop('_configuration', None)
263
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
264
+
265
+ if args:
266
+ for arg in args:
267
+ if isinstance(arg, dict):
268
+ kwargs.update(arg)
269
+ else:
270
+ raise ApiTypeError(
271
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
272
+ args,
273
+ self.__class__.__name__,
274
+ ),
275
+ path_to_item=_path_to_item,
276
+ valid_classes=(self.__class__,),
277
+ )
278
+
279
+ self._data_store = {}
280
+ self._check_type = _check_type
281
+ self._spec_property_naming = _spec_property_naming
282
+ self._path_to_item = _path_to_item
283
+ self._configuration = _configuration
284
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
285
+
286
+ for var_name, var_value in kwargs.items():
287
+ if var_name not in self.attribute_map and \
288
+ self._configuration is not None and \
289
+ self._configuration.discard_unknown_keys and \
290
+ self.additional_properties_type is None:
291
+ # discard variable.
292
+ continue
293
+ setattr(self, var_name, var_value)
294
+ if var_name in self.read_only_vars:
295
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
296
+ f"class with read only attributes.")