criteo-api-retailmedia-sdk 0.0.240404__py3-none-any.whl → 0.0.240515__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 (77) hide show
  1. criteo_api_retailmedia_preview/__init__.py +1 -1
  2. criteo_api_retailmedia_preview/api/audience_api.py +284 -0
  3. criteo_api_retailmedia_preview/api/campaign_api.py +1755 -448
  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/{retail_media_externalv1_add_remove_keyword_model.py → add_remove_keyword_model.py} +12 -19
  7. criteo_api_retailmedia_preview/model/add_remove_keywords_model.py +262 -0
  8. criteo_api_retailmedia_preview/model/add_remove_keywords_model_request.py +262 -0
  9. criteo_api_retailmedia_preview/model/add_remove_keywords_model_resource.py +270 -0
  10. criteo_api_retailmedia_preview/model/approval_status_model.py +292 -0
  11. criteo_api_retailmedia_preview/model/async_accounts_report.py +39 -27
  12. criteo_api_retailmedia_preview/model/async_campaigns_report.py +24 -13
  13. criteo_api_retailmedia_preview/model/async_line_items_report.py +24 -13
  14. criteo_api_retailmedia_preview/model/audience_error.py +310 -0
  15. criteo_api_retailmedia_preview/model/audience_warning.py +312 -0
  16. criteo_api_retailmedia_preview/model/{line_item_bid_multipliers_response.py → creative_v2_list_response.py} +16 -16
  17. criteo_api_retailmedia_preview/model/{retail_media_externalv1_resource_outcome.py → creative_v2_response.py} +19 -17
  18. criteo_api_retailmedia_preview/model/{retail_media_externalv1_add_remove_keywords_model_request.py → error_code_response.py} +23 -11
  19. criteo_api_retailmedia_preview/model/external_choice_variable_value.py +269 -0
  20. criteo_api_retailmedia_preview/model/{retail_media_externalv1_set_bids_model.py → external_color_variable_value.py} +11 -14
  21. criteo_api_retailmedia_preview/model/external_creative_create_model_v2.py +297 -0
  22. criteo_api_retailmedia_preview/model/external_creative_update_model_v2.py +297 -0
  23. criteo_api_retailmedia_preview/model/external_creative_v2.py +361 -0
  24. criteo_api_retailmedia_preview/model/external_files_variable_value.py +272 -0
  25. criteo_api_retailmedia_preview/model/{retail_media_externalv1_set_bids_model_request.py → external_hyperlink_variable_value.py} +7 -13
  26. criteo_api_retailmedia_preview/model/{line_item_bid_multipliers.py → external_line_item_bid_multipliers_v2.py} +41 -29
  27. criteo_api_retailmedia_preview/model/external_page_type_environment.py +293 -0
  28. criteo_api_retailmedia_preview/model/external_template_variable_value.py +309 -0
  29. criteo_api_retailmedia_preview/model/external_text_variable_value.py +263 -0
  30. criteo_api_retailmedia_preview/model/external_video_variable_value.py +293 -0
  31. criteo_api_retailmedia_preview/model/{retail_media_externalv1_input_keywords_model.py → input_keywords_model.py} +4 -16
  32. criteo_api_retailmedia_preview/model/{json_api_body_with_id_of_int64_and_line_item_bid_multipliers_and_line_item_bid_multipliers.py → json_api_body_with_id_of_int64_and_line_item_bid_multipliers_v2_and_line_item_bid_multipliers_v2.py} +8 -8
  33. criteo_api_retailmedia_preview/model/{json_api_single_response_of_line_item_bid_multipliers.py → json_api_single_response_of_line_item_bid_multipliers_v2.py} +14 -14
  34. criteo_api_retailmedia_preview/model/{retail_media_externalv1_keyword_data_model.py → keyword_data_model.py} +19 -37
  35. criteo_api_retailmedia_preview/model/{retail_media_externalv1_keywords_model.py → keywords_model.py} +9 -18
  36. criteo_api_retailmedia_preview/model/keywords_model_resource.py +270 -0
  37. criteo_api_retailmedia_preview/model/keywords_model_response.py +274 -0
  38. criteo_api_retailmedia_preview/model/{line_item_bid_multipliers_request.py → line_item_bid_multipliers_v2_request.py} +8 -8
  39. criteo_api_retailmedia_preview/model/line_item_bid_multipliers_v2_response.py +281 -0
  40. criteo_api_retailmedia_preview/model/line_item_product_status.py +291 -0
  41. criteo_api_retailmedia_preview/model/match_type_model.py +291 -0
  42. criteo_api_retailmedia_preview/model/negotiation_state_model.py +293 -0
  43. criteo_api_retailmedia_preview/model/product_metadata.py +269 -0
  44. criteo_api_retailmedia_preview/model/product_resource_outcome.py +266 -0
  45. criteo_api_retailmedia_preview/model/{retail_media_externalv1_add_remove_keywords_model.py → promoted_product.py} +18 -19
  46. criteo_api_retailmedia_preview/model/promoted_product_resource.py +270 -0
  47. criteo_api_retailmedia_preview/model/promoted_product_resource_collection_input.py +262 -0
  48. criteo_api_retailmedia_preview/model/promoted_product_resource_collection_outcome.py +278 -0
  49. criteo_api_retailmedia_preview/model/{retail_media_externalv1_proposal_status_model.py → proposal_status_model.py} +22 -50
  50. criteo_api_retailmedia_preview/model/proposal_status_model_resource.py +270 -0
  51. criteo_api_retailmedia_preview/model/proposal_status_model_response.py +274 -0
  52. criteo_api_retailmedia_preview/model/{resource_of_line_item_bid_multipliers.py → resource_of_creative_v2.py} +8 -8
  53. criteo_api_retailmedia_preview/model/{retail_media_externalv1_keywords_model_resource.py → resource_of_line_item_bid_multipliers_v2.py} +17 -23
  54. criteo_api_retailmedia_preview/model/resource_outcome.py +268 -0
  55. criteo_api_retailmedia_preview/model/retail_media_account.py +6 -6
  56. criteo_api_retailmedia_preview/model/{retail_media_externalv1_set_bids_model_resource.py → retail_media_contactlist_amendment.py} +16 -20
  57. criteo_api_retailmedia_preview/model/{retail_media_externalv1_add_remove_keywords_model_resource.py → retail_media_contactlist_amendment_attributes.py} +34 -25
  58. criteo_api_retailmedia_preview/model/retail_media_contactlist_amendment_request.py +275 -0
  59. criteo_api_retailmedia_preview/model/retail_media_contactlist_operation.py +291 -0
  60. criteo_api_retailmedia_preview/model/{retail_media_externalv1_proposal_status_model_resource.py → retail_media_contactlist_operation_response_attributes.py} +14 -16
  61. criteo_api_retailmedia_preview/model/retail_media_contactlist_operation_response_attributes_attributes.py +297 -0
  62. criteo_api_retailmedia_preview/model/review_state_model.py +294 -0
  63. criteo_api_retailmedia_preview/model/{retail_media_externalv1_problem_details.py → rmca_common_problem.py} +41 -30
  64. criteo_api_retailmedia_preview/model/{retail_media_externalv1_set_bid_model.py → set_bid_model.py} +4 -10
  65. criteo_api_retailmedia_preview/model/set_bids_model.py +262 -0
  66. criteo_api_retailmedia_preview/model/set_bids_model_request.py +262 -0
  67. criteo_api_retailmedia_preview/model/set_bids_model_resource.py +270 -0
  68. criteo_api_retailmedia_preview/model/sync_attributed_transactions_report.py +12 -10
  69. criteo_api_retailmedia_preview/model/sync_campaigns_report.py +24 -13
  70. criteo_api_retailmedia_preview/model/sync_line_items_report.py +24 -13
  71. criteo_api_retailmedia_preview/models/__init__.py +58 -24
  72. {criteo_api_retailmedia_sdk-0.0.240404.dist-info → criteo_api_retailmedia_sdk-0.0.240515.dist-info}/METADATA +3 -3
  73. {criteo_api_retailmedia_sdk-0.0.240404.dist-info → criteo_api_retailmedia_sdk-0.0.240515.dist-info}/RECORD +75 -41
  74. criteo_api_retailmedia_preview/model/retail_media_externalv1_keywords_model_response.py +0 -285
  75. criteo_api_retailmedia_preview/model/retail_media_externalv1_proposal_status_model_response.py +0 -285
  76. {criteo_api_retailmedia_sdk-0.0.240404.dist-info → criteo_api_retailmedia_sdk-0.0.240515.dist-info}/WHEEL +0 -0
  77. {criteo_api_retailmedia_sdk-0.0.240404.dist-info → criteo_api_retailmedia_sdk-0.0.240515.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,310 @@
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 AudienceError(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
+ ('type',): {
59
+ 'ACCESS-CONTROL': "access-control",
60
+ 'AUTHENTICATION': "authentication",
61
+ 'AUTHORIZATION': "authorization",
62
+ 'AVAILABILITY': "availability",
63
+ 'DEPRECATION': "deprecation",
64
+ 'QUOTA': "quota",
65
+ 'VALIDATION': "validation",
66
+ },
67
+ }
68
+
69
+ validations = {
70
+ }
71
+
72
+ @cached_property
73
+ def additional_properties_type():
74
+ """
75
+ This must be a method because a model may have properties that are
76
+ of type self, this must run after the class is loaded
77
+ """
78
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
79
+
80
+ _nullable = False
81
+
82
+ @cached_property
83
+ def openapi_types():
84
+ """
85
+ This must be a method because a model may have properties that are
86
+ of type self, this must run after the class is loaded
87
+
88
+ Returns
89
+ openapi_types (dict): The key is attribute name
90
+ and the value is attribute type.
91
+ """
92
+ return {
93
+ 'type': (str,), # noqa: E501
94
+ 'code': (str,), # noqa: E501
95
+ 'instance': (str,), # noqa: E501
96
+ 'trace_id': (str, none_type,), # noqa: E501
97
+ 'title': (str, none_type,), # noqa: E501
98
+ 'detail': (str, none_type,), # noqa: E501
99
+ 'source': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501
100
+ 'stack_trace': ([str], none_type,), # noqa: E501
101
+ }
102
+
103
+ @cached_property
104
+ def discriminator():
105
+ return None
106
+
107
+
108
+ attribute_map = {
109
+ 'type': 'type', # noqa: E501
110
+ 'code': 'code', # noqa: E501
111
+ 'instance': 'instance', # noqa: E501
112
+ 'trace_id': 'traceId', # noqa: E501
113
+ 'title': 'title', # noqa: E501
114
+ 'detail': 'detail', # noqa: E501
115
+ 'source': 'source', # noqa: E501
116
+ 'stack_trace': 'stackTrace', # noqa: E501
117
+ }
118
+
119
+ read_only_vars = {
120
+ }
121
+
122
+ _composed_schemas = {}
123
+
124
+ @classmethod
125
+ @convert_js_args_to_python_args
126
+ def _from_openapi_data(cls, type, code, instance, *args, **kwargs): # noqa: E501
127
+ """AudienceError - a model defined in OpenAPI
128
+
129
+ Args:
130
+ type (str): (REQUIRED) The classification of the error
131
+ code (str): (REQUIRED) A machine-readable unique error code, expressed as a string value. The format used must be kebab-case.
132
+ instance (str): (REQUIRED) A URI reference that identifies the specific occurrence of the problem
133
+
134
+ Keyword Args:
135
+ _check_type (bool): if True, values for parameters in openapi_types
136
+ will be type checked and a TypeError will be
137
+ raised if the wrong type is input.
138
+ Defaults to True
139
+ _path_to_item (tuple/list): This is a list of keys or values to
140
+ drill down to the model in received_data
141
+ when deserializing a response
142
+ _spec_property_naming (bool): True if the variable names in the input data
143
+ are serialized names, as specified in the OpenAPI document.
144
+ False if the variable names in the input data
145
+ are pythonic names, e.g. snake case (default)
146
+ _configuration (Configuration): the instance to use when
147
+ deserializing a file_type parameter.
148
+ If passed, type conversion is attempted
149
+ If omitted no type conversion is done.
150
+ _visited_composed_classes (tuple): This stores a tuple of
151
+ classes that we have traveled through so that
152
+ if we see that class again we will not use its
153
+ discriminator again.
154
+ When traveling through a discriminator, the
155
+ composed schema that is
156
+ is traveled through is added to this set.
157
+ For example if Animal has a discriminator
158
+ petType and we pass in "Dog", and the class Dog
159
+ allOf includes Animal, we move through Animal
160
+ once using the discriminator, and pick Dog.
161
+ Then in Dog, we will make an instance of the
162
+ Animal class but this time we won't travel
163
+ through its discriminator because we passed in
164
+ _visited_composed_classes = (Animal,)
165
+ trace_id (str, none_type): (REQUIRED) The Correlation ID provided by the Gateway. It is also a unique identifier for this particular occurrence of the problem.. [optional] # noqa: E501
166
+ title (str, none_type): (RECOMMENDED) A short, human-readable summary of the problem type. [optional] # noqa: E501
167
+ detail (str, none_type): (RECOMMENDED) A human-readable explanation specific to this occurrence of the problem. [optional] # noqa: E501
168
+ source ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): (OPTIONAL) A machine-readable structure to reference to the exact location(s) causing the error(s). [optional] # noqa: E501
169
+ stack_trace ([str], none_type): (NEVER IN PRODUCTION) A human-readable stacktrace produced by the implementation technology. [optional] # noqa: E501
170
+ """
171
+
172
+ _check_type = kwargs.pop('_check_type', True)
173
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
174
+ _path_to_item = kwargs.pop('_path_to_item', ())
175
+ _configuration = kwargs.pop('_configuration', None)
176
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
177
+
178
+ self = super(OpenApiModel, cls).__new__(cls)
179
+
180
+ if args:
181
+ for arg in args:
182
+ if isinstance(arg, dict):
183
+ kwargs.update(arg)
184
+ else:
185
+ raise ApiTypeError(
186
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
187
+ args,
188
+ self.__class__.__name__,
189
+ ),
190
+ path_to_item=_path_to_item,
191
+ valid_classes=(self.__class__,),
192
+ )
193
+
194
+ self._data_store = {}
195
+ self._check_type = _check_type
196
+ self._spec_property_naming = _spec_property_naming
197
+ self._path_to_item = _path_to_item
198
+ self._configuration = _configuration
199
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
200
+
201
+ self.type = type
202
+ self.code = code
203
+ self.instance = instance
204
+ for var_name, var_value in kwargs.items():
205
+ if var_name not in self.attribute_map and \
206
+ self._configuration is not None and \
207
+ self._configuration.discard_unknown_keys and \
208
+ self.additional_properties_type is None:
209
+ # discard variable.
210
+ continue
211
+ setattr(self, var_name, var_value)
212
+ return self
213
+
214
+ required_properties = set([
215
+ '_data_store',
216
+ '_check_type',
217
+ '_spec_property_naming',
218
+ '_path_to_item',
219
+ '_configuration',
220
+ '_visited_composed_classes',
221
+ ])
222
+
223
+ @convert_js_args_to_python_args
224
+ def __init__(self, type, code, instance, *args, **kwargs): # noqa: E501
225
+ """AudienceError - a model defined in OpenAPI
226
+
227
+ Args:
228
+ type (str): (REQUIRED) The classification of the error
229
+ code (str): (REQUIRED) A machine-readable unique error code, expressed as a string value. The format used must be kebab-case.
230
+ instance (str): (REQUIRED) A URI reference that identifies the specific occurrence of the problem
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
+ trace_id (str, none_type): (REQUIRED) The Correlation ID provided by the Gateway. It is also a unique identifier for this particular occurrence of the problem.. [optional] # noqa: E501
264
+ title (str, none_type): (RECOMMENDED) A short, human-readable summary of the problem type. [optional] # noqa: E501
265
+ detail (str, none_type): (RECOMMENDED) A human-readable explanation specific to this occurrence of the problem. [optional] # noqa: E501
266
+ source ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): (OPTIONAL) A machine-readable structure to reference to the exact location(s) causing the error(s). [optional] # noqa: E501
267
+ stack_trace ([str], none_type): (NEVER IN PRODUCTION) A human-readable stacktrace produced by the implementation technology. [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.type = type
298
+ self.code = code
299
+ self.instance = instance
300
+ for var_name, var_value in kwargs.items():
301
+ if var_name not in self.attribute_map and \
302
+ self._configuration is not None and \
303
+ self._configuration.discard_unknown_keys and \
304
+ self.additional_properties_type is None:
305
+ # discard variable.
306
+ continue
307
+ setattr(self, var_name, var_value)
308
+ if var_name in self.read_only_vars:
309
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
310
+ f"class with read only attributes.")
@@ -0,0 +1,312 @@
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 AudienceWarning(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
+ ('type',): {
59
+ 'ACCESS-CONTROL': "access-control",
60
+ 'AUTHENTICATION': "authentication",
61
+ 'AUTHORIZATION': "authorization",
62
+ 'AVAILABILITY': "availability",
63
+ 'DEPRECATION': "deprecation",
64
+ 'QUOTA': "quota",
65
+ 'VALIDATION': "validation",
66
+ },
67
+ }
68
+
69
+ validations = {
70
+ }
71
+
72
+ @cached_property
73
+ def additional_properties_type():
74
+ """
75
+ This must be a method because a model may have properties that are
76
+ of type self, this must run after the class is loaded
77
+ """
78
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
79
+
80
+ _nullable = False
81
+
82
+ @cached_property
83
+ def openapi_types():
84
+ """
85
+ This must be a method because a model may have properties that are
86
+ of type self, this must run after the class is loaded
87
+
88
+ Returns
89
+ openapi_types (dict): The key is attribute name
90
+ and the value is attribute type.
91
+ """
92
+ return {
93
+ 'type': (str,), # noqa: E501
94
+ 'code': (str,), # noqa: E501
95
+ 'instance': (str,), # noqa: E501
96
+ 'detail': (str,), # noqa: E501
97
+ 'trace_id': (str, none_type,), # noqa: E501
98
+ 'title': (str, none_type,), # noqa: E501
99
+ 'source': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,), # noqa: E501
100
+ 'stack_trace': ([str], none_type,), # noqa: E501
101
+ }
102
+
103
+ @cached_property
104
+ def discriminator():
105
+ return None
106
+
107
+
108
+ attribute_map = {
109
+ 'type': 'type', # noqa: E501
110
+ 'code': 'code', # noqa: E501
111
+ 'instance': 'instance', # noqa: E501
112
+ 'detail': 'detail', # noqa: E501
113
+ 'trace_id': 'traceId', # noqa: E501
114
+ 'title': 'title', # noqa: E501
115
+ 'source': 'source', # noqa: E501
116
+ 'stack_trace': 'stackTrace', # noqa: E501
117
+ }
118
+
119
+ read_only_vars = {
120
+ }
121
+
122
+ _composed_schemas = {}
123
+
124
+ @classmethod
125
+ @convert_js_args_to_python_args
126
+ def _from_openapi_data(cls, type, code, instance, detail, *args, **kwargs): # noqa: E501
127
+ """AudienceWarning - a model defined in OpenAPI
128
+
129
+ Args:
130
+ type (str): (REQUIRED) The classification of the error
131
+ code (str): (REQUIRED) A machine-readable unique error code, expressed as a string value. The format used must be kebab-case.
132
+ instance (str): (REQUIRED) A URI reference that identifies the specific occurrence of the problem
133
+ detail (str): (REQUIRED) A human-readable explanation specific to this occurrence of the problem
134
+
135
+ Keyword Args:
136
+ _check_type (bool): if True, values for parameters in openapi_types
137
+ will be type checked and a TypeError will be
138
+ raised if the wrong type is input.
139
+ Defaults to True
140
+ _path_to_item (tuple/list): This is a list of keys or values to
141
+ drill down to the model in received_data
142
+ when deserializing a response
143
+ _spec_property_naming (bool): True if the variable names in the input data
144
+ are serialized names, as specified in the OpenAPI document.
145
+ False if the variable names in the input data
146
+ are pythonic names, e.g. snake case (default)
147
+ _configuration (Configuration): the instance to use when
148
+ deserializing a file_type parameter.
149
+ If passed, type conversion is attempted
150
+ If omitted no type conversion is done.
151
+ _visited_composed_classes (tuple): This stores a tuple of
152
+ classes that we have traveled through so that
153
+ if we see that class again we will not use its
154
+ discriminator again.
155
+ When traveling through a discriminator, the
156
+ composed schema that is
157
+ is traveled through is added to this set.
158
+ For example if Animal has a discriminator
159
+ petType and we pass in "Dog", and the class Dog
160
+ allOf includes Animal, we move through Animal
161
+ once using the discriminator, and pick Dog.
162
+ Then in Dog, we will make an instance of the
163
+ Animal class but this time we won't travel
164
+ through its discriminator because we passed in
165
+ _visited_composed_classes = (Animal,)
166
+ trace_id (str, none_type): (REQUIRED) The Correlation ID provided by the Gateway. It is also a unique identifier for this particular occurrence of the problem.. [optional] # noqa: E501
167
+ title (str, none_type): (RECOMMENDED) A short, human-readable summary of the problem type. [optional] # noqa: E501
168
+ source ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): (OPTIONAL) A machine-readable structure to reference to the exact location(s) causing the error(s). [optional] # noqa: E501
169
+ stack_trace ([str], none_type): (NEVER IN PRODUCTION) A human-readable stacktrace produced by the implementation technology. [optional] # noqa: E501
170
+ """
171
+
172
+ _check_type = kwargs.pop('_check_type', True)
173
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
174
+ _path_to_item = kwargs.pop('_path_to_item', ())
175
+ _configuration = kwargs.pop('_configuration', None)
176
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
177
+
178
+ self = super(OpenApiModel, cls).__new__(cls)
179
+
180
+ if args:
181
+ for arg in args:
182
+ if isinstance(arg, dict):
183
+ kwargs.update(arg)
184
+ else:
185
+ raise ApiTypeError(
186
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
187
+ args,
188
+ self.__class__.__name__,
189
+ ),
190
+ path_to_item=_path_to_item,
191
+ valid_classes=(self.__class__,),
192
+ )
193
+
194
+ self._data_store = {}
195
+ self._check_type = _check_type
196
+ self._spec_property_naming = _spec_property_naming
197
+ self._path_to_item = _path_to_item
198
+ self._configuration = _configuration
199
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
200
+
201
+ self.type = type
202
+ self.code = code
203
+ self.instance = instance
204
+ self.detail = detail
205
+ for var_name, var_value in kwargs.items():
206
+ if var_name not in self.attribute_map and \
207
+ self._configuration is not None and \
208
+ self._configuration.discard_unknown_keys and \
209
+ self.additional_properties_type is None:
210
+ # discard variable.
211
+ continue
212
+ setattr(self, var_name, var_value)
213
+ return self
214
+
215
+ required_properties = set([
216
+ '_data_store',
217
+ '_check_type',
218
+ '_spec_property_naming',
219
+ '_path_to_item',
220
+ '_configuration',
221
+ '_visited_composed_classes',
222
+ ])
223
+
224
+ @convert_js_args_to_python_args
225
+ def __init__(self, type, code, instance, detail, *args, **kwargs): # noqa: E501
226
+ """AudienceWarning - a model defined in OpenAPI
227
+
228
+ Args:
229
+ type (str): (REQUIRED) The classification of the error
230
+ code (str): (REQUIRED) A machine-readable unique error code, expressed as a string value. The format used must be kebab-case.
231
+ instance (str): (REQUIRED) A URI reference that identifies the specific occurrence of the problem
232
+ detail (str): (REQUIRED) A human-readable explanation specific to this occurrence of the problem
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
+ trace_id (str, none_type): (REQUIRED) The Correlation ID provided by the Gateway. It is also a unique identifier for this particular occurrence of the problem.. [optional] # noqa: E501
266
+ title (str, none_type): (RECOMMENDED) A short, human-readable summary of the problem type. [optional] # noqa: E501
267
+ source ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type): (OPTIONAL) A machine-readable structure to reference to the exact location(s) causing the error(s). [optional] # noqa: E501
268
+ stack_trace ([str], none_type): (NEVER IN PRODUCTION) A human-readable stacktrace produced by the implementation technology. [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.type = type
299
+ self.code = code
300
+ self.instance = instance
301
+ self.detail = detail
302
+ for var_name, var_value in kwargs.items():
303
+ if var_name not in self.attribute_map and \
304
+ self._configuration is not None and \
305
+ self._configuration.discard_unknown_keys and \
306
+ self.additional_properties_type is None:
307
+ # discard variable.
308
+ continue
309
+ setattr(self, var_name, var_value)
310
+ if var_name in self.read_only_vars:
311
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
312
+ f"class with read only attributes.")