rapidata 1.2.0__py3-none-any.whl → 1.2.2__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 (67) hide show
  1. rapidata/__init__.py +4 -0
  2. rapidata/api_client/__init__.py +25 -5
  3. rapidata/api_client/api/dataset_api.py +388 -388
  4. rapidata/api_client/api/workflow_api.py +18 -1064
  5. rapidata/api_client/models/__init__.py +25 -5
  6. rapidata/api_client/models/add_validation_text_rapid_model.py +3 -3
  7. rapidata/api_client/models/classification_metadata_model.py +98 -0
  8. rapidata/api_client/models/compare_workflow_config.py +3 -3
  9. rapidata/api_client/models/compare_workflow_config_model.py +3 -3
  10. rapidata/api_client/models/compare_workflow_model1.py +4 -18
  11. rapidata/api_client/models/compare_workflow_model1_referee.py +154 -0
  12. rapidata/api_client/models/completed_rapid_model.py +3 -3
  13. rapidata/api_client/models/completed_rapid_model_asset.py +170 -0
  14. rapidata/api_client/models/count_metadata_model.py +98 -0
  15. rapidata/api_client/models/demographic_metadata_model.py +100 -0
  16. rapidata/api_client/models/file_asset_model.py +3 -3
  17. rapidata/api_client/models/file_asset_model1.py +108 -0
  18. rapidata/api_client/models/file_asset_model1_metadata_inner.py +252 -0
  19. rapidata/api_client/models/file_asset_model2.py +108 -0
  20. rapidata/api_client/models/file_asset_model_metadata_inner.py +252 -0
  21. rapidata/api_client/models/image_dimension_metadata_model.py +100 -0
  22. rapidata/api_client/models/in_progress_rapid_model.py +3 -3
  23. rapidata/api_client/models/location_metadata_model.py +100 -0
  24. rapidata/api_client/models/multi_asset_model.py +3 -3
  25. rapidata/api_client/models/multi_asset_model1.py +118 -0
  26. rapidata/api_client/models/multi_asset_model1_assets_inner.py +170 -0
  27. rapidata/api_client/models/multi_asset_model2.py +118 -0
  28. rapidata/api_client/models/not_started_rapid_model.py +3 -3
  29. rapidata/api_client/models/null_asset_model.py +3 -3
  30. rapidata/api_client/models/null_asset_model1.py +106 -0
  31. rapidata/api_client/models/null_asset_model2.py +106 -0
  32. rapidata/api_client/models/original_filename_metadata_model.py +98 -0
  33. rapidata/api_client/models/prompt_metadata_model.py +98 -0
  34. rapidata/api_client/models/query_validation_rapids_result_asset.py +40 -40
  35. rapidata/api_client/models/ranked_datapoint_model.py +3 -3
  36. rapidata/api_client/models/simple_workflow_config.py +6 -6
  37. rapidata/api_client/models/simple_workflow_config_model.py +3 -3
  38. rapidata/api_client/models/simple_workflow_model1.py +7 -21
  39. rapidata/api_client/models/simple_workflow_model1_blueprint.py +238 -0
  40. rapidata/api_client/models/text_asset_model.py +3 -3
  41. rapidata/api_client/models/text_asset_model1.py +108 -0
  42. rapidata/api_client/models/text_asset_model2.py +108 -0
  43. rapidata/api_client/models/text_metadata_model.py +98 -0
  44. rapidata/api_client/models/transcription_metadata_model.py +98 -0
  45. rapidata/api_client/models/translated_prompt_metadata_model.py +102 -0
  46. rapidata/api_client/models/translated_string.py +93 -0
  47. rapidata/api_client_README.md +26 -10
  48. rapidata/rapidata_client/__init__.py +10 -0
  49. rapidata/rapidata_client/assets/media_asset.py +1 -1
  50. rapidata/rapidata_client/assets/multi_asset.py +12 -3
  51. rapidata/rapidata_client/dataset/rapidata_dataset.py +43 -9
  52. rapidata/rapidata_client/dataset/rapidata_validation_set.py +26 -6
  53. rapidata/rapidata_client/dataset/validation_set_builder.py +1 -1
  54. rapidata/rapidata_client/filter/__init__.py +7 -0
  55. rapidata/rapidata_client/filter/age_filter.py +16 -0
  56. rapidata/rapidata_client/filter/base_filter.py +9 -0
  57. rapidata/rapidata_client/filter/campaign_filter.py +17 -0
  58. rapidata/rapidata_client/filter/country_filter.py +16 -0
  59. rapidata/rapidata_client/filter/gender_filter.py +16 -0
  60. rapidata/rapidata_client/filter/language_filter.py +18 -0
  61. rapidata/rapidata_client/filter/user_score_filter.py +19 -0
  62. rapidata/rapidata_client/order/rapidata_order_builder.py +141 -44
  63. rapidata/rapidata_client/selection/demographic_selection.py +3 -2
  64. {rapidata-1.2.0.dist-info → rapidata-1.2.2.dist-info}/METADATA +1 -1
  65. {rapidata-1.2.0.dist-info → rapidata-1.2.2.dist-info}/RECORD +67 -34
  66. {rapidata-1.2.0.dist-info → rapidata-1.2.2.dist-info}/LICENSE +0 -0
  67. {rapidata-1.2.0.dist-info → rapidata-1.2.2.dist-info}/WHEEL +0 -0
