criteo-api-retailmedia-sdk 0.0.250425__py3-none-any.whl → 0.0.250606__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.
Files changed (74) 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/categories_search_request_v1.py +270 -0
  7. criteo_api_retailmedia_preview/model/entity_resource_category202204.py +277 -0
  8. criteo_api_retailmedia_preview/model/entity_resource_collection_outcome_category202204.py +281 -0
  9. criteo_api_retailmedia_preview/model/entity_resource_collection_outcome_category202204_metadata.py +287 -0
  10. criteo_api_retailmedia_preview/model/entity_resource_of_sponsored_products_line_item.py +270 -0
  11. criteo_api_retailmedia_preview/model/entity_resource_outcome_of_sponsored_products_line_item.py +274 -0
  12. criteo_api_retailmedia_preview/model/flight_leg.py +287 -0
  13. criteo_api_retailmedia_preview/model/flight_schedule.py +262 -0
  14. criteo_api_retailmedia_preview/model/nillable_decimal.py +263 -0
  15. criteo_api_retailmedia_preview/model/page_of_sponsored_products_line_item.py +276 -0
  16. criteo_api_retailmedia_preview/model/recommended_categories_request_v1.py +272 -0
  17. criteo_api_retailmedia_preview/model/recommended_keywords_request_v1.py +266 -0
  18. criteo_api_retailmedia_preview/model/recommended_keywords_response_v1.py +263 -0
  19. criteo_api_retailmedia_preview/model/rm_audience_bulk_create_input_v1.py +269 -0
  20. criteo_api_retailmedia_preview/model/rm_audience_bulk_delete_input_v1.py +269 -0
  21. criteo_api_retailmedia_preview/model/rm_audience_bulk_update_input_v1.py +269 -0
  22. criteo_api_retailmedia_preview/model/rm_audience_compute_sizes_entity_v1.py +272 -0
  23. criteo_api_retailmedia_preview/model/rm_audience_compute_sizes_entity_v1_resource.py +273 -0
  24. criteo_api_retailmedia_preview/model/rm_audience_compute_sizes_input_v1.py +269 -0
  25. criteo_api_retailmedia_preview/model/rm_audience_create_entity_v1.py +291 -0
  26. criteo_api_retailmedia_preview/model/rm_audience_create_entity_v1_resource.py +273 -0
  27. criteo_api_retailmedia_preview/model/rm_audience_delete_entity_v1_resource.py +271 -0
  28. criteo_api_retailmedia_preview/model/rm_audience_entity_v1_list_response.py +281 -0
  29. criteo_api_retailmedia_preview/model/rm_audience_estimate_size_entity_v1.py +282 -0
  30. criteo_api_retailmedia_preview/model/rm_audience_estimate_size_entity_v1_resource.py +273 -0
  31. criteo_api_retailmedia_preview/model/rm_audience_estimate_size_input_v1.py +269 -0
  32. criteo_api_retailmedia_preview/model/rm_audience_segment_compute_size_entity_v1.py +272 -0
  33. criteo_api_retailmedia_preview/model/rm_audience_segment_compute_size_entity_v1_resource.py +273 -0
  34. criteo_api_retailmedia_preview/model/rm_audience_segment_compute_sizes_input_v1.py +269 -0
  35. criteo_api_retailmedia_preview/model/rm_audience_segment_create_entity_v1.py +6 -0
  36. criteo_api_retailmedia_preview/model/rm_audience_segment_estimate_size_entity_v1.py +282 -0
  37. criteo_api_retailmedia_preview/model/rm_audience_segment_estimate_size_entity_v1_resource.py +273 -0
  38. criteo_api_retailmedia_preview/model/rm_audience_segment_estimate_size_input_v1.py +269 -0
  39. criteo_api_retailmedia_preview/model/rm_audience_segment_size_entity_v1.py +267 -0
  40. criteo_api_retailmedia_preview/model/rm_audience_segment_size_entity_v1_list_response.py +281 -0
  41. criteo_api_retailmedia_preview/model/rm_audience_segment_size_entity_v1_resource.py +277 -0
  42. criteo_api_retailmedia_preview/model/rm_audience_segment_size_estimation_v1.py +267 -0
  43. criteo_api_retailmedia_preview/model/rm_audience_segment_size_estimation_v1_resource.py +273 -0
  44. criteo_api_retailmedia_preview/model/rm_audience_segment_size_estimation_v1_response.py +281 -0
  45. criteo_api_retailmedia_preview/model/rm_audience_segment_update_entity_v1.py +6 -0
  46. criteo_api_retailmedia_preview/model/rm_audience_size_entity_v1.py +267 -0
  47. criteo_api_retailmedia_preview/model/rm_audience_size_entity_v1_list_response.py +281 -0
  48. criteo_api_retailmedia_preview/model/rm_audience_size_entity_v1_resource.py +277 -0
  49. criteo_api_retailmedia_preview/model/rm_audience_size_estimation_v1.py +267 -0
  50. criteo_api_retailmedia_preview/model/rm_audience_size_estimation_v1_resource.py +273 -0
  51. criteo_api_retailmedia_preview/model/rm_audience_size_estimation_v1_response.py +281 -0
  52. criteo_api_retailmedia_preview/model/rm_audience_update_entity_v1.py +279 -0
  53. criteo_api_retailmedia_preview/model/rm_audience_update_entity_v1_resource.py +277 -0
  54. criteo_api_retailmedia_preview/model/rm_events_create_v1.py +305 -0
  55. criteo_api_retailmedia_preview/model/rm_events_estimation_v1.py +305 -0
  56. criteo_api_retailmedia_preview/model/rm_events_update_v1.py +307 -0
  57. criteo_api_retailmedia_preview/model/sponsored_products_line_item.py +387 -0
  58. criteo_api_retailmedia_preview/model/sponsored_products_line_item_create_request_model.py +335 -0
  59. criteo_api_retailmedia_preview/model/sponsored_products_line_item_update_request_model.py +335 -0
  60. criteo_api_retailmedia_preview/model/value_resource_categories_search_request_v1.py +273 -0
  61. criteo_api_retailmedia_preview/model/value_resource_input_categories_search_request_v1.py +269 -0
  62. criteo_api_retailmedia_preview/model/value_resource_input_of_sponsored_products_line_item_update_request_model.py +262 -0
  63. criteo_api_retailmedia_preview/model/value_resource_input_recommended_categories_request_v1.py +269 -0
  64. criteo_api_retailmedia_preview/model/value_resource_input_recommended_keywords_request_v1.py +262 -0
  65. criteo_api_retailmedia_preview/model/value_resource_of_sponsored_products_line_item_update_request_model.py +266 -0
  66. criteo_api_retailmedia_preview/model/value_resource_outcome_recommended_keywords_response_v1.py +274 -0
  67. criteo_api_retailmedia_preview/model/value_resource_recommended_categories_request_v1.py +273 -0
  68. criteo_api_retailmedia_preview/model/value_resource_recommended_keywords_request_v1.py +266 -0
  69. criteo_api_retailmedia_preview/model/value_resource_recommended_keywords_response_v1.py +266 -0
  70. criteo_api_retailmedia_preview/models/__init__.py +62 -0
  71. {criteo_api_retailmedia_sdk-0.0.250425.dist-info → criteo_api_retailmedia_sdk-0.0.250606.dist-info}/METADATA +3 -3
  72. {criteo_api_retailmedia_sdk-0.0.250425.dist-info → criteo_api_retailmedia_sdk-0.0.250606.dist-info}/RECORD +74 -12
  73. {criteo_api_retailmedia_sdk-0.0.250425.dist-info → criteo_api_retailmedia_sdk-0.0.250606.dist-info}/WHEEL +1 -1
  74. {criteo_api_retailmedia_sdk-0.0.250425.dist-info → criteo_api_retailmedia_sdk-0.0.250606.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,287 @@
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 FlightLeg(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
+ ('day_of_week',): {
59
+ 'SUNDAY': "Sunday",
60
+ 'MONDAY': "Monday",
61
+ 'TUESDAY': "Tuesday",
62
+ 'WEDNESDAY': "Wednesday",
63
+ 'THURSDAY': "Thursday",
64
+ 'FRIDAY': "Friday",
65
+ 'SATURDAY': "Saturday",
66
+ 'EVERYDAY': "Everyday",
67
+ 'WEEKDAYS': "Weekdays",
68
+ 'WEEKENDS': "Weekends",
69
+ },
70
+ }
71
+
72
+ validations = {
73
+ }
74
+
75
+ additional_properties_type = None
76
+
77
+ _nullable = False
78
+
79
+ @cached_property
80
+ def openapi_types():
81
+ """
82
+ This must be a method because a model may have properties that are
83
+ of type self, this must run after the class is loaded
84
+
85
+ Returns
86
+ openapi_types (dict): The key is attribute name
87
+ and the value is attribute type.
88
+ """
89
+ return {
90
+ 'day_of_week': (str,), # noqa: E501
91
+ 'end_time': (datetime,), # noqa: E501
92
+ 'start_time': (datetime,), # noqa: E501
93
+ }
94
+
95
+ @cached_property
96
+ def discriminator():
97
+ return None
98
+
99
+
100
+ attribute_map = {
101
+ 'day_of_week': 'dayOfWeek', # noqa: E501
102
+ 'end_time': 'endTime', # noqa: E501
103
+ 'start_time': 'startTime', # 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, day_of_week, end_time, start_time, *args, **kwargs): # noqa: E501
114
+ """FlightLeg - a model defined in OpenAPI
115
+
116
+ Args:
117
+ day_of_week (str): Enum for the days of the week.
118
+ end_time (datetime):
119
+ start_time (datetime):
120
+
121
+ Keyword Args:
122
+ _check_type (bool): if True, values for parameters in openapi_types
123
+ will be type checked and a TypeError will be
124
+ raised if the wrong type is input.
125
+ Defaults to True
126
+ _path_to_item (tuple/list): This is a list of keys or values to
127
+ drill down to the model in received_data
128
+ when deserializing a response
129
+ _spec_property_naming (bool): True if the variable names in the input data
130
+ are serialized names, as specified in the OpenAPI document.
131
+ False if the variable names in the input data
132
+ are pythonic names, e.g. snake case (default)
133
+ _configuration (Configuration): the instance to use when
134
+ deserializing a file_type parameter.
135
+ If passed, type conversion is attempted
136
+ If omitted no type conversion is done.
137
+ _visited_composed_classes (tuple): This stores a tuple of
138
+ classes that we have traveled through so that
139
+ if we see that class again we will not use its
140
+ discriminator again.
141
+ When traveling through a discriminator, the
142
+ composed schema that is
143
+ is traveled through is added to this set.
144
+ For example if Animal has a discriminator
145
+ petType and we pass in "Dog", and the class Dog
146
+ allOf includes Animal, we move through Animal
147
+ once using the discriminator, and pick Dog.
148
+ Then in Dog, we will make an instance of the
149
+ Animal class but this time we won't travel
150
+ through its discriminator because we passed in
151
+ _visited_composed_classes = (Animal,)
152
+ """
153
+
154
+ _check_type = kwargs.pop('_check_type', True)
155
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
156
+ _path_to_item = kwargs.pop('_path_to_item', ())
157
+ _configuration = kwargs.pop('_configuration', None)
158
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
159
+
160
+ self = super(OpenApiModel, cls).__new__(cls)
161
+
162
+ if args:
163
+ for arg in args:
164
+ if isinstance(arg, dict):
165
+ kwargs.update(arg)
166
+ else:
167
+ raise ApiTypeError(
168
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
169
+ args,
170
+ self.__class__.__name__,
171
+ ),
172
+ path_to_item=_path_to_item,
173
+ valid_classes=(self.__class__,),
174
+ )
175
+
176
+ self._data_store = {}
177
+ self._check_type = _check_type
178
+ self._spec_property_naming = _spec_property_naming
179
+ self._path_to_item = _path_to_item
180
+ self._configuration = _configuration
181
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
182
+
183
+ self.day_of_week = day_of_week
184
+ self.end_time = end_time
185
+ self.start_time = start_time
186
+ for var_name, var_value in kwargs.items():
187
+ if var_name not in self.attribute_map and \
188
+ self._configuration is not None and \
189
+ self._configuration.discard_unknown_keys and \
190
+ self.additional_properties_type is None:
191
+ # discard variable.
192
+ continue
193
+ setattr(self, var_name, var_value)
194
+ return self
195
+
196
+ required_properties = set([
197
+ '_data_store',
198
+ '_check_type',
199
+ '_spec_property_naming',
200
+ '_path_to_item',
201
+ '_configuration',
202
+ '_visited_composed_classes',
203
+ ])
204
+
205
+ @convert_js_args_to_python_args
206
+ def __init__(self, day_of_week, end_time, start_time, *args, **kwargs): # noqa: E501
207
+ """FlightLeg - a model defined in OpenAPI
208
+
209
+ Args:
210
+ day_of_week (str): Enum for the days of the week.
211
+ end_time (datetime):
212
+ start_time (datetime):
213
+
214
+ Keyword Args:
215
+ _check_type (bool): if True, values for parameters in openapi_types
216
+ will be type checked and a TypeError will be
217
+ raised if the wrong type is input.
218
+ Defaults to True
219
+ _path_to_item (tuple/list): This is a list of keys or values to
220
+ drill down to the model in received_data
221
+ when deserializing a response
222
+ _spec_property_naming (bool): True if the variable names in the input data
223
+ are serialized names, as specified in the OpenAPI document.
224
+ False if the variable names in the input data
225
+ are pythonic names, e.g. snake case (default)
226
+ _configuration (Configuration): the instance to use when
227
+ deserializing a file_type parameter.
228
+ If passed, type conversion is attempted
229
+ If omitted no type conversion is done.
230
+ _visited_composed_classes (tuple): This stores a tuple of
231
+ classes that we have traveled through so that
232
+ if we see that class again we will not use its
233
+ discriminator again.
234
+ When traveling through a discriminator, the
235
+ composed schema that is
236
+ is traveled through is added to this set.
237
+ For example if Animal has a discriminator
238
+ petType and we pass in "Dog", and the class Dog
239
+ allOf includes Animal, we move through Animal
240
+ once using the discriminator, and pick Dog.
241
+ Then in Dog, we will make an instance of the
242
+ Animal class but this time we won't travel
243
+ through its discriminator because we passed in
244
+ _visited_composed_classes = (Animal,)
245
+ """
246
+
247
+ _check_type = kwargs.pop('_check_type', True)
248
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
249
+ _path_to_item = kwargs.pop('_path_to_item', ())
250
+ _configuration = kwargs.pop('_configuration', None)
251
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
252
+
253
+ if args:
254
+ for arg in args:
255
+ if isinstance(arg, dict):
256
+ kwargs.update(arg)
257
+ else:
258
+ raise ApiTypeError(
259
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
260
+ args,
261
+ self.__class__.__name__,
262
+ ),
263
+ path_to_item=_path_to_item,
264
+ valid_classes=(self.__class__,),
265
+ )
266
+
267
+ self._data_store = {}
268
+ self._check_type = _check_type
269
+ self._spec_property_naming = _spec_property_naming
270
+ self._path_to_item = _path_to_item
271
+ self._configuration = _configuration
272
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
273
+
274
+ self.day_of_week = day_of_week
275
+ self.end_time = end_time
276
+ self.start_time = start_time
277
+ for var_name, var_value in kwargs.items():
278
+ if var_name not in self.attribute_map and \
279
+ self._configuration is not None and \
280
+ self._configuration.discard_unknown_keys and \
281
+ self.additional_properties_type is None:
282
+ # discard variable.
283
+ continue
284
+ setattr(self, var_name, var_value)
285
+ if var_name in self.read_only_vars:
286
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
287
+ f"class with read only attributes.")
@@ -0,0 +1,262 @@
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_leg import FlightLeg
34
+ globals()['FlightLeg'] = FlightLeg
35
+
36
+
37
+ class FlightSchedule(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
+ additional_properties_type = None
68
+
69
+ _nullable = True
70
+
71
+ @cached_property
72
+ def openapi_types():
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
+ Returns
78
+ openapi_types (dict): The key is attribute name
79
+ and the value is attribute type.
80
+ """
81
+ lazy_import()
82
+ return {
83
+ 'legs': ([FlightLeg], none_type,), # noqa: E501
84
+ }
85
+
86
+ @cached_property
87
+ def discriminator():
88
+ return None
89
+
90
+
91
+ attribute_map = {
92
+ 'legs': 'legs', # noqa: E501
93
+ }
94
+
95
+ read_only_vars = {
96
+ }
97
+
98
+ _composed_schemas = {}
99
+
100
+ @classmethod
101
+ @convert_js_args_to_python_args
102
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
103
+ """FlightSchedule - a model defined in OpenAPI
104
+
105
+ Keyword Args:
106
+ _check_type (bool): if True, values for parameters in openapi_types
107
+ will be type checked and a TypeError will be
108
+ raised if the wrong type is input.
109
+ Defaults to True
110
+ _path_to_item (tuple/list): This is a list of keys or values to
111
+ drill down to the model in received_data
112
+ when deserializing a response
113
+ _spec_property_naming (bool): True if the variable names in the input data
114
+ are serialized names, as specified in the OpenAPI document.
115
+ False if the variable names in the input data
116
+ are pythonic names, e.g. snake case (default)
117
+ _configuration (Configuration): the instance to use when
118
+ deserializing a file_type parameter.
119
+ If passed, type conversion is attempted
120
+ If omitted no type conversion is done.
121
+ _visited_composed_classes (tuple): This stores a tuple of
122
+ classes that we have traveled through so that
123
+ if we see that class again we will not use its
124
+ discriminator again.
125
+ When traveling through a discriminator, the
126
+ composed schema that is
127
+ is traveled through is added to this set.
128
+ For example if Animal has a discriminator
129
+ petType and we pass in "Dog", and the class Dog
130
+ allOf includes Animal, we move through Animal
131
+ once using the discriminator, and pick Dog.
132
+ Then in Dog, we will make an instance of the
133
+ Animal class but this time we won't travel
134
+ through its discriminator because we passed in
135
+ _visited_composed_classes = (Animal,)
136
+ legs ([FlightLeg], none_type): A list of flight legs on which the line item will run.. [optional] # noqa: E501
137
+ """
138
+
139
+ _check_type = kwargs.pop('_check_type', True)
140
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
141
+ _path_to_item = kwargs.pop('_path_to_item', ())
142
+ _configuration = kwargs.pop('_configuration', None)
143
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
144
+
145
+ self = super(OpenApiModel, cls).__new__(cls)
146
+
147
+ if args:
148
+ for arg in args:
149
+ if isinstance(arg, dict):
150
+ kwargs.update(arg)
151
+ else:
152
+ raise ApiTypeError(
153
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
154
+ args,
155
+ self.__class__.__name__,
156
+ ),
157
+ path_to_item=_path_to_item,
158
+ valid_classes=(self.__class__,),
159
+ )
160
+
161
+ self._data_store = {}
162
+ self._check_type = _check_type
163
+ self._spec_property_naming = _spec_property_naming
164
+ self._path_to_item = _path_to_item
165
+ self._configuration = _configuration
166
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
167
+
168
+ for var_name, var_value in kwargs.items():
169
+ if var_name not in self.attribute_map and \
170
+ self._configuration is not None and \
171
+ self._configuration.discard_unknown_keys and \
172
+ self.additional_properties_type is None:
173
+ # discard variable.
174
+ continue
175
+ setattr(self, var_name, var_value)
176
+ return self
177
+
178
+ required_properties = set([
179
+ '_data_store',
180
+ '_check_type',
181
+ '_spec_property_naming',
182
+ '_path_to_item',
183
+ '_configuration',
184
+ '_visited_composed_classes',
185
+ ])
186
+
187
+ @convert_js_args_to_python_args
188
+ def __init__(self, *args, **kwargs): # noqa: E501
189
+ """FlightSchedule - a model defined in OpenAPI
190
+
191
+ Keyword Args:
192
+ _check_type (bool): if True, values for parameters in openapi_types
193
+ will be type checked and a TypeError will be
194
+ raised if the wrong type is input.
195
+ Defaults to True
196
+ _path_to_item (tuple/list): This is a list of keys or values to
197
+ drill down to the model in received_data
198
+ when deserializing a response
199
+ _spec_property_naming (bool): True if the variable names in the input data
200
+ are serialized names, as specified in the OpenAPI document.
201
+ False if the variable names in the input data
202
+ are pythonic names, e.g. snake case (default)
203
+ _configuration (Configuration): the instance to use when
204
+ deserializing a file_type parameter.
205
+ If passed, type conversion is attempted
206
+ If omitted no type conversion is done.
207
+ _visited_composed_classes (tuple): This stores a tuple of
208
+ classes that we have traveled through so that
209
+ if we see that class again we will not use its
210
+ discriminator again.
211
+ When traveling through a discriminator, the
212
+ composed schema that is
213
+ is traveled through is added to this set.
214
+ For example if Animal has a discriminator
215
+ petType and we pass in "Dog", and the class Dog
216
+ allOf includes Animal, we move through Animal
217
+ once using the discriminator, and pick Dog.
218
+ Then in Dog, we will make an instance of the
219
+ Animal class but this time we won't travel
220
+ through its discriminator because we passed in
221
+ _visited_composed_classes = (Animal,)
222
+ legs ([FlightLeg], none_type): A list of flight legs on which the line item will run.. [optional] # noqa: E501
223
+ """
224
+
225
+ _check_type = kwargs.pop('_check_type', True)
226
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
227
+ _path_to_item = kwargs.pop('_path_to_item', ())
228
+ _configuration = kwargs.pop('_configuration', None)
229
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
230
+
231
+ if args:
232
+ for arg in args:
233
+ if isinstance(arg, dict):
234
+ kwargs.update(arg)
235
+ else:
236
+ raise ApiTypeError(
237
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
238
+ args,
239
+ self.__class__.__name__,
240
+ ),
241
+ path_to_item=_path_to_item,
242
+ valid_classes=(self.__class__,),
243
+ )
244
+
245
+ self._data_store = {}
246
+ self._check_type = _check_type
247
+ self._spec_property_naming = _spec_property_naming
248
+ self._path_to_item = _path_to_item
249
+ self._configuration = _configuration
250
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
251
+
252
+ for var_name, var_value in kwargs.items():
253
+ if var_name not in self.attribute_map and \
254
+ self._configuration is not None and \
255
+ self._configuration.discard_unknown_keys and \
256
+ self.additional_properties_type is None:
257
+ # discard variable.
258
+ continue
259
+ setattr(self, var_name, var_value)
260
+ if var_name in self.read_only_vars:
261
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
262
+ f"class with read only attributes.")