rapidata 2.35.3__py3-none-any.whl → 2.36.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of rapidata might be problematic. Click here for more details.

Files changed (48) hide show
  1. rapidata/__init__.py +1 -1
  2. rapidata/api_client/__init__.py +21 -3
  3. rapidata/api_client/api/__init__.py +1 -0
  4. rapidata/api_client/api/benchmark_api.py +294 -0
  5. rapidata/api_client/api/campaign_api.py +268 -0
  6. rapidata/api_client/api/customer_rapid_api.py +247 -0
  7. rapidata/api_client/api/pipeline_api.py +0 -873
  8. rapidata/api_client/api/sample_api.py +299 -0
  9. rapidata/api_client/models/__init__.py +20 -3
  10. rapidata/api_client/models/and_filter.py +121 -0
  11. rapidata/api_client/models/and_filter_filters_inner.py +268 -0
  12. rapidata/api_client/models/boost_mode.py +37 -0
  13. rapidata/api_client/models/boost_query_result.py +10 -1
  14. rapidata/api_client/models/campaign_filter.py +98 -0
  15. rapidata/api_client/models/change_boost_model.py +89 -0
  16. rapidata/api_client/models/compare_rapid_blueprint.py +5 -3
  17. rapidata/api_client/models/compare_rapid_blueprint1.py +96 -0
  18. rapidata/api_client/models/country_filter.py +98 -0
  19. rapidata/api_client/models/create_leaderboard_model.py +32 -2
  20. rapidata/api_client/models/demographic_filter.py +100 -0
  21. rapidata/api_client/models/feature_flag_model.py +4 -4
  22. rapidata/api_client/models/free_text_payload.py +10 -3
  23. rapidata/api_client/models/free_text_rapid_blueprint.py +10 -3
  24. rapidata/api_client/models/get_compare_ab_summary_result.py +4 -2
  25. rapidata/api_client/models/get_leaderboard_by_id_result.py +29 -2
  26. rapidata/api_client/models/get_public_responses_result.py +95 -0
  27. rapidata/api_client/models/get_sample_by_id_result.py +126 -0
  28. rapidata/api_client/models/language_filter.py +98 -0
  29. rapidata/api_client/models/leaderboard_query_result.py +29 -2
  30. rapidata/api_client/models/new_user_filter.py +96 -0
  31. rapidata/api_client/models/not_filter.py +117 -0
  32. rapidata/api_client/models/or_filter.py +121 -0
  33. rapidata/api_client/models/public_rapid_response.py +112 -0
  34. rapidata/api_client/models/response_count_filter.py +109 -0
  35. rapidata/api_client/models/sample_by_identifier.py +126 -0
  36. rapidata/api_client/models/sample_by_identifier_paged_result.py +105 -0
  37. rapidata/api_client/models/simple_workflow_config_blueprint.py +37 -23
  38. rapidata/api_client/models/user_score_filter.py +102 -0
  39. rapidata/api_client/models/user_state.py +38 -0
  40. rapidata/api_client/models/user_state_filter.py +101 -0
  41. rapidata/api_client_README.md +24 -6
  42. rapidata/rapidata_client/benchmark/rapidata_benchmark.py +26 -2
  43. rapidata/rapidata_client/order/rapidata_order_manager.py +298 -219
  44. rapidata/rapidata_client/workflow/_compare_workflow.py +7 -2
  45. {rapidata-2.35.3.dist-info → rapidata-2.36.0.dist-info}/METADATA +1 -1
  46. {rapidata-2.35.3.dist-info → rapidata-2.36.0.dist-info}/RECORD +48 -26
  47. {rapidata-2.35.3.dist-info → rapidata-2.36.0.dist-info}/LICENSE +0 -0
  48. {rapidata-2.35.3.dist-info → rapidata-2.36.0.dist-info}/WHEEL +0 -0