@@ -19,7 +19,7 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
21
21
  from typing import Any, ClassVar, Dict, List
22
- from rapidata.api_client.models.file_asset_metadata_inner import FileAssetMetadataInner
22
+ from rapidata.api_client.models.file_asset_model_metadata_inner import FileAssetModelMetadataInner
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
@@ -28,7 +28,7 @@ class NullAssetModel(BaseModel):
28
28
  NullAssetModel
29
29
  """ # noqa: E501
30
30
  t: StrictStr = Field(description="Discriminator value for NullAssetModel", alias="_t")
31
- metadata: List[FileAssetMetadataInner]
31
+ metadata: List[FileAssetModelMetadataInner]
32
32
  identifier: StrictStr
33
33
  __properties: ClassVar[List[str]] = ["_t", "metadata", "identifier"]
34
34
 
@@ -98,7 +98,7 @@ class NullAssetModel(BaseModel):
98
98
 
99
99
  _obj = cls.model_validate({
100
100
  "_t": obj.get("_t") if obj.get("_t") is not None else 'NullAssetModel',
101
- "metadata": [FileAssetMetadataInner.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None,
101
+ "metadata": [FileAssetModelMetadataInner.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None,
102
102
  "identifier": obj.get("identifier")
103
103
  })
104
104
  return _obj
@@ -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.file_asset_model1_metadata_inner import FileAssetModel1MetadataInner
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class NullAssetModel1(BaseModel):
27
+ """
28
+ NullAssetModel1
29
+ """ # noqa: E501
30
+ t: StrictStr = Field(description="Discriminator value for NullAssetModel", alias="_t")
31
+ metadata: List[FileAssetModel1MetadataInner]
32
+ identifier: StrictStr
33
+ __properties: ClassVar[List[str]] = ["_t", "metadata", "identifier"]
34
+
35
+ @field_validator('t')
36
+ def t_validate_enum(cls, value):
37
+ """Validates the enum"""
38
+ if value not in set(['NullAssetModel']):
39
+ raise ValueError("must be one of enum values ('NullAssetModel')")
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 NullAssetModel1 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 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
+ return _dict
89
+
90
+ @classmethod
91
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
92
+ """Create an instance of NullAssetModel1 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 'NullAssetModel',
101
+ "metadata": [FileAssetModel1MetadataInner.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None,
102
+ "identifier": obj.get("identifier")
103
+ })
104
+ return _obj
105
+
106
+
@@ -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.file_asset_model1_metadata_inner import FileAssetModel1MetadataInner
23
+ from typing import Optional, Set
24
+ from typing_extensions import Self
25
+
26
+ class NullAssetModel2(BaseModel):
27
+ """
28
+ NullAssetModel2
29
+ """ # noqa: E501
30
+ t: StrictStr = Field(description="Discriminator value for NullAssetModel", alias="_t")
31
+ metadata: List[FileAssetModel1MetadataInner]
32
+ identifier: StrictStr
33
+ __properties: ClassVar[List[str]] = ["_t", "metadata", "identifier"]
34
+
35
+ @field_validator('t')
36
+ def t_validate_enum(cls, value):
37
+ """Validates the enum"""
38
+ if value not in set(['NullAssetModel']):
39
+ raise ValueError("must be one of enum values ('NullAssetModel')")
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 NullAssetModel2 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 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
+ return _dict
89
+
90
+ @classmethod
91
+ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
92
+ """Create an instance of NullAssetModel2 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 'NullAssetModel',
101
+ "metadata": [FileAssetModel1MetadataInner.from_dict(_item) for _item in obj["metadata"]] if obj.get("metadata") is not None else None,
102
+ "identifier": obj.get("identifier")
103
+ })
104
+ return _obj
105
+
106
+
@@ -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 OriginalFilenameMetadataModel(BaseModel):
26
+ """
27
+ OriginalFilenameMetadataModel
28
+ """ # noqa: E501
29
+ t: StrictStr = Field(description="Discriminator value for OriginalFilenameMetadata", alias="_t")
30
+ original_filename: StrictStr = Field(alias="originalFilename")
31
+ identifier: StrictStr
32
+ __properties: ClassVar[List[str]] = ["_t", "originalFilename", "identifier"]
33
+
34
+ @field_validator('t')
35
+ def t_validate_enum(cls, value):
36
+ """Validates the enum"""
37
+ if value not in set(['OriginalFilenameMetadata']):
38
+ raise ValueError("must be one of enum values ('OriginalFilenameMetadata')")
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 OriginalFilenameMetadataModel 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 OriginalFilenameMetadataModel 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 'OriginalFilenameMetadata',
93
+ "originalFilename": obj.get("originalFilename"),
94
+ "identifier": obj.get("identifier")
95
+ })
96
+ return _obj
97
+
98
+
@@ -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 PromptMetadataModel(BaseModel):
26
+ """
27
+ PromptMetadataModel
28
+ """ # noqa: E501
29
+ t: StrictStr = Field(description="Discriminator value for PromptMetadata", alias="_t")
30
+ prompt: StrictStr
31
+ identifier: StrictStr
32
+ __properties: ClassVar[List[str]] = ["_t", "prompt", "identifier"]
33
+
34
+ @field_validator('t')
35
+ def t_validate_enum(cls, value):
36
+ """Validates the enum"""
37
+ if value not in set(['PromptMetadata']):
38
+ raise ValueError("must be one of enum values ('PromptMetadata')")
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 PromptMetadataModel 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 PromptMetadataModel 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 'PromptMetadata',
93
+ "prompt": obj.get("prompt"),
94
+ "identifier": obj.get("identifier")
95
+ })
96
+ return _obj
97
+
98
+
@@ -17,30 +17,30 @@ import json
17
17
  import pprint
18
18
  from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
19
19
  from typing import Any, List, Optional
20
- from rapidata.api_client.models.file_asset_model import FileAssetModel
21
- from rapidata.api_client.models.multi_asset_model import MultiAssetModel
22
- from rapidata.api_client.models.null_asset_model import NullAssetModel
23
- from rapidata.api_client.models.text_asset_model import TextAssetModel
20
+ from rapidata.api_client.models.file_asset_model1 import FileAssetModel1
21
+ from rapidata.api_client.models.multi_asset_model1 import MultiAssetModel1
22
+ from rapidata.api_client.models.null_asset_model1 import NullAssetModel1
23
+ from rapidata.api_client.models.text_asset_model1 import TextAssetModel1
24
24
  from pydantic import StrictStr, Field
25
25
  from typing import Union, List, Set, Optional, Dict
26
26
  from typing_extensions import Literal, Self
27
27
 
28
- QUERYVALIDATIONRAPIDSRESULTASSET_ONE_OF_SCHEMAS = ["FileAssetModel", "MultiAssetModel", "NullAssetModel", "TextAssetModel"]
28
+ QUERYVALIDATIONRAPIDSRESULTASSET_ONE_OF_SCHEMAS = ["FileAssetModel1", "MultiAssetModel1", "NullAssetModel1", "TextAssetModel1"]
29
29
 
30
30
  class QueryValidationRapidsResultAsset(BaseModel):
31
31
  """
