criteo-api-retailmedia-sdk 2023.7.0.240404__py3-none-any.whl → 2023.7.0.240618__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 (35) hide show
  1. {criteo_api_retailmedia_sdk-2023.7.0.240404.dist-info → criteo_api_retailmedia_sdk-2023.7.0.240618.dist-info}/METADATA +3 -3
  2. {criteo_api_retailmedia_sdk-2023.7.0.240404.dist-info → criteo_api_retailmedia_sdk-2023.7.0.240618.dist-info}/RECORD +33 -29
  3. criteo_api_retailmedia_v2023_07/__init__.py +1 -1
  4. criteo_api_retailmedia_v2023_07/api/campaign_api.py +40 -50
  5. criteo_api_retailmedia_v2023_07/api_client.py +1 -1
  6. criteo_api_retailmedia_v2023_07/configuration.py +1 -1
  7. criteo_api_retailmedia_v2023_07/model/{retail_media_externalv1_add_remove_keyword_model.py → add_remove_keyword_model.py} +12 -19
  8. criteo_api_retailmedia_v2023_07/model/{retail_media_externalv1_set_bids_model.py → add_remove_keywords_model.py} +9 -18
  9. criteo_api_retailmedia_v2023_07/model/{retail_media_externalv1_set_bids_model_request.py → add_remove_keywords_model_request.py} +9 -16
  10. criteo_api_retailmedia_v2023_07/model/add_remove_keywords_model_resource.py +270 -0
  11. criteo_api_retailmedia_v2023_07/model/{retail_media_externalv1_proposal_status_model_resource.py → approval_status_model.py} +86 -77
  12. criteo_api_retailmedia_v2023_07/model/async_campaigns_report.py +24 -13
  13. criteo_api_retailmedia_v2023_07/model/async_line_items_report.py +24 -13
  14. criteo_api_retailmedia_v2023_07/model/{retail_media_externalv1_input_keywords_model.py → input_keywords_model.py} +4 -16
  15. criteo_api_retailmedia_v2023_07/model/{retail_media_externalv1_keyword_data_model.py → keyword_data_model.py} +19 -37
  16. criteo_api_retailmedia_v2023_07/model/{retail_media_externalv1_keywords_model.py → keywords_model.py} +9 -18
  17. criteo_api_retailmedia_v2023_07/model/keywords_model_resource.py +270 -0
  18. criteo_api_retailmedia_v2023_07/model/keywords_model_response.py +274 -0
  19. criteo_api_retailmedia_v2023_07/model/{retail_media_externalv1_keywords_model_resource.py → match_type_model.py} +85 -77
  20. criteo_api_retailmedia_v2023_07/model/{retail_media_externalv1_set_bids_model_resource.py → negotiation_state_model.py} +87 -77
  21. criteo_api_retailmedia_v2023_07/model/{retail_media_externalv1_proposal_status_model.py → proposal_status_model.py} +22 -50
  22. criteo_api_retailmedia_v2023_07/model/proposal_status_model_resource.py +270 -0
  23. criteo_api_retailmedia_v2023_07/model/{retail_media_externalv1_resource_outcome.py → proposal_status_model_response.py} +18 -23
  24. criteo_api_retailmedia_v2023_07/model/resource_outcome.py +268 -0
  25. criteo_api_retailmedia_v2023_07/model/{retail_media_externalv1_add_remove_keywords_model_resource.py → review_state_model.py} +88 -77
  26. criteo_api_retailmedia_v2023_07/model/{retail_media_externalv1_problem_details.py → rmca_common_problem.py} +41 -30
  27. criteo_api_retailmedia_v2023_07/model/{retail_media_externalv1_set_bid_model.py → set_bid_model.py} +4 -10
  28. criteo_api_retailmedia_v2023_07/model/{retail_media_externalv1_add_remove_keywords_model.py → set_bids_model.py} +9 -18
  29. criteo_api_retailmedia_v2023_07/model/{retail_media_externalv1_add_remove_keywords_model_request.py → set_bids_model_request.py} +9 -16
  30. criteo_api_retailmedia_v2023_07/model/set_bids_model_resource.py +270 -0
  31. criteo_api_retailmedia_v2023_07/models/__init__.py +22 -18
  32. criteo_api_retailmedia_v2023_07/model/retail_media_externalv1_keywords_model_response.py +0 -285
  33. criteo_api_retailmedia_v2023_07/model/retail_media_externalv1_proposal_status_model_response.py +0 -285
  34. {criteo_api_retailmedia_sdk-2023.7.0.240404.dist-info → criteo_api_retailmedia_sdk-2023.7.0.240618.dist-info}/WHEEL +0 -0
  35. {criteo_api_retailmedia_sdk-2023.7.0.240404.dist-info → criteo_api_retailmedia_sdk-2023.7.0.240618.dist-info}/top_level.txt +0 -0
