criteo-api-retailmedia-sdk 0.0.250425__py3-none-any.whl → 0.0.250618__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 (77) hide show
  1. criteo_api_retailmedia_preview/__init__.py +1 -1
  2. criteo_api_retailmedia_preview/api/audience_api.py +1204 -135
  3. criteo_api_retailmedia_preview/api/campaign_api.py +1205 -147
  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/async_accounts_report.py +11 -0
  7. criteo_api_retailmedia_preview/model/async_campaigns_report.py +11 -0
  8. criteo_api_retailmedia_preview/model/async_line_items_report.py +11 -0
  9. criteo_api_retailmedia_preview/model/categories_search_request_v1.py +270 -0
  10. criteo_api_retailmedia_preview/model/entity_resource_category202204.py +277 -0
  11. criteo_api_retailmedia_preview/model/entity_resource_collection_outcome_category202204.py +281 -0
  12. criteo_api_retailmedia_preview/model/entity_resource_collection_outcome_category202204_metadata.py +287 -0
  13. criteo_api_retailmedia_preview/model/entity_resource_of_sponsored_products_line_item.py +270 -0
  14. criteo_api_retailmedia_preview/model/entity_resource_outcome_of_sponsored_products_line_item.py +274 -0
  15. criteo_api_retailmedia_preview/model/flight_leg.py +287 -0
  16. criteo_api_retailmedia_preview/model/flight_schedule.py +262 -0
  17. criteo_api_retailmedia_preview/model/nillable_decimal.py +263 -0
  18. criteo_api_retailmedia_preview/model/page_of_sponsored_products_line_item.py +276 -0
  19. criteo_api_retailmedia_preview/model/recommended_categories_request_v1.py +272 -0
  20. criteo_api_retailmedia_preview/model/recommended_keywords_request_v1.py +266 -0
  21. criteo_api_retailmedia_preview/model/recommended_keywords_response_v1.py +263 -0
  22. criteo_api_retailmedia_preview/model/rm_audience_bulk_create_input_v1.py +269 -0
  23. criteo_api_retailmedia_preview/model/rm_audience_bulk_delete_input_v1.py +269 -0
  24. criteo_api_retailmedia_preview/model/rm_audience_bulk_update_input_v1.py +269 -0
  25. criteo_api_retailmedia_preview/model/rm_audience_compute_sizes_entity_v1.py +272 -0
  26. criteo_api_retailmedia_preview/model/rm_audience_compute_sizes_entity_v1_resource.py +273 -0
  27. criteo_api_retailmedia_preview/model/rm_audience_compute_sizes_input_v1.py +269 -0
  28. criteo_api_retailmedia_preview/model/rm_audience_create_entity_v1.py +291 -0
  29. criteo_api_retailmedia_preview/model/rm_audience_create_entity_v1_resource.py +273 -0
  30. criteo_api_retailmedia_preview/model/rm_audience_delete_entity_v1_resource.py +271 -0
  31. criteo_api_retailmedia_preview/model/rm_audience_entity_v1_list_response.py +281 -0
  32. criteo_api_retailmedia_preview/model/rm_audience_estimate_size_entity_v1.py +282 -0
  33. criteo_api_retailmedia_preview/model/rm_audience_estimate_size_entity_v1_resource.py +273 -0
  34. criteo_api_retailmedia_preview/model/rm_audience_estimate_size_input_v1.py +269 -0
  35. criteo_api_retailmedia_preview/model/rm_audience_segment_compute_size_entity_v1.py +272 -0
  36. criteo_api_retailmedia_preview/model/rm_audience_segment_compute_size_entity_v1_resource.py +273 -0
  37. criteo_api_retailmedia_preview/model/rm_audience_segment_compute_sizes_input_v1.py +269 -0
  38. criteo_api_retailmedia_preview/model/rm_audience_segment_create_entity_v1.py +6 -0
  39. criteo_api_retailmedia_preview/model/rm_audience_segment_estimate_size_entity_v1.py +282 -0
  40. criteo_api_retailmedia_preview/model/rm_audience_segment_estimate_size_entity_v1_resource.py +273 -0
  41. criteo_api_retailmedia_preview/model/rm_audience_segment_estimate_size_input_v1.py +269 -0
  42. criteo_api_retailmedia_preview/model/rm_audience_segment_size_entity_v1.py +267 -0
  43. criteo_api_retailmedia_preview/model/rm_audience_segment_size_entity_v1_list_response.py +281 -0
  44. criteo_api_retailmedia_preview/model/rm_audience_segment_size_entity_v1_resource.py +277 -0
  45. criteo_api_retailmedia_preview/model/rm_audience_segment_size_estimation_v1.py +267 -0
  46. criteo_api_retailmedia_preview/model/rm_audience_segment_size_estimation_v1_resource.py +273 -0
  47. criteo_api_retailmedia_preview/model/rm_audience_segment_size_estimation_v1_response.py +281 -0
  48. criteo_api_retailmedia_preview/model/rm_audience_segment_update_entity_v1.py +6 -0
  49. criteo_api_retailmedia_preview/model/rm_audience_size_entity_v1.py +267 -0
  50. criteo_api_retailmedia_preview/model/rm_audience_size_entity_v1_list_response.py +281 -0
  51. criteo_api_retailmedia_preview/model/rm_audience_size_entity_v1_resource.py +277 -0
  52. criteo_api_retailmedia_preview/model/rm_audience_size_estimation_v1.py +267 -0
  53. criteo_api_retailmedia_preview/model/rm_audience_size_estimation_v1_resource.py +273 -0
  54. criteo_api_retailmedia_preview/model/rm_audience_size_estimation_v1_response.py +281 -0
  55. criteo_api_retailmedia_preview/model/rm_audience_update_entity_v1.py +279 -0
  56. criteo_api_retailmedia_preview/model/rm_audience_update_entity_v1_resource.py +277 -0
  57. criteo_api_retailmedia_preview/model/rm_events_create_v1.py +305 -0
  58. criteo_api_retailmedia_preview/model/rm_events_estimation_v1.py +305 -0
  59. criteo_api_retailmedia_preview/model/rm_events_update_v1.py +307 -0
  60. criteo_api_retailmedia_preview/model/sponsored_products_line_item.py +387 -0
  61. criteo_api_retailmedia_preview/model/sponsored_products_line_item_create_request_model.py +335 -0
  62. criteo_api_retailmedia_preview/model/sponsored_products_line_item_update_request_model.py +335 -0
  63. criteo_api_retailmedia_preview/model/value_resource_categories_search_request_v1.py +273 -0
  64. criteo_api_retailmedia_preview/model/value_resource_input_categories_search_request_v1.py +269 -0
  65. criteo_api_retailmedia_preview/model/value_resource_input_of_sponsored_products_line_item_update_request_model.py +262 -0
  66. criteo_api_retailmedia_preview/model/value_resource_input_recommended_categories_request_v1.py +269 -0
  67. criteo_api_retailmedia_preview/model/value_resource_input_recommended_keywords_request_v1.py +262 -0
  68. criteo_api_retailmedia_preview/model/value_resource_of_sponsored_products_line_item_update_request_model.py +266 -0
  69. criteo_api_retailmedia_preview/model/value_resource_outcome_recommended_keywords_response_v1.py +274 -0
  70. criteo_api_retailmedia_preview/model/value_resource_recommended_categories_request_v1.py +273 -0
  71. criteo_api_retailmedia_preview/model/value_resource_recommended_keywords_request_v1.py +266 -0
  72. criteo_api_retailmedia_preview/model/value_resource_recommended_keywords_response_v1.py +266 -0
  73. criteo_api_retailmedia_preview/models/__init__.py +62 -0
  74. {criteo_api_retailmedia_sdk-0.0.250425.dist-info → criteo_api_retailmedia_sdk-0.0.250618.dist-info}/METADATA +3 -3
  75. {criteo_api_retailmedia_sdk-0.0.250425.dist-info → criteo_api_retailmedia_sdk-0.0.250618.dist-info}/RECORD +77 -15
  76. {criteo_api_retailmedia_sdk-0.0.250425.dist-info → criteo_api_retailmedia_sdk-0.0.250618.dist-info}/WHEEL +1 -1
  77. {criteo_api_retailmedia_sdk-0.0.250425.dist-info → criteo_api_retailmedia_sdk-0.0.250618.dist-info}/top_level.txt +0 -0