@@ -0,0 +1,109 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Rapidata.Dataset
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr, field_validator
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class ResponseCountFilter(BaseModel):
26
+ """
27
+ ResponseCountFilter
28
+ """ # noqa: E501
29
+ t: StrictStr = Field(description="Discriminator value for ResponseCountFilter", alias="_t")
30
+ response_count: StrictInt = Field(alias="responseCount")
31
+ dimension: StrictStr
32
+ operator: StrictStr
33
+ execution_order: Optional[StrictInt] = Field(default=None, alias="executionOrder")
34
+ __properties: ClassVar[List[str]] = ["_t", "responseCount", "dimension", "operator", "executionOrder"]
35
+
36
+ @field_validator('t')
37
+ def t_validate_enum(cls, value):
38
+ """Validates the enum"""
39
+ if value not in set(['ResponseCountFilter']):
40
+ raise ValueError("must be one of enum values ('ResponseCountFilter')")
41
+ return value
42
+
43
+ @field_validator('operator')
44
+ def operator_validate_enum(cls, value):
45
+ """Validates the enum"""
46
+ if value not in set(['Equal', 'NotEqual', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual']):
47
+ raise ValueError("must be one of enum values ('Equal', 'NotEqual', 'LessThan', 'LessThanOrEqual', 'GreaterThan', 'GreaterThanOrEqual')")
48
+ return value
49
+
50
+ model_config = ConfigDict(
51
+ populate_by_name=True,
52
+ validate_assignment=True,
53
+ protected_namespaces=(),
54
+ )
55
+
56
+
57
+ def to_str(self) -> str:
58
+ """Returns the string representation of the model using alias"""
59
+ return pprint.pformat(self.model_dump(by_alias=True))
60
+
61
+ def to_json(self) -> str:
62
+ """Returns the JSON representation of the model using alias"""
63
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
64
+ return json.dumps(self.to_dict())
65
+
66
+ @classmethod
67
+ def from_json(cls, json_str: str) -> Optional[Self]:
68
+ """Create an instance of ResponseCountFilter from a JSON string"""
69
+ return cls.from_dict(json.loads(json_str))
70
+
71
+ def to_dict(self) -> Dict[str, Any]:
72
+ """Return the dictionary representation of the model using alias.
73
+
74
+ This has the following differences from calling pydantic's
75
+ `self.model_dump(by_alias=True)`:
76
+
77
+ * `None` is only added to the output dict for nullable fields that
78
+ were set at model initialization. Other fields with value `None`
79
+ are ignored.
80
+ """
81
+ excluded_fields: Set[str] = set([
82
+ ])
83
+
84
+ _dict = self.model_dump(
85
+ by_alias=True,
86
+ exclude=excluded_fields,
87
+ exclude_none=True,
88
+ )
89
+ return _dict
90
+
91
+ @classmethod
92
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
93
+ """Create an instance of ResponseCountFilter from a dict"""
94
+ if obj is None:
95
+ return None
96
+
97
+ if not isinstance(obj, dict):
98
+ return cls.model_validate(obj)
99
+
100
+ _obj = cls.model_validate({
101
+ "_t": obj.get("_t") if obj.get("_t") is not None else 'ResponseCountFilter',
102
+ "responseCount": obj.get("responseCount"),
103
+ "dimension": obj.get("dimension"),
104
+ "operator": obj.get("operator"),
105
+ "executionOrder": obj.get("executionOrder")
106
+ })
107
+ return _obj
108
+
109
+
@@ -0,0 +1,126 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Rapidata.Dataset
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from datetime import datetime
21
+ from pydantic import BaseModel, ConfigDict, Field, StrictStr
22
+ from typing import Any, ClassVar, Dict, List, Optional
23
+ from rapidata.api_client.models.datapoint_asset import DatapointAsset
24
+ from rapidata.api_client.models.get_validation_rapids_result_asset import GetValidationRapidsResultAsset
25
+ from typing import Optional, Set
26
+ from typing_extensions import Self
27
+
28
+ class SampleByIdentifier(BaseModel):
29
+ """
30
+ SampleByIdentifier
31
+ """ # noqa: E501
32
+ id: StrictStr
33
+ identifier: StrictStr
34
+ participant_id: StrictStr = Field(alias="participantId")
35
+ participant_name: StrictStr = Field(alias="participantName")
36
+ asset: DatapointAsset
37
+ prompt: Optional[StrictStr] = None
38
+ prompt_asset: Optional[GetValidationRapidsResultAsset] = Field(default=None, alias="promptAsset")
39
+ tags: List[StrictStr]
40
+ created_at: Optional[datetime] = Field(default=None, alias="createdAt")
41
+ owner_id: Optional[StrictStr] = Field(default=None, alias="ownerId")
42
+ owner_mail: StrictStr = Field(alias="ownerMail")
43
+ __properties: ClassVar[List[str]] = ["id", "identifier", "participantId", "participantName", "asset", "prompt", "promptAsset", "tags", "createdAt", "ownerId", "ownerMail"]
44
+
45
+ model_config = ConfigDict(
46
+ populate_by_name=True,
47
+ validate_assignment=True,
48
+ protected_namespaces=(),
49
+ )
50
+
51
+
52
+ def to_str(self) -> str:
53
+ """Returns the string representation of the model using alias"""
54
+ return pprint.pformat(self.model_dump(by_alias=True))
55
+
56
+ def to_json(self) -> str:
57
+ """Returns the JSON representation of the model using alias"""
58
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
59
+ return json.dumps(self.to_dict())
60
+
61
+ @classmethod
62
+ def from_json(cls, json_str: str) -> Optional[Self]:
63
+ """Create an instance of SampleByIdentifier from a JSON string"""
64
+ return cls.from_dict(json.loads(json_str))
65
+
66
+ def to_dict(self) -> Dict[str, Any]:
67
+ """Return the dictionary representation of the model using alias.
68
+
69
+ This has the following differences from calling pydantic's
70
+ `self.model_dump(by_alias=True)`:
71
+
72
+ * `None` is only added to the output dict for nullable fields that
73
+ were set at model initialization. Other fields with value `None`
74
+ are ignored.
75
+ """
76
+ excluded_fields: Set[str] = set([
77
+ ])
78
+
79
+ _dict = self.model_dump(
80
+ by_alias=True,
81
+ exclude=excluded_fields,
82
+ exclude_none=True,
83
+ )
84
+ # override the default output from pydantic by calling `to_dict()` of asset
85
+ if self.asset:
86
+ _dict['asset'] = self.asset.to_dict()
87
+ # override the default output from pydantic by calling `to_dict()` of prompt_asset
88
+ if self.prompt_asset:
89
+ _dict['promptAsset'] = self.prompt_asset.to_dict()
90
+ # set to None if prompt (nullable) is None
91
+ # and model_fields_set contains the field
92
+ if self.prompt is None and "prompt" in self.model_fields_set:
93
+ _dict['prompt'] = None
94
+
95
+ # set to None if prompt_asset (nullable) is None
96
+ # and model_fields_set contains the field
97
+ if self.prompt_asset is None and "prompt_asset" in self.model_fields_set:
98
+ _dict['promptAsset'] = None
99
+
100
+ return _dict
101
+
102
+ @classmethod
103
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
104
+ """Create an instance of SampleByIdentifier from a dict"""
105
+ if obj is None:
106
+ return None
107
+
108
+ if not isinstance(obj, dict):
109
+ return cls.model_validate(obj)
110
+
111
+ _obj = cls.model_validate({
112
+ "id": obj.get("id"),
113
+ "identifier": obj.get("identifier"),
114
+ "participantId": obj.get("participantId"),
115
+ "participantName": obj.get("participantName"),
116
+ "asset": DatapointAsset.from_dict(obj["asset"]) if obj.get("asset") is not None else None,
117
+ "prompt": obj.get("prompt"),
118
+ "promptAsset": GetValidationRapidsResultAsset.from_dict(obj["promptAsset"]) if obj.get("promptAsset") is not None else None,
119
+ "tags": obj.get("tags"),
120
+ "createdAt": obj.get("createdAt"),
121
+ "ownerId": obj.get("ownerId"),
122
+ "ownerMail": obj.get("ownerMail")
123
+ })
124
+ return _obj
125
+
126
+
@@ -0,0 +1,105 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Rapidata.Dataset
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import pprint
17
+ import re # noqa: F401
18
+ import json
19
+
20
+ from pydantic import BaseModel, ConfigDict, Field, StrictInt
21
+ from typing import Any, ClassVar, Dict, List, Optional
22
+ from rapidata.api_client.models.sample_by_identifier import SampleByIdentifier
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class SampleByIdentifierPagedResult(BaseModel):
27
+ """
28
+ SampleByIdentifierPagedResult
29
+ """ # noqa: E501
30
+ total: StrictInt
31
+ page: StrictInt
32
+ page_size: StrictInt = Field(alias="pageSize")
33
+ items: List[SampleByIdentifier]
34
+ total_pages: Optional[StrictInt] = Field(default=None, alias="totalPages")
35
+ __properties: ClassVar[List[str]] = ["total", "page", "pageSize", "items", "totalPages"]
36
+
37
+ model_config = ConfigDict(
38
+ populate_by_name=True,
39
+ validate_assignment=True,
40
+ protected_namespaces=(),
41
+ )
42
+
43
+
44
+ def to_str(self) -> str:
45
+ """Returns the string representation of the model using alias"""
46
+ return pprint.pformat(self.model_dump(by_alias=True))
47
+
48
+ def to_json(self) -> str:
49
+ """Returns the JSON representation of the model using alias"""
50
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
51
+ return json.dumps(self.to_dict())
52
+
53
+ @classmethod
54
+ def from_json(cls, json_str: str) -> Optional[Self]:
55
+ """Create an instance of SampleByIdentifierPagedResult from a JSON string"""
56
+ return cls.from_dict(json.loads(json_str))
57
+
58
+ def to_dict(self) -> Dict[str, Any]:
59
+ """Return the dictionary representation of the model using alias.
60
+
61
+ This has the following differences from calling pydantic's
62
+ `self.model_dump(by_alias=True)`:
63
+
64
+ * `None` is only added to the output dict for nullable fields that
65
+ were set at model initialization. Other fields with value `None`
66
+ are ignored.
67
+ * OpenAPI `readOnly` fields are excluded.
68
+ """
69
+ excluded_fields: Set[str] = set([
70
+ "total_pages",
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 each item in items (list)
79
+ _items = []
80
+ if self.items:
81
+ for _item_items in self.items:
82
+ if _item_items:
83
+ _items.append(_item_items.to_dict())
84
+ _dict['items'] = _items
85
+ return _dict
86
+
87
+ @classmethod
88
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
89
+ """Create an instance of SampleByIdentifierPagedResult from a dict"""
90
+ if obj is None:
91
+ return None
92
+
93
+ if not isinstance(obj, dict):
94
+ return cls.model_validate(obj)
95
+
96
+ _obj = cls.model_validate({
97
+ "total": obj.get("total"),
98
+ "page": obj.get("page"),
99
+ "pageSize": obj.get("pageSize"),
100
+ "items": [SampleByIdentifier.from_dict(_item) for _item in obj["items"]] if obj.get("items") is not None else None,
101
+ "totalPages": obj.get("totalPages")
102
+ })
103
+ return _obj
104
+
105
+
@@ -19,18 +19,19 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, f
19
19
  from typing import Any, List, Optional
20
20
  from rapidata.api_client.models.attach_category_rapid_blueprint import AttachCategoryRapidBlueprint
21
21
  from rapidata.api_client.models.bounding_box_rapid_blueprint import BoundingBoxRapidBlueprint
22
- from rapidata.api_client.models.compare_rapid_blueprint import CompareRapidBlueprint
22
+ from rapidata.api_client.models.compare_rapid_blueprint1 import CompareRapidBlueprint1
23
23
  from rapidata.api_client.models.free_text_rapid_blueprint import FreeTextRapidBlueprint
24
24
  from rapidata.api_client.models.line_rapid_blueprint import LineRapidBlueprint
25
25
  from rapidata.api_client.models.locate_rapid_blueprint import LocateRapidBlueprint
26
26
  from rapidata.api_client.models.named_entity_rapid_blueprint import NamedEntityRapidBlueprint
27
27
  from rapidata.api_client.models.polygon_rapid_blueprint import PolygonRapidBlueprint
28
+ from rapidata.api_client.models.scrub_rapid_blueprint import ScrubRapidBlueprint
28
29
  from rapidata.api_client.models.transcription_rapid_blueprint import TranscriptionRapidBlueprint
29
30
  from pydantic import StrictStr, Field
30
31
  from typing import Union, List, Set, Optional, Dict
31
32
  from typing_extensions import Literal, Self
32
33
 
33
- SIMPLEWORKFLOWCONFIGBLUEPRINT_ONE_OF_SCHEMAS = ["AttachCategoryRapidBlueprint", "BoundingBoxRapidBlueprint", "CompareRapidBlueprint", "FreeTextRapidBlueprint", "LineRapidBlueprint", "LocateRapidBlueprint", "NamedEntityRapidBlueprint", "PolygonRapidBlueprint", "TranscriptionRapidBlueprint"]
34
+ SIMPLEWORKFLOWCONFIGBLUEPRINT_ONE_OF_SCHEMAS = ["AttachCategoryRapidBlueprint", "BoundingBoxRapidBlueprint", "CompareRapidBlueprint1", "FreeTextRapidBlueprint", "LineRapidBlueprint", "LocateRapidBlueprint", "NamedEntityRapidBlueprint", "PolygonRapidBlueprint", "ScrubRapidBlueprint", "TranscriptionRapidBlueprint"]
34
35
 
35
36
  class SimpleWorkflowConfigBlueprint(BaseModel):
36
37
  """
@@ -38,24 +39,26 @@ class SimpleWorkflowConfigBlueprint(BaseModel):
38
39
  """
39
40
  # data type: TranscriptionRapidBlueprint
40
41
  oneof_schema_1_validator: Optional[TranscriptionRapidBlueprint] = None
42
+ # data type: ScrubRapidBlueprint
43
+ oneof_schema_2_validator: Optional[ScrubRapidBlueprint] = None
41
44
  # data type: PolygonRapidBlueprint
42
- oneof_schema_2_validator: Optional[PolygonRapidBlueprint] = None
45
+ oneof_schema_3_validator: Optional[PolygonRapidBlueprint] = None
43
46
  # data type: NamedEntityRapidBlueprint
44
- oneof_schema_3_validator: Optional[NamedEntityRapidBlueprint] = None
47
+ oneof_schema_4_validator: Optional[NamedEntityRapidBlueprint] = None
45
48
  # data type: LocateRapidBlueprint
46
- oneof_schema_4_validator: Optional[LocateRapidBlueprint] = None
49
+ oneof_schema_5_validator: Optional[LocateRapidBlueprint] = None
47
50
  # data type: LineRapidBlueprint
48
- oneof_schema_5_validator: Optional[LineRapidBlueprint] = None
51
+ oneof_schema_6_validator: Optional[LineRapidBlueprint] = None
49
52
  # data type: FreeTextRapidBlueprint
50
- oneof_schema_6_validator: Optional[FreeTextRapidBlueprint] = None
51
- # data type: CompareRapidBlueprint
52
- oneof_schema_7_validator: Optional[CompareRapidBlueprint] = None
53
+ oneof_schema_7_validator: Optional[FreeTextRapidBlueprint] = None
54
+ # data type: CompareRapidBlueprint1
55
+ oneof_schema_8_validator: Optional[CompareRapidBlueprint1] = None
53
56
  # data type: AttachCategoryRapidBlueprint
54
- oneof_schema_8_validator: Optional[AttachCategoryRapidBlueprint] = None
57
+ oneof_schema_9_validator: Optional[AttachCategoryRapidBlueprint] = None
55
58
  # data type: BoundingBoxRapidBlueprint
56
- oneof_schema_9_validator: Optional[BoundingBoxRapidBlueprint] = None
57
- actual_instance: Optional[Union[AttachCategoryRapidBlueprint, BoundingBoxRapidBlueprint, CompareRapidBlueprint, FreeTextRapidBlueprint, LineRapidBlueprint, LocateRapidBlueprint, NamedEntityRapidBlueprint, PolygonRapidBlueprint, TranscriptionRapidBlueprint]] = None
58
- one_of_schemas: Set[str] = { "AttachCategoryRapidBlueprint", "BoundingBoxRapidBlueprint", "CompareRapidBlueprint", "FreeTextRapidBlueprint", "LineRapidBlueprint", "LocateRapidBlueprint", "NamedEntityRapidBlueprint", "PolygonRapidBlueprint", "TranscriptionRapidBlueprint" }
59
+ oneof_schema_10_validator: Optional[BoundingBoxRapidBlueprint] = None
60
+ actual_instance: Optional[Union[AttachCategoryRapidBlueprint, BoundingBoxRapidBlueprint, CompareRapidBlueprint1, FreeTextRapidBlueprint, LineRapidBlueprint, LocateRapidBlueprint, NamedEntityRapidBlueprint, PolygonRapidBlueprint, ScrubRapidBlueprint, TranscriptionRapidBlueprint]] = None
61
+ one_of_schemas: Set[str] = { "AttachCategoryRapidBlueprint", "BoundingBoxRapidBlueprint", "CompareRapidBlueprint1", "FreeTextRapidBlueprint", "LineRapidBlueprint", "LocateRapidBlueprint", "NamedEntityRapidBlueprint", "PolygonRapidBlueprint", "ScrubRapidBlueprint", "TranscriptionRapidBlueprint" }
59
62
 
60
63
  model_config = ConfigDict(
61
64
  validate_assignment=True,
@@ -86,6 +89,11 @@ class SimpleWorkflowConfigBlueprint(BaseModel):
86
89
  error_messages.append(f"Error! Input type `{type(v)}` is not `TranscriptionRapidBlueprint`")
87
90
  else:
88
91
  match += 1
92
+ # validate data type: ScrubRapidBlueprint
93
+ if not isinstance(v, ScrubRapidBlueprint):
94
+ error_messages.append(f"Error! Input type `{type(v)}` is not `ScrubRapidBlueprint`")
95
+ else:
96
+ match += 1
89
97
  # validate data type: PolygonRapidBlueprint
90
98
  if not isinstance(v, PolygonRapidBlueprint):
91
99
  error_messages.append(f"Error! Input type `{type(v)}` is not `PolygonRapidBlueprint`")
@@ -111,9 +119,9 @@ class SimpleWorkflowConfigBlueprint(BaseModel):
111
119
  error_messages.append(f"Error! Input type `{type(v)}` is not `FreeTextRapidBlueprint`")
112
120
  else:
113
121
  match += 1
114
- # validate data type: CompareRapidBlueprint
115
- if not isinstance(v, CompareRapidBlueprint):
116
- error_messages.append(f"Error! Input type `{type(v)}` is not `CompareRapidBlueprint`")
122
+ # validate data type: CompareRapidBlueprint1
123
+ if not isinstance(v, CompareRapidBlueprint1):
124
+ error_messages.append(f"Error! Input type `{type(v)}` is not `CompareRapidBlueprint1`")
117
125
  else:
118
126
  match += 1
119
127
  # validate data type: AttachCategoryRapidBlueprint
@@ -128,10 +136,10 @@ class SimpleWorkflowConfigBlueprint(BaseModel):
128
136
  match += 1
129
137
  if match > 1:
130
138
  # more than 1 match
131
- raise ValueError("Multiple matches found when setting `actual_instance` in SimpleWorkflowConfigBlueprint with oneOf schemas: AttachCategoryRapidBlueprint, BoundingBoxRapidBlueprint, CompareRapidBlueprint, FreeTextRapidBlueprint, LineRapidBlueprint, LocateRapidBlueprint, NamedEntityRapidBlueprint, PolygonRapidBlueprint, TranscriptionRapidBlueprint. Details: " + ", ".join(error_messages))
139
+ raise ValueError("Multiple matches found when setting `actual_instance` in SimpleWorkflowConfigBlueprint with oneOf schemas: AttachCategoryRapidBlueprint, BoundingBoxRapidBlueprint, CompareRapidBlueprint1, FreeTextRapidBlueprint, LineRapidBlueprint, LocateRapidBlueprint, NamedEntityRapidBlueprint, PolygonRapidBlueprint, ScrubRapidBlueprint, TranscriptionRapidBlueprint. Details: " + ", ".join(error_messages))
132
140
  elif match == 0:
133
141
  # no match
134
- raise ValueError("No match found when setting `actual_instance` in SimpleWorkflowConfigBlueprint with oneOf schemas: AttachCategoryRapidBlueprint, BoundingBoxRapidBlueprint, CompareRapidBlueprint, FreeTextRapidBlueprint, LineRapidBlueprint, LocateRapidBlueprint, NamedEntityRapidBlueprint, PolygonRapidBlueprint, TranscriptionRapidBlueprint. Details: " + ", ".join(error_messages))
142
+ raise ValueError("No match found when setting `actual_instance` in SimpleWorkflowConfigBlueprint with oneOf schemas: AttachCategoryRapidBlueprint, BoundingBoxRapidBlueprint, CompareRapidBlueprint1, FreeTextRapidBlueprint, LineRapidBlueprint, LocateRapidBlueprint, NamedEntityRapidBlueprint, PolygonRapidBlueprint, ScrubRapidBlueprint, TranscriptionRapidBlueprint. Details: " + ", ".join(error_messages))
135
143
  else:
136
144
  return v
137
145
 
@@ -152,6 +160,12 @@ class SimpleWorkflowConfigBlueprint(BaseModel):
152
160
  match += 1
153
161
  except (ValidationError, ValueError) as e:
154
162
  error_messages.append(str(e))
163
+ # deserialize data into ScrubRapidBlueprint
164
+ try:
165
+ instance.actual_instance = ScrubRapidBlueprint.from_json(json_str)
166
+ match += 1
167
+ except (ValidationError, ValueError) as e:
168
+ error_messages.append(str(e))
155
169
  # deserialize data into PolygonRapidBlueprint
156
170
  try:
157
171
  instance.actual_instance = PolygonRapidBlueprint.from_json(json_str)
@@ -182,9 +196,9 @@ class SimpleWorkflowConfigBlueprint(BaseModel):
182
196
  match += 1
183
197
  except (ValidationError, ValueError) as e:
184
198
  error_messages.append(str(e))
185
- # deserialize data into CompareRapidBlueprint
199
+ # deserialize data into CompareRapidBlueprint1
186
200
  try:
187
- instance.actual_instance = CompareRapidBlueprint.from_json(json_str)
201
+ instance.actual_instance = CompareRapidBlueprint1.from_json(json_str)
188
202
  match += 1
189
203
  except (ValidationError, ValueError) as e:
190
204
  error_messages.append(str(e))
@@ -203,10 +217,10 @@ class SimpleWorkflowConfigBlueprint(BaseModel):
203
217
 
204
218
  if match > 1:
205
219
  # more than 1 match
206
- raise ValueError("Multiple matches found when deserializing the JSON string into SimpleWorkflowConfigBlueprint with oneOf schemas: AttachCategoryRapidBlueprint, BoundingBoxRapidBlueprint, CompareRapidBlueprint, FreeTextRapidBlueprint, LineRapidBlueprint, LocateRapidBlueprint, NamedEntityRapidBlueprint, PolygonRapidBlueprint, TranscriptionRapidBlueprint. Details: " + ", ".join(error_messages))
220
+ raise ValueError("Multiple matches found when deserializing the JSON string into SimpleWorkflowConfigBlueprint with oneOf schemas: AttachCategoryRapidBlueprint, BoundingBoxRapidBlueprint, CompareRapidBlueprint1, FreeTextRapidBlueprint, LineRapidBlueprint, LocateRapidBlueprint, NamedEntityRapidBlueprint, PolygonRapidBlueprint, ScrubRapidBlueprint, TranscriptionRapidBlueprint. Details: " + ", ".join(error_messages))
207
221
  elif match == 0:
208
222
  # no match
209
- raise ValueError("No match found when deserializing the JSON string into SimpleWorkflowConfigBlueprint with oneOf schemas: AttachCategoryRapidBlueprint, BoundingBoxRapidBlueprint, CompareRapidBlueprint, FreeTextRapidBlueprint, LineRapidBlueprint, LocateRapidBlueprint, NamedEntityRapidBlueprint, PolygonRapidBlueprint, TranscriptionRapidBlueprint. Details: " + ", ".join(error_messages))
223
+ raise ValueError("No match found when deserializing the JSON string into SimpleWorkflowConfigBlueprint with oneOf schemas: AttachCategoryRapidBlueprint, BoundingBoxRapidBlueprint, CompareRapidBlueprint1, FreeTextRapidBlueprint, LineRapidBlueprint, LocateRapidBlueprint, NamedEntityRapidBlueprint, PolygonRapidBlueprint, ScrubRapidBlueprint, TranscriptionRapidBlueprint. Details: " + ", ".join(error_messages))
210
224
  else:
211
225
  return instance
212
226
 
@@ -220,7 +234,7 @@ class SimpleWorkflowConfigBlueprint(BaseModel):
220
234
  else:
221
235
  return json.dumps(self.actual_instance)
222
236
 
223
- def to_dict(self) -> Optional[Union[Dict[str, Any], AttachCategoryRapidBlueprint, BoundingBoxRapidBlueprint, CompareRapidBlueprint, FreeTextRapidBlueprint, LineRapidBlueprint, LocateRapidBlueprint, NamedEntityRapidBlueprint, PolygonRapidBlueprint, TranscriptionRapidBlueprint]]:
237
+ def to_dict(self) -> Optional[Union[Dict[str, Any], AttachCategoryRapidBlueprint, BoundingBoxRapidBlueprint, CompareRapidBlueprint1, FreeTextRapidBlueprint, LineRapidBlueprint, LocateRapidBlueprint, NamedEntityRapidBlueprint, PolygonRapidBlueprint, ScrubRapidBlueprint, TranscriptionRapidBlueprint]]:
224
238
  """Returns the dict representation of the actual instance"""
225
239
  if self.actual_instance is None:
226
240
  return None
@@ -0,0 +1,102 @@
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, field_validator
21
+ from typing import Any, ClassVar, Dict, List, Optional, Union
22
+ from typing import Optional, Set
23
+ from typing_extensions import Self
24
+
25
+ class UserScoreFilter(BaseModel):
26
+ """
27
+ UserScoreFilter
28
+ """ # noqa: E501
29
+ t: StrictStr = Field(description="Discriminator value for UserScoreFilter", alias="_t")
30
+ lowerbound: Union[StrictFloat, StrictInt]
31
+ upperbound: Union[StrictFloat, StrictInt]
32
+ dimension: StrictStr
33
+ execution_order: Optional[StrictInt] = Field(default=None, alias="executionOrder")
34
+ __properties: ClassVar[List[str]] = ["_t", "lowerbound", "upperbound", "dimension", "executionOrder"]
35
+
36
+ @field_validator('t')
37
+ def t_validate_enum(cls, value):
38
+ """Validates the enum"""
39
+ if value not in set(['UserScoreFilter']):
40
+ raise ValueError("must be one of enum values ('UserScoreFilter')")
41
+ return value
42
+
43
+ model_config = ConfigDict(
44
+ populate_by_name=True,
45
+ validate_assignment=True,
46
+ protected_namespaces=(),
47
+ )
48
+
49
+
50
+ def to_str(self) -> str:
51
+ """Returns the string representation of the model using alias"""
52
+ return pprint.pformat(self.model_dump(by_alias=True))
53
+
54
+ def to_json(self) -> str:
55
+ """Returns the JSON representation of the model using alias"""
56
+ # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
57
+ return json.dumps(self.to_dict())
58
+
59
+ @classmethod
60
+ def from_json(cls, json_str: str) -> Optional[Self]:
61
+ """Create an instance of UserScoreFilter from a JSON string"""
62
+ return cls.from_dict(json.loads(json_str))
63
+
64
+ def to_dict(self) -> Dict[str, Any]:
65
+ """Return the dictionary representation of the model using alias.
66
+
67
+ This has the following differences from calling pydantic's
68
+ `self.model_dump(by_alias=True)`:
69
+
70
+ * `None` is only added to the output dict for nullable fields that
71
+ were set at model initialization. Other fields with value `None`
72
+ are ignored.
73
+ """
74
+ excluded_fields: Set[str] = set([
75
+ ])
76
+
77
+ _dict = self.model_dump(
78
+ by_alias=True,
79
+ exclude=excluded_fields,
80
+ exclude_none=True,
81
+ )
82
+ return _dict
83
+
84
+ @classmethod
85
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
86
+ """Create an instance of UserScoreFilter from a dict"""
87
+ if obj is None:
88
+ return None
89
+
90
+ if not isinstance(obj, dict):
91
+ return cls.model_validate(obj)
92
+
93
+ _obj = cls.model_validate({
94
+ "_t": obj.get("_t") if obj.get("_t") is not None else 'UserScoreFilter',
95
+ "lowerbound": obj.get("lowerbound"),
96
+ "upperbound": obj.get("upperbound"),
97
+ "dimension": obj.get("dimension"),
98
+ "executionOrder": obj.get("executionOrder")
99
+ })
100
+ return _obj
101
+
102
+
@@ -0,0 +1,38 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ Rapidata.Dataset
5
+
6
+ No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
7
+
8
+ The version of the OpenAPI document: v1
9
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
10
+
11
+ Do not edit the class manually.
12
+ """ # noqa: E501
13
+
14
+
15
+ from __future__ import annotations
16
+ import json
17
+ from enum import Enum
18
+ from typing_extensions import Self
19
+
20
+
21
+ class UserState(str, Enum):
22
+ """
23
+ UserState
24
+ """
25
+
26
+ """
27
+ allowed enum values
28
+ """
29
+ TRAINING = 'Training'
30
+ BLACKLIST = 'Blacklist'
31
+ ACTIVE = 'Active'
32
+
33
+ @classmethod
34
+ def from_json(cls, json_str: str) -> Self:
35
+ """Create an instance of UserState from a JSON string"""
36
+ return cls(json.loads(json_str))
37
+
38
+