rapidata 0.1.2__py3-none-any.whl → 0.1.5__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.
- openapi/openapi-client/openapi_client/__init__.py +215 -0
- openapi/openapi-client/openapi_client/api/__init__.py +11 -0
- openapi/openapi-client/openapi_client/api/coco_api.py +619 -0
- openapi/openapi-client/openapi_client/api/datapoint_api.py +817 -0
- openapi/openapi-client/openapi_client/api/dataset_api.py +2290 -0
- openapi/openapi-client/openapi_client/api/identity_api.py +3181 -0
- openapi/openapi-client/openapi_client/api/newsletter_api.py +571 -0
- openapi/openapi-client/openapi_client/api/order_api.py +5390 -0
- openapi/openapi-client/openapi_client/api/validation_api.py +1670 -0
- openapi/openapi-client/openapi_client/api_client.py +797 -0
- openapi/openapi-client/openapi_client/api_response.py +21 -0
- openapi/openapi-client/openapi_client/configuration.py +479 -0
- openapi/openapi-client/openapi_client/exceptions.py +199 -0
- openapi/openapi-client/openapi_client/models/__init__.py +192 -0
- openapi/openapi-client/openapi_client/models/add_validation_rapid_model.py +116 -0
- openapi/openapi-client/openapi_client/models/add_validation_rapid_model_payload.py +238 -0
- openapi/openapi-client/openapi_client/models/add_validation_rapid_model_truth.py +238 -0
- openapi/openapi-client/openapi_client/models/admin_order_model.py +103 -0
- openapi/openapi-client/openapi_client/models/admin_order_model_paged_result.py +105 -0
- openapi/openapi-client/openapi_client/models/age_group.py +40 -0
- openapi/openapi-client/openapi_client/models/age_user_filter_model.py +97 -0
- openapi/openapi-client/openapi_client/models/aggregator_type.py +46 -0
- openapi/openapi-client/openapi_client/models/attach_category_rapid_blueprint.py +98 -0
- openapi/openapi-client/openapi_client/models/attach_category_truth.py +96 -0
- openapi/openapi-client/openapi_client/models/base_error.py +90 -0
- openapi/openapi-client/openapi_client/models/bounding_box_payload.py +96 -0
- openapi/openapi-client/openapi_client/models/bounding_box_rapid_blueprint.py +96 -0
- openapi/openapi-client/openapi_client/models/bounding_box_truth.py +102 -0
- openapi/openapi-client/openapi_client/models/box_shape.py +122 -0
- openapi/openapi-client/openapi_client/models/classification_metadata.py +110 -0
- openapi/openapi-client/openapi_client/models/classification_metadata_filter_config.py +96 -0
- openapi/openapi-client/openapi_client/models/classify_payload.py +98 -0
- openapi/openapi-client/openapi_client/models/clone_dataset_model.py +98 -0
- openapi/openapi-client/openapi_client/models/clone_order_model.py +89 -0
- openapi/openapi-client/openapi_client/models/clone_order_result.py +89 -0
- openapi/openapi-client/openapi_client/models/compare_payload.py +96 -0
- openapi/openapi-client/openapi_client/models/compare_rapid_blueprint.py +96 -0
- openapi/openapi-client/openapi_client/models/compare_truth.py +96 -0
- openapi/openapi-client/openapi_client/models/compare_workflow_config.py +143 -0
- openapi/openapi-client/openapi_client/models/compare_workflow_config_rapid_selection_configs_inner.py +210 -0
- openapi/openapi-client/openapi_client/models/compare_workflow_config_referee.py +154 -0
- openapi/openapi-client/openapi_client/models/compare_workflow_model.py +106 -0
- openapi/openapi-client/openapi_client/models/conditional_validation_rapid_selection_config.py +113 -0
- openapi/openapi-client/openapi_client/models/correlated_rapid_selection_config.py +98 -0
- openapi/openapi-client/openapi_client/models/count_classification_metadata_filter_config.py +94 -0
- openapi/openapi-client/openapi_client/models/count_metadata.py +110 -0
- openapi/openapi-client/openapi_client/models/country_user_filter_model.py +96 -0
- openapi/openapi-client/openapi_client/models/create_client_model.py +89 -0
- openapi/openapi-client/openapi_client/models/create_complex_order_model.py +95 -0
- openapi/openapi-client/openapi_client/models/create_complex_order_model_pipeline.py +126 -0
- openapi/openapi-client/openapi_client/models/create_complex_order_result.py +96 -0
- openapi/openapi-client/openapi_client/models/create_dataset_artifact_model.py +102 -0
- openapi/openapi-client/openapi_client/models/create_dataset_artifact_model_dataset.py +126 -0
- openapi/openapi-client/openapi_client/models/create_default_order_model.py +109 -0
- openapi/openapi-client/openapi_client/models/create_default_order_model_workflow_config.py +140 -0
- openapi/openapi-client/openapi_client/models/create_empty_validation_set_result.py +87 -0
- openapi/openapi-client/openapi_client/models/create_legacy_order_result.py +89 -0
- openapi/openapi-client/openapi_client/models/create_order_model.py +163 -0
- openapi/openapi-client/openapi_client/models/create_order_model_referee.py +126 -0
- openapi/openapi-client/openapi_client/models/create_order_model_selections_inner.py +154 -0
- openapi/openapi-client/openapi_client/models/create_order_model_user_filters_inner.py +154 -0
- openapi/openapi-client/openapi_client/models/create_order_model_workflow.py +140 -0
- openapi/openapi-client/openapi_client/models/create_order_result.py +96 -0
- openapi/openapi-client/openapi_client/models/create_simple_pipeline_model.py +116 -0
- openapi/openapi-client/openapi_client/models/create_simple_pipeline_model_artifacts_inner.py +126 -0
- openapi/openapi-client/openapi_client/models/create_simple_pipeline_model_pipeline_steps_inner.py +182 -0
- openapi/openapi-client/openapi_client/models/create_unsupported_order_model.py +91 -0
- openapi/openapi-client/openapi_client/models/customer_order_model.py +101 -0
- openapi/openapi-client/openapi_client/models/customer_order_model_paged_result.py +105 -0
- openapi/openapi-client/openapi_client/models/datapoint.py +121 -0
- openapi/openapi-client/openapi_client/models/datapoint_asset.py +170 -0
- openapi/openapi-client/openapi_client/models/datapoint_get_by_id_get200_response.py +126 -0
- openapi/openapi-client/openapi_client/models/datapoint_metadata_model.py +97 -0
- openapi/openapi-client/openapi_client/models/datapoint_metadata_model_metadata_inner.py +168 -0
- openapi/openapi-client/openapi_client/models/datapoint_model.py +95 -0
- openapi/openapi-client/openapi_client/models/datapoint_model_asset.py +170 -0
- openapi/openapi-client/openapi_client/models/dataset_evaluation_step_model.py +102 -0
- openapi/openapi-client/openapi_client/models/demographic_rapid_selection_config.py +96 -0
- openapi/openapi-client/openapi_client/models/demographic_selection.py +96 -0
- openapi/openapi-client/openapi_client/models/empty_validation_truth.py +94 -0
- openapi/openapi-client/openapi_client/models/error_type.py +40 -0
- openapi/openapi-client/openapi_client/models/feature_flag.py +89 -0
- openapi/openapi-client/openapi_client/models/feature_flag_model.py +89 -0
- openapi/openapi-client/openapi_client/models/feedback_model.py +94 -0
- openapi/openapi-client/openapi_client/models/file_asset.py +108 -0
- openapi/openapi-client/openapi_client/models/file_asset_metadata_inner.py +224 -0
- openapi/openapi-client/openapi_client/models/file_asset_model.py +108 -0
- openapi/openapi-client/openapi_client/models/filter.py +134 -0
- openapi/openapi-client/openapi_client/models/filter_operator.py +44 -0
- openapi/openapi-client/openapi_client/models/free_text_payload.py +96 -0
- openapi/openapi-client/openapi_client/models/free_text_rapid_blueprint.py +96 -0
- openapi/openapi-client/openapi_client/models/gender.py +38 -0
- openapi/openapi-client/openapi_client/models/gender_user_filter_model.py +97 -0
- openapi/openapi-client/openapi_client/models/get_available_validation_sets_result.py +95 -0
- openapi/openapi-client/openapi_client/models/get_datapoints_by_dataset_id_result.py +95 -0
- openapi/openapi-client/openapi_client/models/get_dataset_by_id_result.py +87 -0
- openapi/openapi-client/openapi_client/models/get_order_by_id_result.py +98 -0
- openapi/openapi-client/openapi_client/models/get_order_results_result.py +91 -0
- openapi/openapi-client/openapi_client/models/get_public_orders_result.py +95 -0
- openapi/openapi-client/openapi_client/models/get_workflow_config_result.py +91 -0
- openapi/openapi-client/openapi_client/models/get_workflow_config_result_workflow_config.py +140 -0
- openapi/openapi-client/openapi_client/models/image_dimension_metadata.py +112 -0
- openapi/openapi-client/openapi_client/models/import_from_file_result.py +87 -0
- openapi/openapi-client/openapi_client/models/import_validation_set_from_file_result.py +87 -0
- openapi/openapi-client/openapi_client/models/issue_auth_token_result.py +87 -0
- openapi/openapi-client/openapi_client/models/issue_client_auth_token_result.py +87 -0
- openapi/openapi-client/openapi_client/models/labeling_selection.py +96 -0
- openapi/openapi-client/openapi_client/models/line_payload.py +96 -0
- openapi/openapi-client/openapi_client/models/line_rapid_blueprint.py +96 -0
- openapi/openapi-client/openapi_client/models/line_truth.py +94 -0
- openapi/openapi-client/openapi_client/models/locate_box_truth.py +104 -0
- openapi/openapi-client/openapi_client/models/locate_payload.py +96 -0
- openapi/openapi-client/openapi_client/models/locate_rapid_blueprint.py +96 -0
- openapi/openapi-client/openapi_client/models/location_metadata.py +112 -0
- openapi/openapi-client/openapi_client/models/location_metadata_exists_filter_config.py +94 -0
- openapi/openapi-client/openapi_client/models/logic_operator.py +37 -0
- openapi/openapi-client/openapi_client/models/login_model.py +89 -0
- openapi/openapi-client/openapi_client/models/metadata_visibilities.py +40 -0
- openapi/openapi-client/openapi_client/models/multi_asset.py +116 -0
- openapi/openapi-client/openapi_client/models/multi_asset_model.py +118 -0
- openapi/openapi-client/openapi_client/models/naive_referee_config.py +96 -0
- openapi/openapi-client/openapi_client/models/naive_referee_model.py +96 -0
- openapi/openapi-client/openapi_client/models/named_classification.py +100 -0
- openapi/openapi-client/openapi_client/models/named_entity_payload.py +98 -0
- openapi/openapi-client/openapi_client/models/named_entity_rapid_blueprint.py +98 -0
- openapi/openapi-client/openapi_client/models/named_entity_truth.py +104 -0
- openapi/openapi-client/openapi_client/models/never_ending_referee_config.py +94 -0
- openapi/openapi-client/openapi_client/models/newsletter_model.py +89 -0
- openapi/openapi-client/openapi_client/models/no_validation_workflow_rapid_selection_config.py +101 -0
- openapi/openapi-client/openapi_client/models/null_asset.py +104 -0
- openapi/openapi-client/openapi_client/models/null_asset_model.py +106 -0
- openapi/openapi-client/openapi_client/models/only_validation_workflow_rapid_selection_config.py +96 -0
- openapi/openapi-client/openapi_client/models/order_model.py +91 -0
- openapi/openapi-client/openapi_client/models/order_query_get200_response.py +137 -0
- openapi/openapi-client/openapi_client/models/original_filename_metadata.py +110 -0
- openapi/openapi-client/openapi_client/models/page_info.py +94 -0
- openapi/openapi-client/openapi_client/models/polygon_payload.py +96 -0
- openapi/openapi-client/openapi_client/models/polygon_rapid_blueprint.py +96 -0
- openapi/openapi-client/openapi_client/models/polygon_truth.py +94 -0
- openapi/openapi-client/openapi_client/models/private_text_metadata_input.py +98 -0
- openapi/openapi-client/openapi_client/models/probabilistic_attach_category_referee_config.py +98 -0
- openapi/openapi-client/openapi_client/models/prompt_metadata.py +110 -0
- openapi/openapi-client/openapi_client/models/prompt_metadata_input.py +98 -0
- openapi/openapi-client/openapi_client/models/public_text_metadata_input.py +98 -0
- openapi/openapi-client/openapi_client/models/query_orders_model.py +112 -0
- openapi/openapi-client/openapi_client/models/query_validation_set_model.py +112 -0
- openapi/openapi-client/openapi_client/models/request_password_reset_command.py +98 -0
- openapi/openapi-client/openapi_client/models/root_filter.py +107 -0
- openapi/openapi-client/openapi_client/models/send_completion_mail_step_model.py +98 -0
- openapi/openapi-client/openapi_client/models/signup_customer_model.py +93 -0
- openapi/openapi-client/openapi_client/models/signup_shadow_customer_model.py +87 -0
- openapi/openapi-client/openapi_client/models/simple_workflow_config.py +137 -0
- openapi/openapi-client/openapi_client/models/simple_workflow_config_blueprint.py +238 -0
- openapi/openapi-client/openapi_client/models/simple_workflow_model.py +100 -0
- openapi/openapi-client/openapi_client/models/simple_workflow_model_blueprint.py +238 -0
- openapi/openapi-client/openapi_client/models/sort_criterion.py +96 -0
- openapi/openapi-client/openapi_client/models/sort_direction.py +37 -0
- openapi/openapi-client/openapi_client/models/static_rapid_selection_config.py +96 -0
- openapi/openapi-client/openapi_client/models/submit_coco_model.py +91 -0
- openapi/openapi-client/openapi_client/models/submit_coco_result.py +87 -0
- openapi/openapi-client/openapi_client/models/submit_password_reset_command.py +102 -0
- openapi/openapi-client/openapi_client/models/text_asset.py +106 -0
- openapi/openapi-client/openapi_client/models/text_asset_model.py +108 -0
- openapi/openapi-client/openapi_client/models/text_metadata.py +107 -0
- openapi/openapi-client/openapi_client/models/transcription_metadata.py +107 -0
- openapi/openapi-client/openapi_client/models/transcription_metadata_input.py +98 -0
- openapi/openapi-client/openapi_client/models/transcription_payload.py +106 -0
- openapi/openapi-client/openapi_client/models/transcription_rapid_blueprint.py +96 -0
- openapi/openapi-client/openapi_client/models/transcription_truth.py +106 -0
- openapi/openapi-client/openapi_client/models/transcription_word.py +89 -0
- openapi/openapi-client/openapi_client/models/unlock_order_result.py +87 -0
- openapi/openapi-client/openapi_client/models/update_access_model.py +87 -0
- openapi/openapi-client/openapi_client/models/update_order_model.py +87 -0
- openapi/openapi-client/openapi_client/models/update_workflow_config_model.py +100 -0
- openapi/openapi-client/openapi_client/models/update_workflow_config_model_workflow_config.py +140 -0
- openapi/openapi-client/openapi_client/models/upload_coco_result.py +91 -0
- openapi/openapi-client/openapi_client/models/upload_datapoints_result.py +97 -0
- openapi/openapi-client/openapi_client/models/upload_files_from_s3_bucket_model.py +116 -0
- openapi/openapi-client/openapi_client/models/upload_text_sources_to_dataset_model.py +89 -0
- openapi/openapi-client/openapi_client/models/validation_chance.py +91 -0
- openapi/openapi-client/openapi_client/models/validation_import_post_request_blueprint.py +238 -0
- openapi/openapi-client/openapi_client/models/validation_rapid_selection_config.py +98 -0
- openapi/openapi-client/openapi_client/models/validation_selection.py +98 -0
- openapi/openapi-client/openapi_client/models/validation_set.py +105 -0
- openapi/openapi-client/openapi_client/models/validation_set_overview_model.py +91 -0
- openapi/openapi-client/openapi_client/models/validation_set_paged_result.py +105 -0
- openapi/openapi-client/openapi_client/models/workflow_aggregation_step_model.py +112 -0
- openapi/openapi-client/openapi_client/models/workflow_labeling_step_model.py +96 -0
- openapi/openapi-client/openapi_client/models/workflow_split_model.py +110 -0
- openapi/openapi-client/openapi_client/models/workflow_split_model_filter_configs_inner.py +154 -0
- openapi/openapi-client/openapi_client/rest.py +257 -0
- rapidata/rapidata_client/{workflow/feature_flags → feature_flags}/feature_flags.py +5 -3
- rapidata/rapidata_client/metadata/__init__.py +0 -0
- rapidata/rapidata_client/metadata/base_metadata.py +12 -0
- rapidata/rapidata_client/metadata/transcription_metadata.py +19 -0
- rapidata/rapidata_client/order/dataset/rapidata_dataset.py +42 -16
- rapidata/rapidata_client/order/dataset/validation_set_builder.py +187 -0
- rapidata/rapidata_client/order/rapidata_order.py +49 -23
- rapidata/rapidata_client/order/rapidata_order_builder.py +126 -8
- rapidata/rapidata_client/rapidata_client.py +17 -5
- rapidata/rapidata_client/{workflow/referee → referee}/base_referee.py +8 -2
- rapidata/rapidata_client/{workflow/referee → referee}/classify_early_stopping_referee.py +1 -1
- rapidata/rapidata_client/{workflow/referee → referee}/naive_referee.py +5 -1
- rapidata/rapidata_client/workflow/__init__.py +0 -2
- rapidata/rapidata_client/workflow/base_workflow.py +9 -5
- rapidata/rapidata_client/workflow/classify_workflow.py +18 -3
- rapidata/rapidata_client/workflow/compare_workflow.py +13 -14
- rapidata/rapidata_client/workflow/free_text_workflow.py +14 -0
- rapidata/rapidata_client/workflow/transcription_workflow.py +22 -0
- rapidata/service/__init__.py +0 -1
- rapidata/service/openapi_service.py +43 -0
- {rapidata-0.1.2.dist-info → rapidata-0.1.5.dist-info}/METADATA +1 -1
- rapidata-0.1.5.dist-info/RECORD +227 -0
- rapidata/service/rapidata_api_services/base_service.py +0 -76
- rapidata/service/rapidata_api_services/dataset_service.py +0 -82
- rapidata/service/rapidata_api_services/order_service.py +0 -49
- rapidata/service/rapidata_api_services/rapidata_service.py +0 -18
- rapidata-0.1.2.dist-info/RECORD +0 -34
- /rapidata/service/rapidata_api_services/__init__.py → /openapi/openapi-client/openapi_client/py.typed +0 -0
- /rapidata/rapidata_client/{workflow/country_codes → country_codes}/__init__.py +0 -0
- /rapidata/rapidata_client/{workflow/country_codes → country_codes}/country_codes.py +0 -0
- /rapidata/rapidata_client/{workflow/feature_flags → feature_flags}/__init__.py +0 -0
- /rapidata/rapidata_client/{workflow/referee → referee}/__init__.py +0 -0
- {rapidata-0.1.2.dist-info → rapidata-0.1.5.dist-info}/LICENSE +0 -0
- {rapidata-0.1.2.dist-info → rapidata-0.1.5.dist-info}/WHEEL +0 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
# flake8: noqa
|
|
4
|
+
"""
|
|
5
|
+
Rapidata.Dataset
|
|
6
|
+
|
|
7
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
8
|
+
|
|
9
|
+
The version of the OpenAPI document: v1
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
# import models into model package
|
|
17
|
+
from openapi_client.models.add_validation_rapid_model import AddValidationRapidModel
|
|
18
|
+
from openapi_client.models.add_validation_rapid_model_payload import AddValidationRapidModelPayload
|
|
19
|
+
from openapi_client.models.add_validation_rapid_model_truth import AddValidationRapidModelTruth
|
|
20
|
+
from openapi_client.models.admin_order_model import AdminOrderModel
|
|
21
|
+
from openapi_client.models.admin_order_model_paged_result import AdminOrderModelPagedResult
|
|
22
|
+
from openapi_client.models.age_group import AgeGroup
|
|
23
|
+
from openapi_client.models.age_user_filter_model import AgeUserFilterModel
|
|
24
|
+
from openapi_client.models.aggregator_type import AggregatorType
|
|
25
|
+
from openapi_client.models.attach_category_rapid_blueprint import AttachCategoryRapidBlueprint
|
|
26
|
+
from openapi_client.models.attach_category_truth import AttachCategoryTruth
|
|
27
|
+
from openapi_client.models.base_error import BaseError
|
|
28
|
+
from openapi_client.models.bounding_box_payload import BoundingBoxPayload
|
|
29
|
+
from openapi_client.models.bounding_box_rapid_blueprint import BoundingBoxRapidBlueprint
|
|
30
|
+
from openapi_client.models.bounding_box_truth import BoundingBoxTruth
|
|
31
|
+
from openapi_client.models.box_shape import BoxShape
|
|
32
|
+
from openapi_client.models.classification_metadata import ClassificationMetadata
|
|
33
|
+
from openapi_client.models.classification_metadata_filter_config import ClassificationMetadataFilterConfig
|
|
34
|
+
from openapi_client.models.classify_payload import ClassifyPayload
|
|
35
|
+
from openapi_client.models.clone_dataset_model import CloneDatasetModel
|
|
36
|
+
from openapi_client.models.clone_order_model import CloneOrderModel
|
|
37
|
+
from openapi_client.models.clone_order_result import CloneOrderResult
|
|
38
|
+
from openapi_client.models.compare_payload import ComparePayload
|
|
39
|
+
from openapi_client.models.compare_rapid_blueprint import CompareRapidBlueprint
|
|
40
|
+
from openapi_client.models.compare_truth import CompareTruth
|
|
41
|
+
from openapi_client.models.compare_workflow_config import CompareWorkflowConfig
|
|
42
|
+
from openapi_client.models.compare_workflow_config_rapid_selection_configs_inner import CompareWorkflowConfigRapidSelectionConfigsInner
|
|
43
|
+
from openapi_client.models.compare_workflow_config_referee import CompareWorkflowConfigReferee
|
|
44
|
+
from openapi_client.models.compare_workflow_model import CompareWorkflowModel
|
|
45
|
+
from openapi_client.models.conditional_validation_rapid_selection_config import ConditionalValidationRapidSelectionConfig
|
|
46
|
+
from openapi_client.models.correlated_rapid_selection_config import CorrelatedRapidSelectionConfig
|
|
47
|
+
from openapi_client.models.count_classification_metadata_filter_config import CountClassificationMetadataFilterConfig
|
|
48
|
+
from openapi_client.models.count_metadata import CountMetadata
|
|
49
|
+
from openapi_client.models.country_user_filter_model import CountryUserFilterModel
|
|
50
|
+
from openapi_client.models.create_client_model import CreateClientModel
|
|
51
|
+
from openapi_client.models.create_complex_order_model import CreateComplexOrderModel
|
|
52
|
+
from openapi_client.models.create_complex_order_model_pipeline import CreateComplexOrderModelPipeline
|
|
53
|
+
from openapi_client.models.create_complex_order_result import CreateComplexOrderResult
|
|
54
|
+
from openapi_client.models.create_dataset_artifact_model import CreateDatasetArtifactModel
|
|
55
|
+
from openapi_client.models.create_dataset_artifact_model_dataset import CreateDatasetArtifactModelDataset
|
|
56
|
+
from openapi_client.models.create_default_order_model import CreateDefaultOrderModel
|
|
57
|
+
from openapi_client.models.create_default_order_model_workflow_config import CreateDefaultOrderModelWorkflowConfig
|
|
58
|
+
from openapi_client.models.create_empty_validation_set_result import CreateEmptyValidationSetResult
|
|
59
|
+
from openapi_client.models.create_legacy_order_result import CreateLegacyOrderResult
|
|
60
|
+
from openapi_client.models.create_order_model import CreateOrderModel
|
|
61
|
+
from openapi_client.models.create_order_model_referee import CreateOrderModelReferee
|
|
62
|
+
from openapi_client.models.create_order_model_selections_inner import CreateOrderModelSelectionsInner
|
|
63
|
+
from openapi_client.models.create_order_model_user_filters_inner import CreateOrderModelUserFiltersInner
|
|
64
|
+
from openapi_client.models.create_order_model_workflow import CreateOrderModelWorkflow
|
|
65
|
+
from openapi_client.models.create_order_result import CreateOrderResult
|
|
66
|
+
from openapi_client.models.create_simple_pipeline_model import CreateSimplePipelineModel
|
|
67
|
+
from openapi_client.models.create_simple_pipeline_model_artifacts_inner import CreateSimplePipelineModelArtifactsInner
|
|
68
|
+
from openapi_client.models.create_simple_pipeline_model_pipeline_steps_inner import CreateSimplePipelineModelPipelineStepsInner
|
|
69
|
+
from openapi_client.models.create_unsupported_order_model import CreateUnsupportedOrderModel
|
|
70
|
+
from openapi_client.models.customer_order_model import CustomerOrderModel
|
|
71
|
+
from openapi_client.models.customer_order_model_paged_result import CustomerOrderModelPagedResult
|
|
72
|
+
from openapi_client.models.datapoint import Datapoint
|
|
73
|
+
from openapi_client.models.datapoint_asset import DatapointAsset
|
|
74
|
+
from openapi_client.models.datapoint_get_by_id_get200_response import DatapointGetByIdGet200Response
|
|
75
|
+
from openapi_client.models.datapoint_metadata_model import DatapointMetadataModel
|
|
76
|
+
from openapi_client.models.datapoint_metadata_model_metadata_inner import DatapointMetadataModelMetadataInner
|
|
77
|
+
from openapi_client.models.datapoint_model import DatapointModel
|
|
78
|
+
from openapi_client.models.datapoint_model_asset import DatapointModelAsset
|
|
79
|
+
from openapi_client.models.dataset_evaluation_step_model import DatasetEvaluationStepModel
|
|
80
|
+
from openapi_client.models.demographic_rapid_selection_config import DemographicRapidSelectionConfig
|
|
81
|
+
from openapi_client.models.demographic_selection import DemographicSelection
|
|
82
|
+
from openapi_client.models.empty_validation_truth import EmptyValidationTruth
|
|
83
|
+
from openapi_client.models.error_type import ErrorType
|
|
84
|
+
from openapi_client.models.feature_flag import FeatureFlag
|
|
85
|
+
from openapi_client.models.feature_flag_model import FeatureFlagModel
|
|
86
|
+
from openapi_client.models.feedback_model import FeedbackModel
|
|
87
|
+
from openapi_client.models.file_asset import FileAsset
|
|
88
|
+
from openapi_client.models.file_asset_metadata_inner import FileAssetMetadataInner
|
|
89
|
+
from openapi_client.models.file_asset_model import FileAssetModel
|
|
90
|
+
from openapi_client.models.filter import Filter
|
|
91
|
+
from openapi_client.models.filter_operator import FilterOperator
|
|
92
|
+
from openapi_client.models.free_text_payload import FreeTextPayload
|
|
93
|
+
from openapi_client.models.free_text_rapid_blueprint import FreeTextRapidBlueprint
|
|
94
|
+
from openapi_client.models.gender import Gender
|
|
95
|
+
from openapi_client.models.gender_user_filter_model import GenderUserFilterModel
|
|
96
|
+
from openapi_client.models.get_available_validation_sets_result import GetAvailableValidationSetsResult
|
|
97
|
+
from openapi_client.models.get_datapoints_by_dataset_id_result import GetDatapointsByDatasetIdResult
|
|
98
|
+
from openapi_client.models.get_dataset_by_id_result import GetDatasetByIdResult
|
|
99
|
+
from openapi_client.models.get_order_by_id_result import GetOrderByIdResult
|
|
100
|
+
from openapi_client.models.get_order_results_result import GetOrderResultsResult
|
|
101
|
+
from openapi_client.models.get_public_orders_result import GetPublicOrdersResult
|
|
102
|
+
from openapi_client.models.get_workflow_config_result import GetWorkflowConfigResult
|
|
103
|
+
from openapi_client.models.get_workflow_config_result_workflow_config import GetWorkflowConfigResultWorkflowConfig
|
|
104
|
+
from openapi_client.models.image_dimension_metadata import ImageDimensionMetadata
|
|
105
|
+
from openapi_client.models.import_from_file_result import ImportFromFileResult
|
|
106
|
+
from openapi_client.models.import_validation_set_from_file_result import ImportValidationSetFromFileResult
|
|
107
|
+
from openapi_client.models.issue_auth_token_result import IssueAuthTokenResult
|
|
108
|
+
from openapi_client.models.issue_client_auth_token_result import IssueClientAuthTokenResult
|
|
109
|
+
from openapi_client.models.labeling_selection import LabelingSelection
|
|
110
|
+
from openapi_client.models.line_payload import LinePayload
|
|
111
|
+
from openapi_client.models.line_rapid_blueprint import LineRapidBlueprint
|
|
112
|
+
from openapi_client.models.line_truth import LineTruth
|
|
113
|
+
from openapi_client.models.locate_box_truth import LocateBoxTruth
|
|
114
|
+
from openapi_client.models.locate_payload import LocatePayload
|
|
115
|
+
from openapi_client.models.locate_rapid_blueprint import LocateRapidBlueprint
|
|
116
|
+
from openapi_client.models.location_metadata import LocationMetadata
|
|
117
|
+
from openapi_client.models.location_metadata_exists_filter_config import LocationMetadataExistsFilterConfig
|
|
118
|
+
from openapi_client.models.logic_operator import LogicOperator
|
|
119
|
+
from openapi_client.models.login_model import LoginModel
|
|
120
|
+
from openapi_client.models.metadata_visibilities import MetadataVisibilities
|
|
121
|
+
from openapi_client.models.multi_asset import MultiAsset
|
|
122
|
+
from openapi_client.models.multi_asset_model import MultiAssetModel
|
|
123
|
+
from openapi_client.models.naive_referee_config import NaiveRefereeConfig
|
|
124
|
+
from openapi_client.models.naive_referee_model import NaiveRefereeModel
|
|
125
|
+
from openapi_client.models.named_classification import NamedClassification
|
|
126
|
+
from openapi_client.models.named_entity_payload import NamedEntityPayload
|
|
127
|
+
from openapi_client.models.named_entity_rapid_blueprint import NamedEntityRapidBlueprint
|
|
128
|
+
from openapi_client.models.named_entity_truth import NamedEntityTruth
|
|
129
|
+
from openapi_client.models.never_ending_referee_config import NeverEndingRefereeConfig
|
|
130
|
+
from openapi_client.models.newsletter_model import NewsletterModel
|
|
131
|
+
from openapi_client.models.no_validation_workflow_rapid_selection_config import NoValidationWorkflowRapidSelectionConfig
|
|
132
|
+
from openapi_client.models.null_asset import NullAsset
|
|
133
|
+
from openapi_client.models.null_asset_model import NullAssetModel
|
|
134
|
+
from openapi_client.models.only_validation_workflow_rapid_selection_config import OnlyValidationWorkflowRapidSelectionConfig
|
|
135
|
+
from openapi_client.models.order_model import OrderModel
|
|
136
|
+
from openapi_client.models.order_query_get200_response import OrderQueryGet200Response
|
|
137
|
+
from openapi_client.models.original_filename_metadata import OriginalFilenameMetadata
|
|
138
|
+
from openapi_client.models.page_info import PageInfo
|
|
139
|
+
from openapi_client.models.polygon_payload import PolygonPayload
|
|
140
|
+
from openapi_client.models.polygon_rapid_blueprint import PolygonRapidBlueprint
|
|
141
|
+
from openapi_client.models.polygon_truth import PolygonTruth
|
|
142
|
+
from openapi_client.models.private_text_metadata_input import PrivateTextMetadataInput
|
|
143
|
+
from openapi_client.models.probabilistic_attach_category_referee_config import ProbabilisticAttachCategoryRefereeConfig
|
|
144
|
+
from openapi_client.models.prompt_metadata import PromptMetadata
|
|
145
|
+
from openapi_client.models.prompt_metadata_input import PromptMetadataInput
|
|
146
|
+
from openapi_client.models.public_text_metadata_input import PublicTextMetadataInput
|
|
147
|
+
from openapi_client.models.query_orders_model import QueryOrdersModel
|
|
148
|
+
from openapi_client.models.query_validation_set_model import QueryValidationSetModel
|
|
149
|
+
from openapi_client.models.request_password_reset_command import RequestPasswordResetCommand
|
|
150
|
+
from openapi_client.models.root_filter import RootFilter
|
|
151
|
+
from openapi_client.models.send_completion_mail_step_model import SendCompletionMailStepModel
|
|
152
|
+
from openapi_client.models.signup_customer_model import SignupCustomerModel
|
|
153
|
+
from openapi_client.models.signup_shadow_customer_model import SignupShadowCustomerModel
|
|
154
|
+
from openapi_client.models.simple_workflow_config import SimpleWorkflowConfig
|
|
155
|
+
from openapi_client.models.simple_workflow_config_blueprint import SimpleWorkflowConfigBlueprint
|
|
156
|
+
from openapi_client.models.simple_workflow_model import SimpleWorkflowModel
|
|
157
|
+
from openapi_client.models.simple_workflow_model_blueprint import SimpleWorkflowModelBlueprint
|
|
158
|
+
from openapi_client.models.sort_criterion import SortCriterion
|
|
159
|
+
from openapi_client.models.sort_direction import SortDirection
|
|
160
|
+
from openapi_client.models.static_rapid_selection_config import StaticRapidSelectionConfig
|
|
161
|
+
from openapi_client.models.submit_coco_model import SubmitCocoModel
|
|
162
|
+
from openapi_client.models.submit_coco_result import SubmitCocoResult
|
|
163
|
+
from openapi_client.models.submit_password_reset_command import SubmitPasswordResetCommand
|
|
164
|
+
from openapi_client.models.text_asset import TextAsset
|
|
165
|
+
from openapi_client.models.text_asset_model import TextAssetModel
|
|
166
|
+
from openapi_client.models.text_metadata import TextMetadata
|
|
167
|
+
from openapi_client.models.transcription_metadata import TranscriptionMetadata
|
|
168
|
+
from openapi_client.models.transcription_metadata_input import TranscriptionMetadataInput
|
|
169
|
+
from openapi_client.models.transcription_payload import TranscriptionPayload
|
|
170
|
+
from openapi_client.models.transcription_rapid_blueprint import TranscriptionRapidBlueprint
|
|
171
|
+
from openapi_client.models.transcription_truth import TranscriptionTruth
|
|
172
|
+
from openapi_client.models.transcription_word import TranscriptionWord
|
|
173
|
+
from openapi_client.models.unlock_order_result import UnlockOrderResult
|
|
174
|
+
from openapi_client.models.update_access_model import UpdateAccessModel
|
|
175
|
+
from openapi_client.models.update_order_model import UpdateOrderModel
|
|
176
|
+
from openapi_client.models.update_workflow_config_model import UpdateWorkflowConfigModel
|
|
177
|
+
from openapi_client.models.update_workflow_config_model_workflow_config import UpdateWorkflowConfigModelWorkflowConfig
|
|
178
|
+
from openapi_client.models.upload_coco_result import UploadCocoResult
|
|
179
|
+
from openapi_client.models.upload_datapoints_result import UploadDatapointsResult
|
|
180
|
+
from openapi_client.models.upload_files_from_s3_bucket_model import UploadFilesFromS3BucketModel
|
|
181
|
+
from openapi_client.models.upload_text_sources_to_dataset_model import UploadTextSourcesToDatasetModel
|
|
182
|
+
from openapi_client.models.validation_chance import ValidationChance
|
|
183
|
+
from openapi_client.models.validation_import_post_request_blueprint import ValidationImportPostRequestBlueprint
|
|
184
|
+
from openapi_client.models.validation_rapid_selection_config import ValidationRapidSelectionConfig
|
|
185
|
+
from openapi_client.models.validation_selection import ValidationSelection
|
|
186
|
+
from openapi_client.models.validation_set import ValidationSet
|
|
187
|
+
from openapi_client.models.validation_set_overview_model import ValidationSetOverviewModel
|
|
188
|
+
from openapi_client.models.validation_set_paged_result import ValidationSetPagedResult
|
|
189
|
+
from openapi_client.models.workflow_aggregation_step_model import WorkflowAggregationStepModel
|
|
190
|
+
from openapi_client.models.workflow_labeling_step_model import WorkflowLabelingStepModel
|
|
191
|
+
from openapi_client.models.workflow_split_model import WorkflowSplitModel
|
|
192
|
+
from openapi_client.models.workflow_split_model_filter_configs_inner import WorkflowSplitModelFilterConfigsInner
|
|
@@ -0,0 +1,116 @@
|
|
|
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, StrictFloat, StrictInt, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional, Union
|
|
22
|
+
from openapi_client.models.add_validation_rapid_model_payload import AddValidationRapidModelPayload
|
|
23
|
+
from openapi_client.models.add_validation_rapid_model_truth import AddValidationRapidModelTruth
|
|
24
|
+
from openapi_client.models.datapoint_metadata_model_metadata_inner import DatapointMetadataModelMetadataInner
|
|
25
|
+
from typing import Optional, Set
|
|
26
|
+
from typing_extensions import Self
|
|
27
|
+
|
|
28
|
+
class AddValidationRapidModel(BaseModel):
|
|
29
|
+
"""
|
|
30
|
+
The model for adding a validation rapid.
|
|
31
|
+
""" # noqa: E501
|
|
32
|
+
validation_set_id: StrictStr = Field(description="The ID of the validation set to add the rapid to.", alias="validationSetId")
|
|
33
|
+
payload: AddValidationRapidModelPayload
|
|
34
|
+
metadata: List[DatapointMetadataModelMetadataInner] = Field(description="Some metadata to attach to the rapid.")
|
|
35
|
+
truth: AddValidationRapidModelTruth
|
|
36
|
+
random_correct_probability: Optional[Union[StrictFloat, StrictInt]] = Field(description="The probability for an answer to be correct when randomly guessing.", alias="randomCorrectProbability")
|
|
37
|
+
__properties: ClassVar[List[str]] = ["validationSetId", "payload", "metadata", "truth", "randomCorrectProbability"]
|
|
38
|
+
|
|
39
|
+
model_config = ConfigDict(
|
|
40
|
+
populate_by_name=True,
|
|
41
|
+
validate_assignment=True,
|
|
42
|
+
protected_namespaces=(),
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def to_str(self) -> str:
|
|
47
|
+
"""Returns the string representation of the model using alias"""
|
|
48
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
49
|
+
|
|
50
|
+
def to_json(self) -> str:
|
|
51
|
+
"""Returns the JSON representation of the model using alias"""
|
|
52
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
53
|
+
return json.dumps(self.to_dict())
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
57
|
+
"""Create an instance of AddValidationRapidModel from a JSON string"""
|
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
|
59
|
+
|
|
60
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
61
|
+
"""Return the dictionary representation of the model using alias.
|
|
62
|
+
|
|
63
|
+
This has the following differences from calling pydantic's
|
|
64
|
+
`self.model_dump(by_alias=True)`:
|
|
65
|
+
|
|
66
|
+
* `None` is only added to the output dict for nullable fields that
|
|
67
|
+
were set at model initialization. Other fields with value `None`
|
|
68
|
+
are ignored.
|
|
69
|
+
"""
|
|
70
|
+
excluded_fields: Set[str] = set([
|
|
71
|
+
])
|
|
72
|
+
|
|
73
|
+
_dict = self.model_dump(
|
|
74
|
+
by_alias=True,
|
|
75
|
+
exclude=excluded_fields,
|
|
76
|
+
exclude_none=True,
|
|
77
|
+
)
|
|
78
|
+
# override the default output from pydantic by calling `to_dict()` of payload
|
|
79
|
+
if self.payload:
|
|
80
|
+
_dict['payload'] = self.payload.to_dict()
|
|
81
|
+
# override the default output from pydantic by calling `to_dict()` of each item in metadata (list)
|
|
82
|
+
_items = []
|
|
83
|
+
if self.metadata:
|
|
84
|
+
for _item_metadata in self.metadata:
|
|
85
|
+
if _item_metadata:
|
|
86
|
+
_items.append(_item_metadata.to_dict())
|
|
87
|
+
_dict['metadata'] = _items
|
|
88
|
+
# override the default output from pydantic by calling `to_dict()` of truth
|
|
89
|
+
if self.truth:
|
|
90
|
+
_dict['truth'] = self.truth.to_dict()
|
|
91
|
+
# set to None if random_correct_probability (nullable) is None
|
|
92
|
+
# and model_fields_set contains the field
|
|
93
|
+
if self.random_correct_probability is None and "random_correct_probability" in self.model_fields_set:
|
|
94
|
+
_dict['randomCorrectProbability'] = None
|
|
95
|
+
|
|
96
|
+
return _dict
|
|
97
|
+
|
|
98
|
+
@classmethod
|
|
99
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
100
|
+
"""Create an instance of AddValidationRapidModel from a dict"""
|
|
101
|
+
if obj is None:
|
|
102
|
+
return None
|
|
103
|
+
|
|
104
|
+
if not isinstance(obj, dict):
|
|
105
|
+
return cls.model_validate(obj)
|
|
106
|
+
|
|
107
|
+
_obj = cls.model_validate({
|
|
108
|
+
"validationSetId": obj.get("validationSetId"),
|
|
109
|
+
"payload": AddValidationRapidModelPayload.from_dict(obj["payload"]) if obj.get("payload") is not None else None,
|
|
110
|
+
"metadata": [DatapointMetadataModelMetadataInner.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None,
|
|
111
|
+
"truth": AddValidationRapidModelTruth.from_dict(obj["truth"]) if obj.get("truth") is not None else None,
|
|
112
|
+
"randomCorrectProbability": obj.get("randomCorrectProbability")
|
|
113
|
+
})
|
|
114
|
+
return _obj
|
|
115
|
+
|
|
116
|
+
|
|
@@ -0,0 +1,238 @@
|
|
|
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 openapi_client.models.bounding_box_payload import BoundingBoxPayload
|
|
21
|
+
from openapi_client.models.classify_payload import ClassifyPayload
|
|
22
|
+
from openapi_client.models.compare_payload import ComparePayload
|
|
23
|
+
from openapi_client.models.free_text_payload import FreeTextPayload
|
|
24
|
+
from openapi_client.models.line_payload import LinePayload
|
|
25
|
+
from openapi_client.models.locate_payload import LocatePayload
|
|
26
|
+
from openapi_client.models.named_entity_payload import NamedEntityPayload
|
|
27
|
+
from openapi_client.models.polygon_payload import PolygonPayload
|
|
28
|
+
from openapi_client.models.transcription_payload import TranscriptionPayload
|
|
29
|
+
from pydantic import StrictStr, Field
|
|
30
|
+
from typing import Union, List, Set, Optional, Dict
|
|
31
|
+
from typing_extensions import Literal, Self
|
|
32
|
+
|
|
33
|
+
ADDVALIDATIONRAPIDMODELPAYLOAD_ONE_OF_SCHEMAS = ["BoundingBoxPayload", "ClassifyPayload", "ComparePayload", "FreeTextPayload", "LinePayload", "LocatePayload", "NamedEntityPayload", "PolygonPayload", "TranscriptionPayload"]
|
|
34
|
+
|
|
35
|
+
class AddValidationRapidModelPayload(BaseModel):
|
|
36
|
+
"""
|
|
37
|
+
The payload to use for the rapid.
|
|
38
|
+
"""
|
|
39
|
+
# data type: TranscriptionPayload
|
|
40
|
+
oneof_schema_1_validator: Optional[TranscriptionPayload] = None
|
|
41
|
+
# data type: PolygonPayload
|
|
42
|
+
oneof_schema_2_validator: Optional[PolygonPayload] = None
|
|
43
|
+
# data type: NamedEntityPayload
|
|
44
|
+
oneof_schema_3_validator: Optional[NamedEntityPayload] = None
|
|
45
|
+
# data type: LocatePayload
|
|
46
|
+
oneof_schema_4_validator: Optional[LocatePayload] = None
|
|
47
|
+
# data type: LinePayload
|
|
48
|
+
oneof_schema_5_validator: Optional[LinePayload] = None
|
|
49
|
+
# data type: FreeTextPayload
|
|
50
|
+
oneof_schema_6_validator: Optional[FreeTextPayload] = None
|
|
51
|
+
# data type: ComparePayload
|
|
52
|
+
oneof_schema_7_validator: Optional[ComparePayload] = None
|
|
53
|
+
# data type: ClassifyPayload
|
|
54
|
+
oneof_schema_8_validator: Optional[ClassifyPayload] = None
|
|
55
|
+
# data type: BoundingBoxPayload
|
|
56
|
+
oneof_schema_9_validator: Optional[BoundingBoxPayload] = None
|
|
57
|
+
actual_instance: Optional[Union[BoundingBoxPayload, ClassifyPayload, ComparePayload, FreeTextPayload, LinePayload, LocatePayload, NamedEntityPayload, PolygonPayload, TranscriptionPayload]] = None
|
|
58
|
+
one_of_schemas: Set[str] = { "BoundingBoxPayload", "ClassifyPayload", "ComparePayload", "FreeTextPayload", "LinePayload", "LocatePayload", "NamedEntityPayload", "PolygonPayload", "TranscriptionPayload" }
|
|
59
|
+
|
|
60
|
+
model_config = ConfigDict(
|
|
61
|
+
validate_assignment=True,
|
|
62
|
+
protected_namespaces=(),
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
discriminator_value_class_map: Dict[str, str] = {
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
70
|
+
if args:
|
|
71
|
+
if len(args) > 1:
|
|
72
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
73
|
+
if kwargs:
|
|
74
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
75
|
+
super().__init__(actual_instance=args[0])
|
|
76
|
+
else:
|
|
77
|
+
super().__init__(**kwargs)
|
|
78
|
+
|
|
79
|
+
@field_validator('actual_instance')
|
|
80
|
+
def actual_instance_must_validate_oneof(cls, v):
|
|
81
|
+
instance = AddValidationRapidModelPayload.model_construct()
|
|
82
|
+
error_messages = []
|
|
83
|
+
match = 0
|
|
84
|
+
# validate data type: TranscriptionPayload
|
|
85
|
+
if not isinstance(v, TranscriptionPayload):
|
|
86
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `TranscriptionPayload`")
|
|
87
|
+
else:
|
|
88
|
+
match += 1
|
|
89
|
+
# validate data type: PolygonPayload
|
|
90
|
+
if not isinstance(v, PolygonPayload):
|
|
91
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `PolygonPayload`")
|
|
92
|
+
else:
|
|
93
|
+
match += 1
|
|
94
|
+
# validate data type: NamedEntityPayload
|
|
95
|
+
if not isinstance(v, NamedEntityPayload):
|
|
96
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `NamedEntityPayload`")
|
|
97
|
+
else:
|
|
98
|
+
match += 1
|
|
99
|
+
# validate data type: LocatePayload
|
|
100
|
+
if not isinstance(v, LocatePayload):
|
|
101
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `LocatePayload`")
|
|
102
|
+
else:
|
|
103
|
+
match += 1
|
|
104
|
+
# validate data type: LinePayload
|
|
105
|
+
if not isinstance(v, LinePayload):
|
|
106
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `LinePayload`")
|
|
107
|
+
else:
|
|
108
|
+
match += 1
|
|
109
|
+
# validate data type: FreeTextPayload
|
|
110
|
+
if not isinstance(v, FreeTextPayload):
|
|
111
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `FreeTextPayload`")
|
|
112
|
+
else:
|
|
113
|
+
match += 1
|
|
114
|
+
# validate data type: ComparePayload
|
|
115
|
+
if not isinstance(v, ComparePayload):
|
|
116
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ComparePayload`")
|
|
117
|
+
else:
|
|
118
|
+
match += 1
|
|
119
|
+
# validate data type: ClassifyPayload
|
|
120
|
+
if not isinstance(v, ClassifyPayload):
|
|
121
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ClassifyPayload`")
|
|
122
|
+
else:
|
|
123
|
+
match += 1
|
|
124
|
+
# validate data type: BoundingBoxPayload
|
|
125
|
+
if not isinstance(v, BoundingBoxPayload):
|
|
126
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `BoundingBoxPayload`")
|
|
127
|
+
else:
|
|
128
|
+
match += 1
|
|
129
|
+
if match > 1:
|
|
130
|
+
# more than 1 match
|
|
131
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in AddValidationRapidModelPayload with oneOf schemas: BoundingBoxPayload, ClassifyPayload, ComparePayload, FreeTextPayload, LinePayload, LocatePayload, NamedEntityPayload, PolygonPayload, TranscriptionPayload. Details: " + ", ".join(error_messages))
|
|
132
|
+
elif match == 0:
|
|
133
|
+
# no match
|
|
134
|
+
raise ValueError("No match found when setting `actual_instance` in AddValidationRapidModelPayload with oneOf schemas: BoundingBoxPayload, ClassifyPayload, ComparePayload, FreeTextPayload, LinePayload, LocatePayload, NamedEntityPayload, PolygonPayload, TranscriptionPayload. Details: " + ", ".join(error_messages))
|
|
135
|
+
else:
|
|
136
|
+
return v
|
|
137
|
+
|
|
138
|
+
@classmethod
|
|
139
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
140
|
+
return cls.from_json(json.dumps(obj))
|
|
141
|
+
|
|
142
|
+
@classmethod
|
|
143
|
+
def from_json(cls, json_str: str) -> Self:
|
|
144
|
+
"""Returns the object represented by the json string"""
|
|
145
|
+
instance = cls.model_construct()
|
|
146
|
+
error_messages = []
|
|
147
|
+
match = 0
|
|
148
|
+
|
|
149
|
+
# deserialize data into TranscriptionPayload
|
|
150
|
+
try:
|
|
151
|
+
instance.actual_instance = TranscriptionPayload.from_json(json_str)
|
|
152
|
+
match += 1
|
|
153
|
+
except (ValidationError, ValueError) as e:
|
|
154
|
+
error_messages.append(str(e))
|
|
155
|
+
# deserialize data into PolygonPayload
|
|
156
|
+
try:
|
|
157
|
+
instance.actual_instance = PolygonPayload.from_json(json_str)
|
|
158
|
+
match += 1
|
|
159
|
+
except (ValidationError, ValueError) as e:
|
|
160
|
+
error_messages.append(str(e))
|
|
161
|
+
# deserialize data into NamedEntityPayload
|
|
162
|
+
try:
|
|
163
|
+
instance.actual_instance = NamedEntityPayload.from_json(json_str)
|
|
164
|
+
match += 1
|
|
165
|
+
except (ValidationError, ValueError) as e:
|
|
166
|
+
error_messages.append(str(e))
|
|
167
|
+
# deserialize data into LocatePayload
|
|
168
|
+
try:
|
|
169
|
+
instance.actual_instance = LocatePayload.from_json(json_str)
|
|
170
|
+
match += 1
|
|
171
|
+
except (ValidationError, ValueError) as e:
|
|
172
|
+
error_messages.append(str(e))
|
|
173
|
+
# deserialize data into LinePayload
|
|
174
|
+
try:
|
|
175
|
+
instance.actual_instance = LinePayload.from_json(json_str)
|
|
176
|
+
match += 1
|
|
177
|
+
except (ValidationError, ValueError) as e:
|
|
178
|
+
error_messages.append(str(e))
|
|
179
|
+
# deserialize data into FreeTextPayload
|
|
180
|
+
try:
|
|
181
|
+
instance.actual_instance = FreeTextPayload.from_json(json_str)
|
|
182
|
+
match += 1
|
|
183
|
+
except (ValidationError, ValueError) as e:
|
|
184
|
+
error_messages.append(str(e))
|
|
185
|
+
# deserialize data into ComparePayload
|
|
186
|
+
try:
|
|
187
|
+
instance.actual_instance = ComparePayload.from_json(json_str)
|
|
188
|
+
match += 1
|
|
189
|
+
except (ValidationError, ValueError) as e:
|
|
190
|
+
error_messages.append(str(e))
|
|
191
|
+
# deserialize data into ClassifyPayload
|
|
192
|
+
try:
|
|
193
|
+
instance.actual_instance = ClassifyPayload.from_json(json_str)
|
|
194
|
+
match += 1
|
|
195
|
+
except (ValidationError, ValueError) as e:
|
|
196
|
+
error_messages.append(str(e))
|
|
197
|
+
# deserialize data into BoundingBoxPayload
|
|
198
|
+
try:
|
|
199
|
+
instance.actual_instance = BoundingBoxPayload.from_json(json_str)
|
|
200
|
+
match += 1
|
|
201
|
+
except (ValidationError, ValueError) as e:
|
|
202
|
+
error_messages.append(str(e))
|
|
203
|
+
|
|
204
|
+
if match > 1:
|
|
205
|
+
# more than 1 match
|
|
206
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into AddValidationRapidModelPayload with oneOf schemas: BoundingBoxPayload, ClassifyPayload, ComparePayload, FreeTextPayload, LinePayload, LocatePayload, NamedEntityPayload, PolygonPayload, TranscriptionPayload. Details: " + ", ".join(error_messages))
|
|
207
|
+
elif match == 0:
|
|
208
|
+
# no match
|
|
209
|
+
raise ValueError("No match found when deserializing the JSON string into AddValidationRapidModelPayload with oneOf schemas: BoundingBoxPayload, ClassifyPayload, ComparePayload, FreeTextPayload, LinePayload, LocatePayload, NamedEntityPayload, PolygonPayload, TranscriptionPayload. Details: " + ", ".join(error_messages))
|
|
210
|
+
else:
|
|
211
|
+
return instance
|
|
212
|
+
|
|
213
|
+
def to_json(self) -> str:
|
|
214
|
+
"""Returns the JSON representation of the actual instance"""
|
|
215
|
+
if self.actual_instance is None:
|
|
216
|
+
return "null"
|
|
217
|
+
|
|
218
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
219
|
+
return self.actual_instance.to_json()
|
|
220
|
+
else:
|
|
221
|
+
return json.dumps(self.actual_instance)
|
|
222
|
+
|
|
223
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], BoundingBoxPayload, ClassifyPayload, ComparePayload, FreeTextPayload, LinePayload, LocatePayload, NamedEntityPayload, PolygonPayload, TranscriptionPayload]]:
|
|
224
|
+
"""Returns the dict representation of the actual instance"""
|
|
225
|
+
if self.actual_instance is None:
|
|
226
|
+
return None
|
|
227
|
+
|
|
228
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
229
|
+
return self.actual_instance.to_dict()
|
|
230
|
+
else:
|
|
231
|
+
# primitive type
|
|
232
|
+
return self.actual_instance
|
|
233
|
+
|
|
234
|
+
def to_str(self) -> str:
|
|
235
|
+
"""Returns the string representation of the actual instance"""
|
|
236
|
+
return pprint.pformat(self.model_dump())
|
|
237
|
+
|
|
238
|
+
|