@@ -29,12 +29,8 @@ from criteo_api_retailmedia_v2023_07.model_utils import ( # noqa: F401
29
29
  from criteo_api_retailmedia_v2023_07.exceptions import ApiAttributeError
30
30
 
31
31
 
32
- def lazy_import():
33
- from criteo_api_retailmedia_v2023_07.model.retail_media_externalv1_keywords_model import RetailMediaExternalv1KeywordsModel
34
- globals()['RetailMediaExternalv1KeywordsModel'] = RetailMediaExternalv1KeywordsModel
35
32
 
36
-
37
- class RetailMediaExternalv1KeywordsModelResource(ModelNormal):
33
+ class MatchTypeModel(ModelSimple):
38
34
  """NOTE: This class is auto generated by OpenAPI Generator.
39
35
  Ref: https://openapi-generator.tech
40
36
 
@@ -45,10 +41,6 @@ class RetailMediaExternalv1KeywordsModelResource(ModelNormal):
45
41
  and the for var_name this is (var_name,). The value is a dict
46
42
  with a capitalized key describing the allowed value and an allowed
47
43
  value. These dicts store the allowed enum values.
48
- attribute_map (dict): The key is attribute name
49
- and the value is json key in definition.
50
- discriminator_value_class_map (dict): A dict to go from the discriminator
51
- variable value to the discriminator class name.
52
44
  validations (dict): The key is the tuple path to the attribute
53
45
  and the for var_name this is (var_name,). The value is a dict
54
46
  that stores validations for max_length, min_length, max_items,
@@ -59,19 +51,17 @@ class RetailMediaExternalv1KeywordsModelResource(ModelNormal):
59
51
  """
60
52
 
61
53
  allowed_values = {
54
+ ('value',): {
55
+ 'POSITIVEEXACTMATCH': "PositiveExactMatch",
56
+ 'NEGATIVEEXACTMATCH': "NegativeExactMatch",
57
+ 'NEGATIVEBROADMATCH': "NegativeBroadMatch",
58
+ },
62
59
  }
63
60
 
64
61
  validations = {
65
62
  }
66
63
 
67
- @cached_property
68
- def additional_properties_type():
69
- """
70
- This must be a method because a model may have properties that are
71
- of type self, this must run after the class is loaded
72
- """
73
- lazy_import()
74
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
64
+ additional_properties_type = None
75
65
 
76
66
  _nullable = False
77
67
 
@@ -85,11 +75,8 @@ class RetailMediaExternalv1KeywordsModelResource(ModelNormal):
85
75
  openapi_types (dict): The key is attribute name
86
76
  and the value is attribute type.
87
77
  """
88
- lazy_import()
89
78
  return {
90
- 'type': (str,), # noqa: E501
91
- 'id': (str, none_type,), # noqa: E501
92
- 'attributes': (RetailMediaExternalv1KeywordsModel,), # noqa: E501
79
+ 'value': (str,),
93
80
  }
94
81
 
95
82
  @cached_property
@@ -97,26 +84,32 @@ class RetailMediaExternalv1KeywordsModelResource(ModelNormal):
97
84
  return None
98
85
 
99
86
 
100
- attribute_map = {
101
- 'type': 'type', # noqa: E501
102
- 'id': 'id', # noqa: E501
103
- 'attributes': 'attributes', # noqa: E501
104
- }
87
+ attribute_map = {}
105
88
 
106
- read_only_vars = {
107
- }
89
+ read_only_vars = set()
108
90
 
109
- _composed_schemas = {}
91
+ _composed_schemas = None
92
+
93
+ required_properties = set([
94
+ '_data_store',
95
+ '_check_type',
96
+ '_spec_property_naming',
97
+ '_path_to_item',
98
+ '_configuration',
99
+ '_visited_composed_classes',
100
+ ])
110
101
 
111
- @classmethod
112
102
  @convert_js_args_to_python_args
113
- def _from_openapi_data(cls, type, *args, **kwargs): # noqa: E501
114
- """RetailMediaExternalv1KeywordsModelResource - a model defined in OpenAPI
103
+ def __init__(self, *args, **kwargs):
104
+ """MatchTypeModel - a model defined in OpenAPI
105
+
106
+ Note that value can be passed either in args or in kwargs, but not in both.
115
107
 
116
108
  Args:
117
- type (str):
109
+ args[0] (str): The match type of a keyword.., must be one of ["PositiveExactMatch", "NegativeExactMatch", "NegativeBroadMatch", ] # noqa: E501
118
110
 
119
111
  Keyword Args:
112
+ value (str): The match type of a keyword.., must be one of ["PositiveExactMatch", "NegativeExactMatch", "NegativeBroadMatch", ] # noqa: E501
120
113
  _check_type (bool): if True, values for parameters in openapi_types
121
114
  will be type checked and a TypeError will be
122
115
  raised if the wrong type is input.
@@ -147,18 +140,27 @@ class RetailMediaExternalv1KeywordsModelResource(ModelNormal):
147
140
  Animal class but this time we won't travel
148
141
  through its discriminator because we passed in
149
142
  _visited_composed_classes = (Animal,)
150
- id (str, none_type): [optional] # noqa: E501
151
- attributes (RetailMediaExternalv1KeywordsModel): [optional] # noqa: E501
152
143
  """
144
+ # required up here when default value is not given
145
+ _path_to_item = kwargs.pop('_path_to_item', ())
146
+
147
+ if 'value' in kwargs:
148
+ value = kwargs.pop('value')
149
+ elif args:
150
+ args = list(args)
151
+ value = args.pop(0)
152
+ else:
153
+ raise ApiTypeError(
154
+ "value is required, but not passed in args or kwargs and doesn't have default",
155
+ path_to_item=_path_to_item,
156
+ valid_classes=(self.__class__,),
157
+ )
153
158
 
154
159
  _check_type = kwargs.pop('_check_type', True)
155
- _spec_property_naming = kwargs.pop('_spec_property_naming', True)
156
- _path_to_item = kwargs.pop('_path_to_item', ())
160
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
157
161
  _configuration = kwargs.pop('_configuration', None)
158
162
  _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
159
163
 
160
- self = super(OpenApiModel, cls).__new__(cls)
161
-
162
164
  if args:
163
165
  for arg in args:
164
166
  if isinstance(arg, dict):
@@ -179,35 +181,29 @@ class RetailMediaExternalv1KeywordsModelResource(ModelNormal):
179
181
  self._path_to_item = _path_to_item
180
182
  self._configuration = _configuration
181
183
  self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
184
+ self.value = value
185
+ if kwargs:
186
+ raise ApiTypeError(
187
+ "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
188
+ kwargs,
189
+ self.__class__.__name__,
190
+ ),
191
+ path_to_item=_path_to_item,
192
+ valid_classes=(self.__class__,),
193
+ )
182
194
 