32
32
  QueryValidationRapidsResultAsset
33
33
  """
34
- # data type: FileAssetModel
35
- oneof_schema_1_validator: Optional[FileAssetModel] = None
36
- # data type: MultiAssetModel
37
- oneof_schema_2_validator: Optional[MultiAssetModel] = None
38
- # data type: NullAssetModel
39
- oneof_schema_3_validator: Optional[NullAssetModel] = None
40
- # data type: TextAssetModel
41
- oneof_schema_4_validator: Optional[TextAssetModel] = None
42
- actual_instance: Optional[Union[FileAssetModel, MultiAssetModel, NullAssetModel, TextAssetModel]] = None
43
- one_of_schemas: Set[str] = { "FileAssetModel", "MultiAssetModel", "NullAssetModel", "TextAssetModel" }
34
+ # data type: FileAssetModel1
35
+ oneof_schema_1_validator: Optional[FileAssetModel1] = None
36
+ # data type: MultiAssetModel1
37
+ oneof_schema_2_validator: Optional[MultiAssetModel1] = None
38
+ # data type: NullAssetModel1
39
+ oneof_schema_3_validator: Optional[NullAssetModel1] = None
40
+ # data type: TextAssetModel1
41
+ oneof_schema_4_validator: Optional[TextAssetModel1] = None
42
+ actual_instance: Optional[Union[FileAssetModel1, MultiAssetModel1, NullAssetModel1, TextAssetModel1]] = None
43
+ one_of_schemas: Set[str] = { "FileAssetModel1", "MultiAssetModel1", "NullAssetModel1", "TextAssetModel1" }
44
44
 
45
45
  model_config = ConfigDict(
46
46
  validate_assignment=True,
@@ -69,32 +69,32 @@ class QueryValidationRapidsResultAsset(BaseModel):
69
69
  instance = QueryValidationRapidsResultAsset.model_construct()
70
70
  error_messages = []
71
71
  match = 0
72
- # validate data type: FileAssetModel
73
- if not isinstance(v, FileAssetModel):
74
- error_messages.append(f"Error! Input type `{type(v)}` is not `FileAssetModel`")
72
+ # validate data type: FileAssetModel1
73
+ if not isinstance(v, FileAssetModel1):
74
+ error_messages.append(f"Error! Input type `{type(v)}` is not `FileAssetModel1`")
75
75
  else:
76
76
  match += 1
77
- # validate data type: MultiAssetModel
78
- if not isinstance(v, MultiAssetModel):
79
- error_messages.append(f"Error! Input type `{type(v)}` is not `MultiAssetModel`")
77
+ # validate data type: MultiAssetModel1
78
+ if not isinstance(v, MultiAssetModel1):
79
+ error_messages.append(f"Error! Input type `{type(v)}` is not `MultiAssetModel1`")
80
80
  else:
81
81
  match += 1
82
- # validate data type: NullAssetModel
83
- if not isinstance(v, NullAssetModel):
84
- error_messages.append(f"Error! Input type `{type(v)}` is not `NullAssetModel`")
82
+ # validate data type: NullAssetModel1
83
+ if not isinstance(v, NullAssetModel1):
84
+ error_messages.append(f"Error! Input type `{type(v)}` is not `NullAssetModel1`")
85
85
  else:
86
86
  match += 1
87
- # validate data type: TextAssetModel
88
- if not isinstance(v, TextAssetModel):
89
- error_messages.append(f"Error! Input type `{type(v)}` is not `TextAssetModel`")
87
+ # validate data type: TextAssetModel1
88
+ if not isinstance(v, TextAssetModel1):
89
+ error_messages.append(f"Error! Input type `{type(v)}` is not `TextAssetModel1`")
90
90
  else:
91
91
  match += 1
92
92
  if match > 1:
93
93
  # more than 1 match
94
- raise ValueError("Multiple matches found when setting `actual_instance` in QueryValidationRapidsResultAsset with oneOf schemas: FileAssetModel, MultiAssetModel, NullAssetModel, TextAssetModel. Details: " + ", ".join(error_messages))
94
+ raise ValueError("Multiple matches found when setting `actual_instance` in QueryValidationRapidsResultAsset with oneOf schemas: FileAssetModel1, MultiAssetModel1, NullAssetModel1, TextAssetModel1. Details: " + ", ".join(error_messages))
95
95
  elif match == 0:
96
96
  # no match
97
- raise ValueError("No match found when setting `actual_instance` in QueryValidationRapidsResultAsset with oneOf schemas: FileAssetModel, MultiAssetModel, NullAssetModel, TextAssetModel. Details: " + ", ".join(error_messages))
97
+ raise ValueError("No match found when setting `actual_instance` in QueryValidationRapidsResultAsset with oneOf schemas: FileAssetModel1, MultiAssetModel1, NullAssetModel1, TextAssetModel1. Details: " + ", ".join(error_messages))
98
98
  else:
99
99
  return v
100
100
 
@@ -112,37 +112,37 @@ class QueryValidationRapidsResultAsset(BaseModel):
112
112
  error_messages = []
113
113
  match = 0
114
114
 
115
- # deserialize data into FileAssetModel
115
+ # deserialize data into FileAssetModel1
116
116
  try:
117
- instance.actual_instance = FileAssetModel.from_json(json_str)
117
+ instance.actual_instance = FileAssetModel1.from_json(json_str)
118
118
  match += 1
119
119
  except (ValidationError, ValueError) as e:
120
120
  error_messages.append(str(e))
121
- # deserialize data into MultiAssetModel
121
+ # deserialize data into MultiAssetModel1
122
122
  try:
123
- instance.actual_instance = MultiAssetModel.from_json(json_str)
123
+ instance.actual_instance = MultiAssetModel1.from_json(json_str)
124
124
  match += 1
125
125
  except (ValidationError, ValueError) as e:
126
126
  error_messages.append(str(e))
127
- # deserialize data into NullAssetModel
127
+ # deserialize data into NullAssetModel1
128
128
  try:
129
- instance.actual_instance = NullAssetModel.from_json(json_str)
129
+ instance.actual_instance = NullAssetModel1.from_json(json_str)
130
130
  match += 1
131
131
  except (ValidationError, ValueError) as e:
132
132
  error_messages.append(str(e))
133
- # deserialize data into TextAssetModel
133
+ # deserialize data into TextAssetModel1
134
134
  try:
135
- instance.actual_instance = TextAssetModel.from_json(json_str)
135
+ instance.actual_instance = TextAssetModel1.from_json(json_str)
136
136
  match += 1
137
137
  except (ValidationError, ValueError) as e:
138
138
  error_messages.append(str(e))
139
139
 
140
140
  if match > 1:
141
141
  # more than 1 match
142
- raise ValueError("Multiple matches found when deserializing the JSON string into QueryValidationRapidsResultAsset with oneOf schemas: FileAssetModel, MultiAssetModel, NullAssetModel, TextAssetModel. Details: " + ", ".join(error_messages))
142
+ raise ValueError("Multiple matches found when deserializing the JSON string into QueryValidationRapidsResultAsset with oneOf schemas: FileAssetModel1, MultiAssetModel1, NullAssetModel1, TextAssetModel1. Details: " + ", ".join(error_messages))
143
143
  elif match == 0:
144
144
  # no match
145
- raise ValueError("No match found when deserializing the JSON string into QueryValidationRapidsResultAsset with oneOf schemas: FileAssetModel, MultiAssetModel, NullAssetModel, TextAssetModel. Details: " + ", ".join(error_messages))
145
+ raise ValueError("No match found when deserializing the JSON string into QueryValidationRapidsResultAsset with oneOf schemas: FileAssetModel1, MultiAssetModel1, NullAssetModel1, TextAssetModel1. Details: " + ", ".join(error_messages))
146
146
  else:
147
147
  return instance
148
148
 
@@ -156,7 +156,7 @@ class QueryValidationRapidsResultAsset(BaseModel):
156
156
  else:
157
157
  return json.dumps(self.actual_instance)
158
158
 
159
- def to_dict(self) -> Optional[Union[Dict[str, Any], FileAssetModel, MultiAssetModel, NullAssetModel, TextAssetModel]]:
159
+ def to_dict(self) -> Optional[Union[Dict[str, Any], FileAssetModel1, MultiAssetModel1, NullAssetModel1, TextAssetModel1]]:
160
160
  """Returns the dict representation of the actual instance"""
161
161
  if self.actual_instance is None:
162
162
  return None
@@ -19,7 +19,7 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
21
21
  from typing import Any, ClassVar, Dict, List
22
- from rapidata.api_client.models.datapoint_model_asset import DatapointModelAsset
22
+ from rapidata.api_client.models.completed_rapid_model_asset import CompletedRapidModelAsset
23
23
  from typing import Optional, Set
24
24
  from typing_extensions import Self
25
25
 
@@ -28,7 +28,7 @@ class RankedDatapointModel(BaseModel):
28
28
  RankedDatapointModel
29
29
  """ # noqa: E501
