rapidata 0.1.18__py3-none-any.whl → 0.1.20__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.
- rapidata/api_client/__init__.py +26 -0
- rapidata/api_client/api/__init__.py +1 -0
- rapidata/api_client/api/rapid_api.py +1370 -0
- rapidata/api_client/api/validation_api.py +15 -5
- rapidata/api_client/models/__init__.py +25 -0
- rapidata/api_client/models/add_validation_rapid_result.py +87 -0
- rapidata/api_client/models/attach_category_result.py +98 -0
- rapidata/api_client/models/bounding_box_result.py +106 -0
- rapidata/api_client/models/classification_metadata.py +0 -10
- rapidata/api_client/models/compare_result.py +98 -0
- rapidata/api_client/models/coordinate.py +108 -0
- rapidata/api_client/models/count_metadata.py +0 -10
- rapidata/api_client/models/create_demographic_rapid_model.py +93 -0
- rapidata/api_client/models/create_order_model_referee.py +22 -8
- rapidata/api_client/models/early_stopping_referee_model.py +98 -0
- rapidata/api_client/models/free_text_result.py +98 -0
- rapidata/api_client/models/image_dimension_metadata.py +0 -10
- rapidata/api_client/models/line.py +106 -0
- rapidata/api_client/models/line_point.py +98 -0
- rapidata/api_client/models/line_result.py +106 -0
- rapidata/api_client/models/locate_coordinate.py +98 -0
- rapidata/api_client/models/locate_result.py +106 -0
- rapidata/api_client/models/location_metadata.py +0 -10
- rapidata/api_client/models/named_entity_result.py +106 -0
- rapidata/api_client/models/order_query_get200_response.py +12 -12
- rapidata/api_client/models/original_filename_metadata.py +0 -10
- rapidata/api_client/models/polygon_result.py +106 -0
- rapidata/api_client/models/prompt_metadata.py +0 -10
- rapidata/api_client/models/query_model.py +112 -0
- rapidata/api_client/models/query_validation_rapids_result.py +98 -0
- rapidata/api_client/models/query_validation_rapids_result_asset.py +174 -0
- rapidata/api_client/models/query_validation_rapids_result_paged_result.py +105 -0
- rapidata/api_client/models/rapid_result_model.py +93 -0
- rapidata/api_client/models/rapid_result_model_result.py +252 -0
- rapidata/api_client/models/rapid_skipped_model.py +89 -0
- rapidata/api_client/models/shape.py +104 -0
- rapidata/api_client/models/skip_result.py +96 -0
- rapidata/api_client/models/text_metadata.py +0 -7
- rapidata/api_client/models/transcription_metadata.py +0 -7
- rapidata/api_client/models/transcription_result.py +106 -0
- rapidata/rapidata_client/config.py +9 -0
- rapidata/rapidata_client/dataset/rapidata_dataset.py +1 -2
- rapidata/rapidata_client/dataset/rapidata_validation_set.py +1 -2
- rapidata/rapidata_client/dataset/validation_rapid_parts.py +1 -2
- rapidata/rapidata_client/order/rapidata_order_builder.py +4 -4
- rapidata/rapidata_client/rapidata_client.py +5 -0
- rapidata/rapidata_client/utils/__init__.py +0 -0
- rapidata/rapidata_client/utils/utils.py +22 -0
- rapidata/service/openapi_service.py +6 -2
- {rapidata-0.1.18.dist-info → rapidata-0.1.20.dist-info}/METADATA +3 -2
- {rapidata-0.1.18.dist-info → rapidata-0.1.20.dist-info}/RECORD +53 -25
- rapidata/rapidata_client/types/__init__.py +0 -1
- {rapidata-0.1.18.dist-info → rapidata-0.1.20.dist-info}/LICENSE +0 -0
- {rapidata-0.1.18.dist-info → rapidata-0.1.20.dist-info}/WHEEL +0 -0
|
@@ -20,6 +20,7 @@ from pydantic import Field, StrictBytes, StrictStr
|
|
|
20
20
|
from typing import List, Optional, Tuple, Union
|
|
21
21
|
from typing_extensions import Annotated
|
|
22
22
|
from rapidata.api_client.models.add_validation_rapid_model import AddValidationRapidModel
|
|
23
|
+
from rapidata.api_client.models.add_validation_rapid_result import AddValidationRapidResult
|
|
23
24
|
from rapidata.api_client.models.create_empty_validation_set_result import CreateEmptyValidationSetResult
|
|
24
25
|
from rapidata.api_client.models.get_available_validation_sets_result import GetAvailableValidationSetsResult
|
|
25
26
|
from rapidata.api_client.models.import_validation_set_from_file_result import ImportValidationSetFromFileResult
|
|
@@ -62,7 +63,7 @@ class ValidationApi:
|
|
|
62
63
|
_content_type: Optional[StrictStr] = None,
|
|
63
64
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
64
65
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
65
|
-
) ->
|
|
66
|
+
) -> AddValidationRapidResult:
|
|
66
67
|
"""Adds a new validation rapid to the specified validation set.
|
|
67
68
|
|
|
68
69
|
|
|
@@ -102,7 +103,7 @@ class ValidationApi:
|
|
|
102
103
|
)
|
|
103
104
|
|
|
104
105
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
105
|
-
'200':
|
|
106
|
+
'200': "AddValidationRapidResult",
|
|
106
107
|
}
|
|
107
108
|
response_data = self.api_client.call_api(
|
|
108
109
|
*_param,
|
|
@@ -132,7 +133,7 @@ class ValidationApi:
|
|
|
132
133
|
_content_type: Optional[StrictStr] = None,
|
|
133
134
|
_headers: Optional[Dict[StrictStr, Any]] = None,
|
|
134
135
|
_host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0,
|
|
135
|
-
) -> ApiResponse[
|
|
136
|
+
) -> ApiResponse[AddValidationRapidResult]:
|
|
136
137
|
"""Adds a new validation rapid to the specified validation set.
|
|
137
138
|
|
|
138
139
|
|
|
@@ -172,7 +173,7 @@ class ValidationApi:
|
|
|
172
173
|
)
|
|
173
174
|
|
|
174
175
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
175
|
-
'200':
|
|
176
|
+
'200': "AddValidationRapidResult",
|
|
176
177
|
}
|
|
177
178
|
response_data = self.api_client.call_api(
|
|
178
179
|
*_param,
|
|
@@ -242,7 +243,7 @@ class ValidationApi:
|
|
|
242
243
|
)
|
|
243
244
|
|
|
244
245
|
_response_types_map: Dict[str, Optional[str]] = {
|
|
245
|
-
'200':
|
|
246
|
+
'200': "AddValidationRapidResult",
|
|
246
247
|
}
|
|
247
248
|
response_data = self.api_client.call_api(
|
|
248
249
|
*_param,
|
|
@@ -287,6 +288,15 @@ class ValidationApi:
|
|
|
287
288
|
# process the body parameter
|
|
288
289
|
|
|
289
290
|
|
|
291
|
+
# set the HTTP header `Accept`
|
|
292
|
+
if 'Accept' not in _header_params:
|
|
293
|
+
_header_params['Accept'] = self.api_client.select_header_accept(
|
|
294
|
+
[
|
|
295
|
+
'text/plain',
|
|
296
|
+
'application/json',
|
|
297
|
+
'text/json'
|
|
298
|
+
]
|
|
299
|
+
)
|
|
290
300
|
|
|
291
301
|
# set the HTTP header `Content-Type`
|
|
292
302
|
if _content_type:
|
|
@@ -17,16 +17,19 @@
|
|
|
17
17
|
from rapidata.api_client.models.add_validation_rapid_model import AddValidationRapidModel
|
|
18
18
|
from rapidata.api_client.models.add_validation_rapid_model_payload import AddValidationRapidModelPayload
|
|
19
19
|
from rapidata.api_client.models.add_validation_rapid_model_truth import AddValidationRapidModelTruth
|
|
20
|
+
from rapidata.api_client.models.add_validation_rapid_result import AddValidationRapidResult
|
|
20
21
|
from rapidata.api_client.models.admin_order_model import AdminOrderModel
|
|
21
22
|
from rapidata.api_client.models.admin_order_model_paged_result import AdminOrderModelPagedResult
|
|
22
23
|
from rapidata.api_client.models.age_group import AgeGroup
|
|
23
24
|
from rapidata.api_client.models.age_user_filter_model import AgeUserFilterModel
|
|
24
25
|
from rapidata.api_client.models.aggregator_type import AggregatorType
|
|
25
26
|
from rapidata.api_client.models.attach_category_rapid_blueprint import AttachCategoryRapidBlueprint
|
|
27
|
+
from rapidata.api_client.models.attach_category_result import AttachCategoryResult
|
|
26
28
|
from rapidata.api_client.models.attach_category_truth import AttachCategoryTruth
|
|
27
29
|
from rapidata.api_client.models.base_error import BaseError
|
|
28
30
|
from rapidata.api_client.models.bounding_box_payload import BoundingBoxPayload
|
|
29
31
|
from rapidata.api_client.models.bounding_box_rapid_blueprint import BoundingBoxRapidBlueprint
|
|
32
|
+
from rapidata.api_client.models.bounding_box_result import BoundingBoxResult
|
|
30
33
|
from rapidata.api_client.models.bounding_box_truth import BoundingBoxTruth
|
|
31
34
|
from rapidata.api_client.models.box_shape import BoxShape
|
|
32
35
|
from rapidata.api_client.models.classification_metadata import ClassificationMetadata
|
|
@@ -37,12 +40,14 @@ from rapidata.api_client.models.clone_order_model import CloneOrderModel
|
|
|
37
40
|
from rapidata.api_client.models.clone_order_result import CloneOrderResult
|
|
38
41
|
from rapidata.api_client.models.compare_payload import ComparePayload
|
|
39
42
|
from rapidata.api_client.models.compare_rapid_blueprint import CompareRapidBlueprint
|
|
43
|
+
from rapidata.api_client.models.compare_result import CompareResult
|
|
40
44
|
from rapidata.api_client.models.compare_truth import CompareTruth
|
|
41
45
|
from rapidata.api_client.models.compare_workflow_config import CompareWorkflowConfig
|
|
42
46
|
from rapidata.api_client.models.compare_workflow_config_rapid_selection_configs_inner import CompareWorkflowConfigRapidSelectionConfigsInner
|
|
43
47
|
from rapidata.api_client.models.compare_workflow_config_referee import CompareWorkflowConfigReferee
|
|
44
48
|
from rapidata.api_client.models.compare_workflow_model import CompareWorkflowModel
|
|
45
49
|
from rapidata.api_client.models.conditional_validation_rapid_selection_config import ConditionalValidationRapidSelectionConfig
|
|
50
|
+
from rapidata.api_client.models.coordinate import Coordinate
|
|
46
51
|
from rapidata.api_client.models.correlated_rapid_selection_config import CorrelatedRapidSelectionConfig
|
|
47
52
|
from rapidata.api_client.models.count_classification_metadata_filter_config import CountClassificationMetadataFilterConfig
|
|
48
53
|
from rapidata.api_client.models.count_metadata import CountMetadata
|
|
@@ -55,6 +60,7 @@ from rapidata.api_client.models.create_dataset_artifact_model import CreateDatas
|
|
|
55
60
|
from rapidata.api_client.models.create_dataset_artifact_model_dataset import CreateDatasetArtifactModelDataset
|
|
56
61
|
from rapidata.api_client.models.create_default_order_model import CreateDefaultOrderModel
|
|
57
62
|
from rapidata.api_client.models.create_default_order_model_workflow_config import CreateDefaultOrderModelWorkflowConfig
|
|
63
|
+
from rapidata.api_client.models.create_demographic_rapid_model import CreateDemographicRapidModel
|
|
58
64
|
from rapidata.api_client.models.create_empty_validation_set_result import CreateEmptyValidationSetResult
|
|
59
65
|
from rapidata.api_client.models.create_legacy_order_result import CreateLegacyOrderResult
|
|
60
66
|
from rapidata.api_client.models.create_order_model import CreateOrderModel
|
|
@@ -79,6 +85,7 @@ from rapidata.api_client.models.datapoint_model_asset import DatapointModelAsset
|
|
|
79
85
|
from rapidata.api_client.models.dataset_evaluation_step_model import DatasetEvaluationStepModel
|
|
80
86
|
from rapidata.api_client.models.demographic_rapid_selection_config import DemographicRapidSelectionConfig
|
|
81
87
|
from rapidata.api_client.models.demographic_selection import DemographicSelection
|
|
88
|
+
from rapidata.api_client.models.early_stopping_referee_model import EarlyStoppingRefereeModel
|
|
82
89
|
from rapidata.api_client.models.empty_validation_truth import EmptyValidationTruth
|
|
83
90
|
from rapidata.api_client.models.error_type import ErrorType
|
|
84
91
|
from rapidata.api_client.models.feature_flag import FeatureFlag
|
|
@@ -91,6 +98,7 @@ from rapidata.api_client.models.filter import Filter
|
|
|
91
98
|
from rapidata.api_client.models.filter_operator import FilterOperator
|
|
92
99
|
from rapidata.api_client.models.free_text_payload import FreeTextPayload
|
|
93
100
|
from rapidata.api_client.models.free_text_rapid_blueprint import FreeTextRapidBlueprint
|
|
101
|
+
from rapidata.api_client.models.free_text_result import FreeTextResult
|
|
94
102
|
from rapidata.api_client.models.gender import Gender
|
|
95
103
|
from rapidata.api_client.models.gender_user_filter_model import GenderUserFilterModel
|
|
96
104
|
from rapidata.api_client.models.get_available_validation_sets_result import GetAvailableValidationSetsResult
|
|
@@ -107,12 +115,17 @@ from rapidata.api_client.models.import_validation_set_from_file_result import Im
|
|
|
107
115
|
from rapidata.api_client.models.issue_auth_token_result import IssueAuthTokenResult
|
|
108
116
|
from rapidata.api_client.models.issue_client_auth_token_result import IssueClientAuthTokenResult
|
|
109
117
|
from rapidata.api_client.models.labeling_selection import LabelingSelection
|
|
118
|
+
from rapidata.api_client.models.line import Line
|
|
110
119
|
from rapidata.api_client.models.line_payload import LinePayload
|
|
120
|
+
from rapidata.api_client.models.line_point import LinePoint
|
|
111
121
|
from rapidata.api_client.models.line_rapid_blueprint import LineRapidBlueprint
|
|
122
|
+
from rapidata.api_client.models.line_result import LineResult
|
|
112
123
|
from rapidata.api_client.models.line_truth import LineTruth
|
|
113
124
|
from rapidata.api_client.models.locate_box_truth import LocateBoxTruth
|
|
125
|
+
from rapidata.api_client.models.locate_coordinate import LocateCoordinate
|
|
114
126
|
from rapidata.api_client.models.locate_payload import LocatePayload
|
|
115
127
|
from rapidata.api_client.models.locate_rapid_blueprint import LocateRapidBlueprint
|
|
128
|
+
from rapidata.api_client.models.locate_result import LocateResult
|
|
116
129
|
from rapidata.api_client.models.location_metadata import LocationMetadata
|
|
117
130
|
from rapidata.api_client.models.location_metadata_exists_filter_config import LocationMetadataExistsFilterConfig
|
|
118
131
|
from rapidata.api_client.models.logic_operator import LogicOperator
|
|
@@ -125,6 +138,7 @@ from rapidata.api_client.models.naive_referee_model import NaiveRefereeModel
|
|
|
125
138
|
from rapidata.api_client.models.named_classification import NamedClassification
|
|
126
139
|
from rapidata.api_client.models.named_entity_payload import NamedEntityPayload
|
|
127
140
|
from rapidata.api_client.models.named_entity_rapid_blueprint import NamedEntityRapidBlueprint
|
|
141
|
+
from rapidata.api_client.models.named_entity_result import NamedEntityResult
|
|
128
142
|
from rapidata.api_client.models.named_entity_truth import NamedEntityTruth
|
|
129
143
|
from rapidata.api_client.models.never_ending_referee_config import NeverEndingRefereeConfig
|
|
130
144
|
from rapidata.api_client.models.newsletter_model import NewsletterModel
|
|
@@ -138,23 +152,33 @@ from rapidata.api_client.models.original_filename_metadata import OriginalFilena
|
|
|
138
152
|
from rapidata.api_client.models.page_info import PageInfo
|
|
139
153
|
from rapidata.api_client.models.polygon_payload import PolygonPayload
|
|
140
154
|
from rapidata.api_client.models.polygon_rapid_blueprint import PolygonRapidBlueprint
|
|
155
|
+
from rapidata.api_client.models.polygon_result import PolygonResult
|
|
141
156
|
from rapidata.api_client.models.polygon_truth import PolygonTruth
|
|
142
157
|
from rapidata.api_client.models.private_text_metadata_input import PrivateTextMetadataInput
|
|
143
158
|
from rapidata.api_client.models.probabilistic_attach_category_referee_config import ProbabilisticAttachCategoryRefereeConfig
|
|
144
159
|
from rapidata.api_client.models.prompt_metadata import PromptMetadata
|
|
145
160
|
from rapidata.api_client.models.prompt_metadata_input import PromptMetadataInput
|
|
146
161
|
from rapidata.api_client.models.public_text_metadata_input import PublicTextMetadataInput
|
|
162
|
+
from rapidata.api_client.models.query_model import QueryModel
|
|
147
163
|
from rapidata.api_client.models.query_orders_model import QueryOrdersModel
|
|
164
|
+
from rapidata.api_client.models.query_validation_rapids_result import QueryValidationRapidsResult
|
|
165
|
+
from rapidata.api_client.models.query_validation_rapids_result_asset import QueryValidationRapidsResultAsset
|
|
166
|
+
from rapidata.api_client.models.query_validation_rapids_result_paged_result import QueryValidationRapidsResultPagedResult
|
|
148
167
|
from rapidata.api_client.models.query_validation_set_model import QueryValidationSetModel
|
|
168
|
+
from rapidata.api_client.models.rapid_result_model import RapidResultModel
|
|
169
|
+
from rapidata.api_client.models.rapid_result_model_result import RapidResultModelResult
|
|
170
|
+
from rapidata.api_client.models.rapid_skipped_model import RapidSkippedModel
|
|
149
171
|
from rapidata.api_client.models.request_password_reset_command import RequestPasswordResetCommand
|
|
150
172
|
from rapidata.api_client.models.root_filter import RootFilter
|
|
151
173
|
from rapidata.api_client.models.send_completion_mail_step_model import SendCompletionMailStepModel
|
|
174
|
+
from rapidata.api_client.models.shape import Shape
|
|
152
175
|
from rapidata.api_client.models.signup_customer_model import SignupCustomerModel
|
|
153
176
|
from rapidata.api_client.models.signup_shadow_customer_model import SignupShadowCustomerModel
|
|
154
177
|
from rapidata.api_client.models.simple_workflow_config import SimpleWorkflowConfig
|
|
155
178
|
from rapidata.api_client.models.simple_workflow_config_blueprint import SimpleWorkflowConfigBlueprint
|
|
156
179
|
from rapidata.api_client.models.simple_workflow_model import SimpleWorkflowModel
|
|
157
180
|
from rapidata.api_client.models.simple_workflow_model_blueprint import SimpleWorkflowModelBlueprint
|
|
181
|
+
from rapidata.api_client.models.skip_result import SkipResult
|
|
158
182
|
from rapidata.api_client.models.sort_criterion import SortCriterion
|
|
159
183
|
from rapidata.api_client.models.sort_direction import SortDirection
|
|
160
184
|
from rapidata.api_client.models.static_rapid_selection_config import StaticRapidSelectionConfig
|
|
@@ -168,6 +192,7 @@ from rapidata.api_client.models.transcription_metadata import TranscriptionMetad
|
|
|
168
192
|
from rapidata.api_client.models.transcription_metadata_input import TranscriptionMetadataInput
|
|
169
193
|
from rapidata.api_client.models.transcription_payload import TranscriptionPayload
|
|
170
194
|
from rapidata.api_client.models.transcription_rapid_blueprint import TranscriptionRapidBlueprint
|
|
195
|
+
from rapidata.api_client.models.transcription_result import TranscriptionResult
|
|
171
196
|
from rapidata.api_client.models.transcription_truth import TranscriptionTruth
|
|
172
197
|
from rapidata.api_client.models.transcription_word import TranscriptionWord
|
|
173
198
|
from rapidata.api_client.models.unlock_order_result import UnlockOrderResult
|
|
@@ -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 AddValidationRapidResult(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
AddValidationRapidResult
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
rapid_id: StrictStr = Field(alias="rapidId")
|
|
30
|
+
__properties: ClassVar[List[str]] = ["rapidId"]
|
|
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 AddValidationRapidResult 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 AddValidationRapidResult 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
|
+
"rapidId": obj.get("rapidId")
|
|
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 AttachCategoryResult(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
AttachCategoryResult
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
t: StrictStr = Field(description="Discriminator value for AttachCategoryResult", alias="_t")
|
|
30
|
+
category: StrictStr
|
|
31
|
+
rapid_id: StrictStr = Field(alias="rapidId")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["_t", "category", "rapidId"]
|
|
33
|
+
|
|
34
|
+
@field_validator('t')
|
|
35
|
+
def t_validate_enum(cls, value):
|
|
36
|
+
"""Validates the enum"""
|
|
37
|
+
if value not in set(['AttachCategoryResult']):
|
|
38
|
+
raise ValueError("must be one of enum values ('AttachCategoryResult')")
|
|
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 AttachCategoryResult 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 AttachCategoryResult 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 'AttachCategoryResult',
|
|
93
|
+
"category": obj.get("category"),
|
|
94
|
+
"rapidId": obj.get("rapidId")
|
|
95
|
+
})
|
|
96
|
+
return _obj
|
|
97
|
+
|
|
98
|
+
|
|
@@ -0,0 +1,106 @@
|
|
|
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 rapidata.api_client.models.box_shape import BoxShape
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class BoundingBoxResult(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
BoundingBoxResult
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
t: StrictStr = Field(description="Discriminator value for BoundingBoxResult", alias="_t")
|
|
31
|
+
bounding_boxes: List[BoxShape] = Field(alias="boundingBoxes")
|
|
32
|
+
rapid_id: StrictStr = Field(alias="rapidId")
|
|
33
|
+
__properties: ClassVar[List[str]] = ["_t", "boundingBoxes", "rapidId"]
|
|
34
|
+
|
|
35
|
+
@field_validator('t')
|
|
36
|
+
def t_validate_enum(cls, value):
|
|
37
|
+
"""Validates the enum"""
|
|
38
|
+
if value not in set(['BoundingBoxResult']):
|
|
39
|
+
raise ValueError("must be one of enum values ('BoundingBoxResult')")
|
|
40
|
+
return value
|
|
41
|
+
|
|
42
|
+
model_config = ConfigDict(
|
|
43
|
+
populate_by_name=True,
|
|
44
|
+
validate_assignment=True,
|
|
45
|
+
protected_namespaces=(),
|
|
46
|
+
)
|
|
47
|
+
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Returns the JSON representation of the model using alias"""
|
|
55
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
56
|
+
return json.dumps(self.to_dict())
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
60
|
+
"""Create an instance of BoundingBoxResult from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
64
|
+
"""Return the dictionary representation of the model using alias.
|
|
65
|
+
|
|
66
|
+
This has the following differences from calling pydantic's
|
|
67
|
+
`self.model_dump(by_alias=True)`:
|
|
68
|
+
|
|
69
|
+
* `None` is only added to the output dict for nullable fields that
|
|
70
|
+
were set at model initialization. Other fields with value `None`
|
|
71
|
+
are ignored.
|
|
72
|
+
"""
|
|
73
|
+
excluded_fields: Set[str] = set([
|
|
74
|
+
])
|
|
75
|
+
|
|
76
|
+
_dict = self.model_dump(
|
|
77
|
+
by_alias=True,
|
|
78
|
+
exclude=excluded_fields,
|
|
79
|
+
exclude_none=True,
|
|
80
|
+
)
|
|
81
|
+
# override the default output from pydantic by calling `to_dict()` of each item in bounding_boxes (list)
|
|
82
|
+
_items = []
|
|
83
|
+
if self.bounding_boxes:
|
|
84
|
+
for _item_bounding_boxes in self.bounding_boxes:
|
|
85
|
+
if _item_bounding_boxes:
|
|
86
|
+
_items.append(_item_bounding_boxes.to_dict())
|
|
87
|
+
_dict['boundingBoxes'] = _items
|
|
88
|
+
return _dict
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
92
|
+
"""Create an instance of BoundingBoxResult from a dict"""
|
|
93
|
+
if obj is None:
|
|
94
|
+
return None
|
|
95
|
+
|
|
96
|
+
if not isinstance(obj, dict):
|
|
97
|
+
return cls.model_validate(obj)
|
|
98
|
+
|
|
99
|
+
_obj = cls.model_validate({
|
|
100
|
+
"_t": obj.get("_t") if obj.get("_t") is not None else 'BoundingBoxResult',
|
|
101
|
+
"boundingBoxes": [BoxShape.from_dict(_item) for _item in obj["boundingBoxes"]] if obj.get("boundingBoxes") is not None else None,
|
|
102
|
+
"rapidId": obj.get("rapidId")
|
|
103
|
+
})
|
|
104
|
+
return _obj
|
|
105
|
+
|
|
106
|
+
|
|
@@ -39,16 +39,6 @@ class ClassificationMetadata(BaseModel):
|
|
|
39
39
|
raise ValueError("must be one of enum values ('ClassificationMetadata')")
|
|
40
40
|
return value
|
|
41
41
|
|
|
42
|
-
@field_validator('visibilities')
|
|
43
|
-
def visibilities_validate_enum(cls, value):
|
|
44
|
-
"""Validates the enum"""
|
|
45
|
-
if value is None:
|
|
46
|
-
return value
|
|
47
|
-
|
|
48
|
-
if value not in set(['None', 'Users', 'Customers', 'Admins', 'All']):
|
|
49
|
-
raise ValueError("must be one of enum values ('None', 'Users', 'Customers', 'Admins', 'All')")
|
|
50
|
-
return value
|
|
51
|
-
|
|
52
42
|
model_config = ConfigDict(
|
|
53
43
|
populate_by_name=True,
|
|
54
44
|
validate_assignment=True,
|
|
@@ -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 CompareResult(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
CompareResult
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
t: StrictStr = Field(description="Discriminator value for CompareResult", alias="_t")
|
|
30
|
+
winner_id: StrictStr = Field(alias="winnerId")
|
|
31
|
+
rapid_id: StrictStr = Field(alias="rapidId")
|
|
32
|
+
__properties: ClassVar[List[str]] = ["_t", "winnerId", "rapidId"]
|
|
33
|
+
|
|
34
|
+
@field_validator('t')
|
|
35
|
+
def t_validate_enum(cls, value):
|
|
36
|
+
"""Validates the enum"""
|
|
37
|
+
if value not in set(['CompareResult']):
|
|
38
|
+
raise ValueError("must be one of enum values ('CompareResult')")
|
|
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 CompareResult 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 CompareResult 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 'CompareResult',
|
|
93
|
+
"winnerId": obj.get("winnerId"),
|
|
94
|
+
"rapidId": obj.get("rapidId")
|
|
95
|
+
})
|
|
96
|
+
return _obj
|
|
97
|
+
|
|
98
|
+
|