criteo-api-retailmedia-sdk 2024.10.0.241029__py3-none-any.whl → 2024.10.0.250205__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 (82) hide show
  1. {criteo_api_retailmedia_sdk-2024.10.0.241029.dist-info → criteo_api_retailmedia_sdk-2024.10.0.250205.dist-info}/METADATA +14 -5
  2. {criteo_api_retailmedia_sdk-2024.10.0.241029.dist-info → criteo_api_retailmedia_sdk-2024.10.0.250205.dist-info}/RECORD +70 -81
  3. {criteo_api_retailmedia_sdk-2024.10.0.241029.dist-info → criteo_api_retailmedia_sdk-2024.10.0.250205.dist-info}/WHEEL +1 -1
  4. criteo_api_retailmedia_v2024_10/__init__.py +1 -1
  5. criteo_api_retailmedia_v2024_10/api/accounts_api.py +30 -41
  6. criteo_api_retailmedia_v2024_10/api/campaign_api.py +26 -285
  7. criteo_api_retailmedia_v2024_10/api_client.py +1 -1
  8. criteo_api_retailmedia_v2024_10/configuration.py +1 -1
  9. criteo_api_retailmedia_v2024_10/model/async_campaigns_report.py +44 -0
  10. criteo_api_retailmedia_v2024_10/model/async_line_items_report.py +44 -0
  11. criteo_api_retailmedia_v2024_10/model/async_revenue_report.py +29 -2
  12. criteo_api_retailmedia_v2024_10/model/balance_response_v2_response.py +1 -1
  13. criteo_api_retailmedia_v2024_10/model/change_details_v1.py +8 -18
  14. criteo_api_retailmedia_v2024_10/model/choice_option.py +1 -8
  15. criteo_api_retailmedia_v2024_10/model/choice_variable_specification.py +1 -8
  16. criteo_api_retailmedia_v2024_10/model/choice_variable_value.py +1 -7
  17. criteo_api_retailmedia_v2024_10/model/color_variable_value.py +7 -19
  18. criteo_api_retailmedia_v2024_10/model/{external_creative_v2.py → creative2.py} +23 -30
  19. criteo_api_retailmedia_v2024_10/model/creative202110.py +7 -13
  20. criteo_api_retailmedia_v2024_10/model/creative202110_list_response.py +13 -20
  21. criteo_api_retailmedia_v2024_10/model/creative202210.py +12 -19
  22. criteo_api_retailmedia_v2024_10/model/creative202210_response.py +10 -17
  23. criteo_api_retailmedia_v2024_10/model/{resource_outcome_of_retail_media_account.py → creative2_list_response.py} +9 -9
  24. criteo_api_retailmedia_v2024_10/model/{proposal_status_model_response.py → creative2_response.py} +20 -20
  25. criteo_api_retailmedia_v2024_10/model/creative_create_model202207.py +4 -11
  26. criteo_api_retailmedia_v2024_10/model/creative_update_model202207.py +4 -11
  27. criteo_api_retailmedia_v2024_10/model/{resource_of_creative_v2.py → entity_resource_of_retail_media_account.py} +14 -14
  28. criteo_api_retailmedia_v2024_10/model/{creative_v2_response.py → entity_resource_outcome_of_retail_media_account.py} +9 -9
  29. criteo_api_retailmedia_v2024_10/model/external_line_item_bid_multipliers_v2.py +1 -1
  30. criteo_api_retailmedia_v2024_10/model/{retail_media_account.py → external_retail_media_account.py} +29 -23
  31. criteo_api_retailmedia_v2024_10/model/{retail_media_brand_account_creation.py → external_retail_media_brand_account_creation.py} +18 -12
  32. criteo_api_retailmedia_v2024_10/model/{external_text_variable_value.py → external_retail_media_brands.py} +7 -7
  33. criteo_api_retailmedia_v2024_10/model/{external_hyperlink_variable_value.py → external_retail_media_seller.py} +12 -8
  34. criteo_api_retailmedia_v2024_10/model/external_retail_media_seller_account_creation.py +281 -0
  35. criteo_api_retailmedia_v2024_10/model/external_retailer.py +2 -0
  36. criteo_api_retailmedia_v2024_10/model/files_variable_value.py +2 -7
  37. criteo_api_retailmedia_v2024_10/model/files_variables_specification.py +7 -15
  38. criteo_api_retailmedia_v2024_10/model/hyperlink_variable_value.py +7 -19
  39. criteo_api_retailmedia_v2024_10/model/line_item_bid_multipliers_v2_request.py +1 -1
  40. criteo_api_retailmedia_v2024_10/model/line_item_bid_multipliers_v2_response.py +1 -1
  41. criteo_api_retailmedia_v2024_10/model/{external_page_type_environment.py → page_type_environment2.py} +4 -10
  42. criteo_api_retailmedia_v2024_10/model/{page_type_environment.py → page_type_environment202210.py} +12 -16
  43. criteo_api_retailmedia_v2024_10/model/{proposal_status_model_resource.py → resource_of_creative2.py} +14 -14
  44. criteo_api_retailmedia_v2024_10/model/resource_of_creative202110.py +6 -13
  45. criteo_api_retailmedia_v2024_10/model/resource_of_creative202210.py +2 -9
  46. criteo_api_retailmedia_v2024_10/model/resource_of_line_item_bid_multipliers_v2.py +1 -1
  47. criteo_api_retailmedia_v2024_10/model/resource_of_preferred_line_item_v2.py +1 -1
  48. criteo_api_retailmedia_v2024_10/model/resource_of_template.py +2 -9
  49. criteo_api_retailmedia_v2024_10/model/retail_media_contactlist_amendment.py +31 -18
  50. criteo_api_retailmedia_v2024_10/model/section.py +6 -9
  51. criteo_api_retailmedia_v2024_10/model/template.py +13 -24
  52. criteo_api_retailmedia_v2024_10/model/template_list_response.py +13 -20
  53. criteo_api_retailmedia_v2024_10/model/template_response.py +10 -17
  54. criteo_api_retailmedia_v2024_10/model/template_variable.py +1 -8
  55. criteo_api_retailmedia_v2024_10/model/template_variable_value.py +7 -8
  56. criteo_api_retailmedia_v2024_10/model/text_variable_specification.py +2 -8
  57. criteo_api_retailmedia_v2024_10/model/text_variable_value.py +7 -19
  58. criteo_api_retailmedia_v2024_10/model/value_resource_collection_input_of_retail_media_seller.py +12 -5
  59. criteo_api_retailmedia_v2024_10/model/value_resource_collection_outcome_of_retail_media_seller.py +9 -2
  60. criteo_api_retailmedia_v2024_10/model/value_resource_input_of_retail_media_brand_account_creation.py +8 -1
  61. criteo_api_retailmedia_v2024_10/model/value_resource_input_of_retail_media_brands.py +9 -2
  62. criteo_api_retailmedia_v2024_10/model/value_resource_input_of_retail_media_seller_account_creation.py +9 -2
  63. criteo_api_retailmedia_v2024_10/model/value_resource_of_retail_media_brand_account_creation.py +13 -6
  64. criteo_api_retailmedia_v2024_10/model/value_resource_of_retail_media_brands.py +14 -7
  65. criteo_api_retailmedia_v2024_10/model/value_resource_of_retail_media_seller.py +14 -7
  66. criteo_api_retailmedia_v2024_10/model/value_resource_of_retail_media_seller_account_creation.py +14 -7
  67. criteo_api_retailmedia_v2024_10/model/{creative_v2_list_response.py → value_resource_outcome_of_retail_media_brands.py} +9 -9
  68. criteo_api_retailmedia_v2024_10/model/{external_video_variable_value.py → video_variable_value.py} +4 -10
  69. criteo_api_retailmedia_v2024_10/models/__init__.py +15 -26
  70. criteo_api_retailmedia_v2024_10/model/approval_status_model.py +0 -292
  71. criteo_api_retailmedia_v2024_10/model/external_choice_variable_value.py +0 -269
  72. criteo_api_retailmedia_v2024_10/model/external_color_variable_value.py +0 -268
  73. criteo_api_retailmedia_v2024_10/model/external_files_variable_value.py +0 -272
  74. criteo_api_retailmedia_v2024_10/model/external_template_variable_value.py +0 -309
  75. criteo_api_retailmedia_v2024_10/model/negotiation_state_model.py +0 -293
  76. criteo_api_retailmedia_v2024_10/model/proposal_status_model.py +0 -284
  77. criteo_api_retailmedia_v2024_10/model/resource_of_retail_media_account.py +0 -270
  78. criteo_api_retailmedia_v2024_10/model/retail_media_brands.py +0 -257
  79. criteo_api_retailmedia_v2024_10/model/retail_media_contactlist_amendment_attributes.py +0 -292
  80. criteo_api_retailmedia_v2024_10/model/retail_media_seller.py +0 -261
  81. criteo_api_retailmedia_v2024_10/model/retail_media_seller_account_creation.py +0 -274
  82. {criteo_api_retailmedia_sdk-2024.10.0.241029.dist-info → criteo_api_retailmedia_sdk-2024.10.0.250205.dist-info}/top_level.txt +0 -0
