rapidata 2.35.3__py3-none-any.whl → 2.36.0__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 rapidata might be problematic. Click here for more details.
- rapidata/__init__.py +1 -1
- rapidata/api_client/__init__.py +21 -3
- rapidata/api_client/api/__init__.py +1 -0
- rapidata/api_client/api/benchmark_api.py +294 -0
- rapidata/api_client/api/campaign_api.py +268 -0
- rapidata/api_client/api/customer_rapid_api.py +247 -0
- rapidata/api_client/api/pipeline_api.py +0 -873
- rapidata/api_client/api/sample_api.py +299 -0
- rapidata/api_client/models/__init__.py +20 -3
- rapidata/api_client/models/and_filter.py +121 -0
- rapidata/api_client/models/and_filter_filters_inner.py +268 -0
- rapidata/api_client/models/boost_mode.py +37 -0
- rapidata/api_client/models/boost_query_result.py +10 -1
- rapidata/api_client/models/campaign_filter.py +98 -0
- rapidata/api_client/models/change_boost_model.py +89 -0
- rapidata/api_client/models/compare_rapid_blueprint.py +5 -3
- rapidata/api_client/models/compare_rapid_blueprint1.py +96 -0
- rapidata/api_client/models/country_filter.py +98 -0
- rapidata/api_client/models/create_leaderboard_model.py +32 -2
- rapidata/api_client/models/demographic_filter.py +100 -0
- rapidata/api_client/models/feature_flag_model.py +4 -4
- rapidata/api_client/models/free_text_payload.py +10 -3
- rapidata/api_client/models/free_text_rapid_blueprint.py +10 -3
- rapidata/api_client/models/get_compare_ab_summary_result.py +4 -2
- rapidata/api_client/models/get_leaderboard_by_id_result.py +29 -2
- rapidata/api_client/models/get_public_responses_result.py +95 -0
- rapidata/api_client/models/get_sample_by_id_result.py +126 -0
- rapidata/api_client/models/language_filter.py +98 -0
- rapidata/api_client/models/leaderboard_query_result.py +29 -2
- rapidata/api_client/models/new_user_filter.py +96 -0
- rapidata/api_client/models/not_filter.py +117 -0
- rapidata/api_client/models/or_filter.py +121 -0
- rapidata/api_client/models/public_rapid_response.py +112 -0
- rapidata/api_client/models/response_count_filter.py +109 -0
- rapidata/api_client/models/sample_by_identifier.py +126 -0
- rapidata/api_client/models/sample_by_identifier_paged_result.py +105 -0
- rapidata/api_client/models/simple_workflow_config_blueprint.py +37 -23
- rapidata/api_client/models/user_score_filter.py +102 -0
- rapidata/api_client/models/user_state.py +38 -0
- rapidata/api_client/models/user_state_filter.py +101 -0
- rapidata/api_client_README.md +24 -6
- rapidata/rapidata_client/benchmark/rapidata_benchmark.py +26 -2
- rapidata/rapidata_client/order/rapidata_order_manager.py +298 -219
- rapidata/rapidata_client/workflow/_compare_workflow.py +7 -2
- {rapidata-2.35.3.dist-info → rapidata-2.36.0.dist-info}/METADATA +1 -1
- {rapidata-2.35.3.dist-info → rapidata-2.36.0.dist-info}/RECORD +48 -26
- {rapidata-2.35.3.dist-info → rapidata-2.36.0.dist-info}/LICENSE +0 -0
- {rapidata-2.35.3.dist-info → rapidata-2.36.0.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,268 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Rapidata.Dataset
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
|
+
import pprint
|
|
18
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
19
|
+
from typing import Any, List, Optional
|
|
20
|
+
from rapidata.api_client.models.campaign_filter import CampaignFilter
|
|
21
|
+
from rapidata.api_client.models.country_filter import CountryFilter
|
|
22
|
+
from rapidata.api_client.models.demographic_filter import DemographicFilter
|
|
23
|
+
from rapidata.api_client.models.language_filter import LanguageFilter
|
|
24
|
+
from rapidata.api_client.models.new_user_filter import NewUserFilter
|
|
25
|
+
from rapidata.api_client.models.response_count_filter import ResponseCountFilter
|
|
26
|
+
from rapidata.api_client.models.user_score_filter import UserScoreFilter
|
|
27
|
+
from rapidata.api_client.models.user_state_filter import UserStateFilter
|
|
28
|
+
from pydantic import StrictStr, Field
|
|
29
|
+
from typing import Union, List, Set, Optional, Dict
|
|
30
|
+
from typing_extensions import Literal, Self
|
|
31
|
+
|
|
32
|
+
ANDFILTERFILTERSINNER_ONE_OF_SCHEMAS = ["AndFilter", "CampaignFilter", "CountryFilter", "DemographicFilter", "LanguageFilter", "NewUserFilter", "NotFilter", "OrFilter", "ResponseCountFilter", "UserScoreFilter", "UserStateFilter"]
|
|
33
|
+
|
|
34
|
+
class AndFilterFiltersInner(BaseModel):
|
|
35
|
+
"""
|
|
36
|
+
AndFilterFiltersInner
|
|
37
|
+
"""
|
|
38
|
+
# data type: AndFilter
|
|
39
|
+
oneof_schema_1_validator: Optional[AndFilter] = None
|
|
40
|
+
# data type: CampaignFilter
|
|
41
|
+
oneof_schema_2_validator: Optional[CampaignFilter] = None
|
|
42
|
+
# data type: CountryFilter
|
|
43
|
+
oneof_schema_3_validator: Optional[CountryFilter] = None
|
|
44
|
+
# data type: DemographicFilter
|
|
45
|
+
oneof_schema_4_validator: Optional[DemographicFilter] = None
|
|
46
|
+
# data type: LanguageFilter
|
|
47
|
+
oneof_schema_5_validator: Optional[LanguageFilter] = None
|
|
48
|
+
# data type: NewUserFilter
|
|
49
|
+
oneof_schema_6_validator: Optional[NewUserFilter] = None
|
|
50
|
+
# data type: NotFilter
|
|
51
|
+
oneof_schema_7_validator: Optional[NotFilter] = None
|
|
52
|
+
# data type: OrFilter
|
|
53
|
+
oneof_schema_8_validator: Optional[OrFilter] = None
|
|
54
|
+
# data type: ResponseCountFilter
|
|
55
|
+
oneof_schema_9_validator: Optional[ResponseCountFilter] = None
|
|
56
|
+
# data type: UserScoreFilter
|
|
57
|
+
oneof_schema_10_validator: Optional[UserScoreFilter] = None
|
|
58
|
+
# data type: UserStateFilter
|
|
59
|
+
oneof_schema_11_validator: Optional[UserStateFilter] = None
|
|
60
|
+
actual_instance: Optional[Union[AndFilter, CampaignFilter, CountryFilter, DemographicFilter, LanguageFilter, NewUserFilter, NotFilter, OrFilter, ResponseCountFilter, UserScoreFilter, UserStateFilter]] = None
|
|
61
|
+
one_of_schemas: Set[str] = { "AndFilter", "CampaignFilter", "CountryFilter", "DemographicFilter", "LanguageFilter", "NewUserFilter", "NotFilter", "OrFilter", "ResponseCountFilter", "UserScoreFilter", "UserStateFilter" }
|
|
62
|
+
|
|
63
|
+
model_config = ConfigDict(
|
|
64
|
+
validate_assignment=True,
|
|
65
|
+
protected_namespaces=(),
|
|
66
|
+
)
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
discriminator_value_class_map: Dict[str, str] = {
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
73
|
+
if args:
|
|
74
|
+
if len(args) > 1:
|
|
75
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
76
|
+
if kwargs:
|
|
77
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
78
|
+
super().__init__(actual_instance=args[0])
|
|
79
|
+
else:
|
|
80
|
+
super().__init__(**kwargs)
|
|
81
|
+
|
|
82
|
+
@field_validator('actual_instance')
|
|
83
|
+
def actual_instance_must_validate_oneof(cls, v):
|
|
84
|
+
instance = AndFilterFiltersInner.model_construct()
|
|
85
|
+
error_messages = []
|
|
86
|
+
match = 0
|
|
87
|
+
# validate data type: AndFilter
|
|
88
|
+
if not isinstance(v, AndFilter):
|
|
89
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `AndFilter`")
|
|
90
|
+
else:
|
|
91
|
+
match += 1
|
|
92
|
+
# validate data type: CampaignFilter
|
|
93
|
+
if not isinstance(v, CampaignFilter):
|
|
94
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `CampaignFilter`")
|
|
95
|
+
else:
|
|
96
|
+
match += 1
|
|
97
|
+
# validate data type: CountryFilter
|
|
98
|
+
if not isinstance(v, CountryFilter):
|
|
99
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `CountryFilter`")
|
|
100
|
+
else:
|
|
101
|
+
match += 1
|
|
102
|
+
# validate data type: DemographicFilter
|
|
103
|
+
if not isinstance(v, DemographicFilter):
|
|
104
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `DemographicFilter`")
|
|
105
|
+
else:
|
|
106
|
+
match += 1
|
|
107
|
+
# validate data type: LanguageFilter
|
|
108
|
+
if not isinstance(v, LanguageFilter):
|
|
109
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `LanguageFilter`")
|
|
110
|
+
else:
|
|
111
|
+
match += 1
|
|
112
|
+
# validate data type: NewUserFilter
|
|
113
|
+
if not isinstance(v, NewUserFilter):
|
|
114
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `NewUserFilter`")
|
|
115
|
+
else:
|
|
116
|
+
match += 1
|
|
117
|
+
# validate data type: NotFilter
|
|
118
|
+
if not isinstance(v, NotFilter):
|
|
119
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `NotFilter`")
|
|
120
|
+
else:
|
|
121
|
+
match += 1
|
|
122
|
+
# validate data type: OrFilter
|
|
123
|
+
if not isinstance(v, OrFilter):
|
|
124
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `OrFilter`")
|
|
125
|
+
else:
|
|
126
|
+
match += 1
|
|
127
|
+
# validate data type: ResponseCountFilter
|
|
128
|
+
if not isinstance(v, ResponseCountFilter):
|
|
129
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ResponseCountFilter`")
|
|
130
|
+
else:
|
|
131
|
+
match += 1
|
|
132
|
+
# validate data type: UserScoreFilter
|
|
133
|
+
if not isinstance(v, UserScoreFilter):
|
|
134
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `UserScoreFilter`")
|
|
135
|
+
else:
|
|
136
|
+
match += 1
|
|
137
|
+
# validate data type: UserStateFilter
|
|
138
|
+
if not isinstance(v, UserStateFilter):
|
|
139
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `UserStateFilter`")
|
|
140
|
+
else:
|
|
141
|
+
match += 1
|
|
142
|
+
if match > 1:
|
|
143
|
+
# more than 1 match
|
|
144
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in AndFilterFiltersInner with oneOf schemas: AndFilter, CampaignFilter, CountryFilter, DemographicFilter, LanguageFilter, NewUserFilter, NotFilter, OrFilter, ResponseCountFilter, UserScoreFilter, UserStateFilter. Details: " + ", ".join(error_messages))
|
|
145
|
+
elif match == 0:
|
|
146
|
+
# no match
|
|
147
|
+
raise ValueError("No match found when setting `actual_instance` in AndFilterFiltersInner with oneOf schemas: AndFilter, CampaignFilter, CountryFilter, DemographicFilter, LanguageFilter, NewUserFilter, NotFilter, OrFilter, ResponseCountFilter, UserScoreFilter, UserStateFilter. Details: " + ", ".join(error_messages))
|
|
148
|
+
else:
|
|
149
|
+
return v
|
|
150
|
+
|
|
151
|
+
@classmethod
|
|
152
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
153
|
+
return cls.from_json(json.dumps(obj))
|
|
154
|
+
|
|
155
|
+
@classmethod
|
|
156
|
+
def from_json(cls, json_str: str) -> Self:
|
|
157
|
+
"""Returns the object represented by the json string"""
|
|
158
|
+
instance = cls.model_construct()
|
|
159
|
+
error_messages = []
|
|
160
|
+
match = 0
|
|
161
|
+
|
|
162
|
+
# deserialize data into AndFilter
|
|
163
|
+
try:
|
|
164
|
+
instance.actual_instance = AndFilter.from_json(json_str)
|
|
165
|
+
match += 1
|
|
166
|
+
except (ValidationError, ValueError) as e:
|
|
167
|
+
error_messages.append(str(e))
|
|
168
|
+
# deserialize data into CampaignFilter
|
|
169
|
+
try:
|
|
170
|
+
instance.actual_instance = CampaignFilter.from_json(json_str)
|
|
171
|
+
match += 1
|
|
172
|
+
except (ValidationError, ValueError) as e:
|
|
173
|
+
error_messages.append(str(e))
|
|
174
|
+
# deserialize data into CountryFilter
|
|
175
|
+
try:
|
|
176
|
+
instance.actual_instance = CountryFilter.from_json(json_str)
|
|
177
|
+
match += 1
|
|
178
|
+
except (ValidationError, ValueError) as e:
|
|
179
|
+
error_messages.append(str(e))
|
|
180
|
+
# deserialize data into DemographicFilter
|
|
181
|
+
try:
|
|
182
|
+
instance.actual_instance = DemographicFilter.from_json(json_str)
|
|
183
|
+
match += 1
|
|
184
|
+
except (ValidationError, ValueError) as e:
|
|
185
|
+
error_messages.append(str(e))
|
|
186
|
+
# deserialize data into LanguageFilter
|
|
187
|
+
try:
|
|
188
|
+
instance.actual_instance = LanguageFilter.from_json(json_str)
|
|
189
|
+
match += 1
|
|
190
|
+
except (ValidationError, ValueError) as e:
|
|
191
|
+
error_messages.append(str(e))
|
|
192
|
+
# deserialize data into NewUserFilter
|
|
193
|
+
try:
|
|
194
|
+
instance.actual_instance = NewUserFilter.from_json(json_str)
|
|
195
|
+
match += 1
|
|
196
|
+
except (ValidationError, ValueError) as e:
|
|
197
|
+
error_messages.append(str(e))
|
|
198
|
+
# deserialize data into NotFilter
|
|
199
|
+
try:
|
|
200
|
+
instance.actual_instance = NotFilter.from_json(json_str)
|
|
201
|
+
match += 1
|
|
202
|
+
except (ValidationError, ValueError) as e:
|
|
203
|
+
error_messages.append(str(e))
|
|
204
|
+
# deserialize data into OrFilter
|
|
205
|
+
try:
|
|
206
|
+
instance.actual_instance = OrFilter.from_json(json_str)
|
|
207
|
+
match += 1
|
|
208
|
+
except (ValidationError, ValueError) as e:
|
|
209
|
+
error_messages.append(str(e))
|
|
210
|
+
# deserialize data into ResponseCountFilter
|
|
211
|
+
try:
|
|
212
|
+
instance.actual_instance = ResponseCountFilter.from_json(json_str)
|
|
213
|
+
match += 1
|
|
214
|
+
except (ValidationError, ValueError) as e:
|
|
215
|
+
error_messages.append(str(e))
|
|
216
|
+
# deserialize data into UserScoreFilter
|
|
217
|
+
try:
|
|
218
|
+
instance.actual_instance = UserScoreFilter.from_json(json_str)
|
|
219
|
+
match += 1
|
|
220
|
+
except (ValidationError, ValueError) as e:
|
|
221
|
+
error_messages.append(str(e))
|
|
222
|
+
# deserialize data into UserStateFilter
|
|
223
|
+
try:
|
|
224
|
+
instance.actual_instance = UserStateFilter.from_json(json_str)
|
|
225
|
+
match += 1
|
|
226
|
+
except (ValidationError, ValueError) as e:
|
|
227
|
+
error_messages.append(str(e))
|
|
228
|
+
|
|
229
|
+
if match > 1:
|
|
230
|
+
# more than 1 match
|
|
231
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into AndFilterFiltersInner with oneOf schemas: AndFilter, CampaignFilter, CountryFilter, DemographicFilter, LanguageFilter, NewUserFilter, NotFilter, OrFilter, ResponseCountFilter, UserScoreFilter, UserStateFilter. Details: " + ", ".join(error_messages))
|
|
232
|
+
elif match == 0:
|
|
233
|
+
# no match
|
|
234
|
+
raise ValueError("No match found when deserializing the JSON string into AndFilterFiltersInner with oneOf schemas: AndFilter, CampaignFilter, CountryFilter, DemographicFilter, LanguageFilter, NewUserFilter, NotFilter, OrFilter, ResponseCountFilter, UserScoreFilter, UserStateFilter. Details: " + ", ".join(error_messages))
|
|
235
|
+
else:
|
|
236
|
+
return instance
|
|
237
|
+
|
|
238
|
+
def to_json(self) -> str:
|
|
239
|
+
"""Returns the JSON representation of the actual instance"""
|
|
240
|
+
if self.actual_instance is None:
|
|
241
|
+
return "null"
|
|
242
|
+
|
|
243
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
244
|
+
return self.actual_instance.to_json()
|
|
245
|
+
else:
|
|
246
|
+
return json.dumps(self.actual_instance)
|
|
247
|
+
|
|
248
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], AndFilter, CampaignFilter, CountryFilter, DemographicFilter, LanguageFilter, NewUserFilter, NotFilter, OrFilter, ResponseCountFilter, UserScoreFilter, UserStateFilter]]:
|
|
249
|
+
"""Returns the dict representation of the actual instance"""
|
|
250
|
+
if self.actual_instance is None:
|
|
251
|
+
return None
|
|
252
|
+
|
|
253
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
254
|
+
return self.actual_instance.to_dict()
|
|
255
|
+
else:
|
|
256
|
+
# primitive type
|
|
257
|
+
return self.actual_instance
|
|
258
|
+
|
|
259
|
+
def to_str(self) -> str:
|
|
260
|
+
"""Returns the string representation of the actual instance"""
|
|
261
|
+
return pprint.pformat(self.model_dump())
|
|
262
|
+
|
|
263
|
+
from rapidata.api_client.models.and_filter import AndFilter
|
|
264
|
+
from rapidata.api_client.models.not_filter import NotFilter
|
|
265
|
+
from rapidata.api_client.models.or_filter import OrFilter
|
|
266
|
+
# TODO: Rewrite to not use raise_errors
|
|
267
|
+
AndFilterFiltersInner.model_rebuild(raise_errors=False)
|
|
268
|
+
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Rapidata.Dataset
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import json
|
|
17
|
+
from enum import Enum
|
|
18
|
+
from typing_extensions import Self
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
class BoostMode(str, Enum):
|
|
22
|
+
"""
|
|
23
|
+
BoostMode
|
|
24
|
+
"""
|
|
25
|
+
|
|
26
|
+
"""
|
|
27
|
+
allowed enum values
|
|
28
|
+
"""
|
|
29
|
+
AUTOMATIC = 'Automatic'
|
|
30
|
+
MANUAL = 'Manual'
|
|
31
|
+
|
|
32
|
+
@classmethod
|
|
33
|
+
def from_json(cls, json_str: str) -> Self:
|
|
34
|
+
"""Create an instance of BoostMode from a JSON string"""
|
|
35
|
+
return cls(json.loads(json_str))
|
|
36
|
+
|
|
37
|
+
|
|
@@ -27,10 +27,11 @@ class BoostQueryResult(BaseModel):
|
|
|
27
27
|
BoostQueryResult
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
status: StrictStr
|
|
30
|
+
mode: StrictStr
|
|
30
31
|
active_campaigns: List[StrictStr] = Field(alias="activeCampaigns")
|
|
31
32
|
inactive_campaigns: List[StrictStr] = Field(alias="inactiveCampaigns")
|
|
32
33
|
unknown_campaigns: List[StrictInt] = Field(alias="unknownCampaigns")
|
|
33
|
-
__properties: ClassVar[List[str]] = ["status", "activeCampaigns", "inactiveCampaigns", "unknownCampaigns"]
|
|
34
|
+
__properties: ClassVar[List[str]] = ["status", "mode", "activeCampaigns", "inactiveCampaigns", "unknownCampaigns"]
|
|
34
35
|
|
|
35
36
|
@field_validator('status')
|
|
36
37
|
def status_validate_enum(cls, value):
|
|
@@ -39,6 +40,13 @@ class BoostQueryResult(BaseModel):
|
|
|
39
40
|
raise ValueError("must be one of enum values ('Active', 'Inactive', 'Partial', 'Unknown')")
|
|
40
41
|
return value
|
|
41
42
|
|
|
43
|
+
@field_validator('mode')
|
|
44
|
+
def mode_validate_enum(cls, value):
|
|
45
|
+
"""Validates the enum"""
|
|
46
|
+
if value not in set(['Automatic', 'Manual']):
|
|
47
|
+
raise ValueError("must be one of enum values ('Automatic', 'Manual')")
|
|
48
|
+
return value
|
|
49
|
+
|
|
42
50
|
model_config = ConfigDict(
|
|
43
51
|
populate_by_name=True,
|
|
44
52
|
validate_assignment=True,
|
|
@@ -91,6 +99,7 @@ class BoostQueryResult(BaseModel):
|
|
|
91
99
|
|
|
92
100
|
_obj = cls.model_validate({
|
|
93
101
|
"status": obj.get("status"),
|
|
102
|
+
"mode": obj.get("mode"),
|
|
94
103
|
"activeCampaigns": obj.get("activeCampaigns"),
|
|
95
104
|
"inactiveCampaigns": obj.get("inactiveCampaigns"),
|
|
96
105
|
"unknownCampaigns": obj.get("unknownCampaigns")
|
|
@@ -0,0 +1,98 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Rapidata.Dataset
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class CampaignFilter(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
CampaignFilter
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
t: StrictStr = Field(description="Discriminator value for CampaignFilter", alias="_t")
|
|
30
|
+
campaign_ids: List[StrictStr] = Field(alias="campaignIds")
|
|
31
|
+
execution_order: Optional[StrictInt] = Field(default=None, alias="executionOrder")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["_t", "campaignIds", "executionOrder"]
|
|
33
|
+
|
|
34
|
+
@field_validator('t')
|
|
35
|
+
def t_validate_enum(cls, value):
|
|
36
|
+
"""Validates the enum"""
|
|
37
|
+
if value not in set(['CampaignFilter']):
|
|
38
|
+
raise ValueError("must be one of enum values ('CampaignFilter')")
|
|
39
|
+
return value
|
|
40
|
+
|
|
41
|
+
model_config = ConfigDict(
|
|
42
|
+
populate_by_name=True,
|
|
43
|
+
validate_assignment=True,
|
|
44
|
+
protected_namespaces=(),
|
|
45
|
+
)
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def to_str(self) -> str:
|
|
49
|
+
"""Returns the string representation of the model using alias"""
|
|
50
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
51
|
+
|
|
52
|
+
def to_json(self) -> str:
|
|
53
|
+
"""Returns the JSON representation of the model using alias"""
|
|
54
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
55
|
+
return json.dumps(self.to_dict())
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
59
|
+
"""Create an instance of CampaignFilter from a JSON string"""
|
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
|
61
|
+
|
|
62
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
63
|
+
"""Return the dictionary representation of the model using alias.
|
|
64
|
+
|
|
65
|
+
This has the following differences from calling pydantic's
|
|
66
|
+
`self.model_dump(by_alias=True)`:
|
|
67
|
+
|
|
68
|
+
* `None` is only added to the output dict for nullable fields that
|
|
69
|
+
were set at model initialization. Other fields with value `None`
|
|
70
|
+
are ignored.
|
|
71
|
+
"""
|
|
72
|
+
excluded_fields: Set[str] = set([
|
|
73
|
+
])
|
|
74
|
+
|
|
75
|
+
_dict = self.model_dump(
|
|
76
|
+
by_alias=True,
|
|
77
|
+
exclude=excluded_fields,
|
|
78
|
+
exclude_none=True,
|
|
79
|
+
)
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of CampaignFilter from a dict"""
|
|
85
|
+
if obj is None:
|
|
86
|
+
return None
|
|
87
|
+
|
|
88
|
+
if not isinstance(obj, dict):
|
|
89
|
+
return cls.model_validate(obj)
|
|
90
|
+
|
|
91
|
+
_obj = cls.model_validate({
|
|
92
|
+
"_t": obj.get("_t") if obj.get("_t") is not None else 'CampaignFilter',
|
|
93
|
+
"campaignIds": obj.get("campaignIds"),
|
|
94
|
+
"executionOrder": obj.get("executionOrder")
|
|
95
|
+
})
|
|
96
|
+
return _obj
|
|
97
|
+
|
|
98
|
+
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Rapidata.Dataset
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictBool
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class ChangeBoostModel(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
The model to update the manual boost status. or putting it back to autopilot.
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
is_manual: StrictBool = Field(description="If the manual overwrite should be applied", alias="isManual")
|
|
30
|
+
is_active: StrictBool = Field(description="If manual is set to true it will overrule the system with this.", alias="isActive")
|
|
31
|
+
__properties: ClassVar[List[str]] = ["isManual", "isActive"]
|
|
32
|
+
|
|
33
|
+
model_config = ConfigDict(
|
|
34
|
+
populate_by_name=True,
|
|
35
|
+
validate_assignment=True,
|
|
36
|
+
protected_namespaces=(),
|
|
37
|
+
)
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
def to_str(self) -> str:
|
|
41
|
+
"""Returns the string representation of the model using alias"""
|
|
42
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
43
|
+
|
|
44
|
+
def to_json(self) -> str:
|
|
45
|
+
"""Returns the JSON representation of the model using alias"""
|
|
46
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
47
|
+
return json.dumps(self.to_dict())
|
|
48
|
+
|
|
49
|
+
@classmethod
|
|
50
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
51
|
+
"""Create an instance of ChangeBoostModel from a JSON string"""
|
|
52
|
+
return cls.from_dict(json.loads(json_str))
|
|
53
|
+
|
|
54
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
55
|
+
"""Return the dictionary representation of the model using alias.
|
|
56
|
+
|
|
57
|
+
This has the following differences from calling pydantic's
|
|
58
|
+
`self.model_dump(by_alias=True)`:
|
|
59
|
+
|
|
60
|
+
* `None` is only added to the output dict for nullable fields that
|
|
61
|
+
were set at model initialization. Other fields with value `None`
|
|
62
|
+
are ignored.
|
|
63
|
+
"""
|
|
64
|
+
excluded_fields: Set[str] = set([
|
|
65
|
+
])
|
|
66
|
+
|
|
67
|
+
_dict = self.model_dump(
|
|
68
|
+
by_alias=True,
|
|
69
|
+
exclude=excluded_fields,
|
|
70
|
+
exclude_none=True,
|
|
71
|
+
)
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
76
|
+
"""Create an instance of ChangeBoostModel from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return cls.model_validate(obj)
|
|
82
|
+
|
|
83
|
+
_obj = cls.model_validate({
|
|
84
|
+
"isManual": obj.get("isManual"),
|
|
85
|
+
"isActive": obj.get("isActive")
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -18,7 +18,7 @@ import re # noqa: F401
|
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
20
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
21
|
-
from typing import Any, ClassVar, Dict, List
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from typing import Optional, Set
|
|
23
23
|
from typing_extensions import Self
|
|
24
24
|
|
|
@@ -28,7 +28,8 @@ class CompareRapidBlueprint(BaseModel):
|
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
t: StrictStr = Field(description="Discriminator value for CompareBlueprint", alias="_t")
|
|
30
30
|
criteria: StrictStr
|
|
31
|
-
|
|
31
|
+
index_identifiers: Optional[List[StrictStr]] = Field(default=None, alias="indexIdentifiers")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["_t", "criteria", "indexIdentifiers"]
|
|
32
33
|
|
|
33
34
|
@field_validator('t')
|
|
34
35
|
def t_validate_enum(cls, value):
|
|
@@ -89,7 +90,8 @@ class CompareRapidBlueprint(BaseModel):
|
|
|
89
90
|
|
|
90
91
|
_obj = cls.model_validate({
|
|
91
92
|
"_t": obj.get("_t") if obj.get("_t") is not None else 'CompareBlueprint',
|
|
92
|
-
"criteria": obj.get("criteria")
|
|
93
|
+
"criteria": obj.get("criteria"),
|
|
94
|
+
"indexIdentifiers": obj.get("indexIdentifiers")
|
|
93
95
|
})
|
|
94
96
|
return _obj
|
|
95
97
|
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Rapidata.Dataset
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class CompareRapidBlueprint1(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
CompareRapidBlueprint1
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
t: StrictStr = Field(description="Discriminator value for CompareBlueprint", alias="_t")
|
|
30
|
+
criteria: StrictStr
|
|
31
|
+
__properties: ClassVar[List[str]] = ["_t", "criteria"]
|
|
32
|
+
|
|
33
|
+
@field_validator('t')
|
|
34
|
+
def t_validate_enum(cls, value):
|
|
35
|
+
"""Validates the enum"""
|
|
36
|
+
if value not in set(['CompareBlueprint']):
|
|
37
|
+
raise ValueError("must be one of enum values ('CompareBlueprint')")
|
|
38
|
+
return value
|
|
39
|
+
|
|
40
|
+
model_config = ConfigDict(
|
|
41
|
+
populate_by_name=True,
|
|
42
|
+
validate_assignment=True,
|
|
43
|
+
protected_namespaces=(),
|
|
44
|
+
)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
def to_str(self) -> str:
|
|
48
|
+
"""Returns the string representation of the model using alias"""
|
|
49
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
50
|
+
|
|
51
|
+
def to_json(self) -> str:
|
|
52
|
+
"""Returns the JSON representation of the model using alias"""
|
|
53
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
54
|
+
return json.dumps(self.to_dict())
|
|
55
|
+
|
|
56
|
+
@classmethod
|
|
57
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
58
|
+
"""Create an instance of CompareRapidBlueprint1 from a JSON string"""
|
|
59
|
+
return cls.from_dict(json.loads(json_str))
|
|
60
|
+
|
|
61
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
62
|
+
"""Return the dictionary representation of the model using alias.
|
|
63
|
+
|
|
64
|
+
This has the following differences from calling pydantic's
|
|
65
|
+
`self.model_dump(by_alias=True)`:
|
|
66
|
+
|
|
67
|
+
* `None` is only added to the output dict for nullable fields that
|
|
68
|
+
were set at model initialization. Other fields with value `None`
|
|
69
|
+
are ignored.
|
|
70
|
+
"""
|
|
71
|
+
excluded_fields: Set[str] = set([
|
|
72
|
+
])
|
|
73
|
+
|
|
74
|
+
_dict = self.model_dump(
|
|
75
|
+
by_alias=True,
|
|
76
|
+
exclude=excluded_fields,
|
|
77
|
+
exclude_none=True,
|
|
78
|
+
)
|
|
79
|
+
return _dict
|
|
80
|
+
|
|
81
|
+
@classmethod
|
|
82
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
83
|
+
"""Create an instance of CompareRapidBlueprint1 from a dict"""
|
|
84
|
+
if obj is None:
|
|
85
|
+
return None
|
|
86
|
+
|
|
87
|
+
if not isinstance(obj, dict):
|
|
88
|
+
return cls.model_validate(obj)
|
|
89
|
+
|
|
90
|
+
_obj = cls.model_validate({
|
|
91
|
+
"_t": obj.get("_t") if obj.get("_t") is not None else 'CompareBlueprint',
|
|
92
|
+
"criteria": obj.get("criteria")
|
|
93
|
+
})
|
|
94
|
+
return _obj
|
|
95
|
+
|
|
96
|
+
|