183
- self.type = type
184
- for var_name, var_value in kwargs.items():
185
- if var_name not in self.attribute_map and \
186
- self._configuration is not None and \
187
- self._configuration.discard_unknown_keys and \
188
- self.additional_properties_type is None:
189
- # discard variable.
190
- continue
191
- setattr(self, var_name, var_value)
192
- return self
193
-
194
- required_properties = set([
195
- '_data_store',
196
- '_check_type',
197
- '_spec_property_naming',
198
- '_path_to_item',
199
- '_configuration',
200
- '_visited_composed_classes',
201
- ])
202
-
195
+ @classmethod
203
196
  @convert_js_args_to_python_args
204
- def __init__(self, type, *args, **kwargs): # noqa: E501
205
- """RetailMediaExternalv1KeywordsModelResource - a model defined in OpenAPI
197
+ def _from_openapi_data(cls, *args, **kwargs):
198
+ """MatchTypeModel - a model defined in OpenAPI
199
+
200
+ Note that value can be passed either in args or in kwargs, but not in both.
206
201
 
207
202
  Args:
208
- type (str):
203
+ args[0] (str): The match type of a keyword.., must be one of ["PositiveExactMatch", "NegativeExactMatch", "NegativeBroadMatch", ] # noqa: E501
209
204
 
