criteo-api-retailmedia-sdk 2024.7.0.250915__py3-none-any.whl → 2024.7.0.251014__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 (102) hide show
  1. {criteo_api_retailmedia_sdk-2024.7.0.250915.dist-info → criteo_api_retailmedia_sdk-2024.7.0.251014.dist-info}/METADATA +3 -3
  2. {criteo_api_retailmedia_sdk-2024.7.0.250915.dist-info → criteo_api_retailmedia_sdk-2024.7.0.251014.dist-info}/RECORD +60 -102
  3. criteo_api_retailmedia_v2024_07/__init__.py +1 -1
  4. criteo_api_retailmedia_v2024_07/api/accounts_api.py +7 -9
  5. criteo_api_retailmedia_v2024_07/api/analytics_api.py +8 -28
  6. criteo_api_retailmedia_v2024_07/api/balance_api.py +257 -261
  7. criteo_api_retailmedia_v2024_07/api/campaign_api.py +1307 -2452
  8. criteo_api_retailmedia_v2024_07/api_client.py +1 -1
  9. criteo_api_retailmedia_v2024_07/apis/__init__.py +0 -1
  10. criteo_api_retailmedia_v2024_07/configuration.py +1 -1
  11. criteo_api_retailmedia_v2024_07/model/add_funds_to_balance_v2.py +6 -6
  12. criteo_api_retailmedia_v2024_07/model/{external_add_to_basket_ids_update_model202110.py → add_to_basket_ids_update_model202110.py} +3 -3
  13. criteo_api_retailmedia_v2024_07/model/{external_add_to_basket_target202110.py → add_to_basket_target202110.py} +3 -3
  14. criteo_api_retailmedia_v2024_07/model/add_to_basket_target202110_response.py +8 -8
  15. criteo_api_retailmedia_v2024_07/model/async_campaigns_report.py +14 -0
  16. criteo_api_retailmedia_v2024_07/model/async_line_items_report.py +14 -0
  17. criteo_api_retailmedia_v2024_07/model/async_revenue_report.py +11 -0
  18. criteo_api_retailmedia_v2024_07/model/{external_auction_line_item.py → auction_line_item.py} +19 -25
  19. criteo_api_retailmedia_v2024_07/model/{external_auction_line_item_create_model.py → auction_line_item_create_model.py} +3 -3
  20. criteo_api_retailmedia_v2024_07/model/auction_line_item_paged_list_response.py +8 -8
  21. criteo_api_retailmedia_v2024_07/model/auction_line_item_response.py +8 -8
  22. criteo_api_retailmedia_v2024_07/model/{external_auction_line_item_update_model.py → auction_line_item_update_model.py} +6 -6
  23. criteo_api_retailmedia_v2024_07/model/{external_audience_ids_update_model202110.py → audience_ids_update_model202110.py} +3 -3
  24. criteo_api_retailmedia_v2024_07/model/{external_audience_target202110.py → audience_target202110.py} +3 -3
  25. criteo_api_retailmedia_v2024_07/model/audience_target202110_response.py +8 -8
  26. criteo_api_retailmedia_v2024_07/model/balance_campaign202110_paged_list_response.py +8 -8
  27. criteo_api_retailmedia_v2024_07/model/balance_response_v2.py +6 -6
  28. criteo_api_retailmedia_v2024_07/model/{paged_resource_collection_outcome_of_balance_response_v2.py → balance_response_v2_paged_list_response.py} +3 -3
  29. criteo_api_retailmedia_v2024_07/model/campaign_attributes_v202301.py +11 -15
  30. criteo_api_retailmedia_v2024_07/model/campaign_v202301.py +23 -33
  31. criteo_api_retailmedia_v2024_07/model/change_dates_of_balance_v2.py +9 -9
  32. criteo_api_retailmedia_v2024_07/model/{external_common_line_item.py → common_line_item.py} +19 -25
  33. criteo_api_retailmedia_v2024_07/model/common_line_item_paged_list_response.py +8 -8
  34. criteo_api_retailmedia_v2024_07/model/common_line_item_response.py +8 -8
  35. criteo_api_retailmedia_v2024_07/model/create_balance_v2.py +6 -6
  36. criteo_api_retailmedia_v2024_07/model/editable_campaign_attributes_v202301.py +11 -15
  37. criteo_api_retailmedia_v2024_07/model/files_variable_value.py +0 -3
  38. criteo_api_retailmedia_v2024_07/model/input_resource_of_auction_line_item_create_model.py +5 -5
  39. criteo_api_retailmedia_v2024_07/model/{external_keyword_target202110.py → keyword_target202110.py} +3 -3
  40. criteo_api_retailmedia_v2024_07/model/keyword_target202110_response.py +8 -8
  41. criteo_api_retailmedia_v2024_07/model/resource_of_auction_line_item.py +5 -5
  42. criteo_api_retailmedia_v2024_07/model/resource_of_auction_line_item_update_model.py +5 -5
  43. criteo_api_retailmedia_v2024_07/model/resource_of_common_line_item.py +5 -5
  44. criteo_api_retailmedia_v2024_07/model/{external_store_ids_update_model202110.py → store_ids_update_model202110.py} +3 -3
  45. criteo_api_retailmedia_v2024_07/model/{external_store_target202110.py → store_target202110.py} +3 -3
  46. criteo_api_retailmedia_v2024_07/model/store_target202110_response.py +8 -8
  47. criteo_api_retailmedia_v2024_07/model/value_resource_of_campaign_budget_overrides.py +2 -2
  48. criteo_api_retailmedia_v2024_07/model/value_resource_of_line_item_budget_overrides.py +2 -2
  49. criteo_api_retailmedia_v2024_07/model/value_resource_outcome_of_campaign_budget_overrides.py +8 -8
  50. criteo_api_retailmedia_v2024_07/model/value_resource_outcome_of_line_item_budget_overrides.py +8 -8
  51. criteo_api_retailmedia_v2024_07/model/value_type_resource_of_add_to_basket_ids_update_model202110.py +5 -5
  52. criteo_api_retailmedia_v2024_07/model/value_type_resource_of_add_to_basket_target202110.py +5 -5
  53. criteo_api_retailmedia_v2024_07/model/value_type_resource_of_audience_ids_update_model202110.py +5 -5
  54. criteo_api_retailmedia_v2024_07/model/value_type_resource_of_audience_target202110.py +5 -5
  55. criteo_api_retailmedia_v2024_07/model/value_type_resource_of_keyword_target202110.py +5 -5
  56. criteo_api_retailmedia_v2024_07/model/value_type_resource_of_store_ids_update_model202110.py +5 -5
  57. criteo_api_retailmedia_v2024_07/model/value_type_resource_of_store_target202110.py +5 -5
  58. criteo_api_retailmedia_v2024_07/models/__init__.py +12 -53
  59. criteo_api_retailmedia_v2024_07/api/audience_api.py +0 -657
  60. criteo_api_retailmedia_v2024_07/model/creative202210_list_response.py +0 -274
  61. criteo_api_retailmedia_v2024_07/model/external_line_item_capping202110.py +0 -280
  62. criteo_api_retailmedia_v2024_07/model/external_line_item_page202110.py +0 -293
  63. criteo_api_retailmedia_v2024_07/model/external_line_item_page_category202110.py +0 -273
  64. criteo_api_retailmedia_v2024_07/model/external_preferred_line_item202110.py +0 -377
  65. criteo_api_retailmedia_v2024_07/model/external_preferred_line_item_create_model202110.py +0 -345
  66. criteo_api_retailmedia_v2024_07/model/external_preferred_line_item_update_model202110.py +0 -335
  67. criteo_api_retailmedia_v2024_07/model/input_resource_of_preferred_line_item_create_model202110.py +0 -273
  68. criteo_api_retailmedia_v2024_07/model/json_api_body_with_id_of_int64_and_line_item_bid_multipliers_and_line_item_bid_multipliers.py +0 -285
  69. criteo_api_retailmedia_v2024_07/model/json_api_single_response_of_line_item_bid_multipliers.py +0 -287
  70. criteo_api_retailmedia_v2024_07/model/line_item_bid_multipliers.py +0 -291
  71. criteo_api_retailmedia_v2024_07/model/line_item_bid_multipliers_request.py +0 -269
  72. criteo_api_retailmedia_v2024_07/model/line_item_bid_multipliers_response.py +0 -281
  73. criteo_api_retailmedia_v2024_07/model/preferred_line_item202110_paged_list_response.py +0 -287
  74. criteo_api_retailmedia_v2024_07/model/preferred_line_item202110_response.py +0 -281
  75. criteo_api_retailmedia_v2024_07/model/preferred_line_item_create_model202110_request.py +0 -269
  76. criteo_api_retailmedia_v2024_07/model/preferred_line_item_update_model202110_request.py +0 -269
  77. criteo_api_retailmedia_v2024_07/model/report_outcome.py +0 -275
  78. criteo_api_retailmedia_v2024_07/model/resource_of_line_item_bid_multipliers.py +0 -277
  79. criteo_api_retailmedia_v2024_07/model/resource_of_preferred_line_item202110.py +0 -277
  80. criteo_api_retailmedia_v2024_07/model/resource_of_preferred_line_item_update_model202110.py +0 -277
  81. criteo_api_retailmedia_v2024_07/model/rm_legacy_audience_create_entity_v1.py +0 -315
  82. criteo_api_retailmedia_v2024_07/model/rm_legacy_audience_create_entity_v1_resource.py +0 -277
  83. criteo_api_retailmedia_v2024_07/model/rm_legacy_audience_create_entity_v1_response.py +0 -281
  84. criteo_api_retailmedia_v2024_07/model/rm_legacy_audience_create_entity_v2.py +0 -287
  85. criteo_api_retailmedia_v2024_07/model/rm_legacy_audience_create_entity_v2_resource.py +0 -277
  86. criteo_api_retailmedia_v2024_07/model/rm_legacy_audience_create_entity_v2_response.py +0 -281
  87. criteo_api_retailmedia_v2024_07/model/rm_legacy_audience_create_input_entity_v1.py +0 -269
  88. criteo_api_retailmedia_v2024_07/model/rm_legacy_audience_create_input_entity_v2.py +0 -269
  89. criteo_api_retailmedia_v2024_07/model/rm_legacy_audience_get_entity_v1.py +0 -291
  90. criteo_api_retailmedia_v2024_07/model/rm_legacy_audience_get_entity_v1_list_response.py +0 -281
  91. criteo_api_retailmedia_v2024_07/model/rm_legacy_audience_get_entity_v1_resource.py +0 -286
  92. criteo_api_retailmedia_v2024_07/model/rm_legacy_audience_get_entity_v2.py +0 -291
  93. criteo_api_retailmedia_v2024_07/model/rm_legacy_audience_get_entity_v2_list_response.py +0 -281
  94. criteo_api_retailmedia_v2024_07/model/rm_legacy_audience_get_entity_v2_resource.py +0 -277
  95. criteo_api_retailmedia_v2024_07/model/rm_legacy_audience_user_behavior_create_v2.py +0 -279
  96. criteo_api_retailmedia_v2024_07/model/rm_legacy_audience_user_behavior_details_v2.py +0 -279
  97. criteo_api_retailmedia_v2024_07/model/rm_legacy_segment_customer_list.py +0 -275
  98. criteo_api_retailmedia_v2024_07/model/rm_legacy_segment_user_behavior_create_v2.py +0 -303
  99. criteo_api_retailmedia_v2024_07/model/rm_legacy_segment_user_behavior_v1.py +0 -306
  100. criteo_api_retailmedia_v2024_07/model/rm_legacy_segment_user_behavior_v2.py +0 -311
  101. {criteo_api_retailmedia_sdk-2024.7.0.250915.dist-info → criteo_api_retailmedia_sdk-2024.7.0.251014.dist-info}/WHEEL +0 -0
  102. {criteo_api_retailmedia_sdk-2024.7.0.250915.dist-info → criteo_api_retailmedia_sdk-2024.7.0.251014.dist-info}/top_level.txt +0 -0
