rapidata 1.4.5__py3-none-any.whl → 1.5.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.

@@ -24,10 +24,11 @@ from rapidata.api_client.models.add_validation_rapid_result import AddValidation
24
24
  from rapidata.api_client.models.add_validation_text_rapid_model import AddValidationTextRapidModel
25
25
  from rapidata.api_client.models.create_empty_validation_set_result import CreateEmptyValidationSetResult
26
26
  from rapidata.api_client.models.get_available_validation_sets_result import GetAvailableValidationSetsResult
27
+ from rapidata.api_client.models.get_validation_set_by_id_result import GetValidationSetByIdResult
27
28
  from rapidata.api_client.models.import_validation_set_from_file_result import ImportValidationSetFromFileResult
28
29
  from rapidata.api_client.models.query_validation_set_model import QueryValidationSetModel
29
30
  from rapidata.api_client.models.validation_import_post_request_blueprint import ValidationImportPostRequestBlueprint
30
- from rapidata.api_client.models.validation_set_paged_result import ValidationSetPagedResult
31
+ from rapidata.api_client.models.validation_set_model_paged_result import ValidationSetModelPagedResult
31
32
 
32
33
  from rapidata.api_client.api_client import ApiClient, RequestSerialized
33
34
  from rapidata.api_client.api_response import ApiResponse
@@ -1122,6 +1123,269 @@ class ValidationApi:
1122
1123
 
1123
1124
 
1124
1125
 