210
205
  Keyword Args:
206
+ value (str): The match type of a keyword.., must be one of ["PositiveExactMatch", "NegativeExactMatch", "NegativeBroadMatch", ] # noqa: E501
211
207
  _check_type (bool): if True, values for parameters in openapi_types
212
208
  will be type checked and a TypeError will be
213
209
  raised if the wrong type is input.
@@ -238,13 +234,26 @@ class RetailMediaExternalv1KeywordsModelResource(ModelNormal):
238
234
  Animal class but this time we won't travel
239
235
  through its discriminator because we passed in
240
236
  _visited_composed_classes = (Animal,)
241
- id (str, none_type): [optional] # noqa: E501
242
- attributes (RetailMediaExternalv1KeywordsModel): [optional] # noqa: E501
243
237
  """
238
+ # required up here when default value is not given
239
+ _path_to_item = kwargs.pop('_path_to_item', ())
240
+
241
+ self = super(OpenApiModel, cls).__new__(cls)
242
+
243
+ if 'value' in kwargs:
244
+ value = kwargs.pop('value')
245
+ elif args:
246
+ args = list(args)
247
+ value = args.pop(0)
248
+ else:
249
+ raise ApiTypeError(
250
+ "value is required, but not passed in args or kwargs and doesn't have default",
251
+ path_to_item=_path_to_item,
252
+ valid_classes=(self.__class__,),
253
+ )
244
254
 
245
255
  _check_type = kwargs.pop('_check_type', True)
246
256
  _spec_property_naming = kwargs.pop('_spec_property_naming', False)
247
- _path_to_item = kwargs.pop('_path_to_item', ())
248
257
  _configuration = kwargs.pop('_configuration', None)
249
258
  _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
250
259
 
@@ -268,16 +277,15 @@ class RetailMediaExternalv1KeywordsModelResource(ModelNormal):
268
277
  self._path_to_item = _path_to_item
269
278
  self._configuration = _configuration
270
279
  self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
280
+ self.value = value
281
+ if kwargs:
282
+ raise ApiTypeError(
283
+ "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
284
+ kwargs,
285
+ self.__class__.__name__,
286
+ ),
287
+ path_to_item=_path_to_item,
288
+ valid_classes=(self.__class__,),
289
+ )
271
290
 
272
- self.type = type
273
- for var_name, var_value in kwargs.items():
274
- if var_name not in self.attribute_map and \
275
- self._configuration is not None and \
276
- self._configuration.discard_unknown_keys and \
277
- self.additional_properties_type is None:
278
- # discard variable.
279
- continue
280
- setattr(self, var_name, var_value)
281
- if var_name in self.read_only_vars:
282
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
283
- f"class with read only attributes.")
291
+ return self
@@ -29,12 +29,8 @@ from criteo_api_retailmedia_v2023_07.model_utils import ( # noqa: F401
29
29
  from criteo_api_retailmedia_v2023_07.exceptions import ApiAttributeError
30
30
 
31
31
 
32
- def lazy_import():
33
- from criteo_api_retailmedia_v2023_07.model.retail_media_externalv1_set_bids_model import RetailMediaExternalv1SetBidsModel
34
- globals()['RetailMediaExternalv1SetBidsModel'] = RetailMediaExternalv1SetBidsModel
35
32
 
36
-
37
- class RetailMediaExternalv1SetBidsModelResource(ModelNormal):
33
+ class NegotiationStateModel(ModelSimple):
38
34
  """NOTE: This class is auto generated by OpenAPI Generator.
39
35
  Ref: https://openapi-generator.tech
40
36
 
@@ -45,10 +41,6 @@ class RetailMediaExternalv1SetBidsModelResource(ModelNormal):
45
41
  and the for var_name this is (var_name,). The value is a dict
46
42
  with a capitalized key describing the allowed value and an allowed
47
43
  value. These dicts store the allowed enum values.
