rapidata 1.1.0__py3-none-any.whl → 1.2.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.

Files changed (40) hide show
  1. rapidata/__init__.py +1 -0
  2. rapidata/api_client/__init__.py +5 -3
  3. rapidata/api_client/api/__init__.py +2 -0
  4. rapidata/api_client/api/campaign_api.py +8 -4
  5. rapidata/api_client/api/coco_api.py +4 -2
  6. rapidata/api_client/api/compare_workflow_api.py +2 -1
  7. rapidata/api_client/api/datapoint_api.py +6 -3
  8. rapidata/api_client/api/dataset_api.py +16 -8
  9. rapidata/api_client/api/identity_api.py +329 -50
  10. rapidata/api_client/api/newsletter_api.py +4 -2
  11. rapidata/api_client/api/order_api.py +40 -20
  12. rapidata/api_client/api/pipeline_api.py +6 -3
  13. rapidata/api_client/api/rapid_api.py +10 -5
  14. rapidata/api_client/api/rapidata_identity_api_api.py +272 -0
  15. rapidata/api_client/api/simple_workflow_api.py +2 -1
  16. rapidata/api_client/api/user_info_api.py +272 -0
  17. rapidata/api_client/api/validation_api.py +14 -7
  18. rapidata/api_client/api/workflow_api.py +18 -9
  19. rapidata/api_client/models/__init__.py +3 -3
  20. rapidata/api_client/models/issue_auth_token_result.py +1 -1
  21. rapidata/api_client/models/legacy_issue_client_auth_token_result.py +87 -0
  22. rapidata/api_client/models/legacy_request_password_reset_command.py +98 -0
  23. rapidata/api_client/models/legacy_submit_password_reset_command.py +102 -0
  24. rapidata/api_client_README.md +10 -3
  25. rapidata/rapidata_client/__init__.py +13 -2
  26. rapidata/rapidata_client/assets/multi_asset.py +2 -0
  27. rapidata/rapidata_client/dataset/rapidata_dataset.py +19 -15
  28. rapidata/rapidata_client/dataset/validation_set_builder.py +1 -1
  29. rapidata/rapidata_client/order/rapidata_order.py +49 -18
  30. rapidata/rapidata_client/order/rapidata_order_builder.py +23 -34
  31. rapidata/rapidata_client/selection/__init__.py +1 -0
  32. rapidata/rapidata_client/selection/capped_selection.py +25 -0
  33. rapidata/rapidata_client/simple_builders/__init__.py +0 -0
  34. rapidata/rapidata_client/simple_builders/simple_classification_builders.py +14 -9
  35. rapidata/rapidata_client/simple_builders/simple_compare_builders.py +6 -3
  36. rapidata/service/openapi_service.py +15 -0
  37. {rapidata-1.1.0.dist-info → rapidata-1.2.0.dist-info}/METADATA +1 -1
  38. {rapidata-1.1.0.dist-info → rapidata-1.2.0.dist-info}/RECORD +40 -33
  39. {rapidata-1.1.0.dist-info → rapidata-1.2.0.dist-info}/LICENSE +0 -0
  40. {rapidata-1.1.0.dist-info → rapidata-1.2.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,272 @@
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
+ import warnings
15
+ from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt
16
+ from typing import Any, Dict, List, Optional, Tuple, Union
17
+ from typing_extensions import Annotated
18
+
19
+
20
+ from rapidata.api_client.api_client import ApiClient, RequestSerialized
21
+ from rapidata.api_client.api_response import ApiResponse
22
+ from rapidata.api_client.rest import RESTResponseType
23
+
24
+
25
+ class UserInfoApi:
26
+ """NOTE: This class is auto generated by OpenAPI Generator
27
+ Ref: https://openapi-generator.tech
28
+
29
+ Do not edit the class manually.
30
+ """
31
+
32
+ def __init__(self, api_client=None) -> None:
33
+ if api_client is None:
34
+ api_client = ApiClient.get_default()
35
+ self.api_client = api_client
36
+
37
+
38
+ @validate_call
39
+ def connect_userinfo_get(
40
+ self,
41
+ _request_timeout: Union[
42
+ None,
43
+ Annotated[StrictFloat, Field(gt=0)],
44
+ Tuple[
45
+ Annotated[StrictFloat, Field(gt=0)],
46
+ Annotated[StrictFloat, Field(gt=0)]
47
+ ]
48
+ ] = None,
49
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
50
+ _content_type: Optional[StrictStr] = None,
51
+ _headers: Optional[Dict[StrictStr, Any]] = None,
52
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
53
+ ) -> None:
54
+ """Retrieves information about the authenticated user.
55
+
56
+
57
+ :param _request_timeout: timeout setting for this request. If one
58
+ number provided, it will be total request
59
+ timeout. It can also be a pair (tuple) of
60
+ (connection, read) timeouts.
61
+ :type _request_timeout: int, tuple(int, int), optional
62
+ :param _request_auth: set to override the auth_settings for an a single
63
+ request; this effectively ignores the
64
+ authentication in the spec for a single request.
65
+ :type _request_auth: dict, optional
66
+ :param _content_type: force content-type for the request.
67
+ :type _content_type: str, Optional
68
+ :param _headers: set to override the headers for a single
69
+ request; this effectively ignores the headers
70
+ in the spec for a single request.
71
+ :type _headers: dict, optional
72
+ :param _host_index: set to override the host_index for a single
73
+ request; this effectively ignores the host_index
74
+ in the spec for a single request.
75
+ :type _host_index: int, optional
76
+ :return: Returns the result object.
77
+ """ # noqa: E501
78
+
79
+ _param = self._connect_userinfo_get_serialize(
80
+ _request_auth=_request_auth,
81
+ _content_type=_content_type,
82
+ _headers=_headers,
83
+ _host_index=_host_index
84
+ )
85
+
86
+ _response_types_map: Dict[str, Optional[str]] = {
87
+ '200': None,
88
+ }
89
+ response_data = self.api_client.call_api(
90
+ *_param,
91
+ _request_timeout=_request_timeout
92
+ )
93
+ response_data.read()
94
+ return self.api_client.response_deserialize(
95
+ response_data=response_data,
96
+ response_types_map=_response_types_map,
97
+ ).data
98
+
99
+
100
+ @validate_call
101
+ def connect_userinfo_get_with_http_info(
102
+ self,
103
+ _request_timeout: Union[
104
+ None,
105
+ Annotated[StrictFloat, Field(gt=0)],
106
+ Tuple[
107
+ Annotated[StrictFloat, Field(gt=0)],
108
+ Annotated[StrictFloat, Field(gt=0)]
109
+ ]
110
+ ] = None,
111
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
112
+ _content_type: Optional[StrictStr] = None,
113
+ _headers: Optional[Dict[StrictStr, Any]] = None,
114
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
115
+ ) -> ApiResponse[None]:
116
+ """Retrieves information about the authenticated user.
117
+
118
+
119
+ :param _request_timeout: timeout setting for this request. If one
120
+ number provided, it will be total request
121
+ timeout. It can also be a pair (tuple) of
122
+ (connection, read) timeouts.
123
+ :type _request_timeout: int, tuple(int, int), optional
124
+ :param _request_auth: set to override the auth_settings for an a single
125
+ request; this effectively ignores the
126
+ authentication in the spec for a single request.
127
+ :type _request_auth: dict, optional
128
+ :param _content_type: force content-type for the request.
129
+ :type _content_type: str, Optional
130
+ :param _headers: set to override the headers for a single
131
+ request; this effectively ignores the headers
132
+ in the spec for a single request.
133
+ :type _headers: dict, optional
134
+ :param _host_index: set to override the host_index for a single
135
+ request; this effectively ignores the host_index
136
+ in the spec for a single request.
137
+ :type _host_index: int, optional
138
+ :return: Returns the result object.
139
+ """ # noqa: E501
140
+
141
+ _param = self._connect_userinfo_get_serialize(
142
+ _request_auth=_request_auth,
143
+ _content_type=_content_type,
144
+ _headers=_headers,
145
+ _host_index=_host_index
146
+ )
147
+
148
+ _response_types_map: Dict[str, Optional[str]] = {
149
+ '200': None,
150
+ }
151
+ response_data = self.api_client.call_api(
152
+ *_param,
153
+ _request_timeout=_request_timeout
154
+ )
155
+ response_data.read()
156
+ return self.api_client.response_deserialize(
157
+ response_data=response_data,
158
+ response_types_map=_response_types_map,
159
+ )
160
+
161
+
162
+ @validate_call
163
+ def connect_userinfo_get_without_preload_content(
164
+ self,
165
+ _request_timeout: Union[
166
+ None,
167
+ Annotated[StrictFloat, Field(gt=0)],
168
+ Tuple[
169
+ Annotated[StrictFloat, Field(gt=0)],
170
+ Annotated[StrictFloat, Field(gt=0)]
171
+ ]
172
+ ] = None,
173
+ _request_auth: Optional[Dict[StrictStr, Any]] = None,
174
+ _content_type: Optional[StrictStr] = None,
175
+ _headers: Optional[Dict[StrictStr, Any]] = None,
176
+ _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
177
+ ) -> RESTResponseType:
178
+ """Retrieves information about the authenticated user.
179
+
180
+
181
+ :param _request_timeout: timeout setting for this request. If one
182
+ number provided, it will be total request
183
+ timeout. It can also be a pair (tuple) of
184
+ (connection, read) timeouts.
185
+ :type _request_timeout: int, tuple(int, int), optional
186
+ :param _request_auth: set to override the auth_settings for an a single
187
+ request; this effectively ignores the
188
+ authentication in the spec for a single request.
189
+ :type _request_auth: dict, optional
190
+ :param _content_type: force content-type for the request.
191
+ :type _content_type: str, Optional
192
+ :param _headers: set to override the headers for a single
193
+ request; this effectively ignores the headers
194
+ in the spec for a single request.
195
+ :type _headers: dict, optional
196
+ :param _host_index: set to override the host_index for a single
197
+ request; this effectively ignores the host_index
198
+ in the spec for a single request.
199
+ :type _host_index: int, optional
200
+ :return: Returns the result object.
201
+ """ # noqa: E501
202
+
203
+ _param = self._connect_userinfo_get_serialize(
204
+ _request_auth=_request_auth,
205
+ _content_type=_content_type,
206
+ _headers=_headers,
207
+ _host_index=_host_index
208
+ )
209
+
210
+ _response_types_map: Dict[str, Optional[str]] = {
211
+ '200': None,
212
+ }
213
+ response_data = self.api_client.call_api(
214
+ *_param,
215
+ _request_timeout=_request_timeout
216
+ )
217
+ return response_data.response
218
+
219
+
220
+ def _connect_userinfo_get_serialize(
221
+ self,
222
+ _request_auth,
223
+ _content_type,
224
+ _headers,
225
+ _host_index,
226
+ ) -> RequestSerialized:
227
+
228
+ _host = None
229
+
230
+ _collection_formats: Dict[str, str] = {
231
+ }
232
+
233
+ _path_params: Dict[str, str] = {}
234
+ _query_params: List[Tuple[str, str]] = []
235
+ _header_params: Dict[str, Optional[str]] = _headers or {}
236
+ _form_params: List[Tuple[str, str]] = []
237
+ _files: Dict[
238
+ str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]]
239
+ ] = {}
240
+ _body_params: Optional[bytes] = None
241
+
242
+ # process the path parameters
243
+ # process the query parameters
244
+ # process the header parameters
245
+ # process the form parameters
246
+ # process the body parameter
247
+
248
+
249
+
250
+
251
+ # authentication setting
252
+ _auth_settings: List[str] = [
253
+ 'bearer',
254
+ 'oauth2'
255
+ ]
256
+
257
+ return self.api_client.param_serialize(
258
+ method='GET',
259
+ resource_path='/connect/userinfo',
260
+ path_params=_path_params,
261
+ query_params=_query_params,
262
+ header_params=_header_params,
263
+ body=_body_params,
264
+ post_params=_form_params,
265
+ files=_files,
266
+ auth_settings=_auth_settings,
267
+ collection_formats=_collection_formats,
268
+ _host=_host,
269
+ _request_auth=_request_auth
270
+ )
271
+
272
+
@@ -315,7 +315,8 @@ class ValidationApi:
315
315
 