1126
+ @validate_call
1127
+ def validation_get_by_id_get(
1128
+ self,
1129
+ id: Annotated[Optional[StrictStr], Field(description="The id of the validation set to get.")] = None,
1130
+ _request_timeout: Union[
1131
+ None,
1132
+ Annotated[StrictFloat, Field(gt=0)],
1133
+ Tuple[
1134
+ Annotated[StrictFloat, Field(gt=0)],
1135
+ Annotated[StrictFloat, Field(gt=0)]
1136
+ ]
1137
+ ] = None,
1138
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1139
+ _content_type: Optional[StrictStr] = None,
1140
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1141
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1142
+ ) -> GetValidationSetByIdResult:
1143
+ """Gets a validation set by the id.
1144
+
1145
+
1146
+ :param id: The id of the validation set to get.
1147
+ :type id: str
1148
+ :param _request_timeout: timeout setting for this request. If one
1149
+ number provided, it will be total request
1150
+ timeout. It can also be a pair (tuple) of
1151
+ (connection, read) timeouts.
1152
+ :type _request_timeout: int, tuple(int, int), optional
1153
+ :param _request_auth: set to override the auth_settings for an a single
1154
+ request; this effectively ignores the
1155
+ authentication in the spec for a single request.
1156
+ :type _request_auth: dict, optional
1157
+ :param _content_type: force content-type for the request.
1158
+ :type _content_type: str, Optional
1159
+ :param _headers: set to override the headers for a single
1160
+ request; this effectively ignores the headers
1161
+ in the spec for a single request.
1162
+ :type _headers: dict, optional
1163
+ :param _host_index: set to override the host_index for a single
1164
+ request; this effectively ignores the host_index
1165
+ in the spec for a single request.
1166
+ :type _host_index: int, optional
1167
+ :return: Returns the result object.
1168
+ """ # noqa: E501
1169
+
1170
+ _param = self._validation_get_by_id_get_serialize(
1171
+ id=id,
1172
+ _request_auth=_request_auth,
1173
+ _content_type=_content_type,
1174
+ _headers=_headers,
1175
+ _host_index=_host_index
1176
+ )
1177
+
1178
+ _response_types_map: Dict[str, Optional[str]] = {
1179
+ '200': "GetValidationSetByIdResult",
1180
+ }
1181
+ response_data = self.api_client.call_api(
1182
+ *_param,
1183
+ _request_timeout=_request_timeout
1184
+ )
1185
+ response_data.read()
1186
+ return self.api_client.response_deserialize(
1187
+ response_data=response_data,
1188
+ response_types_map=_response_types_map,
1189
+ ).data
1190
+
1191
+
1192
+ @validate_call
1193
+ def validation_get_by_id_get_with_http_info(
1194
+ self,
1195
+ id: Annotated[Optional[StrictStr], Field(description="The id of the validation set to get.")] = None,
1196
+ _request_timeout: Union[
1197
+ None,
1198
+ Annotated[StrictFloat, Field(gt=0)],
1199
+ Tuple[
1200
+ Annotated[StrictFloat, Field(gt=0)],
1201
+ Annotated[StrictFloat, Field(gt=0)]
1202
+ ]
1203
+ ] = None,
1204
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1205
+ _content_type: Optional[StrictStr] = None,
1206
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1207
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1208
+ ) -> ApiResponse[GetValidationSetByIdResult]:
1209
+ """Gets a validation set by the id.
1210
+
1211
+
1212
+ :param id: The id of the validation set to get.
1213
+ :type id: str
1214
+ :param _request_timeout: timeout setting for this request. If one
1215
+ number provided, it will be total request
1216
+ timeout. It can also be a pair (tuple) of
1217
+ (connection, read) timeouts.
1218
+ :type _request_timeout: int, tuple(int, int), optional
1219
+ :param _request_auth: set to override the auth_settings for an a single
1220
+ request; this effectively ignores the
1221
+ authentication in the spec for a single request.
1222
+ :type _request_auth: dict, optional
1223
+ :param _content_type: force content-type for the request.
1224
+ :type _content_type: str, Optional
1225
+ :param _headers: set to override the headers for a single
1226
+ request; this effectively ignores the headers
1227
+ in the spec for a single request.
1228
+ :type _headers: dict, optional
1229
+ :param _host_index: set to override the host_index for a single
1230
+ request; this effectively ignores the host_index
1231
+ in the spec for a single request.
1232
+ :type _host_index: int, optional
1233
+ :return: Returns the result object.
1234
+ """ # noqa: E501
1235
+
1236
+ _param = self._validation_get_by_id_get_serialize(
1237
+ id=id,
1238
+ _request_auth=_request_auth,
1239
+ _content_type=_content_type,
1240
+ _headers=_headers,
1241
+ _host_index=_host_index
1242
+ )
1243
+
1244
+ _response_types_map: Dict[str, Optional[str]] = {
1245
+ '200': "GetValidationSetByIdResult",
1246
+ }
1247
+ response_data = self.api_client.call_api(
1248
+ *_param,
1249
+ _request_timeout=_request_timeout
1250
+ )
1251
+ response_data.read()
1252
+ return self.api_client.response_deserialize(
1253
+ response_data=response_data,
1254
+ response_types_map=_response_types_map,
1255
+ )
1256
+
1257
+
1258
+ @validate_call
1259
+ def validation_get_by_id_get_without_preload_content(
1260
+ self,
1261
+ id: Annotated[Optional[StrictStr], Field(description="The id of the validation set to get.")] = None,
1262
+ _request_timeout: Union[
1263
+ None,
1264
+ Annotated[StrictFloat, Field(gt=0)],
1265
+ Tuple[
1266
+ Annotated[StrictFloat, Field(gt=0)],
1267
+ Annotated[StrictFloat, Field(gt=0)]
1268
+ ]
1269
+ ] = None,
1270
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
1271
+ _content_type: Optional[StrictStr] = None,
1272
+ _headers: Optional[Dict[StrictStr, Any]] = None,
1273
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1274
+ ) -> RESTResponseType:
1275
+ """Gets a validation set by the id.
1276
+
1277
+
1278
+ :param id: The id of the validation set to get.
1279
+ :type id: str
1280
+ :param _request_timeout: timeout setting for this request. If one
1281
+ number provided, it will be total request
1282
+ timeout. It can also be a pair (tuple) of
1283
+ (connection, read) timeouts.
1284
+ :type _request_timeout: int, tuple(int, int), optional
1285
+ :param _request_auth: set to override the auth_settings for an a single
1286
+ request; this effectively ignores the
1287
+ authentication in the spec for a single request.
1288
+ :type _request_auth: dict, optional
1289
+ :param _content_type: force content-type for the request.
1290
+ :type _content_type: str, Optional
1291
+ :param _headers: set to override the headers for a single
1292
+ request; this effectively ignores the headers
1293
+ in the spec for a single request.
1294
+ :type _headers: dict, optional
1295
+ :param _host_index: set to override the host_index for a single
1296
+ request; this effectively ignores the host_index
1297
+ in the spec for a single request.
1298
+ :type _host_index: int, optional
1299
+ :return: Returns the result object.
1300
+ """ # noqa: E501
1301
+
1302
+ _param = self._validation_get_by_id_get_serialize(
1303
+ id=id,
1304
+ _request_auth=_request_auth,
1305
+ _content_type=_content_type,
1306
+ _headers=_headers,
1307
+ _host_index=_host_index
1308
+ )
1309
+
1310
+ _response_types_map: Dict[str, Optional[str]] = {
1311
+ '200': "GetValidationSetByIdResult",
1312
+ }
1313
+ response_data = self.api_client.call_api(
1314
+ *_param,
1315
+ _request_timeout=_request_timeout
1316
+ )
1317
+ return response_data.response
1318
+
1319
+
1320
+ def _validation_get_by_id_get_serialize(
1321
+ self,
1322
+ id,
1323
+ _request_auth,
1324
+ _content_type,
1325
+ _headers,
1326
+ _host_index,
1327
+ ) -> RequestSerialized:
1328
+
1329
+ _host = None
1330
+
1331
+ _collection_formats: Dict[str, str] = {
1332
+ }
1333
+
1334
+ _path_params: Dict[str, str] = {}
1335
+ _query_params: List[Tuple[str, str]] = []
1336
+ _header_params: Dict[str, Optional[str]] = _headers or {}
1337
+ _form_params: List[Tuple[str, str]] = []
1338
+ _files: Dict[
1339
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
1340
+ ] = {}
1341
+ _body_params: Optional[bytes] = None
1342
+
1343
+ # process the path parameters
1344
+ # process the query parameters
1345
+ if id is not None:
1346
+
1347
+ _query_params.append(('id', id))
1348
+
1349
+ # process the header parameters
1350
+ # process the form parameters
1351
+ # process the body parameter
1352
+
1353
+
1354
+ # set the HTTP header `Accept`
1355
+ if 'Accept' not in _header_params:
1356
+ _header_params['Accept'] = self.api_client.select_header_accept(
1357
+ [
1358
+ 'text/plain',
1359
+ 'application/json',
1360
+ 'text/json'
1361
+ ]
1362
+ )
1363
+
1364
+
1365
+ # authentication setting
1366
+ _auth_settings: List[str] = [
1367
+ 'bearer',
1368
+ 'oauth2'
1369
+ ]
1370
+
1371
+ return self.api_client.param_serialize(
1372
+ method='GET',
1373
+ resource_path='/Validation/GetById',
1374
+ path_params=_path_params,
1375
+ query_params=_query_params,
1376
+ header_params=_header_params,
1377
+ body=_body_params,
1378
+ post_params=_form_params,
1379
+ files=_files,
1380
+ auth_settings=_auth_settings,
1381
+ collection_formats=_collection_formats,
1382
+ _host=_host,
1383
+ _request_auth=_request_auth
1384
+ )
1385
+
1386
+
1387
+
1388
+
1125
1389
  @validate_call