@@ -0,0 +1,281 @@
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_problem import CommonProblem
34
+ from criteo_api_retailmedia_preview.model.rm_audience_segment_size_estimation_v1_resource import RmAudienceSegmentSizeEstimationV1Resource
35
+ globals()['CommonProblem'] = CommonProblem
36
+ globals()['RmAudienceSegmentSizeEstimationV1Resource'] = RmAudienceSegmentSizeEstimationV1Resource
37
+
38
+
39
+ class RmAudienceSegmentSizeEstimationV1Response(ModelNormal):
40
+ """NOTE: This class is auto generated by OpenAPI Generator.
41
+ Ref: https://openapi-generator.tech
42
+
43
+ Do not edit the class manually.
44
+
45
+ Attributes:
46
+ allowed_values (dict): The key is the tuple path to the attribute
47
+ and the for var_name this is (var_name,). The value is a dict
48
+ with a capitalized key describing the allowed value and an allowed
49
+ value. These dicts store the allowed enum values.
50
+ attribute_map (dict): The key is attribute name
51
+ and the value is json key in definition.
52
+ discriminator_value_class_map (dict): A dict to go from the discriminator
53
+ variable value to the discriminator class name.
54
+ validations (dict): The key is the tuple path to the attribute
55
+ and the for var_name this is (var_name,). The value is a dict
56
+ that stores validations for max_length, min_length, max_items,
57
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
58
+ inclusive_minimum, and regex.
59
+ additional_properties_type (tuple): A tuple of classes accepted
60
+ as additional properties values.
61
+ """
62
+
63
+ allowed_values = {
64
+ }
65
+
66
+ validations = {
67
+ }
68
+
69
+ @cached_property
70
+ def additional_properties_type():
71
+ """
72
+ This must be a method because a model may have properties that are
73
+ of type self, this must run after the class is loaded
74
+ """
75
+ lazy_import()
76
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
77
+
78
+ _nullable = False
79
+
80
+ @cached_property
81
+ def openapi_types():
82
+ """
83
+ This must be a method because a model may have properties that are
84
+ of type self, this must run after the class is loaded
85
+
86
+ Returns
87
+ openapi_types (dict): The key is attribute name
88
+ and the value is attribute type.
89
+ """
90
+ lazy_import()
91
+ return {
92
+ 'data': (RmAudienceSegmentSizeEstimationV1Resource,), # noqa: E501
93
+ 'errors': ([CommonProblem], none_type,), # noqa: E501
94
+ 'warnings': ([CommonProblem], none_type,), # noqa: E501
95
+ }
96
+
97
+ @cached_property
98
+ def discriminator():
99
+ return None
100
+
101
+
102
+ attribute_map = {
103
+ 'data': 'data', # noqa: E501
104
+ 'errors': 'errors', # noqa: E501
105
+ 'warnings': 'warnings', # noqa: E501
106
+ }
107
+
108
+ read_only_vars = {
109
+ 'errors', # noqa: E501
110
+ 'warnings', # noqa: E501
111
+ }
112
+
113
+ _composed_schemas = {}
114
+
115
+ @classmethod
116
+ @convert_js_args_to_python_args
117
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
118
+ """RmAudienceSegmentSizeEstimationV1Response - a model defined in OpenAPI
119
+
120
+ Keyword Args:
121
+ _check_type (bool): if True, values for parameters in openapi_types
122
+ will be type checked and a TypeError will be
123
+ raised if the wrong type is input.
124
+ Defaults to True
125
+ _path_to_item (tuple/list): This is a list of keys or values to
126
+ drill down to the model in received_data
127
+ when deserializing a response
128
+ _spec_property_naming (bool): True if the variable names in the input data
129
+ are serialized names, as specified in the OpenAPI document.
130
+ False if the variable names in the input data
131
+ are pythonic names, e.g. snake case (default)
132
+ _configuration (Configuration): the instance to use when
133
+ deserializing a file_type parameter.
134
+ If passed, type conversion is attempted
135
+ If omitted no type conversion is done.
136
+ _visited_composed_classes (tuple): This stores a tuple of
137
+ classes that we have traveled through so that
138
+ if we see that class again we will not use its
139
+ discriminator again.
140
+ When traveling through a discriminator, the
141
+ composed schema that is
142
+ is traveled through is added to this set.
143
+ For example if Animal has a discriminator
144
+ petType and we pass in "Dog", and the class Dog
145
+ allOf includes Animal, we move through Animal
146
+ once using the discriminator, and pick Dog.
147
+ Then in Dog, we will make an instance of the
148
+ Animal class but this time we won't travel
149
+ through its discriminator because we passed in
150
+ _visited_composed_classes = (Animal,)
151
+ data (RmAudienceSegmentSizeEstimationV1Resource): [optional] # noqa: E501
152
+ errors ([CommonProblem], none_type): [optional] # noqa: E501
153
+ warnings ([CommonProblem], none_type): [optional] # noqa: E501
154
+ """
155
+
156
+ _check_type = kwargs.pop('_check_type', True)
157
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
158
+ _path_to_item = kwargs.pop('_path_to_item', ())
159
+ _configuration = kwargs.pop('_configuration', None)
160
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
161
+
162
+ self = super(OpenApiModel, cls).__new__(cls)
163
+
164
+ if args:
165
+ for arg in args:
166
+ if isinstance(arg, dict):
167
+ kwargs.update(arg)
168
+ else:
169
+ raise ApiTypeError(
170
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
171
+ args,
172
+ self.__class__.__name__,
173
+ ),
174
+ path_to_item=_path_to_item,
175
+ valid_classes=(self.__class__,),
176
+ )
177
+
178
+ self._data_store = {}
179
+ self._check_type = _check_type
180
+ self._spec_property_naming = _spec_property_naming
181
+ self._path_to_item = _path_to_item
182
+ self._configuration = _configuration
183
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
184
+
185
+ for var_name, var_value in kwargs.items():
186
+ if var_name not in self.attribute_map and \
187
+ self._configuration is not None and \
188
+ self._configuration.discard_unknown_keys and \
189
+ self.additional_properties_type is None:
190
+ # discard variable.
191
+ continue
192
+ setattr(self, var_name, var_value)
193
+ return self
194
+
195
+ required_properties = set([
196
+ '_data_store',
197
+ '_check_type',
198
+ '_spec_property_naming',
199
+ '_path_to_item',
200
+ '_configuration',
201
+ '_visited_composed_classes',
202
+ ])
203
+
204
+ @convert_js_args_to_python_args
205
+ def __init__(self, *args, **kwargs): # noqa: E501
206
+ """RmAudienceSegmentSizeEstimationV1Response - a model defined in OpenAPI
207
+
208
+ Keyword Args:
209
+ _check_type (bool): if True, values for parameters in openapi_types
210
+ will be type checked and a TypeError will be
211
+ raised if the wrong type is input.
212
+ Defaults to True
213
+ _path_to_item (tuple/list): This is a list of keys or values to
214
+ drill down to the model in received_data
215
+ when deserializing a response
216
+ _spec_property_naming (bool): True if the variable names in the input data
217
+ are serialized names, as specified in the OpenAPI document.
218
+ False if the variable names in the input data
219
+ are pythonic names, e.g. snake case (default)
220
+ _configuration (Configuration): the instance to use when
221
+ deserializing a file_type parameter.
222
+ If passed, type conversion is attempted
223
+ If omitted no type conversion is done.
224
+ _visited_composed_classes (tuple): This stores a tuple of
225
+ classes that we have traveled through so that
226
+ if we see that class again we will not use its
227
+ discriminator again.
228
+ When traveling through a discriminator, the
229
+ composed schema that is
230
+ is traveled through is added to this set.
231
+ For example if Animal has a discriminator
232
+ petType and we pass in "Dog", and the class Dog
233
+ allOf includes Animal, we move through Animal
234
+ once using the discriminator, and pick Dog.
235
+ Then in Dog, we will make an instance of the
236
+ Animal class but this time we won't travel
237
+ through its discriminator because we passed in
238
+ _visited_composed_classes = (Animal,)
239
+ data (RmAudienceSegmentSizeEstimationV1Resource): [optional] # noqa: E501
240
+ errors ([CommonProblem], none_type): [optional] # noqa: E501
241
+ warnings ([CommonProblem], none_type): [optional] # noqa: E501
242
+ """
243
+
244
+ _check_type = kwargs.pop('_check_type', True)
245
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
246
+ _path_to_item = kwargs.pop('_path_to_item', ())
247
+ _configuration = kwargs.pop('_configuration', None)
248
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
249
+
250
+ if args:
251
+ for arg in args:
252
+ if isinstance(arg, dict):
253
+ kwargs.update(arg)
254
+ else:
255
+ raise ApiTypeError(
256
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
257
+ args,
258
+ self.__class__.__name__,
259
+ ),
260
+ path_to_item=_path_to_item,
261
+ valid_classes=(self.__class__,),
262
+ )
263
+
264
+ self._data_store = {}
265
+ self._check_type = _check_type
266
+ self._spec_property_naming = _spec_property_naming
267
+ self._path_to_item = _path_to_item
268
+ self._configuration = _configuration
269
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
270
+
271
+ for var_name, var_value in kwargs.items():
272
+ if var_name not in self.attribute_map and \
273
+ self._configuration is not None and \
274
+ self._configuration.discard_unknown_keys and \
275
+ self.additional_properties_type is None:
276
+ # discard variable.
277
+ continue
278
+ setattr(self, var_name, var_value)
279
+ if var_name in self.read_only_vars:
280
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
281
+ f"class with read only attributes.")
@@ -31,7 +31,9 @@ from criteo_api_retailmedia_preview.exceptions import ApiAttributeError
31
31
 
