rapidata 2.12.0__py3-none-any.whl → 2.13.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.
- rapidata/__init__.py +0 -33
- rapidata/api_client/__init__.py +17 -39
- rapidata/api_client/api/__init__.py +0 -1
- rapidata/api_client/api/campaign_api.py +13 -13
- rapidata/api_client/api/datapoint_api.py +6 -6
- rapidata/api_client/api/dataset_api.py +574 -16
- rapidata/api_client/api/rapid_api.py +262 -0
- rapidata/api_client/api/validation_api.py +7 -7
- rapidata/api_client/models/__init__.py +17 -38
- rapidata/api_client/models/add_campaign_model.py +3 -3
- rapidata/api_client/models/add_campaign_model_user_filters_inner.py +224 -0
- rapidata/api_client/models/campaign_query_result.py +105 -0
- rapidata/api_client/models/campaign_query_result_paged_result.py +105 -0
- rapidata/api_client/models/classification_metadata_model.py +2 -4
- rapidata/api_client/models/compare_workflow_config.py +8 -10
- rapidata/api_client/models/compare_workflow_config_model.py +9 -11
- rapidata/api_client/models/compare_workflow_config_model_pair_maker_config.py +8 -22
- rapidata/api_client/models/compare_workflow_config_pair_maker_config.py +8 -22
- rapidata/api_client/models/compare_workflow_model.py +8 -10
- rapidata/api_client/models/compare_workflow_model1.py +8 -10
- rapidata/api_client/models/compare_workflow_model1_pair_maker_information.py +8 -22
- rapidata/api_client/models/compare_workflow_model_pair_maker_config.py +10 -24
- rapidata/api_client/models/count_metadata_model.py +2 -4
- rapidata/api_client/models/create_datapoint_from_urls_model.py +87 -0
- rapidata/api_client/models/create_datapoint_result.py +97 -0
- rapidata/api_client/models/create_order_model_user_filters_inner.py +23 -9
- rapidata/api_client/models/datapoint_state.py +38 -0
- rapidata/api_client/models/demographic.py +89 -0
- rapidata/api_client/models/demographic_metadata_model.py +18 -9
- rapidata/api_client/models/elo_config.py +91 -0
- rapidata/api_client/models/elo_config_model.py +91 -0
- rapidata/api_client/models/file_asset_model.py +18 -13
- rapidata/api_client/models/file_asset_model_metadata_value.py +266 -0
- rapidata/api_client/models/get_compare_workflow_results_model.py +1 -9
- rapidata/api_client/models/get_compare_workflow_results_result.py +6 -15
- rapidata/api_client/models/get_datapoint_by_id_result.py +114 -0
- rapidata/api_client/models/get_dataset_progress_result.py +93 -0
- rapidata/api_client/models/get_simple_workflow_results_result.py +3 -3
- rapidata/api_client/models/image_dimension_metadata_model.py +2 -4
- rapidata/api_client/models/inspect_report_result.py +92 -0
- rapidata/api_client/models/location_metadata_model.py +2 -4
- rapidata/api_client/models/multi_asset_model.py +18 -13
- rapidata/api_client/models/new_user_filter_model.py +94 -0
- rapidata/api_client/models/new_user_filter_model1.py +94 -0
- rapidata/api_client/models/null_asset_model.py +18 -13
- rapidata/api_client/models/online_pair_maker_config_model.py +1 -1
- rapidata/api_client/models/original_filename_metadata_model.py +2 -4
- rapidata/api_client/models/prompt_metadata_input.py +2 -4
- rapidata/api_client/models/prompt_metadata_model.py +2 -4
- rapidata/api_client/models/query_validation_rapids_result.py +14 -9
- rapidata/api_client/models/query_validation_rapids_result_asset.py +40 -40
- rapidata/api_client/models/report_model.py +11 -4
- rapidata/api_client/models/source_url_metadata_model.py +96 -0
- rapidata/api_client/models/text_asset_model.py +18 -13
- rapidata/api_client/models/text_metadata_model.py +2 -4
- rapidata/api_client/models/transcription_metadata_input.py +2 -4
- rapidata/api_client/models/transcription_metadata_model.py +1 -3
- rapidata/api_client/models/translated_prompt_metadata_model.py +2 -4
- rapidata/api_client/models/upload_from_s3_result.py +87 -0
- rapidata/api_client_README.md +20 -39
- rapidata/rapidata_client/metadata/_base_metadata.py +0 -3
- rapidata/rapidata_client/metadata/_private_text_metadata.py +2 -1
- rapidata/rapidata_client/metadata/_prompt_metadata.py +3 -3
- rapidata/rapidata_client/metadata/_public_text_metadata.py +2 -1
- rapidata/rapidata_client/metadata/_select_words_metadata.py +2 -4
- rapidata/rapidata_client/validation/validation_set_manager.py +3 -2
- {rapidata-2.12.0.dist-info → rapidata-2.13.0.dist-info}/METADATA +1 -1
- {rapidata-2.12.0.dist-info → rapidata-2.13.0.dist-info}/RECORD +70 -53
- {rapidata-2.12.0.dist-info → rapidata-2.13.0.dist-info}/LICENSE +0 -0
- {rapidata-2.12.0.dist-info → rapidata-2.13.0.dist-info}/WHEEL +0 -0
|
@@ -18,12 +18,11 @@ import pprint
|
|
|
18
18
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
19
19
|
from typing import Any, List, Optional
|
|
20
20
|
from rapidata.api_client.models.online_pair_maker_config import OnlinePairMakerConfig
|
|
21
|
-
from rapidata.api_client.models.pre_arranged_pair_maker_config import PreArrangedPairMakerConfig
|
|
22
21
|
from pydantic import StrictStr, Field
|
|
23
22
|
from typing import Union, List, Set, Optional, Dict
|
|
24
23
|
from typing_extensions import Literal, Self
|
|
25
24
|
|
|
26
|
-
COMPAREWORKFLOWCONFIGPAIRMAKERCONFIG_ONE_OF_SCHEMAS = ["OnlinePairMakerConfig"
|
|
25
|
+
COMPAREWORKFLOWCONFIGPAIRMAKERCONFIG_ONE_OF_SCHEMAS = ["OnlinePairMakerConfig"]
|
|
27
26
|
|
|
28
27
|
class CompareWorkflowConfigPairMakerConfig(BaseModel):
|
|
29
28
|
"""
|
|
@@ -31,10 +30,8 @@ class CompareWorkflowConfigPairMakerConfig(BaseModel):
|
|
|
31
30
|
"""
|
|
32
31
|
# data type: OnlinePairMakerConfig
|
|
33
32
|
oneof_schema_1_validator: Optional[OnlinePairMakerConfig] = None
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
actual_instance: Optional[Union[OnlinePairMakerConfig, PreArrangedPairMakerConfig]] = None
|
|
37
|
-
one_of_schemas: Set[str] = { "OnlinePairMakerConfig", "PreArrangedPairMakerConfig" }
|
|
33
|
+
actual_instance: Optional[Union[OnlinePairMakerConfig]] = None
|
|
34
|
+
one_of_schemas: Set[str] = { "OnlinePairMakerConfig" }
|
|
38
35
|
|
|
39
36
|
model_config = ConfigDict(
|
|
40
37
|
validate_assignment=True,
|
|
@@ -65,17 +62,12 @@ class CompareWorkflowConfigPairMakerConfig(BaseModel):
|
|
|
65
62
|
error_messages.append(f"Error! Input type `{type(v)}` is not `OnlinePairMakerConfig`")
|
|
66
63
|
else:
|
|
67
64
|
match += 1
|
|
68
|
-
# validate data type: PreArrangedPairMakerConfig
|
|
69
|
-
if not isinstance(v, PreArrangedPairMakerConfig):
|
|
70
|
-
error_messages.append(f"Error! Input type `{type(v)}` is not `PreArrangedPairMakerConfig`")
|
|
71
|
-
else:
|
|
72
|
-
match += 1
|
|
73
65
|
if match > 1:
|
|
74
66
|
# more than 1 match
|
|
75
|
-
raise ValueError("Multiple matches found when setting `actual_instance` in CompareWorkflowConfigPairMakerConfig with oneOf schemas: OnlinePairMakerConfig
|
|
67
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in CompareWorkflowConfigPairMakerConfig with oneOf schemas: OnlinePairMakerConfig. Details: " + ", ".join(error_messages))
|
|
76
68
|
elif match == 0:
|
|
77
69
|
# no match
|
|
78
|
-
raise ValueError("No match found when setting `actual_instance` in CompareWorkflowConfigPairMakerConfig with oneOf schemas: OnlinePairMakerConfig
|
|
70
|
+
raise ValueError("No match found when setting `actual_instance` in CompareWorkflowConfigPairMakerConfig with oneOf schemas: OnlinePairMakerConfig. Details: " + ", ".join(error_messages))
|
|
79
71
|
else:
|
|
80
72
|
return v
|
|
81
73
|
|
|
@@ -96,19 +88,13 @@ class CompareWorkflowConfigPairMakerConfig(BaseModel):
|
|
|
96
88
|
match += 1
|
|
97
89
|
except (ValidationError, ValueError) as e:
|
|
98
90
|
error_messages.append(str(e))
|
|
99
|
-
# deserialize data into PreArrangedPairMakerConfig
|
|
100
|
-
try:
|
|
101
|
-
instance.actual_instance = PreArrangedPairMakerConfig.from_json(json_str)
|
|
102
|
-
match += 1
|
|
103
|
-
except (ValidationError, ValueError) as e:
|
|
104
|
-
error_messages.append(str(e))
|
|
105
91
|
|
|
106
92
|
if match > 1:
|
|
107
93
|
# more than 1 match
|
|
108
|
-
raise ValueError("Multiple matches found when deserializing the JSON string into CompareWorkflowConfigPairMakerConfig with oneOf schemas: OnlinePairMakerConfig
|
|
94
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into CompareWorkflowConfigPairMakerConfig with oneOf schemas: OnlinePairMakerConfig. Details: " + ", ".join(error_messages))
|
|
109
95
|
elif match == 0:
|
|
110
96
|
# no match
|
|
111
|
-
raise ValueError("No match found when deserializing the JSON string into CompareWorkflowConfigPairMakerConfig with oneOf schemas: OnlinePairMakerConfig
|
|
97
|
+
raise ValueError("No match found when deserializing the JSON string into CompareWorkflowConfigPairMakerConfig with oneOf schemas: OnlinePairMakerConfig. Details: " + ", ".join(error_messages))
|
|
112
98
|
else:
|
|
113
99
|
return instance
|
|
114
100
|
|
|
@@ -122,7 +108,7 @@ class CompareWorkflowConfigPairMakerConfig(BaseModel):
|
|
|
122
108
|
else:
|
|
123
109
|
return json.dumps(self.actual_instance)
|
|
124
110
|
|
|
125
|
-
def to_dict(self) -> Optional[Union[Dict[str, Any], OnlinePairMakerConfig
|
|
111
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], OnlinePairMakerConfig]]:
|
|
126
112
|
"""Returns the dict representation of the actual instance"""
|
|
127
113
|
if self.actual_instance is None:
|
|
128
114
|
return None
|
|
@@ -17,9 +17,10 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field,
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from rapidata.api_client.models.compare_workflow_model_pair_maker_config import CompareWorkflowModelPairMakerConfig
|
|
23
|
+
from rapidata.api_client.models.elo_config_model import EloConfigModel
|
|
23
24
|
from typing import Optional, Set
|
|
24
25
|
from typing_extensions import Self
|
|
25
26
|
|
|
@@ -29,12 +30,9 @@ class CompareWorkflowModel(BaseModel):
|
|
|
29
30
|
""" # noqa: E501
|
|
30
31
|
t: StrictStr = Field(description="Discriminator value for CompareWorkflow", alias="_t")
|
|
31
32
|
criteria: StrictStr = Field(description="The criteria that the datapoints should be compared based on. No default value.")
|
|
32
|
-
starting_elo: Optional[StrictInt] = Field(default=None, description="The Starting Elo is the Elo that all datapoints will start with. Default is usually between 1200-1500.", alias="startingElo")
|
|
33
|
-
k_factor: Optional[StrictInt] = Field(default=None, description="The KFactor is used to calculate the Elo change after each match. Per default this is between 20 and 40.", alias="kFactor")
|
|
34
33
|
pair_maker_config: Optional[CompareWorkflowModelPairMakerConfig] = Field(default=None, alias="pairMakerConfig")
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
__properties: ClassVar[List[str]] = ["_t", "criteria", "startingElo", "kFactor", "pairMakerConfig", "scalingFactor", "matchesUntilCompleted"]
|
|
34
|
+
elo_config: Optional[EloConfigModel] = Field(default=None, alias="eloConfig")
|
|
35
|
+
__properties: ClassVar[List[str]] = ["_t", "criteria", "pairMakerConfig", "eloConfig"]
|
|
38
36
|
|
|
39
37
|
@field_validator('t')
|
|
40
38
|
def t_validate_enum(cls, value):
|
|
@@ -85,6 +83,9 @@ class CompareWorkflowModel(BaseModel):
|
|
|
85
83
|
# override the default output from pydantic by calling `to_dict()` of pair_maker_config
|
|
86
84
|
if self.pair_maker_config:
|
|
87
85
|
_dict['pairMakerConfig'] = self.pair_maker_config.to_dict()
|
|
86
|
+
# override the default output from pydantic by calling `to_dict()` of elo_config
|
|
87
|
+
if self.elo_config:
|
|
88
|
+
_dict['eloConfig'] = self.elo_config.to_dict()
|
|
88
89
|
return _dict
|
|
89
90
|
|
|
90
91
|
@classmethod
|
|
@@ -99,11 +100,8 @@ class CompareWorkflowModel(BaseModel):
|
|
|
99
100
|
_obj = cls.model_validate({
|
|
100
101
|
"_t": obj.get("_t") if obj.get("_t") is not None else 'CompareWorkflow',
|
|
101
102
|
"criteria": obj.get("criteria"),
|
|
102
|
-
"startingElo": obj.get("startingElo"),
|
|
103
|
-
"kFactor": obj.get("kFactor"),
|
|
104
103
|
"pairMakerConfig": CompareWorkflowModelPairMakerConfig.from_dict(obj["pairMakerConfig"]) if obj.get("pairMakerConfig") is not None else None,
|
|
105
|
-
"
|
|
106
|
-
"matchesUntilCompleted": obj.get("matchesUntilCompleted")
|
|
104
|
+
"eloConfig": EloConfigModel.from_dict(obj["eloConfig"]) if obj.get("eloConfig") is not None else None
|
|
107
105
|
})
|
|
108
106
|
return _obj
|
|
109
107
|
|
|
@@ -17,10 +17,11 @@ import pprint
|
|
|
17
17
|
import re # noqa: F401
|
|
18
18
|
import json
|
|
19
19
|
|
|
20
|
-
from pydantic import BaseModel, ConfigDict, Field,
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
21
21
|
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
22
|
from rapidata.api_client.models.compare_workflow_model1_pair_maker_information import CompareWorkflowModel1PairMakerInformation
|
|
23
23
|
from rapidata.api_client.models.compare_workflow_model1_referee import CompareWorkflowModel1Referee
|
|
24
|
+
from rapidata.api_client.models.elo_config import EloConfig
|
|
24
25
|
from typing import Optional, Set
|
|
25
26
|
from typing_extensions import Self
|
|
26
27
|
|
|
@@ -37,11 +38,8 @@ class CompareWorkflowModel1(BaseModel):
|
|
|
37
38
|
criteria: StrictStr
|
|
38
39
|
name: StrictStr
|
|
39
40
|
owner_mail: Optional[StrictStr] = Field(default=None, alias="ownerMail")
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
scaling_factor: StrictInt = Field(alias="scalingFactor")
|
|
43
|
-
matches_until_completed: StrictInt = Field(alias="matchesUntilCompleted")
|
|
44
|
-
__properties: ClassVar[List[str]] = ["_t", "id", "datasetId", "referee", "pairMakerInformation", "state", "criteria", "name", "ownerMail", "startingElo", "kFactor", "scalingFactor", "matchesUntilCompleted"]
|
|
41
|
+
elo_config: EloConfig = Field(alias="eloConfig")
|
|
42
|
+
__properties: ClassVar[List[str]] = ["_t", "id", "datasetId", "referee", "pairMakerInformation", "state", "criteria", "name", "ownerMail", "eloConfig"]
|
|
45
43
|
|
|
46
44
|
@field_validator('t')
|
|
47
45
|
def t_validate_enum(cls, value):
|
|
@@ -95,6 +93,9 @@ class CompareWorkflowModel1(BaseModel):
|
|
|
95
93
|
# override the default output from pydantic by calling `to_dict()` of pair_maker_information
|
|
96
94
|
if self.pair_maker_information:
|
|
97
95
|
_dict['pairMakerInformation'] = self.pair_maker_information.to_dict()
|
|
96
|
+
# override the default output from pydantic by calling `to_dict()` of elo_config
|
|
97
|
+
if self.elo_config:
|
|
98
|
+
_dict['eloConfig'] = self.elo_config.to_dict()
|
|
98
99
|
# set to None if dataset_id (nullable) is None
|
|
99
100
|
# and model_fields_set contains the field
|
|
100
101
|
if self.dataset_id is None and "dataset_id" in self.model_fields_set:
|
|
@@ -126,10 +127,7 @@ class CompareWorkflowModel1(BaseModel):
|
|
|
126
127
|
"criteria": obj.get("criteria"),
|
|
127
128
|
"name": obj.get("name"),
|
|
128
129
|
"ownerMail": obj.get("ownerMail"),
|
|
129
|
-
"
|
|
130
|
-
"kFactor": obj.get("kFactor"),
|
|
131
|
-
"scalingFactor": obj.get("scalingFactor"),
|
|
132
|
-
"matchesUntilCompleted": obj.get("matchesUntilCompleted")
|
|
130
|
+
"eloConfig": EloConfig.from_dict(obj["eloConfig"]) if obj.get("eloConfig") is not None else None
|
|
133
131
|
})
|
|
134
132
|
return _obj
|
|
135
133
|
|
|
@@ -18,12 +18,11 @@ import pprint
|
|
|
18
18
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
19
19
|
from typing import Any, List, Optional
|
|
20
20
|
from rapidata.api_client.models.online_pair_maker_information import OnlinePairMakerInformation
|
|
21
|
-
from rapidata.api_client.models.pre_arranged_pair_maker_information import PreArrangedPairMakerInformation
|
|
22
21
|
from pydantic import StrictStr, Field
|
|
23
22
|
from typing import Union, List, Set, Optional, Dict
|
|
24
23
|
from typing_extensions import Literal, Self
|
|
25
24
|
|
|
26
|
-
COMPAREWORKFLOWMODEL1PAIRMAKERINFORMATION_ONE_OF_SCHEMAS = ["OnlinePairMakerInformation"
|
|
25
|
+
COMPAREWORKFLOWMODEL1PAIRMAKERINFORMATION_ONE_OF_SCHEMAS = ["OnlinePairMakerInformation"]
|
|
27
26
|
|
|
28
27
|
class CompareWorkflowModel1PairMakerInformation(BaseModel):
|
|
29
28
|
"""
|
|
@@ -31,10 +30,8 @@ class CompareWorkflowModel1PairMakerInformation(BaseModel):
|
|
|
31
30
|
"""
|
|
32
31
|
# data type: OnlinePairMakerInformation
|
|
33
32
|
oneof_schema_1_validator: Optional[OnlinePairMakerInformation] = None
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
actual_instance: Optional[Union[OnlinePairMakerInformation, PreArrangedPairMakerInformation]] = None
|
|
37
|
-
one_of_schemas: Set[str] = { "OnlinePairMakerInformation", "PreArrangedPairMakerInformation" }
|
|
33
|
+
actual_instance: Optional[Union[OnlinePairMakerInformation]] = None
|
|
34
|
+
one_of_schemas: Set[str] = { "OnlinePairMakerInformation" }
|
|
38
35
|
|
|
39
36
|
model_config = ConfigDict(
|
|
40
37
|
validate_assignment=True,
|
|
@@ -65,17 +62,12 @@ class CompareWorkflowModel1PairMakerInformation(BaseModel):
|
|
|
65
62
|
error_messages.append(f"Error! Input type `{type(v)}` is not `OnlinePairMakerInformation`")
|
|
66
63
|
else:
|
|
67
64
|
match += 1
|
|
68
|
-
# validate data type: PreArrangedPairMakerInformation
|
|
69
|
-
if not isinstance(v, PreArrangedPairMakerInformation):
|
|
70
|
-
error_messages.append(f"Error! Input type `{type(v)}` is not `PreArrangedPairMakerInformation`")
|
|
71
|
-
else:
|
|
72
|
-
match += 1
|
|
73
65
|
if match > 1:
|
|
74
66
|
# more than 1 match
|
|
75
|
-
raise ValueError("Multiple matches found when setting `actual_instance` in CompareWorkflowModel1PairMakerInformation with oneOf schemas: OnlinePairMakerInformation
|
|
67
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in CompareWorkflowModel1PairMakerInformation with oneOf schemas: OnlinePairMakerInformation. Details: " + ", ".join(error_messages))
|
|
76
68
|
elif match == 0:
|
|
77
69
|
# no match
|
|
78
|
-
raise ValueError("No match found when setting `actual_instance` in CompareWorkflowModel1PairMakerInformation with oneOf schemas: OnlinePairMakerInformation
|
|
70
|
+
raise ValueError("No match found when setting `actual_instance` in CompareWorkflowModel1PairMakerInformation with oneOf schemas: OnlinePairMakerInformation. Details: " + ", ".join(error_messages))
|
|
79
71
|
else:
|
|
80
72
|
return v
|
|
81
73
|
|
|
@@ -96,19 +88,13 @@ class CompareWorkflowModel1PairMakerInformation(BaseModel):
|
|
|
96
88
|
match += 1
|
|
97
89
|
except (ValidationError, ValueError) as e:
|
|
98
90
|
error_messages.append(str(e))
|
|
99
|
-
# deserialize data into PreArrangedPairMakerInformation
|
|
100
|
-
try:
|
|
101
|
-
instance.actual_instance = PreArrangedPairMakerInformation.from_json(json_str)
|
|
102
|
-
match += 1
|
|
103
|
-
except (ValidationError, ValueError) as e:
|
|
104
|
-
error_messages.append(str(e))
|
|
105
91
|
|
|
106
92
|
if match > 1:
|
|
107
93
|
# more than 1 match
|
|
108
|
-
raise ValueError("Multiple matches found when deserializing the JSON string into CompareWorkflowModel1PairMakerInformation with oneOf schemas: OnlinePairMakerInformation
|
|
94
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into CompareWorkflowModel1PairMakerInformation with oneOf schemas: OnlinePairMakerInformation. Details: " + ", ".join(error_messages))
|
|
109
95
|
elif match == 0:
|
|
110
96
|
# no match
|
|
111
|
-
raise ValueError("No match found when deserializing the JSON string into CompareWorkflowModel1PairMakerInformation with oneOf schemas: OnlinePairMakerInformation
|
|
97
|
+
raise ValueError("No match found when deserializing the JSON string into CompareWorkflowModel1PairMakerInformation with oneOf schemas: OnlinePairMakerInformation. Details: " + ", ".join(error_messages))
|
|
112
98
|
else:
|
|
113
99
|
return instance
|
|
114
100
|
|
|
@@ -122,7 +108,7 @@ class CompareWorkflowModel1PairMakerInformation(BaseModel):
|
|
|
122
108
|
else:
|
|
123
109
|
return json.dumps(self.actual_instance)
|
|
124
110
|
|
|
125
|
-
def to_dict(self) -> Optional[Union[Dict[str, Any], OnlinePairMakerInformation
|
|
111
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], OnlinePairMakerInformation]]:
|
|
126
112
|
"""Returns the dict representation of the actual instance"""
|
|
127
113
|
if self.actual_instance is None:
|
|
128
114
|
return None
|
|
@@ -18,23 +18,20 @@ import pprint
|
|
|
18
18
|
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
19
19
|
from typing import Any, List, Optional
|
|
20
20
|
from rapidata.api_client.models.online_pair_maker_config_model import OnlinePairMakerConfigModel
|
|
21
|
-
from rapidata.api_client.models.pre_arranged_pair_maker_config_model import PreArrangedPairMakerConfigModel
|
|
22
21
|
from pydantic import StrictStr, Field
|
|
23
22
|
from typing import Union, List, Set, Optional, Dict
|
|
24
23
|
from typing_extensions import Literal, Self
|
|
25
24
|
|
|
26
|
-
COMPAREWORKFLOWMODELPAIRMAKERCONFIG_ONE_OF_SCHEMAS = ["OnlinePairMakerConfigModel"
|
|
25
|
+
COMPAREWORKFLOWMODELPAIRMAKERCONFIG_ONE_OF_SCHEMAS = ["OnlinePairMakerConfigModel"]
|
|
27
26
|
|
|
28
27
|
class CompareWorkflowModelPairMakerConfig(BaseModel):
|
|
29
28
|
"""
|
|
30
|
-
|
|
29
|
+
The PairMaker config determines the pair making algorithm for compare workflows
|
|
31
30
|
"""
|
|
32
|
-
# data type: PreArrangedPairMakerConfigModel
|
|
33
|
-
oneof_schema_1_validator: Optional[PreArrangedPairMakerConfigModel] = None
|
|
34
31
|
# data type: OnlinePairMakerConfigModel
|
|
35
|
-
|
|
36
|
-
actual_instance: Optional[Union[OnlinePairMakerConfigModel
|
|
37
|
-
one_of_schemas: Set[str] = { "OnlinePairMakerConfigModel"
|
|
32
|
+
oneof_schema_1_validator: Optional[OnlinePairMakerConfigModel] = None
|
|
33
|
+
actual_instance: Optional[Union[OnlinePairMakerConfigModel]] = None
|
|
34
|
+
one_of_schemas: Set[str] = { "OnlinePairMakerConfigModel" }
|
|
38
35
|
|
|
39
36
|
model_config = ConfigDict(
|
|
40
37
|
validate_assignment=True,
|
|
@@ -60,11 +57,6 @@ class CompareWorkflowModelPairMakerConfig(BaseModel):
|
|
|
60
57
|
instance = CompareWorkflowModelPairMakerConfig.model_construct()
|
|
61
58
|
error_messages = []
|
|
62
59
|
match = 0
|
|
63
|
-
# validate data type: PreArrangedPairMakerConfigModel
|
|
64
|
-
if not isinstance(v, PreArrangedPairMakerConfigModel):
|
|
65
|
-
error_messages.append(f"Error! Input type `{type(v)}` is not `PreArrangedPairMakerConfigModel`")
|
|
66
|
-
else:
|
|
67
|
-
match += 1
|
|
68
60
|
# validate data type: OnlinePairMakerConfigModel
|
|
69
61
|
if not isinstance(v, OnlinePairMakerConfigModel):
|
|
70
62
|
error_messages.append(f"Error! Input type `{type(v)}` is not `OnlinePairMakerConfigModel`")
|
|
@@ -72,10 +64,10 @@ class CompareWorkflowModelPairMakerConfig(BaseModel):
|
|
|
72
64
|
match += 1
|
|
73
65
|
if match > 1:
|
|
74
66
|
# more than 1 match
|
|
75
|
-
raise ValueError("Multiple matches found when setting `actual_instance` in CompareWorkflowModelPairMakerConfig with oneOf schemas: OnlinePairMakerConfigModel
|
|
67
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in CompareWorkflowModelPairMakerConfig with oneOf schemas: OnlinePairMakerConfigModel. Details: " + ", ".join(error_messages))
|
|
76
68
|
elif match == 0:
|
|
77
69
|
# no match
|
|
78
|
-
raise ValueError("No match found when setting `actual_instance` in CompareWorkflowModelPairMakerConfig with oneOf schemas: OnlinePairMakerConfigModel
|
|
70
|
+
raise ValueError("No match found when setting `actual_instance` in CompareWorkflowModelPairMakerConfig with oneOf schemas: OnlinePairMakerConfigModel. Details: " + ", ".join(error_messages))
|
|
79
71
|
else:
|
|
80
72
|
return v
|
|
81
73
|
|
|
@@ -90,12 +82,6 @@ class CompareWorkflowModelPairMakerConfig(BaseModel):
|
|
|
90
82
|
error_messages = []
|
|
91
83
|
match = 0
|
|
92
84
|
|
|
93
|
-
# deserialize data into PreArrangedPairMakerConfigModel
|
|
94
|
-
try:
|
|
95
|
-
instance.actual_instance = PreArrangedPairMakerConfigModel.from_json(json_str)
|
|
96
|
-
match += 1
|
|
97
|
-
except (ValidationError, ValueError) as e:
|
|
98
|
-
error_messages.append(str(e))
|
|
99
85
|
# deserialize data into OnlinePairMakerConfigModel
|
|
100
86
|
try:
|
|
101
87
|
instance.actual_instance = OnlinePairMakerConfigModel.from_json(json_str)
|
|
@@ -105,10 +91,10 @@ class CompareWorkflowModelPairMakerConfig(BaseModel):
|
|
|
105
91
|
|
|
106
92
|
if match > 1:
|
|
107
93
|
# more than 1 match
|
|
108
|
-
raise ValueError("Multiple matches found when deserializing the JSON string into CompareWorkflowModelPairMakerConfig with oneOf schemas: OnlinePairMakerConfigModel
|
|
94
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into CompareWorkflowModelPairMakerConfig with oneOf schemas: OnlinePairMakerConfigModel. Details: " + ", ".join(error_messages))
|
|
109
95
|
elif match == 0:
|
|
110
96
|
# no match
|
|
111
|
-
raise ValueError("No match found when deserializing the JSON string into CompareWorkflowModelPairMakerConfig with oneOf schemas: OnlinePairMakerConfigModel
|
|
97
|
+
raise ValueError("No match found when deserializing the JSON string into CompareWorkflowModelPairMakerConfig with oneOf schemas: OnlinePairMakerConfigModel. Details: " + ", ".join(error_messages))
|
|
112
98
|
else:
|
|
113
99
|
return instance
|
|
114
100
|
|
|
@@ -122,7 +108,7 @@ class CompareWorkflowModelPairMakerConfig(BaseModel):
|
|
|
122
108
|
else:
|
|
123
109
|
return json.dumps(self.actual_instance)
|
|
124
110
|
|
|
125
|
-
def to_dict(self) -> Optional[Union[Dict[str, Any], OnlinePairMakerConfigModel
|
|
111
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], OnlinePairMakerConfigModel]]:
|
|
126
112
|
"""Returns the dict representation of the actual instance"""
|
|
127
113
|
if self.actual_instance is None:
|
|
128
114
|
return None
|
|
@@ -28,8 +28,7 @@ class CountMetadataModel(BaseModel):
|
|
|
28
28
|
""" # noqa: E501
|
|
29
29
|
t: StrictStr = Field(description="Discriminator value for CountMetadata", alias="_t")
|
|
30
30
|
count: StrictInt
|
|
31
|
-
|
|
32
|
-
__properties: ClassVar[List[str]] = ["_t", "count", "identifier"]
|
|
31
|
+
__properties: ClassVar[List[str]] = ["_t", "count"]
|
|
33
32
|
|
|
34
33
|
@field_validator('t')
|
|
35
34
|
def t_validate_enum(cls, value):
|
|
@@ -90,8 +89,7 @@ class CountMetadataModel(BaseModel):
|
|
|
90
89
|
|
|
91
90
|
_obj = cls.model_validate({
|
|
92
91
|
"_t": obj.get("_t") if obj.get("_t") is not None else 'CountMetadata',
|
|
93
|
-
"count": obj.get("count")
|
|
94
|
-
"identifier": obj.get("identifier")
|
|
92
|
+
"count": obj.get("count")
|
|
95
93
|
})
|
|
96
94
|
return _obj
|
|
97
95
|
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Rapidata.Dataset
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List
|
|
22
|
+
from typing import Optional, Set
|
|
23
|
+
from typing_extensions import Self
|
|
24
|
+
|
|
25
|
+
class CreateDatapointFromUrlsModel(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
The model for creating a datapoint from urls.
|
|
28
|
+
""" # noqa: E501
|
|
29
|
+
urls: List[StrictStr] = Field(description="The urls to fetch the assets from. The urls must be publicly accessible. A HEAD request will be made to each url to check if it is accessible.")
|
|
30
|
+
__properties: ClassVar[List[str]] = ["urls"]
|
|
31
|
+
|
|
32
|
+
model_config = ConfigDict(
|
|
33
|
+
populate_by_name=True,
|
|
34
|
+
validate_assignment=True,
|
|
35
|
+
protected_namespaces=(),
|
|
36
|
+
)
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
def to_str(self) -> str:
|
|
40
|
+
"""Returns the string representation of the model using alias"""
|
|
41
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
42
|
+
|
|
43
|
+
def to_json(self) -> str:
|
|
44
|
+
"""Returns the JSON representation of the model using alias"""
|
|
45
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
46
|
+
return json.dumps(self.to_dict())
|
|
47
|
+
|
|
48
|
+
@classmethod
|
|
49
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
50
|
+
"""Create an instance of CreateDatapointFromUrlsModel from a JSON string"""
|
|
51
|
+
return cls.from_dict(json.loads(json_str))
|
|
52
|
+
|
|
53
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
54
|
+
"""Return the dictionary representation of the model using alias.
|
|
55
|
+
|
|
56
|
+
This has the following differences from calling pydantic's
|
|
57
|
+
`self.model_dump(by_alias=True)`:
|
|
58
|
+
|
|
59
|
+
* `None` is only added to the output dict for nullable fields that
|
|
60
|
+
were set at model initialization. Other fields with value `None`
|
|
61
|
+
are ignored.
|
|
62
|
+
"""
|
|
63
|
+
excluded_fields: Set[str] = set([
|
|
64
|
+
])
|
|
65
|
+
|
|
66
|
+
_dict = self.model_dump(
|
|
67
|
+
by_alias=True,
|
|
68
|
+
exclude=excluded_fields,
|
|
69
|
+
exclude_none=True,
|
|
70
|
+
)
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
75
|
+
"""Create an instance of CreateDatapointFromUrlsModel from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return cls.model_validate(obj)
|
|
81
|
+
|
|
82
|
+
_obj = cls.model_validate({
|
|
83
|
+
"urls": obj.get("urls")
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
86
|
+
|
|
87
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Rapidata.Dataset
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: v1
|
|
9
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
10
|
+
|
|
11
|
+
Do not edit the class manually.
|
|
12
|
+
""" # noqa: E501
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
from __future__ import annotations
|
|
16
|
+
import pprint
|
|
17
|
+
import re # noqa: F401
|
|
18
|
+
import json
|
|
19
|
+
|
|
20
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr
|
|
21
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
22
|
+
from rapidata.api_client.models.base_error import BaseError
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class CreateDatapointResult(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
CreateDatapointResult
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
datapoint_id: StrictStr = Field(alias="datapointId")
|
|
31
|
+
errors: Optional[List[BaseError]] = None
|
|
32
|
+
__properties: ClassVar[List[str]] = ["datapointId", "errors"]
|
|
33
|
+
|
|
34
|
+
model_config = ConfigDict(
|
|
35
|
+
populate_by_name=True,
|
|
36
|
+
validate_assignment=True,
|
|
37
|
+
protected_namespaces=(),
|
|
38
|
+
)
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
def to_str(self) -> str:
|
|
42
|
+
"""Returns the string representation of the model using alias"""
|
|
43
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
44
|
+
|
|
45
|
+
def to_json(self) -> str:
|
|
46
|
+
"""Returns the JSON representation of the model using alias"""
|
|
47
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
48
|
+
return json.dumps(self.to_dict())
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
52
|
+
"""Create an instance of CreateDatapointResult from a JSON string"""
|
|
53
|
+
return cls.from_dict(json.loads(json_str))
|
|
54
|
+
|
|
55
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
56
|
+
"""Return the dictionary representation of the model using alias.
|
|
57
|
+
|
|
58
|
+
This has the following differences from calling pydantic's
|
|
59
|
+
`self.model_dump(by_alias=True)`:
|
|
60
|
+
|
|
61
|
+
* `None` is only added to the output dict for nullable fields that
|
|
62
|
+
were set at model initialization. Other fields with value `None`
|
|
63
|
+
are ignored.
|
|
64
|
+
"""
|
|
65
|
+
excluded_fields: Set[str] = set([
|
|
66
|
+
])
|
|
67
|
+
|
|
68
|
+
_dict = self.model_dump(
|
|
69
|
+
by_alias=True,
|
|
70
|
+
exclude=excluded_fields,
|
|
71
|
+
exclude_none=True,
|
|
72
|
+
)
|
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of each item in errors (list)
|
|
74
|
+
_items = []
|
|
75
|
+
if self.errors:
|
|
76
|
+
for _item_errors in self.errors:
|
|
77
|
+
if _item_errors:
|
|
78
|
+
_items.append(_item_errors.to_dict())
|
|
79
|
+
_dict['errors'] = _items
|
|
80
|
+
return _dict
|
|
81
|
+
|
|
82
|
+
@classmethod
|
|
83
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
84
|
+
"""Create an instance of CreateDatapointResult 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
|
+
"datapointId": obj.get("datapointId"),
|
|
93
|
+
"errors": [BaseError.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None
|
|
94
|
+
})
|
|
95
|
+
return _obj
|
|
96
|
+
|
|
97
|
+
|
|
@@ -23,12 +23,13 @@ from rapidata.api_client.models.country_user_filter_model import CountryUserFilt
|
|
|
23
23
|
from rapidata.api_client.models.custom_user_filter_model import CustomUserFilterModel
|
|
24
24
|
from rapidata.api_client.models.gender_user_filter_model import GenderUserFilterModel
|
|
25
25
|
from rapidata.api_client.models.language_user_filter_model import LanguageUserFilterModel
|
|
26
|
+
from rapidata.api_client.models.new_user_filter_model import NewUserFilterModel
|
|
26
27
|
from rapidata.api_client.models.user_score_user_filter_model import UserScoreUserFilterModel
|
|
27
28
|
from pydantic import StrictStr, Field
|
|
28
29
|
from typing import Union, List, Set, Optional, Dict
|
|
29
30
|
from typing_extensions import Literal, Self
|
|
30
31
|
|
|
31
|
-
CREATEORDERMODELUSERFILTERSINNER_ONE_OF_SCHEMAS = ["AgeUserFilterModel", "CampaignUserFilterModel", "CountryUserFilterModel", "CustomUserFilterModel", "GenderUserFilterModel", "LanguageUserFilterModel", "UserScoreUserFilterModel"]
|
|
32
|
+
CREATEORDERMODELUSERFILTERSINNER_ONE_OF_SCHEMAS = ["AgeUserFilterModel", "CampaignUserFilterModel", "CountryUserFilterModel", "CustomUserFilterModel", "GenderUserFilterModel", "LanguageUserFilterModel", "NewUserFilterModel", "UserScoreUserFilterModel"]
|
|
32
33
|
|
|
33
34
|
class CreateOrderModelUserFiltersInner(BaseModel):
|
|
34
35
|
"""
|
|
@@ -46,10 +47,12 @@ class CreateOrderModelUserFiltersInner(BaseModel):
|
|
|
46
47
|
oneof_schema_5_validator: Optional[GenderUserFilterModel] = None
|
|
47
48
|
# data type: LanguageUserFilterModel
|
|
48
49
|
oneof_schema_6_validator: Optional[LanguageUserFilterModel] = None
|
|
50
|
+
# data type: NewUserFilterModel
|
|
51
|
+
oneof_schema_7_validator: Optional[NewUserFilterModel] = None
|
|
49
52
|
# data type: UserScoreUserFilterModel
|
|
50
|
-
|
|
51
|
-
actual_instance: Optional[Union[AgeUserFilterModel, CampaignUserFilterModel, CountryUserFilterModel, CustomUserFilterModel, GenderUserFilterModel, LanguageUserFilterModel, UserScoreUserFilterModel]] = None
|
|
52
|
-
one_of_schemas: Set[str] = { "AgeUserFilterModel", "CampaignUserFilterModel", "CountryUserFilterModel", "CustomUserFilterModel", "GenderUserFilterModel", "LanguageUserFilterModel", "UserScoreUserFilterModel" }
|
|
53
|
+
oneof_schema_8_validator: Optional[UserScoreUserFilterModel] = None
|
|
54
|
+
actual_instance: Optional[Union[AgeUserFilterModel, CampaignUserFilterModel, CountryUserFilterModel, CustomUserFilterModel, GenderUserFilterModel, LanguageUserFilterModel, NewUserFilterModel, UserScoreUserFilterModel]] = None
|
|
55
|
+
one_of_schemas: Set[str] = { "AgeUserFilterModel", "CampaignUserFilterModel", "CountryUserFilterModel", "CustomUserFilterModel", "GenderUserFilterModel", "LanguageUserFilterModel", "NewUserFilterModel", "UserScoreUserFilterModel" }
|
|
53
56
|
|
|
54
57
|
model_config = ConfigDict(
|
|
55
58
|
validate_assignment=True,
|
|
@@ -105,6 +108,11 @@ class CreateOrderModelUserFiltersInner(BaseModel):
|
|
|
105
108
|
error_messages.append(f"Error! Input type `{type(v)}` is not `LanguageUserFilterModel`")
|
|
106
109
|
else:
|
|
107
110
|
match += 1
|
|
111
|
+
# validate data type: NewUserFilterModel
|
|
112
|
+
if not isinstance(v, NewUserFilterModel):
|
|
113
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `NewUserFilterModel`")
|
|
114
|
+
else:
|
|
115
|
+
match += 1
|
|
108
116
|
# validate data type: UserScoreUserFilterModel
|
|
109
117
|
if not isinstance(v, UserScoreUserFilterModel):
|
|
110
118
|
error_messages.append(f"Error! Input type `{type(v)}` is not `UserScoreUserFilterModel`")
|
|
@@ -112,10 +120,10 @@ class CreateOrderModelUserFiltersInner(BaseModel):
|
|
|
112
120
|
match += 1
|
|
113
121
|
if match > 1:
|
|
114
122
|
# more than 1 match
|
|
115
|
-
raise ValueError("Multiple matches found when setting `actual_instance` in CreateOrderModelUserFiltersInner with oneOf schemas: AgeUserFilterModel, CampaignUserFilterModel, CountryUserFilterModel, CustomUserFilterModel, GenderUserFilterModel, LanguageUserFilterModel, UserScoreUserFilterModel. Details: " + ", ".join(error_messages))
|
|
123
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in CreateOrderModelUserFiltersInner with oneOf schemas: AgeUserFilterModel, CampaignUserFilterModel, CountryUserFilterModel, CustomUserFilterModel, GenderUserFilterModel, LanguageUserFilterModel, NewUserFilterModel, UserScoreUserFilterModel. Details: " + ", ".join(error_messages))
|
|
116
124
|
elif match == 0:
|
|
117
125
|
# no match
|
|
118
|
-
raise ValueError("No match found when setting `actual_instance` in CreateOrderModelUserFiltersInner with oneOf schemas: AgeUserFilterModel, CampaignUserFilterModel, CountryUserFilterModel, CustomUserFilterModel, GenderUserFilterModel, LanguageUserFilterModel, UserScoreUserFilterModel. Details: " + ", ".join(error_messages))
|
|
126
|
+
raise ValueError("No match found when setting `actual_instance` in CreateOrderModelUserFiltersInner with oneOf schemas: AgeUserFilterModel, CampaignUserFilterModel, CountryUserFilterModel, CustomUserFilterModel, GenderUserFilterModel, LanguageUserFilterModel, NewUserFilterModel, UserScoreUserFilterModel. Details: " + ", ".join(error_messages))
|
|
119
127
|
else:
|
|
120
128
|
return v
|
|
121
129
|
|
|
@@ -166,6 +174,12 @@ class CreateOrderModelUserFiltersInner(BaseModel):
|
|
|
166
174
|
match += 1
|
|
167
175
|
except (ValidationError, ValueError) as e:
|
|
168
176
|
error_messages.append(str(e))
|
|
177
|
+
# deserialize data into NewUserFilterModel
|
|
178
|
+
try:
|
|
179
|
+
instance.actual_instance = NewUserFilterModel.from_json(json_str)
|
|
180
|
+
match += 1
|
|
181
|
+
except (ValidationError, ValueError) as e:
|
|
182
|
+
error_messages.append(str(e))
|
|
169
183
|
# deserialize data into UserScoreUserFilterModel
|
|
170
184
|
try:
|
|
171
185
|
instance.actual_instance = UserScoreUserFilterModel.from_json(json_str)
|
|
@@ -175,10 +189,10 @@ class CreateOrderModelUserFiltersInner(BaseModel):
|
|
|
175
189
|
|
|
176
190
|
if match > 1:
|
|
177
191
|
# more than 1 match
|
|
178
|
-
raise ValueError("Multiple matches found when deserializing the JSON string into CreateOrderModelUserFiltersInner with oneOf schemas: AgeUserFilterModel, CampaignUserFilterModel, CountryUserFilterModel, CustomUserFilterModel, GenderUserFilterModel, LanguageUserFilterModel, UserScoreUserFilterModel. Details: " + ", ".join(error_messages))
|
|
192
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into CreateOrderModelUserFiltersInner with oneOf schemas: AgeUserFilterModel, CampaignUserFilterModel, CountryUserFilterModel, CustomUserFilterModel, GenderUserFilterModel, LanguageUserFilterModel, NewUserFilterModel, UserScoreUserFilterModel. Details: " + ", ".join(error_messages))
|
|
179
193
|
elif match == 0:
|
|
180
194
|
# no match
|
|
181
|
-
raise ValueError("No match found when deserializing the JSON string into CreateOrderModelUserFiltersInner with oneOf schemas: AgeUserFilterModel, CampaignUserFilterModel, CountryUserFilterModel, CustomUserFilterModel, GenderUserFilterModel, LanguageUserFilterModel, UserScoreUserFilterModel. Details: " + ", ".join(error_messages))
|
|
195
|
+
raise ValueError("No match found when deserializing the JSON string into CreateOrderModelUserFiltersInner with oneOf schemas: AgeUserFilterModel, CampaignUserFilterModel, CountryUserFilterModel, CustomUserFilterModel, GenderUserFilterModel, LanguageUserFilterModel, NewUserFilterModel, UserScoreUserFilterModel. Details: " + ", ".join(error_messages))
|
|
182
196
|
else:
|
|
183
197
|
return instance
|
|
184
198
|
|
|
@@ -192,7 +206,7 @@ class CreateOrderModelUserFiltersInner(BaseModel):
|
|
|
192
206
|
else:
|
|
193
207
|
return json.dumps(self.actual_instance)
|
|
194
208
|
|
|
195
|
-
def to_dict(self) -> Optional[Union[Dict[str, Any], AgeUserFilterModel, CampaignUserFilterModel, CountryUserFilterModel, CustomUserFilterModel, GenderUserFilterModel, LanguageUserFilterModel, UserScoreUserFilterModel]]:
|
|
209
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], AgeUserFilterModel, CampaignUserFilterModel, CountryUserFilterModel, CustomUserFilterModel, GenderUserFilterModel, LanguageUserFilterModel, NewUserFilterModel, UserScoreUserFilterModel]]:
|
|
196
210
|
"""Returns the dict representation of the actual instance"""
|
|
197
211
|
if self.actual_instance is None:
|
|
198
212
|
return None
|