1126
1390
  def validation_import_compare_post(
1127
1391
  self,
@@ -1716,7 +1980,7 @@ class ValidationApi:
1716
1980
  _content_type: Optional[StrictStr] = None,
1717
1981
  _headers: Optional[Dict[StrictStr, Any]] = None,
1718
1982
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1719
- ) -> ValidationSetPagedResult:
1983
+ ) -> ValidationSetModelPagedResult:
1720
1984
  """Queries validation sets based on the provided filter, paging and sorting criteria.
1721
1985
 
1722
1986
 
@@ -1753,7 +2017,7 @@ class ValidationApi:
1753
2017
  )
1754
2018
 
1755
2019
  _response_types_map: Dict[str, Optional[str]] = {
1756
- '200': "ValidationSetPagedResult",
2020
+ '200': "ValidationSetModelPagedResult",
1757
2021
  }
1758
2022
  response_data = self.api_client.call_api(
1759
2023
  *_param,
@@ -1782,7 +2046,7 @@ class ValidationApi:
1782
2046
  _content_type: Optional[StrictStr] = None,
1783
2047
  _headers: Optional[Dict[StrictStr, Any]] = None,
1784
2048
  _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
1785
- ) -> ApiResponse[ValidationSetPagedResult]:
2049
+ ) -> ApiResponse[ValidationSetModelPagedResult]:
1786
2050
  """Queries validation sets based on the provided filter, paging and sorting criteria.
1787
2051
 
1788
2052
 
@@ -1819,7 +2083,7 @@ class ValidationApi:
1819
2083
  )