316
316
  # authentication setting
317
317
  _auth_settings: List[str] = [
318
- 'bearer'
318
+ 'bearer',
319
+ 'oauth2'
319
320
  ]
320
321
 
321
322
  return self.api_client.param_serialize(
@@ -590,7 +591,8 @@ class ValidationApi:
590
591
 
591
592
  # authentication setting
592
593
  _auth_settings: List[str] = [
593
- 'bearer'
594
+ 'bearer',
595
+ 'oauth2'
594
596
  ]
595
597
 
596
598
  return self.api_client.param_serialize(
@@ -852,7 +854,8 @@ class ValidationApi:
852
854
 
853
855
  # authentication setting
854
856
  _auth_settings: List[str] = [
855
- 'bearer'
857
+ 'bearer',
858
+ 'oauth2'
856
859
  ]
857
860
 
858
861
  return self.api_client.param_serialize(
@@ -1097,7 +1100,8 @@ class ValidationApi:
1097
1100
 
1098
1101
  # authentication setting
1099
1102
  _auth_settings: List[str] = [
1100
- 'bearer'
1103
+ 'bearer',
1104
+ 'oauth2'
1101
1105
  ]
1102
1106
 
1103
1107
  return self.api_client.param_serialize(
@@ -1385,7 +1389,8 @@ class ValidationApi:
1385
1389
 
1386
1390
  # authentication setting
1387
1391
  _auth_settings: List[str] = [
1388
- 'bearer'
1392
+ 'bearer',
1393
+ 'oauth2'
1389
1394
  ]
1390
1395
 
1391
1396
  return self.api_client.param_serialize(
@@ -1673,7 +1678,8 @@ class ValidationApi:
1673
1678
 
1674
1679
  # authentication setting
1675
1680
  _auth_settings: List[str] = [
1676
- 'bearer'
1681
+ 'bearer',
1682
+ 'oauth2'
1677
1683
  ]
1678
1684
 
1679
1685
  return self.api_client.param_serialize(
@@ -1935,7 +1941,8 @@ class ValidationApi:
1935
1941
 
1936
1942
  # authentication setting
1937
1943
  _auth_settings: List[str] = [
1938
- 'bearer'
1944
+ 'bearer',
1945
+ 'oauth2'
1939
1946
  ]
1940
1947
 
1941
1948
  return self.api_client.param_serialize(
@@ -305,7 +305,8 @@ class WorkflowApi:
305
305
 
306
306
  # authentication setting
307
307
  _auth_settings: List[str] = [
308
- 'bearer'
308
+ 'bearer',
309
+ 'oauth2'
309
310
  ]
310
311
 
311
312
  return self.api_client.param_serialize(
@@ -558,7 +559,8 @@ class WorkflowApi:
558
559
 
559
560
  # authentication setting
560
561
  _auth_settings: List[str] = [
561
- 'bearer'
562
+ 'bearer',
563
+ 'oauth2'
562
564
  ]
563
565
 
564
566
  return self.api_client.param_serialize(
@@ -820,7 +822,8 @@ class WorkflowApi:
820
822
 
821
823
  # authentication setting
822
824
  _auth_settings: List[str] = [
823
- 'bearer'
825
+ 'bearer',
826
+ 'oauth2'
824
827
  ]
825
828
 
826
829
  return self.api_client.param_serialize(
@@ -1082,7 +1085,8 @@ class WorkflowApi:
1082
1085
 
1083
1086
  # authentication setting
1084
1087
  _auth_settings: List[str] = [
1085
- 'bearer'
1088
+ 'bearer',
1089
+ 'oauth2'
1086
1090
  ]
1087
1091
 
1088
1092
  return self.api_client.param_serialize(
@@ -1344,7 +1348,8 @@ class WorkflowApi:
1344
1348
 
1345
1349
  # authentication setting
1346
1350
  _auth_settings: List[str] = [
1347
- 'bearer'
1351
+ 'bearer',
1352
+ 'oauth2'
1348
1353
  ]
1349
1354
 
1350
1355
  return self.api_client.param_serialize(
@@ -1597,7 +1602,8 @@ class WorkflowApi:
1597
1602
 
1598
1603
  # authentication setting
1599
1604
  _auth_settings: List[str] = [
1600
- 'bearer'
1605
+ 'bearer',
1606
+ 'oauth2'
1601
1607
  ]
1602
1608
 
1603
1609
  return self.api_client.param_serialize(
@@ -1859,7 +1865,8 @@ class WorkflowApi:
1859
1865
 
1860
1866
  # authentication setting
1861
1867
  _auth_settings: List[str] = [
1862
- 'bearer'
1868
+ 'bearer',
1869
+ 'oauth2'
1863
1870
  ]
1864
1871
 
1865
1872
  return self.api_client.param_serialize(
@@ -2112,7 +2119,8 @@ class WorkflowApi:
2112
2119
 
2113
2120
  # authentication setting
2114
2121
  _auth_settings: List[str] = [
2115
- 'bearer'
2122
+ 'bearer',
2123
+ 'oauth2'
2116
2124
  ]
2117
2125
 
2118
2126
  return self.api_client.param_serialize(
@@ -2365,7 +2373,8 @@ class WorkflowApi:
2365
2373
 
2366
2374
  # authentication setting
2367
2375
  _auth_settings: List[str] = [
2368
- 'bearer'
2376
+ 'bearer',
2377
+ 'oauth2'
2369
2378
  ]
2370
2379
 
2371
2380
  return self.api_client.param_serialize(
@@ -135,9 +135,11 @@ from rapidata.api_client.models.import_from_file_result import ImportFromFileRes
135
135
  from rapidata.api_client.models.import_validation_set_from_file_result import ImportValidationSetFromFileResult
136
136
  from rapidata.api_client.models.in_progress_rapid_model import InProgressRapidModel
137
137
  from rapidata.api_client.models.issue_auth_token_result import IssueAuthTokenResult
138
- from rapidata.api_client.models.issue_client_auth_token_result import IssueClientAuthTokenResult
139
138
  from rapidata.api_client.models.labeling_selection import LabelingSelection
140
139
  from rapidata.api_client.models.language_user_filter_model import LanguageUserFilterModel
140
+ from rapidata.api_client.models.legacy_issue_client_auth_token_result import LegacyIssueClientAuthTokenResult
141
+ from rapidata.api_client.models.legacy_request_password_reset_command import LegacyRequestPasswordResetCommand
142
+ from rapidata.api_client.models.legacy_submit_password_reset_command import LegacySubmitPasswordResetCommand
141
143
  from rapidata.api_client.models.line import Line
142
144
  from rapidata.api_client.models.line_payload import LinePayload
143
145
  from rapidata.api_client.models.line_point import LinePoint
@@ -196,7 +198,6 @@ from rapidata.api_client.models.rapid_answer_result import RapidAnswerResult
196
198
  from rapidata.api_client.models.rapid_result_model import RapidResultModel
197
199
  from rapidata.api_client.models.rapid_result_model_result import RapidResultModelResult
198
200
  from rapidata.api_client.models.rapid_skipped_model import RapidSkippedModel
199
- from rapidata.api_client.models.request_password_reset_command import RequestPasswordResetCommand
200
201
  from rapidata.api_client.models.root_filter import RootFilter
201
202
  from rapidata.api_client.models.send_completion_mail_step_model import SendCompletionMailStepModel
202
203
  from rapidata.api_client.models.shape import Shape
@@ -216,7 +217,6 @@ from rapidata.api_client.models.sort_direction import SortDirection
216
217
  from rapidata.api_client.models.static_selection import StaticSelection
217
218
  from rapidata.api_client.models.submit_coco_model import SubmitCocoModel
218
219
  from rapidata.api_client.models.submit_coco_result import SubmitCocoResult
219
- from rapidata.api_client.models.submit_password_reset_command import SubmitPasswordResetCommand
220
220
  from rapidata.api_client.models.text_asset import TextAsset
221
221
  from rapidata.api_client.models.text_asset_model import TextAssetModel
222
222
  from rapidata.api_client.models.text_metadata import TextMetadata
@@ -24,7 +24,7 @@ from typing_extensions import Self
24
24
 
25
25
  class IssueAuthTokenResult(BaseModel):
26
26
  """
27
- The result of issuing a auth token.
27
+ The result of issuing an auth token.
28
28
  """ # noqa: E501
29
29
  token: StrictStr = Field(description="The issued auth token.")
30
30
  __properties: ClassVar[List[str]] = ["token"]
@@ -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 LegacyIssueClientAuthTokenResult(BaseModel):
26
+ """
27
+ LegacyIssueClientAuthTokenResult
28
+ """ # noqa: E501
29
+ auth_token: StrictStr = Field(alias="authToken")
30
+ __properties: ClassVar[List[str]] = ["authToken"]
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 LegacyIssueClientAuthTokenResult 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 LegacyIssueClientAuthTokenResult 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
+ "authToken": obj.get("authToken")
84
+ })
85
+ return _obj
86
+
87
+
@@ -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, 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 LegacyRequestPasswordResetCommand(BaseModel):
26
+ """
27
+ LegacyRequestPasswordResetCommand
28
+ """ # noqa: E501
29
+ t: StrictStr = Field(description="Discriminator value for LegacyRequestPasswordResetCommand", alias="_t")
30
+ email: StrictStr
31
+ recaptcha_token: StrictStr = Field(alias="recaptchaToken")
32
+ __properties: ClassVar[List[str]] = ["_t", "email", "recaptchaToken"]
33
+
34
+ @field_validator('t')
35
+ def t_validate_enum(cls, value):
36
+ """Validates the enum"""
37
+ if value not in set(['LegacyRequestPasswordResetCommand']):
38
+ raise ValueError("must be one of enum values ('LegacyRequestPasswordResetCommand')")
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 LegacyRequestPasswordResetCommand 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 LegacyRequestPasswordResetCommand 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 'LegacyRequestPasswordResetCommand',
93
+ "email": obj.get("email"),
94
+ "recaptchaToken": obj.get("recaptchaToken")
95
+ })
96
+ return _obj
97
+
98
+