32
32
  def lazy_import():
33
33
  from criteo_api_retailmedia_preview.model.nillable_string import NillableString
34
+ from criteo_api_retailmedia_preview.model.rm_events_update_v1 import RmEventsUpdateV1
34
35
  globals()['NillableString'] = NillableString
36
+ globals()['RmEventsUpdateV1'] = RmEventsUpdateV1
35
37
 
36
38
 
37
39
  class RmAudienceSegmentUpdateEntityV1(ModelNormal):
@@ -89,6 +91,7 @@ class RmAudienceSegmentUpdateEntityV1(ModelNormal):
89
91
  return {
90
92
  'contact_list': ({str: (bool, date, datetime, dict, float, int, list, str, none_type)},), # noqa: E501
91
93
  'description': (NillableString,), # noqa: E501
94
+ 'events': (RmEventsUpdateV1,), # noqa: E501
92
95
  'name': (str,), # noqa: E501
93
96
  }
94
97
 
@@ -100,6 +103,7 @@ class RmAudienceSegmentUpdateEntityV1(ModelNormal):
100
103
  attribute_map = {
101
104
  'contact_list': 'contactList', # noqa: E501
102
105
  'description': 'description', # noqa: E501
106
+ 'events': 'events', # noqa: E501
103
107
  'name': 'name', # noqa: E501
104
108
  }