@@ -1,272 +0,0 @@
1
- """
2
- Criteo API
3
-
4
- Criteo API - RetailMedia # noqa: E501
5
-
6
- The version of the OpenAPI document: 2024-10
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_v2024_10.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_v2024_10.exceptions import ApiAttributeError
30
-
31
-
32
-
33
- class ExternalFilesVariableValue(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
- ('asset_ids',): {
62
- 'min_items': 1,
63
- },
64
- }
65
-
66
- @cached_property
67
- def additional_properties_type():
68
- """
69
- This must be a method because a model may have properties that are
70
- of type self, this must run after the class is loaded
71
- """
72
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
73
-
74
- _nullable = False
75
-
76
- @cached_property
77
- def openapi_types():
78
- """
79
- This must be a method because a model may have properties that are
80
- of type self, this must run after the class is loaded
81
-
82
- Returns
83
- openapi_types (dict): The key is attribute name
84
- and the value is attribute type.
85
- """
86
- return {
87
- 'asset_ids': ([str],), # noqa: E501
88
- }
89
-
90
- @cached_property
91
- def discriminator():
92
- return None
93
-
94
-
95
- attribute_map = {
96
- 'asset_ids': 'assetIds', # noqa: E501
97
- }
98
-
99
- read_only_vars = {
100
- }
101
-
102
- _composed_schemas = {}
103
-
104
- @classmethod
105
- @convert_js_args_to_python_args
106
- def _from_openapi_data(cls, asset_ids, *args, **kwargs): # noqa: E501
107
- """ExternalFilesVariableValue - a model defined in OpenAPI
108
-
109
- Args:
110
- asset_ids ([str]): The assets representing the images to be displayed
111
-
112
- Keyword Args:
113
- _check_type (bool): if True, values for parameters in openapi_types
114
- will be type checked and a TypeError will be
115
- raised if the wrong type is input.
116
- Defaults to True
117
- _path_to_item (tuple/list): This is a list of keys or values to
118
- drill down to the model in received_data
119
- when deserializing a response
120
- _spec_property_naming (bool): True if the variable names in the input data
121
- are serialized names, as specified in the OpenAPI document.
122
- False if the variable names in the input data
123
- are pythonic names, e.g. snake case (default)
124
- _configuration (Configuration): the instance to use when
125
- deserializing a file_type parameter.
126
- If passed, type conversion is attempted
127
- If omitted no type conversion is done.
128
- _visited_composed_classes (tuple): This stores a tuple of
129
- classes that we have traveled through so that
130
- if we see that class again we will not use its
131
- discriminator again.
132
- When traveling through a discriminator, the
133
- composed schema that is
134
- is traveled through is added to this set.
135
- For example if Animal has a discriminator
136
- petType and we pass in "Dog", and the class Dog
137
- allOf includes Animal, we move through Animal
138
- once using the discriminator, and pick Dog.
139
- Then in Dog, we will make an instance of the
140
- Animal class but this time we won't travel
141
- through its discriminator because we passed in
142
- _visited_composed_classes = (Animal,)
143
- """
144
-
145
- _check_type = kwargs.pop('_check_type', True)
146
- _spec_property_naming = kwargs.pop('_spec_property_naming', True)
147
- _path_to_item = kwargs.pop('_path_to_item', ())
148
- _configuration = kwargs.pop('_configuration', None)
149
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
150
-
151
- self = super(OpenApiModel, cls).__new__(cls)
152
-
153
- if args:
154
- for arg in args:
155
- if isinstance(arg, dict):
156
- kwargs.update(arg)
157
- else:
158
- raise ApiTypeError(
159
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
160
- args,
161
- self.__class__.__name__,
162
- ),
163
- path_to_item=_path_to_item,
164
- valid_classes=(self.__class__,),
165
- )
166
-
167
- self._data_store = {}
168
- self._check_type = _check_type
169
- self._spec_property_naming = _spec_property_naming
170
- self._path_to_item = _path_to_item
171
- self._configuration = _configuration
172
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
173
-
174
- self.asset_ids = asset_ids
175
- for var_name, var_value in kwargs.items():
176
- if var_name not in self.attribute_map and \
177
- self._configuration is not None and \
178
- self._configuration.discard_unknown_keys and \
179
- self.additional_properties_type is None:
180
- # discard variable.
181
- continue
182
- setattr(self, var_name, var_value)
183
- return self
184
-
185
- required_properties = set([
186
- '_data_store',
187
- '_check_type',
188
- '_spec_property_naming',
189
- '_path_to_item',
190
- '_configuration',
191
- '_visited_composed_classes',
192
- ])
193
-
194
- @convert_js_args_to_python_args
195
- def __init__(self, asset_ids, *args, **kwargs): # noqa: E501
196
- """ExternalFilesVariableValue - a model defined in OpenAPI
197
-
198
- Args:
199
- asset_ids ([str]): The assets representing the images to be displayed
200
-
201
- Keyword Args:
202
- _check_type (bool): if True, values for parameters in openapi_types
203
- will be type checked and a TypeError will be
204
- raised if the wrong type is input.
205
- Defaults to True
206
- _path_to_item (tuple/list): This is a list of keys or values to
207
- drill down to the model in received_data
208
- when deserializing a response
209
- _spec_property_naming (bool): True if the variable names in the input data
210
- are serialized names, as specified in the OpenAPI document.
211
- False if the variable names in the input data
212
- are pythonic names, e.g. snake case (default)
213
- _configuration (Configuration): the instance to use when
214
- deserializing a file_type parameter.
215
- If passed, type conversion is attempted
216
- If omitted no type conversion is done.
217
- _visited_composed_classes (tuple): This stores a tuple of
218
- classes that we have traveled through so that
219
- if we see that class again we will not use its
220
- discriminator again.
221
- When traveling through a discriminator, the
222
- composed schema that is
223
- is traveled through is added to this set.
224
- For example if Animal has a discriminator
225
- petType and we pass in "Dog", and the class Dog
226
- allOf includes Animal, we move through Animal
227
- once using the discriminator, and pick Dog.
228
- Then in Dog, we will make an instance of the
229
- Animal class but this time we won't travel
230
- through its discriminator because we passed in
231
- _visited_composed_classes = (Animal,)
232
- """
233
-
234
- _check_type = kwargs.pop('_check_type', True)
235
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
236
- _path_to_item = kwargs.pop('_path_to_item', ())
237
- _configuration = kwargs.pop('_configuration', None)
238
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
239
-
240
- if args:
241
- for arg in args:
242
- if isinstance(arg, dict):
243
- kwargs.update(arg)
244
- else:
245
- raise ApiTypeError(
246
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
247
- args,
248
- self.__class__.__name__,
249
- ),
250
- path_to_item=_path_to_item,
251
- valid_classes=(self.__class__,),
252
- )
253
-
254
- self._data_store = {}
255
- self._check_type = _check_type
256
- self._spec_property_naming = _spec_property_naming
257
- self._path_to_item = _path_to_item
258
- self._configuration = _configuration
259
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
260
-
261
- self.asset_ids = asset_ids
262
- for var_name, var_value in kwargs.items():
263
- if var_name not in self.attribute_map and \
264
- self._configuration is not None and \
265
- self._configuration.discard_unknown_keys and \
266
- self.additional_properties_type is None:
267
- # discard variable.
268
- continue
269
- setattr(self, var_name, var_value)
270
- if var_name in self.read_only_vars:
271
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
272
- f"class with read only attributes.")
@@ -1,309 +0,0 @@
1
- """
2
- Criteo API
3
-
4
- Criteo API - RetailMedia # noqa: E501
5
-
6
- The version of the OpenAPI document: 2024-10
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_v2024_10.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_v2024_10.exceptions import ApiAttributeError
30
-
31
-
32
- def lazy_import():
33
- from criteo_api_retailmedia_v2024_10.model.external_choice_variable_value import ExternalChoiceVariableValue
34
- from criteo_api_retailmedia_v2024_10.model.external_color_variable_value import ExternalColorVariableValue
35
- from criteo_api_retailmedia_v2024_10.model.external_files_variable_value import ExternalFilesVariableValue
36
- from criteo_api_retailmedia_v2024_10.model.external_hyperlink_variable_value import ExternalHyperlinkVariableValue
37
- from criteo_api_retailmedia_v2024_10.model.external_text_variable_value import ExternalTextVariableValue
38
- from criteo_api_retailmedia_v2024_10.model.external_video_variable_value import ExternalVideoVariableValue
39
- globals()['ExternalChoiceVariableValue'] = ExternalChoiceVariableValue
40
- globals()['ExternalColorVariableValue'] = ExternalColorVariableValue
41
- globals()['ExternalFilesVariableValue'] = ExternalFilesVariableValue
42
- globals()['ExternalHyperlinkVariableValue'] = ExternalHyperlinkVariableValue
43
- globals()['ExternalTextVariableValue'] = ExternalTextVariableValue
44
- globals()['ExternalVideoVariableValue'] = ExternalVideoVariableValue
45
-
46
-
47
- class ExternalTemplateVariableValue(ModelNormal):
48
- """NOTE: This class is auto generated by OpenAPI Generator.
49
- Ref: https://openapi-generator.tech
50
-
51
- Do not edit the class manually.
52
-
53
- Attributes:
54
- allowed_values (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
- with a capitalized key describing the allowed value and an allowed
57
- value. These dicts store the allowed enum values.
58
- attribute_map (dict): The key is attribute name
59
- and the value is json key in definition.
60
- discriminator_value_class_map (dict): A dict to go from the discriminator
61
- variable value to the discriminator class name.
62
- validations (dict): The key is the tuple path to the attribute
63
- and the for var_name this is (var_name,). The value is a dict
64
- that stores validations for max_length, min_length, max_items,
65
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
66
- inclusive_minimum, and regex.
67
- additional_properties_type (tuple): A tuple of classes accepted
68
- as additional properties values.
69
- """
70
-
71
- allowed_values = {
72
- }
73
-
74
- validations = {
75
- }
76
-
77
- @cached_property
78
- def additional_properties_type():
79
- """
80
- This must be a method because a model may have properties that are
81
- of type self, this must run after the class is loaded
82
- """
83
- lazy_import()
84
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
85
-
86
- _nullable = False
87
-
88
- @cached_property
89
- def openapi_types():
90
- """
91
- This must be a method because a model may have properties that are
92
- of type self, this must run after the class is loaded
93
-
94
- Returns
95
- openapi_types (dict): The key is attribute name
96
- and the value is attribute type.
97
- """
98
- lazy_import()
99
- return {
100
- 'id': (str,), # noqa: E501
101
- 'text_variable_value': (ExternalTextVariableValue,), # noqa: E501
102
- 'choice_variable_value': (ExternalChoiceVariableValue,), # noqa: E501
103
- 'color_variable_value': (ExternalColorVariableValue,), # noqa: E501
104
- 'files_variable_value': (ExternalFilesVariableValue,), # noqa: E501
105
- 'hyperlink_variable_value': (ExternalHyperlinkVariableValue,), # noqa: E501
106
- 'video_variable_value': (ExternalVideoVariableValue,), # noqa: E501
107
- }
108
-
109
- @cached_property
110
- def discriminator():
111
- return None
112
-
113
-
114
- attribute_map = {
115
- 'id': 'id', # noqa: E501
116
- 'text_variable_value': 'textVariableValue', # noqa: E501
117
- 'choice_variable_value': 'choiceVariableValue', # noqa: E501
118
- 'color_variable_value': 'colorVariableValue', # noqa: E501
119
- 'files_variable_value': 'filesVariableValue', # noqa: E501
120
- 'hyperlink_variable_value': 'hyperlinkVariableValue', # noqa: E501
121
- 'video_variable_value': 'videoVariableValue', # noqa: E501
122
- }
123
-
124
- read_only_vars = {
125
- }
126
-
127
- _composed_schemas = {}
128
-
129
- @classmethod
130
- @convert_js_args_to_python_args
131
- def _from_openapi_data(cls, id, *args, **kwargs): # noqa: E501
132
- """ExternalTemplateVariableValue - a model defined in OpenAPI
133
-
134
- Args:
135
- id (str): The id of the template variable the value is applied to
136
-
137
- Keyword Args:
138
- _check_type (bool): if True, values for parameters in openapi_types
139
- will be type checked and a TypeError will be
140
- raised if the wrong type is input.
141
- Defaults to True
142
- _path_to_item (tuple/list): This is a list of keys or values to
143
- drill down to the model in received_data
144
- when deserializing a response
145
- _spec_property_naming (bool): True if the variable names in the input data
146
- are serialized names, as specified in the OpenAPI document.
147
- False if the variable names in the input data
148
- are pythonic names, e.g. snake case (default)
149
- _configuration (Configuration): the instance to use when
150
- deserializing a file_type parameter.
151
- If passed, type conversion is attempted
152
- If omitted no type conversion is done.
153
- _visited_composed_classes (tuple): This stores a tuple of
154
- classes that we have traveled through so that
155
- if we see that class again we will not use its
156
- discriminator again.
157
- When traveling through a discriminator, the
158
- composed schema that is
159
- is traveled through is added to this set.
160
- For example if Animal has a discriminator
161
- petType and we pass in "Dog", and the class Dog
162
- allOf includes Animal, we move through Animal
163
- once using the discriminator, and pick Dog.
164
- Then in Dog, we will make an instance of the
165
- Animal class but this time we won't travel
166
- through its discriminator because we passed in
167
- _visited_composed_classes = (Animal,)
168
- text_variable_value (ExternalTextVariableValue): [optional] # noqa: E501
169
- choice_variable_value (ExternalChoiceVariableValue): [optional] # noqa: E501
170
- color_variable_value (ExternalColorVariableValue): [optional] # noqa: E501
171
- files_variable_value (ExternalFilesVariableValue): [optional] # noqa: E501
172
- hyperlink_variable_value (ExternalHyperlinkVariableValue): [optional] # noqa: E501
173
- video_variable_value (ExternalVideoVariableValue): [optional] # noqa: E501
174
- """
175
-
176
- _check_type = kwargs.pop('_check_type', True)
177
- _spec_property_naming = kwargs.pop('_spec_property_naming', True)
178
- _path_to_item = kwargs.pop('_path_to_item', ())
179
- _configuration = kwargs.pop('_configuration', None)
180
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
181
-
182
- self = super(OpenApiModel, cls).__new__(cls)
183
-
184
- if args:
185
- for arg in args:
186
- if isinstance(arg, dict):
187
- kwargs.update(arg)
188
- else:
189
- raise ApiTypeError(
190
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
191
- args,
192
- self.__class__.__name__,
193
- ),
194
- path_to_item=_path_to_item,
195
- valid_classes=(self.__class__,),
196
- )
197
-
198
- self._data_store = {}
199
- self._check_type = _check_type
200
- self._spec_property_naming = _spec_property_naming
201
- self._path_to_item = _path_to_item
202
- self._configuration = _configuration
203
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
204
-
205
- self.id = id
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, *args, **kwargs): # noqa: E501
227
- """ExternalTemplateVariableValue - a model defined in OpenAPI
228
-
229
- Args:
230
- id (str): The id of the template variable the value is applied to
231
-
232
- Keyword Args:
233
- _check_type (bool): if True, values for parameters in openapi_types
234
- will be type checked and a TypeError will be
235
- raised if the wrong type is input.
236
- Defaults to True
237
- _path_to_item (tuple/list): This is a list of keys or values to
238
- drill down to the model in received_data
239
- when deserializing a response
240
- _spec_property_naming (bool): True if the variable names in the input data
241
- are serialized names, as specified in the OpenAPI document.
242
- False if the variable names in the input data
243
- are pythonic names, e.g. snake case (default)
244
- _configuration (Configuration): the instance to use when
245
- deserializing a file_type parameter.
246
- If passed, type conversion is attempted
247
- If omitted no type conversion is done.
248
- _visited_composed_classes (tuple): This stores a tuple of
249
- classes that we have traveled through so that
250
- if we see that class again we will not use its
251
- discriminator again.
252
- When traveling through a discriminator, the
253
- composed schema that is
254
- is traveled through is added to this set.
255
- For example if Animal has a discriminator
256
- petType and we pass in "Dog", and the class Dog
257
- allOf includes Animal, we move through Animal
258
- once using the discriminator, and pick Dog.
259
- Then in Dog, we will make an instance of the
260
- Animal class but this time we won't travel
261
- through its discriminator because we passed in
262
- _visited_composed_classes = (Animal,)
263
- text_variable_value (ExternalTextVariableValue): [optional] # noqa: E501
264
- choice_variable_value (ExternalChoiceVariableValue): [optional] # noqa: E501
265
- color_variable_value (ExternalColorVariableValue): [optional] # noqa: E501
266
- files_variable_value (ExternalFilesVariableValue): [optional] # noqa: E501
267
- hyperlink_variable_value (ExternalHyperlinkVariableValue): [optional] # noqa: E501
268
- video_variable_value (ExternalVideoVariableValue): [optional] # noqa: E501
269
- """
270
-
271
- _check_type = kwargs.pop('_check_type', True)
272
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
273
- _path_to_item = kwargs.pop('_path_to_item', ())
274
- _configuration = kwargs.pop('_configuration', None)
275
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
276
-
277
- if args:
278
- for arg in args:
279
- if isinstance(arg, dict):
280
- kwargs.update(arg)
281
- else:
282
- raise ApiTypeError(
283
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
284
- args,
285
- self.__class__.__name__,
286
- ),
287
- path_to_item=_path_to_item,
288
- valid_classes=(self.__class__,),
289
- )
290
-
291
- self._data_store = {}
292
- self._check_type = _check_type
293
- self._spec_property_naming = _spec_property_naming
294
- self._path_to_item = _path_to_item
295
- self._configuration = _configuration
296
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
297
-
298
- self.id = id
299
- for var_name, var_value in kwargs.items():
300
- if var_name not in self.attribute_map and \
301
- self._configuration is not None and \
302
- self._configuration.discard_unknown_keys and \
303
- self.additional_properties_type is None:
304
- # discard variable.
305
- continue
306
- setattr(self, var_name, var_value)
307
- if var_name in self.read_only_vars:
308
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
309
- f"class with read only attributes.")