criteo-api-retailmedia-sdk 0.0.240118__py3-none-any.whl → 0.0.240404__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of criteo-api-retailmedia-sdk might be problematic. Click here for more details.

Files changed (86) hide show
  1. criteo_api_retailmedia_preview/__init__.py +1 -1
  2. criteo_api_retailmedia_preview/api/accounts_api.py +181 -35
  3. criteo_api_retailmedia_preview/api/analytics_api.py +142 -0
  4. criteo_api_retailmedia_preview/api/audience_api.py +2 -313
  5. criteo_api_retailmedia_preview/api/campaign_api.py +443 -974
  6. criteo_api_retailmedia_preview/api/catalog_api.py +312 -0
  7. criteo_api_retailmedia_preview/api_client.py +4 -4
  8. criteo_api_retailmedia_preview/apis/__init__.py +1 -0
  9. criteo_api_retailmedia_preview/configuration.py +1 -1
  10. criteo_api_retailmedia_preview/model/{creative202210.py → async_accounts_report.py} +149 -95
  11. criteo_api_retailmedia_preview/model/{external_catalog_request_preview.py → async_accounts_report_request.py} +13 -10
  12. criteo_api_retailmedia_preview/model/async_accounts_report_resource.py +273 -0
  13. criteo_api_retailmedia_preview/model/async_campaigns_report.py +57 -53
  14. criteo_api_retailmedia_preview/model/async_line_items_report.py +57 -54
  15. criteo_api_retailmedia_preview/model/{customer_list_details.py → batch_accepted_response.py} +11 -11
  16. criteo_api_retailmedia_preview/model/{value_resource_collection_outcome_of_int64.py → change_details.py} +27 -26
  17. criteo_api_retailmedia_preview/model/{color_variable_value.py → custom_attribute.py} +17 -16
  18. criteo_api_retailmedia_preview/model/export_report_column.py +2 -2
  19. criteo_api_retailmedia_preview/model/external_account.py +4 -0
  20. criteo_api_retailmedia_preview/model/{files_variable_value.py → external_line_item_capping_v2.py} +22 -13
  21. criteo_api_retailmedia_preview/model/external_line_item_page_category_v2.py +273 -0
  22. criteo_api_retailmedia_preview/model/{page_type_environment.py → external_line_item_page_v2.py} +40 -29
  23. criteo_api_retailmedia_preview/model/{retail_media_audience_attributes.py → external_preferred_line_item_create_model_v2.py} +79 -25
  24. criteo_api_retailmedia_preview/model/{external_catalog_status.py → external_preferred_line_item_update_model_v2.py} +70 -47
  25. criteo_api_retailmedia_preview/model/{template.py → external_preferred_line_item_v2.py} +93 -70
  26. criteo_api_retailmedia_preview/model/{json_api_body_with_id_of_int64_and_catalog_status_and_catalog_status.py → fail_response.py} +21 -23
  27. criteo_api_retailmedia_preview/model/input_resource_of_preferred_line_item_create_model_v2.py +273 -0
  28. criteo_api_retailmedia_preview/model/{retail_media_audience.py → insertion_order_history_change_data_capture.py} +48 -42
  29. criteo_api_retailmedia_preview/model/installment.py +273 -0
  30. criteo_api_retailmedia_preview/model/{creative202210_response.py → loyalty_points.py} +15 -25
  31. criteo_api_retailmedia_preview/model/metadata.py +273 -0
  32. criteo_api_retailmedia_preview/model/page_of_insertion_order_history_change_data_capture.py +276 -0
  33. criteo_api_retailmedia_preview/model/{json_api_request_of_catalog_request_preview.py → preferred_line_item_create_model_v2_request.py} +8 -8
  34. criteo_api_retailmedia_preview/model/{common_status_code_response.py → preferred_line_item_update_model_v2_request.py} +9 -15
  35. criteo_api_retailmedia_preview/model/{retail_media_audience_v2_list_response.py → preferred_line_item_v2_paged_list_response.py} +21 -27
  36. criteo_api_retailmedia_preview/model/{creative202210_list_response.py → preferred_line_item_v2_response.py} +16 -16
  37. criteo_api_retailmedia_preview/model/price.py +267 -0
  38. criteo_api_retailmedia_preview/model/product.py +626 -0
  39. criteo_api_retailmedia_preview/model/{retail_media_audience_v2.py → product_importer_error.py} +37 -29
  40. criteo_api_retailmedia_preview/model/product_importer_warning.py +299 -0
  41. criteo_api_retailmedia_preview/model/product_shipping.py +293 -0
  42. criteo_api_retailmedia_preview/model/product_shipping_dimension.py +267 -0
  43. criteo_api_retailmedia_preview/model/product_shipping_weight.py +267 -0
  44. criteo_api_retailmedia_preview/model/product_tax.py +283 -0
  45. criteo_api_retailmedia_preview/model/{choice_variable_value.py → product_unit_pricing_base_measure.py} +13 -15
  46. criteo_api_retailmedia_preview/model/{text_variable_specification.py → product_unit_pricing_measure.py} +11 -7
  47. criteo_api_retailmedia_preview/model/{section.py → products_custom_batch_request.py} +13 -19
  48. criteo_api_retailmedia_preview/model/{retail_media_audience_v2_attributes.py → products_custom_batch_request_entry.py} +43 -29
  49. criteo_api_retailmedia_preview/model/{json_api_body_without_id_of_catalog_request_and_catalog_request_preview.py → report_detail_error.py} +35 -15
  50. criteo_api_retailmedia_preview/model/report_detail_errors.py +281 -0
  51. criteo_api_retailmedia_preview/model/{template_variable_value.py → report_ok_response.py} +58 -43
  52. criteo_api_retailmedia_preview/model/{resource_of_creative202210.py → resource_of_preferred_line_item_update_model_v2.py} +9 -9
  53. criteo_api_retailmedia_preview/model/{resource_of_template.py → resource_of_preferred_line_item_v2.py} +9 -9
  54. criteo_api_retailmedia_preview/model/retail_media_account.py +4 -0
  55. criteo_api_retailmedia_preview/model/retail_media_brand_account_creation.py +4 -0
  56. criteo_api_retailmedia_preview/model/{text_variable_value.py → retail_media_brands.py} +10 -22
  57. criteo_api_retailmedia_preview/model/retail_media_seller_account_creation.py +4 -0
  58. criteo_api_retailmedia_preview/model/rm_legacy_audience_get_entity_v2.py +3 -3
  59. criteo_api_retailmedia_preview/model/sync_attributed_transactions_report.py +37 -37
  60. criteo_api_retailmedia_preview/model/sync_campaigns_report.py +51 -47
  61. criteo_api_retailmedia_preview/model/sync_line_items_report.py +53 -50
  62. criteo_api_retailmedia_preview/model/value_resource_collection_input_of_retail_media_seller.py +262 -0
  63. criteo_api_retailmedia_preview/model/value_resource_input_of_retail_media_brand_account_creation.py +262 -0
  64. criteo_api_retailmedia_preview/model/{hyperlink_variable_value.py → value_resource_input_of_retail_media_brands.py} +15 -22
  65. criteo_api_retailmedia_preview/model/value_resource_input_of_retail_media_seller_account_creation.py +262 -0
  66. criteo_api_retailmedia_preview/model/value_resource_of_retail_media_brand_account_creation.py +266 -0
  67. criteo_api_retailmedia_preview/model/{value_resource_of_int64.py → value_resource_of_retail_media_brands.py} +11 -6
  68. criteo_api_retailmedia_preview/model/value_resource_of_retail_media_seller_account_creation.py +266 -0
  69. criteo_api_retailmedia_preview/models/__init__.py +48 -42
  70. {criteo_api_retailmedia_sdk-0.0.240118.dist-info → criteo_api_retailmedia_sdk-0.0.240404.dist-info}/METADATA +3 -3
  71. {criteo_api_retailmedia_sdk-0.0.240118.dist-info → criteo_api_retailmedia_sdk-0.0.240404.dist-info}/RECORD +73 -66
  72. {criteo_api_retailmedia_sdk-0.0.240118.dist-info → criteo_api_retailmedia_sdk-0.0.240404.dist-info}/WHEEL +1 -1
  73. criteo_api_retailmedia_preview/model/choice_option.py +0 -281
  74. criteo_api_retailmedia_preview/model/choice_variable_specification.py +0 -283
  75. criteo_api_retailmedia_preview/model/create_user_behavior_segment_v2.py +0 -309
  76. criteo_api_retailmedia_preview/model/creative_create_model202207.py +0 -297
  77. criteo_api_retailmedia_preview/model/creative_update_model202207.py +0 -297
  78. criteo_api_retailmedia_preview/model/files_variables_specification.py +0 -290
  79. criteo_api_retailmedia_preview/model/get_page_of_audiences_by_account_id_response.py +0 -295
  80. criteo_api_retailmedia_preview/model/json_api_single_response_of_catalog_status.py +0 -287
  81. criteo_api_retailmedia_preview/model/template_list_response.py +0 -281
  82. criteo_api_retailmedia_preview/model/template_response.py +0 -281
  83. criteo_api_retailmedia_preview/model/template_variable.py +0 -310
  84. criteo_api_retailmedia_preview/model/user_behavior_details.py +0 -306
  85. criteo_api_retailmedia_preview/model/user_behavior_details_v2.py +0 -279
  86. {criteo_api_retailmedia_sdk-0.0.240118.dist-info → criteo_api_retailmedia_sdk-0.0.240404.dist-info}/top_level.txt +0 -0