105
109
 
@@ -146,6 +150,7 @@ class RmAudienceSegmentUpdateEntityV1(ModelNormal):
146
150
  _visited_composed_classes = (Animal,)
147
151
  contact_list ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Settings to update the contact list of the segment. [optional] # noqa: E501
148
152
  description (NillableString): [optional] # noqa: E501
153
+ events (RmEventsUpdateV1): [optional] # noqa: E501
149
154
  name (str): Name of the segment. [optional] # noqa: E501
150
155
  """
151
156
 
@@ -234,6 +239,7 @@ class RmAudienceSegmentUpdateEntityV1(ModelNormal):
234
239
  _visited_composed_classes = (Animal,)
235
240
  contact_list ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}): Settings to update the contact list of the segment. [optional] # noqa: E501
236
241
  description (NillableString): [optional] # noqa: E501
242
+ events (RmEventsUpdateV1): [optional] # noqa: E501
237
243
  name (str): Name of the segment. [optional] # noqa: E501
238
244
  """
239
245
 
@@ -0,0 +1,267 @@
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 RmAudienceSizeEntityV1(ModelNormal):
34
+ """NOTE: This class is auto generated by OpenAPI Generator.
35
+ Ref: https://openapi-generator.tech
36
+
37
+ Do not edit the class manually.
38
+
39
+ Attributes:
40
+ allowed_values (dict): The key is the tuple path to the attribute
41
+ and the for var_name this is (var_name,). The value is a dict
42
+ with a capitalized key describing the allowed value and an allowed
43
+ value. These dicts store the allowed enum values.
44
+ attribute_map (dict): The key is attribute name
45
+ and the value is json key in definition.
46
+ discriminator_value_class_map (dict): A dict to go from the discriminator
47
+ variable value to the discriminator class name.
48
+ validations (dict): The key is the tuple path to the attribute
49
+ and the for var_name this is (var_name,). The value is a dict
50
+ that stores validations for max_length, min_length, max_items,
51
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
52
+ inclusive_minimum, and regex.
53
+ additional_properties_type (tuple): A tuple of classes accepted
54
+ as additional properties values.
55
+ """
56
+
57
+ allowed_values = {
58
+ }
59
+
60
+ validations = {
61
+ }
62
+
63
+ @cached_property
64
+ def additional_properties_type():
65
+ """
66
+ This must be a method because a model may have properties that are
67
+ of type self, this must run after the class is loaded
68
+ """
69
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
70
+
71
+ _nullable = True
72
+
73
+ @cached_property
74
+ def openapi_types():
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
+ Returns
80
+ openapi_types (dict): The key is attribute name
81
+ and the value is attribute type.
82
+ """
83
+ return {
84
+ 'relative_size': (float, none_type,), # noqa: E501
85
+ 'size': (int, none_type,), # noqa: E501
86
+ }
87
+
88
+ @cached_property
89
+ def discriminator():
90
+ return None
91
+
92
+
93
+ attribute_map = {
94
+ 'relative_size': 'relativeSize', # noqa: E501
95
+ 'size': 'size', # noqa: E501
96
+ }
97
+
98
+ read_only_vars = {
99
+ }
100
+
101
+ _composed_schemas = {}
102
+
103
+ @classmethod
104
+ @convert_js_args_to_python_args
105
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
106
+ """RmAudienceSizeEntityV1 - a model defined in OpenAPI
107
+
108
+ Keyword Args:
109
+ _check_type (bool): if True, values for parameters in openapi_types
110
+ will be type checked and a TypeError will be
111
+ raised if the wrong type is input.
112
+ Defaults to True
113
+ _path_to_item (tuple/list): This is a list of keys or values to
114
+ drill down to the model in received_data
115
+ when deserializing a response
116
+ _spec_property_naming (bool): True if the variable names in the input data
117
+ are serialized names, as specified in the OpenAPI document.
118
+ False if the variable names in the input data
119
+ are pythonic names, e.g. snake case (default)
120
+ _configuration (Configuration): the instance to use when
121
+ deserializing a file_type parameter.
122
+ If passed, type conversion is attempted
123
+ If omitted no type conversion is done.
124
+ _visited_composed_classes (tuple): This stores a tuple of
125
+ classes that we have traveled through so that
126
+ if we see that class again we will not use its
127
+ discriminator again.
128
+ When traveling through a discriminator, the
129
+ composed schema that is
130
+ is traveled through is added to this set.
131
+ For example if Animal has a discriminator
132
+ petType and we pass in "Dog", and the class Dog
133
+ allOf includes Animal, we move through Animal
134
+ once using the discriminator, and pick Dog.
135
+ Then in Dog, we will make an instance of the
136
+ Animal class but this time we won't travel
137
+ through its discriminator because we passed in
138
+ _visited_composed_classes = (Animal,)
139
+ relative_size (float, none_type): Reach in number of users relative to the total users of a retailer (e.g. 0.5523 / 55.23% users). [optional] # noqa: E501
140
+ size (int, none_type): Reach in absolute number of users (e.g. 150,300 users). It's not present when the user lacks permissions to view it.. [optional] # noqa: E501
141
+ """
142
+
143
+ _check_type = kwargs.pop('_check_type', True)
144
+ _spec_property_naming = kwargs.pop('_spec_property_naming', True)
145
+ _path_to_item = kwargs.pop('_path_to_item', ())
146
+ _configuration = kwargs.pop('_configuration', None)
147
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
148
+
149
+ self = super(OpenApiModel, cls).__new__(cls)
150
+
151
+ if args:
152
+ for arg in args:
153
+ if isinstance(arg, dict):
154
+ kwargs.update(arg)
155
+ else:
156
+ raise ApiTypeError(
157
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
158
+ args,
159
+ self.__class__.__name__,
160
+ ),
161
+ path_to_item=_path_to_item,
162
+ valid_classes=(self.__class__,),
163
+ )
164
+
165
+ self._data_store = {}
166
+ self._check_type = _check_type
167
+ self._spec_property_naming = _spec_property_naming
168
+ self._path_to_item = _path_to_item
169
+ self._configuration = _configuration
170
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
171
+
172
+ for var_name, var_value in kwargs.items():
173
+ if var_name not in self.attribute_map and \
174
+ self._configuration is not None and \
175
+ self._configuration.discard_unknown_keys and \
176
+ self.additional_properties_type is None:
177
+ # discard variable.
178
+ continue
179
+ setattr(self, var_name, var_value)
180
+ return self
181
+
182
+ required_properties = set([
183
+ '_data_store',
184
+ '_check_type',
185
+ '_spec_property_naming',
186
+ '_path_to_item',
187
+ '_configuration',
188
+ '_visited_composed_classes',
189
+ ])
190
+
191
+ @convert_js_args_to_python_args
192
+ def __init__(self, *args, **kwargs): # noqa: E501
193
+ """RmAudienceSizeEntityV1 - a model defined in OpenAPI
194
+
195
+ Keyword Args:
196
+ _check_type (bool): if True, values for parameters in openapi_types
197
+ will be type checked and a TypeError will be
198
+ raised if the wrong type is input.
199
+ Defaults to True
200
+ _path_to_item (tuple/list): This is a list of keys or values to
201
+ drill down to the model in received_data
202
+ when deserializing a response
203
+ _spec_property_naming (bool): True if the variable names in the input data
204
+ are serialized names, as specified in the OpenAPI document.
205
+ False if the variable names in the input data
206
+ are pythonic names, e.g. snake case (default)
207
+ _configuration (Configuration): the instance to use when
208
+ deserializing a file_type parameter.
209
+ If passed, type conversion is attempted
210
+ If omitted no type conversion is done.
211
+ _visited_composed_classes (tuple): This stores a tuple of
212
+ classes that we have traveled through so that
213
+ if we see that class again we will not use its
214
+ discriminator again.
215
+ When traveling through a discriminator, the
216
+ composed schema that is
217
+ is traveled through is added to this set.
218
+ For example if Animal has a discriminator
219
+ petType and we pass in "Dog", and the class Dog
220
+ allOf includes Animal, we move through Animal
221
+ once using the discriminator, and pick Dog.
222
+ Then in Dog, we will make an instance of the
223
+ Animal class but this time we won't travel
224
+ through its discriminator because we passed in
225
+ _visited_composed_classes = (Animal,)
226
+ relative_size (float, none_type): Reach in number of users relative to the total users of a retailer (e.g. 0.5523 / 55.23% users). [optional] # noqa: E501
227
+ size (int, none_type): Reach in absolute number of users (e.g. 150,300 users). It's not present when the user lacks permissions to view it.. [optional] # noqa: E501
228
+ """
229
+
230
+ _check_type = kwargs.pop('_check_type', True)
231
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
232
+ _path_to_item = kwargs.pop('_path_to_item', ())
233
+ _configuration = kwargs.pop('_configuration', None)
234
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
235
+
236
+ if args:
237
+ for arg in args:
238
+ if isinstance(arg, dict):
239
+ kwargs.update(arg)
240
+ else:
241
+ raise ApiTypeError(
242
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
243
+ args,
244
+ self.__class__.__name__,
245
+ ),
246
+ path_to_item=_path_to_item,
247
+ valid_classes=(self.__class__,),
248
+ )
249
+
250
+ self._data_store = {}
251
+ self._check_type = _check_type
252
+ self._spec_property_naming = _spec_property_naming
253
+ self._path_to_item = _path_to_item
254
+ self._configuration = _configuration
255
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
256
+
257
+ for var_name, var_value in kwargs.items():
258
+ if var_name not in self.attribute_map and \
259
+ self._configuration is not None and \
260
+ self._configuration.discard_unknown_keys and \
261
+ self.additional_properties_type is None:
262
+ # discard variable.
263
+ continue
264
+ setattr(self, var_name, var_value)
265
+ if var_name in self.read_only_vars:
266
+ raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
267
+ f"class with read only attributes.")