30
30
  workflow_datapoint_id: StrictStr = Field(alias="workflowDatapointId")
31
- asset: DatapointModelAsset
31
+ asset: CompletedRapidModelAsset
32
32
  elo: StrictInt
33
33
  __properties: ClassVar[List[str]] = ["workflowDatapointId", "asset", "elo"]
34
34
 
@@ -87,7 +87,7 @@ class RankedDatapointModel(BaseModel):
87
87
 
88
88
  _obj = cls.model_validate({
89
89
  "workflowDatapointId": obj.get("workflowDatapointId"),
90
- "asset": DatapointModelAsset.from_dict(obj["asset"]) if obj.get("asset") is not None else None,
90
+ "asset": CompletedRapidModelAsset.from_dict(obj["asset"]) if obj.get("asset") is not None else None,
91
91
  "elo": obj.get("elo")
92
92
  })
93
93
  return _obj
@@ -19,9 +19,9 @@ import json
19
19
 
20
20
  from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr, field_validator
21
21
  from typing import Any, ClassVar, Dict, List, Optional
22
- from rapidata.api_client.models.compare_workflow_config_referee import CompareWorkflowConfigReferee
22
+ from rapidata.api_client.models.compare_workflow_model1_referee import CompareWorkflowModel1Referee
23
23
  from rapidata.api_client.models.feature_flag import FeatureFlag