48
- attribute_map (dict): The key is attribute name
49
- and the value is json key in definition.
50
- discriminator_value_class_map (dict): A dict to go from the discriminator
51
- variable value to the discriminator class name.
52
44
  validations (dict): The key is the tuple path to the attribute
53
45
  and the for var_name this is (var_name,). The value is a dict
54
46
  that stores validations for max_length, min_length, max_items,
@@ -59,19 +51,19 @@ class RetailMediaExternalv1SetBidsModelResource(ModelNormal):
59
51
  """
60
52
 
61
53
  allowed_values = {
54
+ ('value',): {
55
+ 'INVALID': "Invalid",
56
+ 'MODIFIED': "Modified",
57
+ 'SUBMITTED': "Submitted",
58
+ 'REVIEWED': "Reviewed",
59
+ 'APPROVED': "Approved",
60
+ },
62
61
  }
63
62
 
64
63
  validations = {
65
64
  }
66
65
 
67
- @cached_property
68
- def additional_properties_type():
69
- """
70
- This must be a method because a model may have properties that are
71
- of type self, this must run after the class is loaded
72
- """
73
- lazy_import()
74
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
66
+ additional_properties_type = None
75
67
 
76
68
  _nullable = False
77
69
 
@@ -85,11 +77,8 @@ class RetailMediaExternalv1SetBidsModelResource(ModelNormal):
85
77
  openapi_types (dict): The key is attribute name
86
78
  and the value is attribute type.
87
79
  """
88
- lazy_import()
89
80
  return {
90
- 'type': (str,), # noqa: E501
91
- 'id': (str, none_type,), # noqa: E501
92
- 'attributes': (RetailMediaExternalv1SetBidsModel,), # noqa: E501
81
+ 'value': (str,),
93
82
  }
94
83
 
95
84
  @cached_property
@@ -97,26 +86,32 @@ class RetailMediaExternalv1SetBidsModelResource(ModelNormal):
97
86
  return None
98
87
 
99
88
 
100
- attribute_map = {
101
- 'type': 'type', # noqa: E501
102
- 'id': 'id', # noqa: E501
103
- 'attributes': 'attributes', # noqa: E501
104
- }
89
+ attribute_map = {}
105
90
 
106
- read_only_vars = {
107
- }
91
+ read_only_vars = set()
108
92
 
109
- _composed_schemas = {}
93
+ _composed_schemas = None
94
+
95
+ required_properties = set([
96
+ '_data_store',
97
+ '_check_type',
98
+ '_spec_property_naming',
99
+ '_path_to_item',
100
+ '_configuration',
101
+ '_visited_composed_classes',
102
+ ])
110
103
 
111
- @classmethod
112
104
  @convert_js_args_to_python_args
113
- def _from_openapi_data(cls, type, *args, **kwargs): # noqa: E501
114
- """RetailMediaExternalv1SetBidsModelResource - a model defined in OpenAPI
105
+ def __init__(self, *args, **kwargs):
106
+ """NegotiationStateModel - a model defined in OpenAPI
107
+
108
+ Note that value can be passed either in args or in kwargs, but not in both.
115
109
 
116
110
  Args:
117
- type (str):
111
+ args[0] (str): The state of a negotiation in the context of a line item.., must be one of ["Invalid", "Modified", "Submitted", "Reviewed", "Approved", ] # noqa: E501
118
112
 
119
113
  Keyword Args:
114
+ value (str): The state of a negotiation in the context of a line item.., must be one of ["Invalid", "Modified", "Submitted", "Reviewed", "Approved", ] # noqa: E501
120
115
  _check_type (bool): if True, values for parameters in openapi_types
121
116
  will be type checked and a TypeError will be
122
117
  raised if the wrong type is input.
@@ -147,18 +142,27 @@ class RetailMediaExternalv1SetBidsModelResource(ModelNormal):
147
142
  Animal class but this time we won't travel
148
143
  through its discriminator because we passed in
149
144
  _visited_composed_classes = (Animal,)