1820
2084
 
1821
2085
  _response_types_map: Dict[str, Optional[str]] = {
1822
- '200': "ValidationSetPagedResult",
2086
+ '200': "ValidationSetModelPagedResult",
1823
2087
  }
1824
2088
  response_data = self.api_client.call_api(
1825
2089
  *_param,
@@ -1885,7 +2149,7 @@ class ValidationApi:
1885
2149
  )
1886
2150
 
1887
2151
  _response_types_map: Dict[str, Optional[str]] = {
1888
- '200': "ValidationSetPagedResult",
2152
+ '200': "ValidationSetModelPagedResult",
1889
2153
  }
1890
2154
  response_data = self.api_client.call_api(
1891
2155
  *_param,
@@ -74,7 +74,6 @@ from rapidata.api_client.models.create_dataset_artifact_model import CreateDatas
74
74
  from rapidata.api_client.models.create_dataset_artifact_model_dataset import CreateDatasetArtifactModelDataset
75
75
  from rapidata.api_client.models.create_demographic_rapid_model import CreateDemographicRapidModel
76
76
  from rapidata.api_client.models.create_empty_validation_set_result import CreateEmptyValidationSetResult
77
- from rapidata.api_client.models.create_legacy_client_model import CreateLegacyClientModel
78
77
  from rapidata.api_client.models.create_order_model import CreateOrderModel
79
78
  from rapidata.api_client.models.create_order_model_referee import CreateOrderModelReferee
80
79
  from rapidata.api_client.models.create_order_model_user_filters_inner import CreateOrderModelUserFiltersInner
@@ -130,6 +129,7 @@ from rapidata.api_client.models.get_pipeline_by_id_result import GetPipelineById
130
129
  from rapidata.api_client.models.get_pipeline_by_id_result_artifacts_value import GetPipelineByIdResultArtifactsValue
131
130
  from rapidata.api_client.models.get_public_orders_result import GetPublicOrdersResult
132
131
  from rapidata.api_client.models.get_simple_workflow_result_overview_result import GetSimpleWorkflowResultOverviewResult
132
+ from rapidata.api_client.models.get_validation_set_by_id_result import GetValidationSetByIdResult
133
133
  from rapidata.api_client.models.get_workflow_by_id_result import GetWorkflowByIdResult
134
134
  from rapidata.api_client.models.get_workflow_by_id_result_workflow import GetWorkflowByIdResultWorkflow
135
135
  from rapidata.api_client.models.get_workflow_progress_result import GetWorkflowProgressResult
@@ -140,12 +140,8 @@ from rapidata.api_client.models.image_dimension_metadata_model import ImageDimen
140
140
  from rapidata.api_client.models.import_from_file_result import ImportFromFileResult
141
141
  from rapidata.api_client.models.import_validation_set_from_file_result import ImportValidationSetFromFileResult
142
142
  from rapidata.api_client.models.in_progress_rapid_model import InProgressRapidModel
143
- from rapidata.api_client.models.issue_auth_token_result import IssueAuthTokenResult
144
143
  from rapidata.api_client.models.labeling_selection import LabelingSelection
145
144
  from rapidata.api_client.models.language_user_filter_model import LanguageUserFilterModel
146
- from rapidata.api_client.models.legacy_issue_client_auth_token_result import LegacyIssueClientAuthTokenResult
147
- from rapidata.api_client.models.legacy_request_password_reset_command import LegacyRequestPasswordResetCommand
148
- from rapidata.api_client.models.legacy_submit_password_reset_command import LegacySubmitPasswordResetCommand
149
145
  from rapidata.api_client.models.line import Line
150
146
  from rapidata.api_client.models.line_payload import LinePayload
151
147
  from rapidata.api_client.models.line_point import LinePoint
@@ -161,7 +157,6 @@ from rapidata.api_client.models.location_metadata import LocationMetadata
161
157
  from rapidata.api_client.models.location_metadata_exists_filter_config import LocationMetadataExistsFilterConfig
162
158
  from rapidata.api_client.models.location_metadata_model import LocationMetadataModel
163
159
  from rapidata.api_client.models.logic_operator import LogicOperator
164
- from rapidata.api_client.models.login_model import LoginModel
165
160
  from rapidata.api_client.models.metadata_visibilities import MetadataVisibilities
166
161
  from rapidata.api_client.models.multi_asset import MultiAsset
167
162
  from rapidata.api_client.models.multi_asset_model import MultiAssetModel
@@ -213,11 +208,10 @@ from rapidata.api_client.models.rapid_answer_result import RapidAnswerResult
213
208
  from rapidata.api_client.models.rapid_result_model import RapidResultModel
214
209
  from rapidata.api_client.models.rapid_result_model_result import RapidResultModelResult
215
210
  from rapidata.api_client.models.rapid_skipped_model import RapidSkippedModel
211
+ from rapidata.api_client.models.register_temporary_customer_model import RegisterTemporaryCustomerModel
216
212
  from rapidata.api_client.models.root_filter import RootFilter
217
213
  from rapidata.api_client.models.send_completion_mail_step_model import SendCompletionMailStepModel
218
214
  from rapidata.api_client.models.shape import Shape
219
- from rapidata.api_client.models.signup_customer_model import SignupCustomerModel
220
- from rapidata.api_client.models.signup_shadow_customer_model import SignupShadowCustomerModel
221
215
  from rapidata.api_client.models.simple_workflow_config import SimpleWorkflowConfig
222
216
  from rapidata.api_client.models.simple_workflow_config_model import SimpleWorkflowConfigModel
223
217
  from rapidata.api_client.models.simple_workflow_config_model_blueprint import SimpleWorkflowConfigModelBlueprint
@@ -261,9 +255,9 @@ from rapidata.api_client.models.user_score_user_filter_model import UserScoreUse
261
255
  from rapidata.api_client.models.validation_chance import ValidationChance
262
256
  from rapidata.api_client.models.validation_import_post_request_blueprint import ValidationImportPostRequestBlueprint
263
257
  from rapidata.api_client.models.validation_selection import ValidationSelection
264
- from rapidata.api_client.models.validation_set import ValidationSet
258
+ from rapidata.api_client.models.validation_set_model import ValidationSetModel
259
+ from rapidata.api_client.models.validation_set_model_paged_result import ValidationSetModelPagedResult
265
260
  from rapidata.api_client.models.validation_set_overview_model import ValidationSetOverviewModel
266
- from rapidata.api_client.models.validation_set_paged_result import ValidationSetPagedResult
267
261
  from rapidata.api_client.models.workflow_aggregation_step_model import WorkflowAggregationStepModel
268
262
  from rapidata.api_client.models.workflow_artifact_model import WorkflowArtifactModel
269
263
  from rapidata.api_client.models.workflow_config_artifact_model import WorkflowConfigArtifactModel
@@ -0,0 +1,94 @@
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 datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
22
+ from typing import Any, ClassVar, Dict, List
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class GetValidationSetByIdResult(BaseModel):
27
+ """
28
+ GetValidationSetByIdResult
29
+ """ # noqa: E501
30
+ id: StrictStr
31
+ name: StrictStr
32
+ owner_mail: StrictStr = Field(alias="ownerMail")
33
+ created_at: datetime = Field(alias="createdAt")
34
+ __properties: ClassVar[List[str]] = ["id", "name", "ownerMail", "createdAt"]
35
+
36
+ model_config = ConfigDict(
37
+ populate_by_name=True,
38
+ validate_assignment=True,
39
+ protected_namespaces=(),
40
+ )
41
+
42
+
43
+ def to_str(self) -> str:
44
+ """Returns the string representation of the model using alias"""
45
+ return pprint.pformat(self.model_dump(by_alias=True))
46
+
47
+ def to_json(self) -> str:
48
+ """Returns the JSON representation of the model using alias"""
49
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> Optional[Self]:
54
+ """Create an instance of GetValidationSetByIdResult from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self) -> Dict[str, Any]:
58
+ """Return the dictionary representation of the model using alias.
59
+
60
+ This has the following differences from calling pydantic's
61
+ `self.model_dump(by_alias=True)`:
62
+
63
+ * `None` is only added to the output dict for nullable fields that
64
+ were set at model initialization. Other fields with value `None`
65
+ are ignored.
66
+ """
67
+ excluded_fields: Set[str] = set([
68
+ ])
69
+
70
+ _dict = self.model_dump(
71
+ by_alias=True,
72
+ exclude=excluded_fields,
73
+ exclude_none=True,
74
+ )
75
+ return _dict
76
+
77
+ @classmethod
78
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
79
+ """Create an instance of GetValidationSetByIdResult from a dict"""
80
+ if obj is None:
81
+ return None
82
+
83
+ if not isinstance(obj, dict):
84
+ return cls.model_validate(obj)
85
+
86
+ _obj = cls.model_validate({
87
+ "id": obj.get("id"),
88
+ "name": obj.get("name"),
89
+ "ownerMail": obj.get("ownerMail"),
90
+ "createdAt": obj.get("createdAt")
91
+ })
92
+ return _obj
93
+
94
+
@@ -17,8 +17,8 @@ import pprint
17
17
  import re # noqa: F401
18
18
  import json
19
19
 
20
- from pydantic import BaseModel, ConfigDict, Field, StrictStr
21
- from typing import Any, ClassVar, Dict, List
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr
21
+ from typing import Any, ClassVar, Dict, List, Union
22
22
  from rapidata.api_client.models.rapid_answer_result import RapidAnswerResult
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
@@ -30,8 +30,9 @@ class RapidAnswer(BaseModel):
30
30
  id: StrictStr
31
31
  country: StrictStr
32
32
  result: RapidAnswerResult
33
+ user_score: Union[StrictFloat, StrictInt] = Field(alias="userScore")
33
34
  demographic_information: Dict[str, StrictStr] = Field(alias="demographicInformation")
34
- __properties: ClassVar[List[str]] = ["id", "country", "result", "demographicInformation"]
35
+ __properties: ClassVar[List[str]] = ["id", "country", "result", "userScore", "demographicInformation"]
35
36
 
36
37
  model_config = ConfigDict(
37
38
  populate_by_name=True,
@@ -90,6 +91,7 @@ class RapidAnswer(BaseModel):
90
91
  "id": obj.get("id"),
91
92
  "country": obj.get("country"),
92
93
  "result": RapidAnswerResult.from_dict(obj["result"]) if obj.get("result") is not None else None,
94
+ "userScore": obj.get("userScore"),
93
95
  "demographicInformation": obj.get("demographicInformation")
94
96
  })
95
97
  return _obj
@@ -0,0 +1,87 @@
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
21
+ from typing import Any, ClassVar, Dict, List
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class RegisterTemporaryCustomerModel(BaseModel):
26
+ """
27
+ The model for signing up a new temporary user.
28
+ """ # noqa: E501
29
+ token: StrictStr = Field(description="A recaptcha token to verify the user is not a bot.")
30
+ __properties: ClassVar[List[str]] = ["token"]
31
+
32
+ model_config = ConfigDict(
33
+ populate_by_name=True,
34
+ validate_assignment=True,
35
+ protected_namespaces=(),
36
+ )
37
+
38
+
39
+ def to_str(self) -> str:
40
+ """Returns the string representation of the model using alias"""
41
+ return pprint.pformat(self.model_dump(by_alias=True))
42
+
43
+ def to_json(self) -> str:
44
+ """Returns the JSON representation of the model using alias"""
45
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
46
+ return json.dumps(self.to_dict())
47
+
48
+ @classmethod
49
+ def from_json(cls, json_str: str) -> Optional[Self]:
50
+ """Create an instance of RegisterTemporaryCustomerModel from a JSON string"""
51
+ return cls.from_dict(json.loads(json_str))
52
+
53
+ def to_dict(self) -> Dict[str, Any]:
54
+ """Return the dictionary representation of the model using alias.
55
+
56
+ This has the following differences from calling pydantic's
57
+ `self.model_dump(by_alias=True)`:
58
+
59
+ * `None` is only added to the output dict for nullable fields that
60
+ were set at model initialization. Other fields with value `None`
61
+ are ignored.
62
+ """
63
+ excluded_fields: Set[str] = set([
64
+ ])
65
+
66
+ _dict = self.model_dump(
67
+ by_alias=True,
68
+ exclude=excluded_fields,
69
+ exclude_none=True,
70
+ )
71
+ return _dict
72
+
73
+ @classmethod
74
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
75
+ """Create an instance of RegisterTemporaryCustomerModel from a dict"""
76
+ if obj is None:
77
+ return None
78
+
79
+ if not isinstance(obj, dict):
80
+ return cls.model_validate(obj)
81
+
82
+ _obj = cls.model_validate({
83
+ "token": obj.get("token")
84
+ })
85
+ return _obj
86
+
87
+