24
- from rapidata.api_client.models.simple_workflow_config_blueprint import SimpleWorkflowConfigBlueprint
24
+ from rapidata.api_client.models.simple_workflow_model1_blueprint import SimpleWorkflowModel1Blueprint
25
25
  from typing import Optional, Set
26
26
  from typing_extensions import Self
27
27
 
@@ -30,8 +30,8 @@ class SimpleWorkflowConfig(BaseModel):
30
30
  SimpleWorkflowConfig
31
31
  """ # noqa: E501
32
32
  t: StrictStr = Field(description="Discriminator value for SimpleWorkflowConfig", alias="_t")
33
- referee: CompareWorkflowConfigReferee
34
- blueprint: SimpleWorkflowConfigBlueprint
33
+ referee: CompareWorkflowModel1Referee
34
+ blueprint: SimpleWorkflowModel1Blueprint
35
35
  target_country_codes: List[StrictStr] = Field(alias="targetCountryCodes")
36
36
  feature_flags: Optional[List[FeatureFlag]] = Field(default=None, alias="featureFlags")
37
37
  priority: Optional[StrictStr] = None
@@ -115,8 +115,8 @@ class SimpleWorkflowConfig(BaseModel):
115
115
 
116
116
  _obj = cls.model_validate({
117
117
  "_t": obj.get("_t") if obj.get("_t") is not None else 'SimpleWorkflowConfig',
118
- "referee": CompareWorkflowConfigReferee.from_dict(obj["referee"]) if obj.get("referee") is not None else None,
119
- "blueprint": SimpleWorkflowConfigBlueprint.from_dict(obj["blueprint"]) if obj.get("blueprint") is not None else None,
118
+ "referee": CompareWorkflowModel1Referee.from_dict(obj["referee"]) if obj.get("referee") is not None else None,
119
+ "blueprint": SimpleWorkflowModel1Blueprint.from_dict(obj["blueprint"]) if obj.get("blueprint") is not None else None,
120
120
  "targetCountryCodes": obj.get("targetCountryCodes"),
121
121
  "featureFlags": [FeatureFlag.from_dict(_item) for _item in obj["featureFlags"]] if obj.get("featureFlags") is not None else None,
122
122
  "priority": obj.get("priority"),