150
- id (str, none_type): [optional] # noqa: E501
151
- attributes (RetailMediaExternalv1SetBidsModel): [optional] # noqa: E501
152
145
  """
146
+ # required up here when default value is not given
147
+ _path_to_item = kwargs.pop('_path_to_item', ())
148
+
149
+ if 'value' in kwargs:
150
+ value = kwargs.pop('value')
151
+ elif args:
152
+ args = list(args)
153
+ value = args.pop(0)
154
+ else:
155
+ raise ApiTypeError(
156
+ "value is required, but not passed in args or kwargs and doesn't have default",
157
+ path_to_item=_path_to_item,
158
+ valid_classes=(self.__class__,),
159
+ )
153
160
 
154
161
  _check_type = kwargs.pop('_check_type', True)
155
- _spec_property_naming = kwargs.pop('_spec_property_naming', True)
156
- _path_to_item = kwargs.pop('_path_to_item', ())
162
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
157
163
  _configuration = kwargs.pop('_configuration', None)
158
164
  _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
159
165
 
160
- self = super(OpenApiModel, cls).__new__(cls)
161
-
162
166
  if args:
163
167
  for arg in args:
164
168
  if isinstance(arg, dict):
@@ -179,35 +183,29 @@ class RetailMediaExternalv1SetBidsModelResource(ModelNormal):
179
183
  self._path_to_item = _path_to_item
180
184
  self._configuration = _configuration
181
185
  self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
186
+ self.value = value
187
+ if kwargs:
188
+ raise ApiTypeError(
189
+ "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
190
+ kwargs,
191
+ self.__class__.__name__,
192
+ ),
193
+ path_to_item=_path_to_item,
194
+ valid_classes=(self.__class__,),
195
+ )
182
196
 
183
- self.type = type
184
- for var_name, var_value in kwargs.items():
185
- if var_name not in self.attribute_map and \
186
- self._configuration is not None and \
187
- self._configuration.discard_unknown_keys and \
188
- self.additional_properties_type is None:
189
- # discard variable.
190
- continue
191
- setattr(self, var_name, var_value)
192
- return self
193
-
194
- required_properties = set([
195
- '_data_store',
196
- '_check_type',
197
- '_spec_property_naming',
198
- '_path_to_item',
199
- '_configuration',
200
- '_visited_composed_classes',
201
- ])
202
-
197
+ @classmethod
203
198
  @convert_js_args_to_python_args
204
- def __init__(self, type, *args, **kwargs): # noqa: E501
205
- """RetailMediaExternalv1SetBidsModelResource - a model defined in OpenAPI
199
+ def _from_openapi_data(cls, *args, **kwargs):
200
+ """NegotiationStateModel - a model defined in OpenAPI
201
+
202
+ Note that value can be passed either in args or in kwargs, but not in both.
206
203
 
207
204
  Args:
208
- type (str):
205
+ args[0] (str): The state of a negotiation in the context of a line item.., must be one of ["Invalid", "Modified", "Submitted", "Reviewed", "Approved", ] # noqa: E501
209
206
 
210
207
  Keyword Args:
208
+ value (str): The state of a negotiation in the context of a line item.., must be one of ["Invalid", "Modified", "Submitted", "Reviewed", "Approved", ] # noqa: E501
211
209
  _check_type (bool): if True, values for parameters in openapi_types
212
210
  will be type checked and a TypeError will be
213
211
  raised if the wrong type is input.
@@ -238,13 +236,26 @@ class RetailMediaExternalv1SetBidsModelResource(ModelNormal):
238
236
  Animal class but this time we won't travel
239
237
  through its discriminator because we passed in
240
238
  _visited_composed_classes = (Animal,)
241
- id (str, none_type): [optional] # noqa: E501
242
- attributes (RetailMediaExternalv1SetBidsModel): [optional] # noqa: E501
243
239
  """
240
+ # required up here when default value is not given
241
+ _path_to_item = kwargs.pop('_path_to_item', ())
242
+
243
+ self = super(OpenApiModel, cls).__new__(cls)
244
+
245
+ if 'value' in kwargs:
246
+ value = kwargs.pop('value')
247
+ elif args:
248
+ args = list(args)
249
+ value = args.pop(0)
250
+ else:
251
+ raise ApiTypeError(
252
+ "value is required, but not passed in args or kwargs and doesn't have default",
253
+ path_to_item=_path_to_item,
254
+ valid_classes=(self.__class__,),
255
+ )
244
256
 
