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,290 +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
-
33
- class FilesVariablesSpecification(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
- ('extensions',): {
59
- 'UNKNOWN': "Unknown",
60
- 'JPEG': "Jpeg",
61
- 'PNG': "Png",
62
- 'GIF': "Gif",
63
- 'PDF': "Pdf",
64
- },
65
- }
66
-
67
- validations = {
68
- }
69
-
70
- @cached_property
71
- def additional_properties_type():
72
- """
73
- This must be a method because a model may have properties that are
74
- of type self, this must run after the class is loaded
75
- """
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
- return {
91
- 'extensions': ([str],), # noqa: E501
92
- 'min_files': (int, none_type,), # noqa: E501
93
- 'max_bytes': (int, none_type,), # noqa: E501
94
- 'max_file': (int, none_type,), # noqa: E501
95
- }
96
-
97
- @cached_property
98
- def discriminator():
99
- return None
100
-
101
-
102
- attribute_map = {
103
- 'extensions': 'extensions', # noqa: E501
104
- 'min_files': 'minFiles', # noqa: E501
105
- 'max_bytes': 'maxBytes', # noqa: E501
106
- 'max_file': 'maxFile', # noqa: E501
107
- }
108
-
109
- read_only_vars = {
110
- }
111
-
112
- _composed_schemas = {}
113
-
114
- @classmethod
115
- @convert_js_args_to_python_args
116
- def _from_openapi_data(cls, extensions, min_files, *args, **kwargs): # noqa: E501
117
- """FilesVariablesSpecification - a model defined in OpenAPI
118
-
119
- Args:
120
- extensions ([str]): The accepted file extensions
121
- min_files (int, none_type): The minimum amount of files requires
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
- max_bytes (int, none_type): The maximum amount of bytes per file. [optional] # noqa: E501
155
- max_file (int, none_type): The maximum amount of files required. [optional] # noqa: E501
156
- """
157
-
158
- _check_type = kwargs.pop('_check_type', True)
159
- _spec_property_naming = kwargs.pop('_spec_property_naming', True)
160
- _path_to_item = kwargs.pop('_path_to_item', ())
161
- _configuration = kwargs.pop('_configuration', None)
162
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
163
-
164
- self = super(OpenApiModel, cls).__new__(cls)
165
-
166
- if args:
167
- for arg in args:
168
- if isinstance(arg, dict):
169
- kwargs.update(arg)
170
- else:
171
- raise ApiTypeError(
172
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
173
- args,
174
- self.__class__.__name__,
175
- ),
176
- path_to_item=_path_to_item,
177
- valid_classes=(self.__class__,),
178
- )
179
-
180
- self._data_store = {}
181
- self._check_type = _check_type
182
- self._spec_property_naming = _spec_property_naming
183
- self._path_to_item = _path_to_item
184
- self._configuration = _configuration
185
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
186
-
187
- self.extensions = extensions
188
- self.min_files = min_files
189
- for var_name, var_value in kwargs.items():
190
- if var_name not in self.attribute_map and \
191
- self._configuration is not None and \
192
- self._configuration.discard_unknown_keys and \
193
- self.additional_properties_type is None:
194
- # discard variable.
195
- continue
196
- setattr(self, var_name, var_value)
197
- return self
198
-
199
- required_properties = set([
200
- '_data_store',
201
- '_check_type',
202
- '_spec_property_naming',
203
- '_path_to_item',
204
- '_configuration',
205
- '_visited_composed_classes',
206
- ])
207
-
208
- @convert_js_args_to_python_args
209
- def __init__(self, extensions, min_files, *args, **kwargs): # noqa: E501
210
- """FilesVariablesSpecification - a model defined in OpenAPI
211
-
212
- Args:
213
- extensions ([str]): The accepted file extensions
214
- min_files (int, none_type): The minimum amount of files requires
215
-
216
- Keyword Args:
217
- _check_type (bool): if True, values for parameters in openapi_types
218
- will be type checked and a TypeError will be
219
- raised if the wrong type is input.
220
- Defaults to True
221
- _path_to_item (tuple/list): This is a list of keys or values to
222
- drill down to the model in received_data
223
- when deserializing a response
224
- _spec_property_naming (bool): True if the variable names in the input data
225
- are serialized names, as specified in the OpenAPI document.
226
- False if the variable names in the input data
227
- are pythonic names, e.g. snake case (default)
228
- _configuration (Configuration): the instance to use when
229
- deserializing a file_type parameter.
230
- If passed, type conversion is attempted
231
- If omitted no type conversion is done.
232
- _visited_composed_classes (tuple): This stores a tuple of
233
- classes that we have traveled through so that
234
- if we see that class again we will not use its
235
- discriminator again.
236
- When traveling through a discriminator, the
237
- composed schema that is
238
- is traveled through is added to this set.
239
- For example if Animal has a discriminator
240
- petType and we pass in "Dog", and the class Dog
241
- allOf includes Animal, we move through Animal
242
- once using the discriminator, and pick Dog.
243
- Then in Dog, we will make an instance of the
244
- Animal class but this time we won't travel
245
- through its discriminator because we passed in
246
- _visited_composed_classes = (Animal,)
247
- max_bytes (int, none_type): The maximum amount of bytes per file. [optional] # noqa: E501
248
- max_file (int, none_type): The maximum amount of files required. [optional] # noqa: E501
249
- """
250
-
251
- _check_type = kwargs.pop('_check_type', True)
252
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
253
- _path_to_item = kwargs.pop('_path_to_item', ())
254
- _configuration = kwargs.pop('_configuration', None)
255
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
256
-
257
- if args:
258
- for arg in args:
259
- if isinstance(arg, dict):
260
- kwargs.update(arg)
261
- else:
262
- raise ApiTypeError(
263
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
264
- args,
265
- self.__class__.__name__,
266
- ),
267
- path_to_item=_path_to_item,
268
- valid_classes=(self.__class__,),
269
- )
270
-
271
- self._data_store = {}
272
- self._check_type = _check_type
273
- self._spec_property_naming = _spec_property_naming
274
- self._path_to_item = _path_to_item
275
- self._configuration = _configuration
276
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
277
-
278
- self.extensions = extensions
279
- self.min_files = min_files
280
- for var_name, var_value in kwargs.items():
281
- if var_name not in self.attribute_map and \
282
- self._configuration is not None and \
283
- self._configuration.discard_unknown_keys and \
284
- self.additional_properties_type is None:
285
- # discard variable.
286
- continue
287
- setattr(self, var_name, var_value)
288
- if var_name in self.read_only_vars:
289
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
290
- f"class with read only attributes.")
@@ -1,295 +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.common_error import CommonError
34
- from criteo_api_retailmedia_preview.model.common_warning import CommonWarning
35
- from criteo_api_retailmedia_preview.model.page_metadata import PageMetadata
36
- from criteo_api_retailmedia_preview.model.retail_media_audience import RetailMediaAudience
37
- globals()['CommonError'] = CommonError
38
- globals()['CommonWarning'] = CommonWarning
39
- globals()['PageMetadata'] = PageMetadata
40
- globals()['RetailMediaAudience'] = RetailMediaAudience
41
-
42
-
43
- class GetPageOfAudiencesByAccountIdResponse(ModelNormal):
44
- """NOTE: This class is auto generated by OpenAPI Generator.
45
- Ref: https://openapi-generator.tech
46
-
47
- Do not edit the class manually.
48
-
49
- Attributes:
50
- allowed_values (dict): The key is the tuple path to the attribute
51
- and the for var_name this is (var_name,). The value is a dict
52
- with a capitalized key describing the allowed value and an allowed
53
- value. These dicts store the allowed enum values.
54
- attribute_map (dict): The key is attribute name
55
- and the value is json key in definition.
56
- discriminator_value_class_map (dict): A dict to go from the discriminator
57
- variable value to the discriminator class name.
58
- validations (dict): The key is the tuple path to the attribute
59
- and the for var_name this is (var_name,). The value is a dict
60
- that stores validations for max_length, min_length, max_items,
61
- min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
62
- inclusive_minimum, and regex.
63
- additional_properties_type (tuple): A tuple of classes accepted
64
- as additional properties values.
65
- """
66
-
67
- allowed_values = {
68
- }
69
-
70
- validations = {
71
- }
72
-
73
- @cached_property
74
- def additional_properties_type():
75
- """
76
- This must be a method because a model may have properties that are
77
- of type self, this must run after the class is loaded
78
- """
79
- lazy_import()
80
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
81
-
82
- _nullable = False
83
-
84
- @cached_property
85
- def openapi_types():
86
- """
87
- This must be a method because a model may have properties that are
88
- of type self, this must run after the class is loaded
89
-
90
- Returns
91
- openapi_types (dict): The key is attribute name
92
- and the value is attribute type.
93
- """
94
- lazy_import()
95
- return {
96
- 'data': ([RetailMediaAudience],), # noqa: E501
97
- 'metadata': (PageMetadata,), # noqa: E501
98
- 'errors': ([CommonError], none_type,), # noqa: E501
99
- 'warnings': ([CommonWarning], none_type,), # noqa: E501
100
- }
101
-
102
- @cached_property
103
- def discriminator():
104
- return None
105
-
106
-
107
- attribute_map = {
108
- 'data': 'data', # noqa: E501
109
- 'metadata': 'metadata', # noqa: E501
110
- 'errors': 'errors', # noqa: E501
111
- 'warnings': 'warnings', # noqa: E501
112
- }
113
-
114
- read_only_vars = {
115
- 'data', # noqa: E501
116
- 'errors', # noqa: E501
117
- 'warnings', # noqa: E501
118
- }
119
-
120
- _composed_schemas = {}
121
-
122
- @classmethod
123
- @convert_js_args_to_python_args
124
- def _from_openapi_data(cls, data, metadata, *args, **kwargs): # noqa: E501
125
- """GetPageOfAudiencesByAccountIdResponse - a model defined in OpenAPI
126
-
127
- Args:
128
- data ([RetailMediaAudience]): data
129
- metadata (PageMetadata):
130
-
131
- Keyword Args:
132
- _check_type (bool): if True, values for parameters in openapi_types
133
- will be type checked and a TypeError will be
134
- raised if the wrong type is input.
135
- Defaults to True
136
- _path_to_item (tuple/list): This is a list of keys or values to
137
- drill down to the model in received_data
138
- when deserializing a response
139
- _spec_property_naming (bool): True if the variable names in the input data
140
- are serialized names, as specified in the OpenAPI document.
141
- False if the variable names in the input data
142
- are pythonic names, e.g. snake case (default)
143
- _configuration (Configuration): the instance to use when
144
- deserializing a file_type parameter.
145
- If passed, type conversion is attempted
146
- If omitted no type conversion is done.
147
- _visited_composed_classes (tuple): This stores a tuple of
148
- classes that we have traveled through so that
149
- if we see that class again we will not use its
150
- discriminator again.
151
- When traveling through a discriminator, the
152
- composed schema that is
153
- is traveled through is added to this set.
154
- For example if Animal has a discriminator
155
- petType and we pass in "Dog", and the class Dog
156
- allOf includes Animal, we move through Animal
157
- once using the discriminator, and pick Dog.
158
- Then in Dog, we will make an instance of the
159
- Animal class but this time we won't travel
160
- through its discriminator because we passed in
161
- _visited_composed_classes = (Animal,)
162
- errors ([CommonError], none_type): errors. [optional] # noqa: E501
163
- warnings ([CommonWarning], none_type): warnings. [optional] # noqa: E501
164
- """
165
-
166
- _check_type = kwargs.pop('_check_type', True)
167
- _spec_property_naming = kwargs.pop('_spec_property_naming', True)
168
- _path_to_item = kwargs.pop('_path_to_item', ())
169
- _configuration = kwargs.pop('_configuration', None)
170
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
171
-
172
- self = super(OpenApiModel, cls).__new__(cls)
173
-
174
- if args:
175
- for arg in args:
176
- if isinstance(arg, dict):
177
- kwargs.update(arg)
178
- else:
179
- raise ApiTypeError(
180
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
181
- args,
182
- self.__class__.__name__,
183
- ),
184
- path_to_item=_path_to_item,
185
- valid_classes=(self.__class__,),
186
- )
187
-
188
- self._data_store = {}
189
- self._check_type = _check_type
190
- self._spec_property_naming = _spec_property_naming
191
- self._path_to_item = _path_to_item
192
- self._configuration = _configuration
193
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
194
-
195
- self.data = data
196
- self.metadata = metadata
197
- for var_name, var_value in kwargs.items():
198
- if var_name not in self.attribute_map and \
199
- self._configuration is not None and \
200
- self._configuration.discard_unknown_keys and \
201
- self.additional_properties_type is None:
202
- # discard variable.
203
- continue
204
- setattr(self, var_name, var_value)
205
- return self
206
-
207
- required_properties = set([
208
- '_data_store',
209
- '_check_type',
210
- '_spec_property_naming',
211
- '_path_to_item',
212
- '_configuration',
213
- '_visited_composed_classes',
214
- ])
215
-
216
- @convert_js_args_to_python_args
217
- def __init__(self, metadata, *args, **kwargs): # noqa: E501
218
- """GetPageOfAudiencesByAccountIdResponse - a model defined in OpenAPI
219
-
220
- metadata (PageMetadata):
221
-
222
- Keyword Args:
223
- _check_type (bool): if True, values for parameters in openapi_types
224
- will be type checked and a TypeError will be
225
- raised if the wrong type is input.
226
- Defaults to True
227
- _path_to_item (tuple/list): This is a list of keys or values to
228
- drill down to the model in received_data
229
- when deserializing a response
230
- _spec_property_naming (bool): True if the variable names in the input data
231
- are serialized names, as specified in the OpenAPI document.
232
- False if the variable names in the input data
233
- are pythonic names, e.g. snake case (default)
234
- _configuration (Configuration): the instance to use when
235
- deserializing a file_type parameter.
236
- If passed, type conversion is attempted
237
- If omitted no type conversion is done.
238
- _visited_composed_classes (tuple): This stores a tuple of
239
- classes that we have traveled through so that
240
- if we see that class again we will not use its
241
- discriminator again.
242
- When traveling through a discriminator, the
243
- composed schema that is
244
- is traveled through is added to this set.
245
- For example if Animal has a discriminator
246
- petType and we pass in "Dog", and the class Dog
247
- allOf includes Animal, we move through Animal
248
- once using the discriminator, and pick Dog.
249
- Then in Dog, we will make an instance of the
250
- Animal class but this time we won't travel
251
- through its discriminator because we passed in
252
- _visited_composed_classes = (Animal,)
253
- errors ([CommonError], none_type): errors. [optional] # noqa: E501
254
- warnings ([CommonWarning], none_type): warnings. [optional] # noqa: E501
255
- """
256
-
257
- _check_type = kwargs.pop('_check_type', True)
258
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
259
- _path_to_item = kwargs.pop('_path_to_item', ())
260
- _configuration = kwargs.pop('_configuration', None)
261
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
262
-
263
- if args:
264
- for arg in args:
265
- if isinstance(arg, dict):
266
- kwargs.update(arg)
267
- else:
268
- raise ApiTypeError(
269
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
270
- args,
271
- self.__class__.__name__,
272
- ),
273
- path_to_item=_path_to_item,
274
- valid_classes=(self.__class__,),
275
- )
276
-
277
- self._data_store = {}
278
- self._check_type = _check_type
279
- self._spec_property_naming = _spec_property_naming
280
- self._path_to_item = _path_to_item
281
- self._configuration = _configuration
282
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
283
-
284
- self.metadata = metadata
285
- for var_name, var_value in kwargs.items():
286
- if var_name not in self.attribute_map and \
287
- self._configuration is not None and \
288
- self._configuration.discard_unknown_keys and \
289
- self.additional_properties_type is None:
290
- # discard variable.
291
- continue
292
- setattr(self, var_name, var_value)
293
- if var_name in self.read_only_vars:
294
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
295
- f"class with read only attributes.")