@@ -1,306 +0,0 @@
1
- """
2
- Criteo API
3
-
4
- Criteo API - RetailMedia # noqa: E501
5
-
6
- The version of the OpenAPI document: 2024-07
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_07.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_07.exceptions import ApiAttributeError
30
-
31
-
32
-
33
- class RmLegacySegmentUserBehaviorV1(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
- ('lookback_window',): {
59
- 'P7D': "P7D",
60
- 'P14D': "P14D",
61
- 'P30D': "P30D",
62
- 'P45D': "P45D",
63
- 'P60D': "P60D",
64
- 'P90D': "P90D",
65
- 'P120D': "P120D",
66
- 'P150D': "P150D",
67
- 'P180D': "P180D",
68
- },
69
- ('user_type',): {
70
- 'VIEWER': "viewer",
71
- 'BUYER': "buyer",
72
- 'ADDTOCARTER': "addToCarter",
73
- },
74
- ('target_type',): {
75
- 'None': None,
76
- 'BRAND': "brand",
77
- 'CATEGORY': "category",
78
- },
79
- }
80
-
81
- validations = {
82
- ('target_ids',): {
83
- },
84
- }
85
-
86
- @cached_property
87
- def additional_properties_type():
88
- """
89
- This must be a method because a model may have properties that are
90
- of type self, this must run after the class is loaded
91
- """
92
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
93
-
94
- _nullable = True
95
-
96
- @cached_property
97
- def openapi_types():
98
- """
99
- This must be a method because a model may have properties that are
100
- of type self, this must run after the class is loaded
101
-
102
- Returns
103
- openapi_types (dict): The key is attribute name
104
- and the value is attribute type.
105
- """
106
- return {
107
- 'lookback_window': (str,), # noqa: E501
108
- 'user_type': (str,), # noqa: E501
109
- 'target_ids': ([str], none_type,), # noqa: E501
110
- 'target_type': (str, none_type,), # noqa: E501
111
- }
112
-
113
- @cached_property
114
- def discriminator():
115
- return None
116
-
117
-
118
- attribute_map = {
119
- 'lookback_window': 'lookbackWindow', # noqa: E501
120
- 'user_type': 'userType', # noqa: E501
121
- 'target_ids': 'targetIds', # noqa: E501
122
- 'target_type': 'targetType', # noqa: E501
123
- }
124
-
125
- read_only_vars = {
126
- }
127
-
128
- _composed_schemas = {}
129
-
130
- @classmethod
131
- @convert_js_args_to_python_args
132
- def _from_openapi_data(cls, lookback_window, user_type, *args, **kwargs): # noqa: E501
133
- """RmLegacySegmentUserBehaviorV1 - a model defined in OpenAPI
134
-
135
- Args:
136
- lookback_window (str): Length of lookback window
137
- user_type (str): Type of shopper activity used to generate the audience.
138
-
139
- Keyword Args:
140
- _check_type (bool): if True, values for parameters in openapi_types
141
- will be type checked and a TypeError will be
142
- raised if the wrong type is input.
143
- Defaults to True
144
- _path_to_item (tuple/list): This is a list of keys or values to
145
- drill down to the model in received_data
146
- when deserializing a response
147
- _spec_property_naming (bool): True if the variable names in the input data
148
- are serialized names, as specified in the OpenAPI document.
149
- False if the variable names in the input data
150
- are pythonic names, e.g. snake case (default)
151
- _configuration (Configuration): the instance to use when
152
- deserializing a file_type parameter.
153
- If passed, type conversion is attempted
154
- If omitted no type conversion is done.
155
- _visited_composed_classes (tuple): This stores a tuple of
156
- classes that we have traveled through so that
157
- if we see that class again we will not use its
158
- discriminator again.
159
- When traveling through a discriminator, the
160
- composed schema that is
161
- is traveled through is added to this set.
162
- For example if Animal has a discriminator
163
- petType and we pass in "Dog", and the class Dog
164
- allOf includes Animal, we move through Animal
165
- once using the discriminator, and pick Dog.
166
- Then in Dog, we will make an instance of the
167
- Animal class but this time we won't travel
168
- through its discriminator because we passed in
169
- _visited_composed_classes = (Animal,)
170
- target_ids ([str], none_type): The categories to target. [optional] # noqa: E501
171
- target_type (str, none_type): Type of target. [optional] # noqa: E501
172
- """
173
-
174
- _check_type = kwargs.pop('_check_type', True)
175
- _spec_property_naming = kwargs.pop('_spec_property_naming', True)
176
- _path_to_item = kwargs.pop('_path_to_item', ())
177
- _configuration = kwargs.pop('_configuration', None)
178
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
179
-
180
- self = super(OpenApiModel, cls).__new__(cls)
181
-
182
- if args:
183
- for arg in args:
184
- if isinstance(arg, dict):
185
- kwargs.update(arg)
186
- else:
187
- raise ApiTypeError(
188
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
189
- args,
190
- self.__class__.__name__,
191
- ),
192
- path_to_item=_path_to_item,
193
- valid_classes=(self.__class__,),
194
- )
195
-
196
- self._data_store = {}
197
- self._check_type = _check_type
198
- self._spec_property_naming = _spec_property_naming
199
- self._path_to_item = _path_to_item
200
- self._configuration = _configuration
201
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
202
-
203
- self.lookback_window = lookback_window
204
- self.user_type = user_type
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, lookback_window, user_type, *args, **kwargs): # noqa: E501
226
- """RmLegacySegmentUserBehaviorV1 - a model defined in OpenAPI
227
-
228
- Args:
229
- lookback_window (str): Length of lookback window
230
- user_type (str): Type of shopper activity used to generate the audience.
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
- target_ids ([str], none_type): The categories to target. [optional] # noqa: E501
264
- target_type (str, none_type): Type of target. [optional] # noqa: E501
265
- """
266
-
267
- _check_type = kwargs.pop('_check_type', True)
268
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
269
- _path_to_item = kwargs.pop('_path_to_item', ())
270
- _configuration = kwargs.pop('_configuration', None)
271
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
272
-
273
- if args:
274
- for arg in args:
275
- if isinstance(arg, dict):
276
- kwargs.update(arg)
277
- else:
278
- raise ApiTypeError(
279
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
280
- args,
281
- self.__class__.__name__,
282
- ),
283
- path_to_item=_path_to_item,
284
- valid_classes=(self.__class__,),
285
- )
286
-
287
- self._data_store = {}
288
- self._check_type = _check_type
289
- self._spec_property_naming = _spec_property_naming
290
- self._path_to_item = _path_to_item
291
- self._configuration = _configuration
292
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
293
-
294
- self.lookback_window = lookback_window
295
- self.user_type = user_type
296
- for var_name, var_value in kwargs.items():
297
- if var_name not in self.attribute_map and \
298
- self._configuration is not None and \
299
- self._configuration.discard_unknown_keys and \
300
- self.additional_properties_type is None:
301
- # discard variable.
302
- continue
303
- setattr(self, var_name, var_value)
304
- if var_name in self.read_only_vars:
305
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
306
- f"class with read only attributes.")
@@ -1,311 +0,0 @@
1
- """
2
- Criteo API
3
-
4
- Criteo API - RetailMedia # noqa: E501
5
-
6
- The version of the OpenAPI document: 2024-07
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_07.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_07.exceptions import ApiAttributeError
30
-
31
-
32
-
33
- class RmLegacySegmentUserBehaviorV2(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
- ('lookback_window',): {
59
- 'P7D': "P7D",
60
- 'P14D': "P14D",
61
- 'P30D': "P30D",
62
- 'P45D': "P45D",
63
- 'P60D': "P60D",
64
- 'P90D': "P90D",
65
- 'P120D': "P120D",
66
- 'P150D': "P150D",
67
- 'P180D': "P180D",
68
- },
69
- ('user_action',): {
70
- 'BUY': "buy",
71
- 'VIEW': "view",
72
- 'ADDTOCART': "addToCart",
73
- },
74
- }
75
-
76
- validations = {
77
- ('brand_ids',): {
78
- },
79
- ('category_ids',): {
80
- },
81
- }
82
-
83
- @cached_property
84
- def additional_properties_type():
85
- """
86
- This must be a method because a model may have properties that are
87
- of type self, this must run after the class is loaded
88
- """
89
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
90
-
91
- _nullable = True
92
-
93
- @cached_property
94
- def openapi_types():
95
- """
96
- This must be a method because a model may have properties that are
97
- of type self, this must run after the class is loaded
98
-
99
- Returns
100
- openapi_types (dict): The key is attribute name
101
- and the value is attribute type.
102
- """
103
- return {
104
- 'lookback_window': (str,), # noqa: E501
105
- 'user_action': (str,), # noqa: E501
106
- 'brand_ids': ([int], none_type,), # noqa: E501
107
- 'category_ids': ([int], none_type,), # noqa: E501
108
- 'max_price': (float, none_type,), # noqa: E501
109
- 'min_price': (float, none_type,), # noqa: E501
110
- }
111
-
112
- @cached_property
113
- def discriminator():
114
- return None
115
-
116
-
117
- attribute_map = {
118
- 'lookback_window': 'lookbackWindow', # noqa: E501
119
- 'user_action': 'userAction', # noqa: E501
120
- 'brand_ids': 'brandIds', # noqa: E501
121
- 'category_ids': 'categoryIds', # noqa: E501
122
- 'max_price': 'maxPrice', # noqa: E501
123
- 'min_price': 'minPrice', # noqa: E501
124
- }
125
-
126
- read_only_vars = {
127
- }
128
-
129
- _composed_schemas = {}
130
-
131
- @classmethod
132
- @convert_js_args_to_python_args
133
- def _from_openapi_data(cls, lookback_window, user_action, *args, **kwargs): # noqa: E501
134
- """RmLegacySegmentUserBehaviorV2 - a model defined in OpenAPI
135
-
136
- Args:
137
- lookback_window (str): Length of lookback window
138
- user_action (str): Type of shopper activity used to generate the audience.
139
-
140
- Keyword Args:
141
- _check_type (bool): if True, values for parameters in openapi_types
142
- will be type checked and a TypeError will be
143
- raised if the wrong type is input.
144
- Defaults to True
145
- _path_to_item (tuple/list): This is a list of keys or values to
146
- drill down to the model in received_data
147
- when deserializing a response
148
- _spec_property_naming (bool): True if the variable names in the input data
149
- are serialized names, as specified in the OpenAPI document.
150
- False if the variable names in the input data
151
- are pythonic names, e.g. snake case (default)
152
- _configuration (Configuration): the instance to use when
153
- deserializing a file_type parameter.
154
- If passed, type conversion is attempted
155
- If omitted no type conversion is done.
156
- _visited_composed_classes (tuple): This stores a tuple of
157
- classes that we have traveled through so that
158
- if we see that class again we will not use its
159
- discriminator again.
160
- When traveling through a discriminator, the
161
- composed schema that is
162
- is traveled through is added to this set.
163
- For example if Animal has a discriminator
164
- petType and we pass in "Dog", and the class Dog
165
- allOf includes Animal, we move through Animal
166
- once using the discriminator, and pick Dog.
167
- Then in Dog, we will make an instance of the
168
- Animal class but this time we won't travel
169
- through its discriminator because we passed in
170
- _visited_composed_classes = (Animal,)
171
- brand_ids ([int], none_type): The brands to target. [optional] # noqa: E501
172
- category_ids ([int], none_type): The categories to target. [optional] # noqa: E501
173
- max_price (float, none_type): The max price of targeted skus.. [optional] # noqa: E501
174
- min_price (float, none_type): The min price of targeted skus.. [optional] # noqa: E501
175
- """
176
-
177
- _check_type = kwargs.pop('_check_type', True)
178
- _spec_property_naming = kwargs.pop('_spec_property_naming', True)
179
- _path_to_item = kwargs.pop('_path_to_item', ())
180
- _configuration = kwargs.pop('_configuration', None)
181
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
182
-
183
- self = super(OpenApiModel, cls).__new__(cls)
184
-
185
- if args:
186
- for arg in args:
187
- if isinstance(arg, dict):
188
- kwargs.update(arg)
189
- else:
190
- raise ApiTypeError(
191
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
192
- args,
193
- self.__class__.__name__,
194
- ),
195
- path_to_item=_path_to_item,
196
- valid_classes=(self.__class__,),
197
- )
198
-
199
- self._data_store = {}
200
- self._check_type = _check_type
201
- self._spec_property_naming = _spec_property_naming
202
- self._path_to_item = _path_to_item
203
- self._configuration = _configuration
204
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
205
-
206
- self.lookback_window = lookback_window
207
- self.user_action = user_action
208
- for var_name, var_value in kwargs.items():
209
- if var_name not in self.attribute_map and \
210
- self._configuration is not None and \
211
- self._configuration.discard_unknown_keys and \
212
- self.additional_properties_type is None:
213
- # discard variable.
214
- continue
215
- setattr(self, var_name, var_value)
216
- return self
217
-
218
- required_properties = set([
219
- '_data_store',
220
- '_check_type',
221
- '_spec_property_naming',
222
- '_path_to_item',
223
- '_configuration',
224
- '_visited_composed_classes',
225
- ])
226
-
227
- @convert_js_args_to_python_args
228
- def __init__(self, lookback_window, user_action, *args, **kwargs): # noqa: E501
229
- """RmLegacySegmentUserBehaviorV2 - a model defined in OpenAPI
230
-
231
- Args:
232
- lookback_window (str): Length of lookback window
233
- user_action (str): Type of shopper activity used to generate the audience.
234
-
235
- Keyword Args:
236
- _check_type (bool): if True, values for parameters in openapi_types
237
- will be type checked and a TypeError will be
238
- raised if the wrong type is input.
239
- Defaults to True
240
- _path_to_item (tuple/list): This is a list of keys or values to
241
- drill down to the model in received_data
242
- when deserializing a response
243
- _spec_property_naming (bool): True if the variable names in the input data
244
- are serialized names, as specified in the OpenAPI document.
245
- False if the variable names in the input data
246
- are pythonic names, e.g. snake case (default)
247
- _configuration (Configuration): the instance to use when
248
- deserializing a file_type parameter.
249
- If passed, type conversion is attempted
250
- If omitted no type conversion is done.
251
- _visited_composed_classes (tuple): This stores a tuple of
252
- classes that we have traveled through so that
253
- if we see that class again we will not use its
254
- discriminator again.
255
- When traveling through a discriminator, the
256
- composed schema that is
257
- is traveled through is added to this set.
258
- For example if Animal has a discriminator
259
- petType and we pass in "Dog", and the class Dog
260
- allOf includes Animal, we move through Animal
261
- once using the discriminator, and pick Dog.
262
- Then in Dog, we will make an instance of the
263
- Animal class but this time we won't travel
264
- through its discriminator because we passed in
265
- _visited_composed_classes = (Animal,)
266
- brand_ids ([int], none_type): The brands to target. [optional] # noqa: E501
267
- category_ids ([int], none_type): The categories to target. [optional] # noqa: E501
268
- max_price (float, none_type): The max price of targeted skus.. [optional] # noqa: E501
269
- min_price (float, none_type): The min price of targeted skus.. [optional] # noqa: E501
270
- """
271
-
272
- _check_type = kwargs.pop('_check_type', True)
273
- _spec_property_naming = kwargs.pop('_spec_property_naming', False)
274
- _path_to_item = kwargs.pop('_path_to_item', ())
275
- _configuration = kwargs.pop('_configuration', None)
276
- _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
277
-
278
- if args:
279
- for arg in args:
280
- if isinstance(arg, dict):
281
- kwargs.update(arg)
282
- else:
283
- raise ApiTypeError(
284
- "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
285
- args,
286
- self.__class__.__name__,
287
- ),
288
- path_to_item=_path_to_item,
289
- valid_classes=(self.__class__,),
290
- )
291
-
292
- self._data_store = {}
293
- self._check_type = _check_type
294
- self._spec_property_naming = _spec_property_naming
295
- self._path_to_item = _path_to_item
296
- self._configuration = _configuration
297
- self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
298
-
299
- self.lookback_window = lookback_window
300
- self.user_action = user_action
301
- for var_name, var_value in kwargs.items():
302
- if var_name not in self.attribute_map and \
303
- self._configuration is not None and \
304
- self._configuration.discard_unknown_keys and \
305
- self.additional_properties_type is None:
306
- # discard variable.
307
- continue
308
- setattr(self, var_name, var_value)
309
- if var_name in self.read_only_vars:
310
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
311
- f"class with read only attributes.")