245
257
  _check_type = kwargs.pop('_check_type', True)
246
258
  _spec_property_naming = kwargs.pop('_spec_property_naming', False)
247
- _path_to_item = kwargs.pop('_path_to_item', ())
248
259
  _configuration = kwargs.pop('_configuration', None)
249
260
  _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
250
261
 
@@ -268,16 +279,15 @@ class RetailMediaExternalv1SetBidsModelResource(ModelNormal):
268
279
  self._path_to_item = _path_to_item
269
280
  self._configuration = _configuration
270
281
  self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
282
+ self.value = value
283
+ if kwargs:
284
+ raise ApiTypeError(
285
+ "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
286
+ kwargs,
287
+ self.__class__.__name__,
288
+ ),
289
+ path_to_item=_path_to_item,
290
+ valid_classes=(self.__class__,),
291
+ )
271
292
 
272
- self.type = type
273
- for var_name, var_value in kwargs.items():
274
- if var_name not in self.attribute_map and \
275
- self._configuration is not None and \
276
- self._configuration.discard_unknown_keys and \
277
- self.additional_properties_type is None:
278
- # discard variable.
279
- continue
280
- setattr(self, var_name, var_value)
281
- if var_name in self.read_only_vars:
282
- raise ApiAttributeError(f"`{var_name}` is a read-only attribute. Use `from_openapi_data` to instantiate "
283
- f"class with read only attributes.")
293
+ return self
@@ -29,8 +29,14 @@ from criteo_api_retailmedia_v2023_07.model_utils import ( # noqa: F401
29
29
  from criteo_api_retailmedia_v2023_07.exceptions import ApiAttributeError
30
30
 
31
31
 
32
+ def lazy_import():
33
+ from criteo_api_retailmedia_v2023_07.model.approval_status_model import ApprovalStatusModel
34
+ from criteo_api_retailmedia_v2023_07.model.negotiation_state_model import NegotiationStateModel
35
+ globals()['ApprovalStatusModel'] = ApprovalStatusModel
36
+ globals()['NegotiationStateModel'] = NegotiationStateModel
32
37
 
33
- class RetailMediaExternalv1ProposalStatusModel(ModelNormal):
38
+
39
+ class ProposalStatusModel(ModelNormal):
34
40
  """NOTE: This class is auto generated by OpenAPI Generator.
35
41
  Ref: https://openapi-generator.tech
36
42
 
@@ -55,37 +61,12 @@ class RetailMediaExternalv1ProposalStatusModel(ModelNormal):
55
61
  """
56
62
 
57
63
  allowed_values = {
58
- ('negotiation_state',): {
59
- 'INVALID': "Invalid",
60
- 'MODIFIED': "Modified",
61
- 'SUBMITTED': "Submitted",
62
- 'REVIEWED': "Reviewed",
63
- 'APPROVED': "Approved",
64
- },
65
- ('booking_status',): {
66
- 'NOTSUBMITTED': "NotSubmitted",
67
- 'SUBMITTED': "Submitted",
68
- 'REJECTED': "Rejected",
69
- 'APPROVED': "Approved",
70
- },
71
- ('runnable_status',): {
72
- 'NOTSUBMITTED': "NotSubmitted",
73
- 'SUBMITTED': "Submitted",
74
- 'REJECTED': "Rejected",
75
- 'APPROVED': "Approved",
76
- },
77
64
  }
78
65
 
79
66
  validations = {
80
67
  }
81
68
 
82
- @cached_property
83
- def additional_properties_type():
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
- return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
69
+ additional_properties_type = None
89
70
 
90
71
  _nullable = False
91
72
 
@@ -99,10 +80,11 @@ class RetailMediaExternalv1ProposalStatusModel(ModelNormal):
99
80
  openapi_types (dict): The key is attribute name
100
81
  and the value is attribute type.
101
82
  """
83
+ lazy_import()
102
84
  return {
103
- 'negotiation_state': (str,), # noqa: E501
104
- 'booking_status': (str,), # noqa: E501
105
- 'runnable_status': (str,), # noqa: E501
85
+ 'negotiation_state': (NegotiationStateModel,), # noqa: E501
86
+ 'booking_status': (ApprovalStatusModel,), # noqa: E501
87
+ 'runnable_status': (ApprovalStatusModel,), # noqa: E501
106
88
  'comment': (str, none_type,), # noqa: E501
107
89
  'created_at': (datetime, none_type,), # noqa: E501
108
90
  'updated_at': (datetime, none_type,), # noqa: E501
@@ -129,13 +111,8 @@ class RetailMediaExternalv1ProposalStatusModel(ModelNormal):
129
111
 
130
112
  @classmethod
131
113
  @convert_js_args_to_python_args
132
- def _from_openapi_data(cls, negotiation_state, booking_status, runnable_status, *args, **kwargs): # noqa: E501
133
- """RetailMediaExternalv1ProposalStatusModel - a model defined in OpenAPI
134
-
135
- Args:
136
- negotiation_state (str):
137
- booking_status (str):
138
- runnable_status (str):
114
+ def _from_openapi_data(cls, *args, **kwargs): # noqa: E501
115
+ """ProposalStatusModel - a model defined in OpenAPI
139
116
 
140
117
  Keyword Args:
141
118
  _check_type (bool): if True, values for parameters in openapi_types
@@ -168,6 +145,9 @@ class RetailMediaExternalv1ProposalStatusModel(ModelNormal):
168
145
  Animal class but this time we won't travel
169
146
  through its discriminator because we passed in
170
147
  _visited_composed_classes = (Animal,)
148
+ negotiation_state (NegotiationStateModel): [optional] # noqa: E501
149
+ booking_status (ApprovalStatusModel): [optional] # noqa: E501
150
+ runnable_status (ApprovalStatusModel): [optional] # noqa: E501
171
151
  comment (str, none_type): [optional] # noqa: E501
172
152
  created_at (datetime, none_type): [optional] # noqa: E501
173
153
  updated_at (datetime, none_type): [optional] # noqa: E501
@@ -202,9 +182,6 @@ class RetailMediaExternalv1ProposalStatusModel(ModelNormal):
202
182
  self._configuration = _configuration
203
183
  self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
204
184
 
205
- self.negotiation_state = negotiation_state
206
- self.booking_status = booking_status
207
- self.runnable_status = runnable_status
208
185
  for var_name, var_value in kwargs.items():
209
186
  if var_name not in self.attribute_map and \
210
187
  self._configuration is not None and \
@@ -225,13 +202,8 @@ class RetailMediaExternalv1ProposalStatusModel(ModelNormal):
225
202
  ])
226
203
 
227
204
  @convert_js_args_to_python_args
228
- def __init__(self, negotiation_state, booking_status, runnable_status, *args, **kwargs): # noqa: E501
229
- """RetailMediaExternalv1ProposalStatusModel - a model defined in OpenAPI
230
-
231
- Args:
232
- negotiation_state (str):
233
- booking_status (str):
234
- runnable_status (str):
205
+ def __init__(self, *args, **kwargs): # noqa: E501
206
+ """ProposalStatusModel - a model defined in OpenAPI
235
207
 
236
208
  Keyword Args:
237
209
  _check_type (bool): if True, values for parameters in openapi_types
@@ -264,6 +236,9 @@ class RetailMediaExternalv1ProposalStatusModel(ModelNormal):
264
236
  Animal class but this time we won't travel
265
237
  through its discriminator because we passed in
266
238
  _visited_composed_classes = (Animal,)
239
+ negotiation_state (NegotiationStateModel): [optional] # noqa: E501
240
+ booking_status (ApprovalStatusModel): [optional] # noqa: E501
241
+ runnable_status (ApprovalStatusModel): [optional] # noqa: E501
267
242
  comment (str, none_type): [optional] # noqa: E501
268
243
  created_at (datetime, none_type): [optional] # noqa: E501
269
244
  updated_at (datetime, none_type): [optional] # noqa: E501
@@ -296,9 +271,6 @@ class RetailMediaExternalv1ProposalStatusModel(ModelNormal):
296
271
  self._configuration = _configuration
297
272
  self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
298
273
 
299
- self.negotiation_state = negotiation_state
300
- self.booking_status = booking_status
301
- self.runnable_status = runnable_status
302
274
  for var_name, var_value in kwargs.items():
303
275
  if var_name not in self.attribute_map and \
304
276
  self._configuration is not None and \