@@ -1,281 +0,0 @@
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.problem_details import ProblemDetails
34
- from criteo_api_retailmedia_preview.model.resource_of_template import ResourceOfTemplate
35
- globals()['ProblemDetails'] = ProblemDetails
36
- globals()['ResourceOfTemplate'] = ResourceOfTemplate
37
-
38
-
39
- class TemplateResponse(ModelNormal):
40
- """NOTE: This class is auto generated by OpenAPI Generator.
41
- Ref: https://openapi-generator.tech
42
-
43
- Do not edit the class manually.
44
-
45
- Attributes:
46
- allowed_values (dict): The key is the tuple path to the attribute
47
- and the for var_name this is (var_name,). The value is a dict
48
- with a capitalized key describing the allowed value and an allowed
49
- value. These dicts store the allowed enum values.
50
- attribute_map (dict): The key is attribute name
51
- and the value is json key in definition.
52
- discriminator_value_class_map (dict): A dict to go from the discriminator
53
- variable value to the discriminator class name.
54
- validations (dict): The key is the tuple path to the attribute
55
- and the for var_name this is (var_name,). The value is a dict
56
- that stores validations for max_length, min_length, max_items,
57
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
58
- inclusive_minimum, and regex.
59
- additional_properties_type (tuple): A tuple of classes accepted
60
- as additional properties values.
61
- """
62
-
63
- allowed_values = {
64
- }
65
-
66
- validations = {
67
- }
68
-
69
- @cached_property
70
- def additional_properties_type():
71
- """
72
- This must be a method because a model may have properties that are
73
- of type self, this must run after the class is loaded
74
- """
75
- lazy_import()
76
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
77
-
78
- _nullable = False
79
-
80
- @cached_property
81
- def openapi_types():
82
- """
83
- This must be a method because a model may have properties that are
84
- of type self, this must run after the class is loaded
85
-
86
- Returns
87
- openapi_types (dict): The key is attribute name
88
- and the value is attribute type.
89
- """
90
- lazy_import()
91
- return {
92
- 'data': (ResourceOfTemplate,), # noqa: E501
93
- 'warnings': ([ProblemDetails],), # noqa: E501
94
- 'errors': ([ProblemDetails],), # noqa: E501
95
- }
96
-
97
- @cached_property
98
- def discriminator():
99
- return None
100
-
101
-
102
- attribute_map = {
103
- 'data': 'data', # noqa: E501
104
- 'warnings': 'warnings', # noqa: E501
105
- 'errors': 'errors', # noqa: E501
106
- }
107
-
108
- read_only_vars = {
109
- 'warnings', # noqa: E501
110
- 'errors', # noqa: E501
111
- }
112
-
113
- _composed_schemas = {}
114
-
115
- @classmethod
116
- @convert_js_args_to_python_args
117
- def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
118
- """TemplateResponse - a model defined in OpenAPI
119
-
120
- Keyword Args:
121
- _check_type (bool): if True, values for parameters in openapi_types
122
- will be type checked and a TypeError will be
123
- raised if the wrong type is input.
124
- Defaults to True
125
- _path_to_item (tuple/list): This is a list of keys or values to
126
- drill down to the model in received_data
127
- when deserializing a response
128
- _spec_property_naming (bool): True if the variable names in the input data
129
- are serialized names, as specified in the OpenAPI document.
130
- False if the variable names in the input data
131
- are pythonic names, e.g. snake case (default)
132
- _configuration (Configuration): the instance to use when
133
- deserializing a file_type parameter.
134
- If passed, type conversion is attempted
135
- If omitted no type conversion is done.
136
- _visited_composed_classes (tuple): This stores a tuple of
137
- classes that we have traveled through so that
138
- if we see that class again we will not use its
139
- discriminator again.
140
- When traveling through a discriminator, the
141
- composed schema that is
142
- is traveled through is added to this set.
143
- For example if Animal has a discriminator
144
- petType and we pass in "Dog", and the class Dog
145
- allOf includes Animal, we move through Animal
146
- once using the discriminator, and pick Dog.
147
- Then in Dog, we will make an instance of the
148
- Animal class but this time we won't travel
149
- through its discriminator because we passed in
150
- _visited_composed_classes = (Animal,)
151
- data (ResourceOfTemplate): [optional] # noqa: E501
152
- warnings ([ProblemDetails]): [optional] # noqa: E501
153
- errors ([ProblemDetails]): [optional] # noqa: E501
154
- """
155
-
156
- _check_type = kwargs.pop('_check_type', True)
157
- _spec_property_naming = kwargs.pop('_spec_property_naming', True)
158
- _path_to_item = kwargs.pop('_path_to_item', ())
159
- _configuration = kwargs.pop('_configuration', None)
160
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
161
-
162
- self = super(OpenApiModel, cls).__new__(cls)
163
-
164
- if args:
165
- for arg in args:
166
- if isinstance(arg, dict):
167
- kwargs.update(arg)
168
- else:
169
- raise ApiTypeError(
170
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
171
- args,
172
- self.__class__.__name__,
173
- ),
174
- path_to_item=_path_to_item,
175
- valid_classes=(self.__class__,),
176
- )
177
-
178
- self._data_store = {}
179
- self._check_type = _check_type
180
- self._spec_property_naming = _spec_property_naming
181
- self._path_to_item = _path_to_item
182
- self._configuration = _configuration
183
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
184
-
185
- for var_name, var_value in kwargs.items():
186
- if var_name not in self.attribute_map and \
187
- self._configuration is not None and \
188
- self._configuration.discard_unknown_keys and \
189
- self.additional_properties_type is None:
190
- # discard variable.
191
- continue
192
- setattr(self, var_name, var_value)
193
- return self
194
-
195
- required_properties = set([
196
- '_data_store',
197
- '_check_type',
198
- '_spec_property_naming',
199
- '_path_to_item',
200
- '_configuration',
201
- '_visited_composed_classes',
202
- ])
203
-
204
- @convert_js_args_to_python_args
205
- def __init__(self, *args, **kwargs): # noqa: E501
206
- """TemplateResponse - a model defined in OpenAPI
207
-
208
- Keyword Args:
209
- _check_type (bool): if True, values for parameters in openapi_types
210
- will be type checked and a TypeError will be
211
- raised if the wrong type is input.
212
- Defaults to True
213
- _path_to_item (tuple/list): This is a list of keys or values to
214
- drill down to the model in received_data
215
- when deserializing a response
216
- _spec_property_naming (bool): True if the variable names in the input data
217
- are serialized names, as specified in the OpenAPI document.
218
- False if the variable names in the input data
219
- are pythonic names, e.g. snake case (default)
220
- _configuration (Configuration): the instance to use when
221
- deserializing a file_type parameter.
222
- If passed, type conversion is attempted
223
- If omitted no type conversion is done.
224
- _visited_composed_classes (tuple): This stores a tuple of
225
- classes that we have traveled through so that
226
- if we see that class again we will not use its
227
- discriminator again.
228
- When traveling through a discriminator, the
229
- composed schema that is
230
- is traveled through is added to this set.
231
- For example if Animal has a discriminator
232
- petType and we pass in "Dog", and the class Dog
233
- allOf includes Animal, we move through Animal
234
- once using the discriminator, and pick Dog.
235
- Then in Dog, we will make an instance of the
236
- Animal class but this time we won't travel
237
- through its discriminator because we passed in
238
- _visited_composed_classes = (Animal,)
239
- data (ResourceOfTemplate): [optional] # noqa: E501
240
- warnings ([ProblemDetails]): [optional] # noqa: E501
241
- errors ([ProblemDetails]): [optional] # noqa: E501
242
- """
243
-
244
- _check_type = kwargs.pop('_check_type', True)
245
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
246
- _path_to_item = kwargs.pop('_path_to_item', ())
247
- _configuration = kwargs.pop('_configuration', None)
248
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
249
-
250
- if args:
251
- for arg in args:
252
- if isinstance(arg, dict):
253
- kwargs.update(arg)
254
- else:
255
- raise ApiTypeError(
256
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
257
- args,
258
- self.__class__.__name__,
259
- ),
260
- path_to_item=_path_to_item,
261
- valid_classes=(self.__class__,),
262
- )
263
-
264
- self._data_store = {}
265
- self._check_type = _check_type
266
- self._spec_property_naming = _spec_property_naming
267
- self._path_to_item = _path_to_item
268
- self._configuration = _configuration
269
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
270
-
271
- for var_name, var_value in kwargs.items():
272
- if var_name not in self.attribute_map and \
273
- self._configuration is not None and \
274
- self._configuration.discard_unknown_keys and \
275
- self.additional_properties_type is None:
276
- # discard variable.
277
- continue
278
- setattr(self, var_name, var_value)
279
- if var_name in self.read_only_vars:
280
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
281
- f"class with read only attributes.")
@@ -1,310 +0,0 @@
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.choice_variable_specification import ChoiceVariableSpecification
34
- from criteo_api_retailmedia_preview.model.files_variables_specification import FilesVariablesSpecification
35
- from criteo_api_retailmedia_preview.model.text_variable_specification import TextVariableSpecification
36
- globals()['ChoiceVariableSpecification'] = ChoiceVariableSpecification
37
- globals()['FilesVariablesSpecification'] = FilesVariablesSpecification
38
- globals()['TextVariableSpecification'] = TextVariableSpecification
39
-
40
-
41
- class TemplateVariable(ModelNormal):
42
- """NOTE: This class is auto generated by OpenAPI Generator.
43
- Ref: https://openapi-generator.tech
44
-
45
- Do not edit the class manually.
46
-
47
- Attributes:
48
- allowed_values (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
- with a capitalized key describing the allowed value and an allowed
51
- value. These dicts store the allowed enum values.
52
- attribute_map (dict): The key is attribute name
53
- and the value is json key in definition.
54
- discriminator_value_class_map (dict): A dict to go from the discriminator
55
- variable value to the discriminator class name.
56
- validations (dict): The key is the tuple path to the attribute
57
- and the for var_name this is (var_name,). The value is a dict
58
- that stores validations for max_length, min_length, max_items,
59
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
60
- inclusive_minimum, and regex.
61
- additional_properties_type (tuple): A tuple of classes accepted
62
- as additional properties values.
63
- """
64
-
65
- allowed_values = {
66
- ('type',): {
67
- 'TEXT': "Text",
68
- 'CHOICE': "Choice",
69
- 'COLOR': "Color",
70
- 'FILES': "Files",
71
- 'HYPERLINK': "Hyperlink",
72
- },
73
- }
74
-
75
- validations = {
76
- }
77
-
78
- @cached_property
79
- def additional_properties_type():
80
- """
81
- This must be a method because a model may have properties that are
82
- of type self, this must run after the class is loaded
83
- """
84
- lazy_import()
85
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
86
-
87
- _nullable = False
88
-
89
- @cached_property
90
- def openapi_types():
91
- """
92
- This must be a method because a model may have properties that are
93
- of type self, this must run after the class is loaded
94
-
95
- Returns
96
- openapi_types (dict): The key is attribute name
97
- and the value is attribute type.
98
- """
99
- lazy_import()
100
- return {
101
- 'id': (str,), # noqa: E501
102
- 'required': (bool,), # noqa: E501
103
- 'type': (str,), # noqa: E501
104
- 'choice_variable_specification': (ChoiceVariableSpecification,), # noqa: E501
105
- 'text_variable_specification': (TextVariableSpecification,), # noqa: E501
106
- 'files_variables_specification': (FilesVariablesSpecification,), # noqa: E501
107
- }
108
-
109
- @cached_property
110
- def discriminator():
111
- return None
112
-
113
-
114
- attribute_map = {
115
- 'id': 'id', # noqa: E501
116
- 'required': 'required', # noqa: E501
117
- 'type': 'type', # noqa: E501
118
- 'choice_variable_specification': 'choiceVariableSpecification', # noqa: E501
119
- 'text_variable_specification': 'textVariableSpecification', # noqa: E501
120
- 'files_variables_specification': 'filesVariablesSpecification', # noqa: E501
121
- }
122
-
123
- read_only_vars = {
124
- }
125
-
126
- _composed_schemas = {}
127
-
128
- @classmethod
129
- @convert_js_args_to_python_args
130
- def _from_openapi_data(cls, id, required, type, *args, **kwargs): # noqa: E501
131
- """TemplateVariable - a model defined in OpenAPI
132
-
133
- Args:
134
- id (str): The id of the variable
135
- required (bool): Whether the variable is required
136
- type (str): The type of the variable
137
-
138
- Keyword Args:
139
- _check_type (bool): if True, values for parameters in openapi_types
140
- will be type checked and a TypeError will be
141
- raised if the wrong type is input.
142
- Defaults to True
143
- _path_to_item (tuple/list): This is a list of keys or values to
144
- drill down to the model in received_data
145
- when deserializing a response
146
- _spec_property_naming (bool): True if the variable names in the input data
147
- are serialized names, as specified in the OpenAPI document.
148
- False if the variable names in the input data
149
- are pythonic names, e.g. snake case (default)
150
- _configuration (Configuration): the instance to use when
151
- deserializing a file_type parameter.
152
- If passed, type conversion is attempted
153
- If omitted no type conversion is done.
154
- _visited_composed_classes (tuple): This stores a tuple of
155
- classes that we have traveled through so that
156
- if we see that class again we will not use its
157
- discriminator again.
158
- When traveling through a discriminator, the
159
- composed schema that is
160
- is traveled through is added to this set.
161
- For example if Animal has a discriminator
162
- petType and we pass in "Dog", and the class Dog
163
- allOf includes Animal, we move through Animal
164
- once using the discriminator, and pick Dog.
165
- Then in Dog, we will make an instance of the
166
- Animal class but this time we won't travel
167
- through its discriminator because we passed in
168
- _visited_composed_classes = (Animal,)
169
- choice_variable_specification (ChoiceVariableSpecification): [optional] # noqa: E501
170
- text_variable_specification (TextVariableSpecification): [optional] # noqa: E501
171
- files_variables_specification (FilesVariablesSpecification): [optional] # noqa: E501
172
- """
173
-
174
- _check_type = kwargs.pop('_check_type', True)
175
- _spec_property_naming = kwargs.pop('_spec_property_naming', True)
176
- _path_to_item = kwargs.pop('_path_to_item', ())
177
- _configuration = kwargs.pop('_configuration', None)
178
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
179
-
180
- self = super(OpenApiModel, cls).__new__(cls)
181
-
182
- if args:
183
- for arg in args:
184
- if isinstance(arg, dict):
185
- kwargs.update(arg)
186
- else:
187
- raise ApiTypeError(
188
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
189
- args,
190
- self.__class__.__name__,
191
- ),
192
- path_to_item=_path_to_item,
193
- valid_classes=(self.__class__,),
194
- )
195
-
196
- self._data_store = {}
197
- self._check_type = _check_type
198
- self._spec_property_naming = _spec_property_naming
199
- self._path_to_item = _path_to_item
200
- self._configuration = _configuration
201
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
202
-
203
- self.id = id
204
- self.required = required
205
- self.type = type
206
- for var_name, var_value in kwargs.items():
207
- if var_name not in self.attribute_map and \
208
- self._configuration is not None and \
209
- self._configuration.discard_unknown_keys and \
210
- self.additional_properties_type is None:
211
- # discard variable.
212
- continue
213
- setattr(self, var_name, var_value)
214
- return self
215
-
216
- required_properties = set([
217
- '_data_store',
218
- '_check_type',
219
- '_spec_property_naming',
220
- '_path_to_item',
221
- '_configuration',
222
- '_visited_composed_classes',
223
- ])
224
-
225
- @convert_js_args_to_python_args
226
- def __init__(self, id, required, type, *args, **kwargs): # noqa: E501
227
- """TemplateVariable - a model defined in OpenAPI
228
-
229
- Args:
230
- id (str): The id of the variable
231
- required (bool): Whether the variable is required
232
- type (str): The type of the variable
233
-
234
- Keyword Args:
235
- _check_type (bool): if True, values for parameters in openapi_types
236
- will be type checked and a TypeError will be
237
- raised if the wrong type is input.
238
- Defaults to True
239
- _path_to_item (tuple/list): This is a list of keys or values to
240
- drill down to the model in received_data
241
- when deserializing a response
242
- _spec_property_naming (bool): True if the variable names in the input data
243
- are serialized names, as specified in the OpenAPI document.
244
- False if the variable names in the input data
245
- are pythonic names, e.g. snake case (default)
246
- _configuration (Configuration): the instance to use when
247
- deserializing a file_type parameter.
248
- If passed, type conversion is attempted
249
- If omitted no type conversion is done.
250
- _visited_composed_classes (tuple): This stores a tuple of
251
- classes that we have traveled through so that
252
- if we see that class again we will not use its
253
- discriminator again.
254
- When traveling through a discriminator, the
255
- composed schema that is
256
- is traveled through is added to this set.
257
- For example if Animal has a discriminator
258
- petType and we pass in "Dog", and the class Dog
259
- allOf includes Animal, we move through Animal
260
- once using the discriminator, and pick Dog.
261
- Then in Dog, we will make an instance of the
262
- Animal class but this time we won't travel
263
- through its discriminator because we passed in
264
- _visited_composed_classes = (Animal,)
265
- choice_variable_specification (ChoiceVariableSpecification): [optional] # noqa: E501
266
- text_variable_specification (TextVariableSpecification): [optional] # noqa: E501
267
- files_variables_specification (FilesVariablesSpecification): [optional] # noqa: E501
268
- """
269
-
270
- _check_type = kwargs.pop('_check_type', True)
271
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
272
- _path_to_item = kwargs.pop('_path_to_item', ())
273
- _configuration = kwargs.pop('_configuration', None)
274
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
275
-
276
- if args:
277
- for arg in args:
278
- if isinstance(arg, dict):
279
- kwargs.update(arg)
280
- else:
281
- raise ApiTypeError(
282
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
283
- args,
284
- self.__class__.__name__,
285
- ),
286
- path_to_item=_path_to_item,
287
- valid_classes=(self.__class__,),
288
- )
289
-
290
- self._data_store = {}
291
- self._check_type = _check_type
292
- self._spec_property_naming = _spec_property_naming
293
- self._path_to_item = _path_to_item
294
- self._configuration = _configuration
295
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
296
-
297
- self.id = id
298
- self.required = required
299
- self.type = type
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.")