hotdata 0.0.1__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.
- hotdata/__init__.py +300 -0
- hotdata/api/__init__.py +20 -0
- hotdata/api/connection_types_api.py +549 -0
- hotdata/api/connections_api.py +2213 -0
- hotdata/api/datasets_api.py +1711 -0
- hotdata/api/embedding_providers_api.py +1380 -0
- hotdata/api/indexes_api.py +977 -0
- hotdata/api/information_schema_api.py +390 -0
- hotdata/api/jobs_api.py +619 -0
- hotdata/api/query_api.py +320 -0
- hotdata/api/query_runs_api.py +615 -0
- hotdata/api/refresh_api.py +317 -0
- hotdata/api/results_api.py +581 -0
- hotdata/api/saved_queries_api.py +2003 -0
- hotdata/api/secrets_api.py +1380 -0
- hotdata/api/uploads_api.py +595 -0
- hotdata/api/workspace_context_api.py +828 -0
- hotdata/api/workspaces_api.py +602 -0
- hotdata/api_client.py +806 -0
- hotdata/api_response.py +21 -0
- hotdata/configuration.py +620 -0
- hotdata/exceptions.py +219 -0
- hotdata/models/__init__.py +125 -0
- hotdata/models/api_error_detail.py +90 -0
- hotdata/models/api_error_response.py +92 -0
- hotdata/models/async_query_response.py +99 -0
- hotdata/models/boolean_profile_detail.py +91 -0
- hotdata/models/categorical_profile_detail.py +96 -0
- hotdata/models/category_value_info.py +96 -0
- hotdata/models/column_definition.py +140 -0
- hotdata/models/column_info.py +92 -0
- hotdata/models/column_profile_detail.py +180 -0
- hotdata/models/column_profile_detail_one_of.py +105 -0
- hotdata/models/column_profile_detail_one_of1.py +102 -0
- hotdata/models/column_profile_detail_one_of2.py +101 -0
- hotdata/models/column_profile_detail_one_of3.py +99 -0
- hotdata/models/column_profile_detail_one_of4.py +100 -0
- hotdata/models/column_profile_info.py +108 -0
- hotdata/models/column_type_spec.py +117 -0
- hotdata/models/connection_health_response.py +100 -0
- hotdata/models/connection_info.py +92 -0
- hotdata/models/connection_refresh_result.py +117 -0
- hotdata/models/connection_schema_error.py +90 -0
- hotdata/models/connection_type_detail.py +104 -0
- hotdata/models/connection_type_summary.py +90 -0
- hotdata/models/create_connection_request.py +108 -0
- hotdata/models/create_connection_response.py +105 -0
- hotdata/models/create_dataset_request.py +101 -0
- hotdata/models/create_dataset_response.py +99 -0
- hotdata/models/create_embedding_provider_request.py +111 -0
- hotdata/models/create_embedding_provider_response.py +102 -0
- hotdata/models/create_index_request.py +130 -0
- hotdata/models/create_saved_query_request.py +104 -0
- hotdata/models/create_secret_request.py +90 -0
- hotdata/models/create_secret_response.py +93 -0
- hotdata/models/create_workspace201_response.py +93 -0
- hotdata/models/create_workspace_request.py +90 -0
- hotdata/models/create_workspace_response.py +94 -0
- hotdata/models/dataset_source.py +180 -0
- hotdata/models/dataset_source_one_of.py +109 -0
- hotdata/models/dataset_source_one_of1.py +91 -0
- hotdata/models/dataset_summary.py +108 -0
- hotdata/models/dataset_version_summary.py +95 -0
- hotdata/models/discovery_status.py +39 -0
- hotdata/models/embedding_provider_response.py +108 -0
- hotdata/models/error.py +88 -0
- hotdata/models/execute_saved_query_request.py +93 -0
- hotdata/models/get_connection_response.py +97 -0
- hotdata/models/get_dataset_response.py +120 -0
- hotdata/models/get_result_response.py +126 -0
- hotdata/models/get_secret_response.py +93 -0
- hotdata/models/get_workspace_context_response.py +92 -0
- hotdata/models/index_info_response.py +107 -0
- hotdata/models/index_status.py +38 -0
- hotdata/models/information_schema_response.py +110 -0
- hotdata/models/inline_data.py +92 -0
- hotdata/models/inline_dataset_source.py +92 -0
- hotdata/models/job_result.py +152 -0
- hotdata/models/job_status.py +41 -0
- hotdata/models/job_status_response.py +124 -0
- hotdata/models/job_type.py +40 -0
- hotdata/models/list_connection_types_response.py +96 -0
- hotdata/models/list_connections_response.py +96 -0
- hotdata/models/list_dataset_versions_response.py +107 -0
- hotdata/models/list_datasets_response.py +105 -0
- hotdata/models/list_embedding_providers_response.py +96 -0
- hotdata/models/list_indexes_response.py +96 -0
- hotdata/models/list_jobs_response.py +96 -0
- hotdata/models/list_query_runs_response.py +110 -0
- hotdata/models/list_results_response.py +105 -0
- hotdata/models/list_saved_queries_response.py +105 -0
- hotdata/models/list_saved_query_versions_response.py +107 -0
- hotdata/models/list_secrets_response.py +96 -0
- hotdata/models/list_uploads_response.py +96 -0
- hotdata/models/list_workspace_contexts_response.py +96 -0
- hotdata/models/list_workspaces200_response.py +97 -0
- hotdata/models/list_workspaces_response.py +98 -0
- hotdata/models/numeric_profile_detail.py +92 -0
- hotdata/models/query_request.py +98 -0
- hotdata/models/query_response.py +113 -0
- hotdata/models/query_run_info.py +176 -0
- hotdata/models/refresh_dataset_response.py +95 -0
- hotdata/models/refresh_request.py +120 -0
- hotdata/models/refresh_response.py +180 -0
- hotdata/models/refresh_warning.py +102 -0
- hotdata/models/result_info.py +100 -0
- hotdata/models/saved_query_dataset_source.py +95 -0
- hotdata/models/saved_query_detail.py +168 -0
- hotdata/models/saved_query_summary.py +101 -0
- hotdata/models/saved_query_version_info.py +158 -0
- hotdata/models/schema_refresh_result.py +107 -0
- hotdata/models/secret_metadata_response.py +93 -0
- hotdata/models/sql_query_dataset_source.py +102 -0
- hotdata/models/submit_job_response.py +93 -0
- hotdata/models/table_info.py +116 -0
- hotdata/models/table_profile_response.py +112 -0
- hotdata/models/table_refresh_error.py +92 -0
- hotdata/models/table_refresh_result.py +107 -0
- hotdata/models/temporal_profile_detail.py +90 -0
- hotdata/models/text_profile_detail.py +93 -0
- hotdata/models/update_dataset_request.py +107 -0
- hotdata/models/update_dataset_response.py +104 -0
- hotdata/models/update_embedding_provider_request.py +114 -0
- hotdata/models/update_embedding_provider_response.py +93 -0
- hotdata/models/update_saved_query_request.py +128 -0
- hotdata/models/update_secret_request.py +88 -0
- hotdata/models/update_secret_response.py +91 -0
- hotdata/models/upload_dataset_source.py +97 -0
- hotdata/models/upload_info.py +102 -0
- hotdata/models/upload_response.py +102 -0
- hotdata/models/upsert_workspace_context_request.py +90 -0
- hotdata/models/upsert_workspace_context_response.py +92 -0
- hotdata/models/url_dataset_source.py +97 -0
- hotdata/models/workspace_context_entry.py +93 -0
- hotdata/models/workspace_detail.py +94 -0
- hotdata/models/workspace_list_item.py +98 -0
- hotdata/py.typed +0 -0
- hotdata/rest.py +264 -0
- hotdata-0.0.1.dist-info/METADATA +93 -0
- hotdata-0.0.1.dist-info/RECORD +142 -0
- hotdata-0.0.1.dist-info/WHEEL +5 -0
- hotdata-0.0.1.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,180 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hotdata API
|
|
5
|
+
|
|
6
|
+
Powerful data platform API for datasets, queries, and analytics.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: developers@hotdata.dev
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import json
|
|
18
|
+
import pprint
|
|
19
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator
|
|
20
|
+
from typing import Any, List, Optional
|
|
21
|
+
from hotdata.models.column_profile_detail_one_of import ColumnProfileDetailOneOf
|
|
22
|
+
from hotdata.models.column_profile_detail_one_of1 import ColumnProfileDetailOneOf1
|
|
23
|
+
from hotdata.models.column_profile_detail_one_of2 import ColumnProfileDetailOneOf2
|
|
24
|
+
from hotdata.models.column_profile_detail_one_of3 import ColumnProfileDetailOneOf3
|
|
25
|
+
from hotdata.models.column_profile_detail_one_of4 import ColumnProfileDetailOneOf4
|
|
26
|
+
from pydantic import StrictStr, Field
|
|
27
|
+
from typing import Union, List, Set, Optional, Dict
|
|
28
|
+
from typing_extensions import Literal, Self
|
|
29
|
+
|
|
30
|
+
COLUMNPROFILEDETAIL_ONE_OF_SCHEMAS = ["ColumnProfileDetailOneOf", "ColumnProfileDetailOneOf1", "ColumnProfileDetailOneOf2", "ColumnProfileDetailOneOf3", "ColumnProfileDetailOneOf4"]
|
|
31
|
+
|
|
32
|
+
class ColumnProfileDetail(BaseModel):
|
|
33
|
+
"""
|
|
34
|
+
ColumnProfileDetail
|
|
35
|
+
"""
|
|
36
|
+
# data type: ColumnProfileDetailOneOf
|
|
37
|
+
oneof_schema_1_validator: Optional[ColumnProfileDetailOneOf] = None
|
|
38
|
+
# data type: ColumnProfileDetailOneOf1
|
|
39
|
+
oneof_schema_2_validator: Optional[ColumnProfileDetailOneOf1] = None
|
|
40
|
+
# data type: ColumnProfileDetailOneOf2
|
|
41
|
+
oneof_schema_3_validator: Optional[ColumnProfileDetailOneOf2] = None
|
|
42
|
+
# data type: ColumnProfileDetailOneOf3
|
|
43
|
+
oneof_schema_4_validator: Optional[ColumnProfileDetailOneOf3] = None
|
|
44
|
+
# data type: ColumnProfileDetailOneOf4
|
|
45
|
+
oneof_schema_5_validator: Optional[ColumnProfileDetailOneOf4] = None
|
|
46
|
+
actual_instance: Optional[Union[ColumnProfileDetailOneOf, ColumnProfileDetailOneOf1, ColumnProfileDetailOneOf2, ColumnProfileDetailOneOf3, ColumnProfileDetailOneOf4]] = None
|
|
47
|
+
one_of_schemas: Set[str] = { "ColumnProfileDetailOneOf", "ColumnProfileDetailOneOf1", "ColumnProfileDetailOneOf2", "ColumnProfileDetailOneOf3", "ColumnProfileDetailOneOf4" }
|
|
48
|
+
|
|
49
|
+
model_config = ConfigDict(
|
|
50
|
+
validate_assignment=True,
|
|
51
|
+
protected_namespaces=(),
|
|
52
|
+
)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
def __init__(self, *args, **kwargs) -> None:
|
|
56
|
+
if args:
|
|
57
|
+
if len(args) > 1:
|
|
58
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
59
|
+
if kwargs:
|
|
60
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
61
|
+
super().__init__(actual_instance=args[0])
|
|
62
|
+
else:
|
|
63
|
+
super().__init__(**kwargs)
|
|
64
|
+
|
|
65
|
+
@field_validator('actual_instance')
|
|
66
|
+
def actual_instance_must_validate_oneof(cls, v):
|
|
67
|
+
instance = ColumnProfileDetail.model_construct()
|
|
68
|
+
error_messages = []
|
|
69
|
+
match = 0
|
|
70
|
+
# validate data type: ColumnProfileDetailOneOf
|
|
71
|
+
if not isinstance(v, ColumnProfileDetailOneOf):
|
|
72
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ColumnProfileDetailOneOf`")
|
|
73
|
+
else:
|
|
74
|
+
match += 1
|
|
75
|
+
# validate data type: ColumnProfileDetailOneOf1
|
|
76
|
+
if not isinstance(v, ColumnProfileDetailOneOf1):
|
|
77
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ColumnProfileDetailOneOf1`")
|
|
78
|
+
else:
|
|
79
|
+
match += 1
|
|
80
|
+
# validate data type: ColumnProfileDetailOneOf2
|
|
81
|
+
if not isinstance(v, ColumnProfileDetailOneOf2):
|
|
82
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ColumnProfileDetailOneOf2`")
|
|
83
|
+
else:
|
|
84
|
+
match += 1
|
|
85
|
+
# validate data type: ColumnProfileDetailOneOf3
|
|
86
|
+
if not isinstance(v, ColumnProfileDetailOneOf3):
|
|
87
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ColumnProfileDetailOneOf3`")
|
|
88
|
+
else:
|
|
89
|
+
match += 1
|
|
90
|
+
# validate data type: ColumnProfileDetailOneOf4
|
|
91
|
+
if not isinstance(v, ColumnProfileDetailOneOf4):
|
|
92
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ColumnProfileDetailOneOf4`")
|
|
93
|
+
else:
|
|
94
|
+
match += 1
|
|
95
|
+
if match > 1:
|
|
96
|
+
# more than 1 match
|
|
97
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in ColumnProfileDetail with oneOf schemas: ColumnProfileDetailOneOf, ColumnProfileDetailOneOf1, ColumnProfileDetailOneOf2, ColumnProfileDetailOneOf3, ColumnProfileDetailOneOf4. Details: " + ", ".join(error_messages))
|
|
98
|
+
elif match == 0:
|
|
99
|
+
# no match
|
|
100
|
+
raise ValueError("No match found when setting `actual_instance` in ColumnProfileDetail with oneOf schemas: ColumnProfileDetailOneOf, ColumnProfileDetailOneOf1, ColumnProfileDetailOneOf2, ColumnProfileDetailOneOf3, ColumnProfileDetailOneOf4. Details: " + ", ".join(error_messages))
|
|
101
|
+
else:
|
|
102
|
+
return v
|
|
103
|
+
|
|
104
|
+
@classmethod
|
|
105
|
+
def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self:
|
|
106
|
+
return cls.from_json(json.dumps(obj))
|
|
107
|
+
|
|
108
|
+
@classmethod
|
|
109
|
+
def from_json(cls, json_str: str) -> Self:
|
|
110
|
+
"""Returns the object represented by the json string"""
|
|
111
|
+
instance = cls.model_construct()
|
|
112
|
+
error_messages = []
|
|
113
|
+
match = 0
|
|
114
|
+
|
|
115
|
+
# deserialize data into ColumnProfileDetailOneOf
|
|
116
|
+
try:
|
|
117
|
+
instance.actual_instance = ColumnProfileDetailOneOf.from_json(json_str)
|
|
118
|
+
match += 1
|
|
119
|
+
except (ValidationError, ValueError) as e:
|
|
120
|
+
error_messages.append(str(e))
|
|
121
|
+
# deserialize data into ColumnProfileDetailOneOf1
|
|
122
|
+
try:
|
|
123
|
+
instance.actual_instance = ColumnProfileDetailOneOf1.from_json(json_str)
|
|
124
|
+
match += 1
|
|
125
|
+
except (ValidationError, ValueError) as e:
|
|
126
|
+
error_messages.append(str(e))
|
|
127
|
+
# deserialize data into ColumnProfileDetailOneOf2
|
|
128
|
+
try:
|
|
129
|
+
instance.actual_instance = ColumnProfileDetailOneOf2.from_json(json_str)
|
|
130
|
+
match += 1
|
|
131
|
+
except (ValidationError, ValueError) as e:
|
|
132
|
+
error_messages.append(str(e))
|
|
133
|
+
# deserialize data into ColumnProfileDetailOneOf3
|
|
134
|
+
try:
|
|
135
|
+
instance.actual_instance = ColumnProfileDetailOneOf3.from_json(json_str)
|
|
136
|
+
match += 1
|
|
137
|
+
except (ValidationError, ValueError) as e:
|
|
138
|
+
error_messages.append(str(e))
|
|
139
|
+
# deserialize data into ColumnProfileDetailOneOf4
|
|
140
|
+
try:
|
|
141
|
+
instance.actual_instance = ColumnProfileDetailOneOf4.from_json(json_str)
|
|
142
|
+
match += 1
|
|
143
|
+
except (ValidationError, ValueError) as e:
|
|
144
|
+
error_messages.append(str(e))
|
|
145
|
+
|
|
146
|
+
if match > 1:
|
|
147
|
+
# more than 1 match
|
|
148
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into ColumnProfileDetail with oneOf schemas: ColumnProfileDetailOneOf, ColumnProfileDetailOneOf1, ColumnProfileDetailOneOf2, ColumnProfileDetailOneOf3, ColumnProfileDetailOneOf4. Details: " + ", ".join(error_messages))
|
|
149
|
+
elif match == 0:
|
|
150
|
+
# no match
|
|
151
|
+
raise ValueError("No match found when deserializing the JSON string into ColumnProfileDetail with oneOf schemas: ColumnProfileDetailOneOf, ColumnProfileDetailOneOf1, ColumnProfileDetailOneOf2, ColumnProfileDetailOneOf3, ColumnProfileDetailOneOf4. Details: " + ", ".join(error_messages))
|
|
152
|
+
else:
|
|
153
|
+
return instance
|
|
154
|
+
|
|
155
|
+
def to_json(self) -> str:
|
|
156
|
+
"""Returns the JSON representation of the actual instance"""
|
|
157
|
+
if self.actual_instance is None:
|
|
158
|
+
return "null"
|
|
159
|
+
|
|
160
|
+
if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json):
|
|
161
|
+
return self.actual_instance.to_json()
|
|
162
|
+
else:
|
|
163
|
+
return json.dumps(self.actual_instance)
|
|
164
|
+
|
|
165
|
+
def to_dict(self) -> Optional[Union[Dict[str, Any], ColumnProfileDetailOneOf, ColumnProfileDetailOneOf1, ColumnProfileDetailOneOf2, ColumnProfileDetailOneOf3, ColumnProfileDetailOneOf4]]:
|
|
166
|
+
"""Returns the dict representation of the actual instance"""
|
|
167
|
+
if self.actual_instance is None:
|
|
168
|
+
return None
|
|
169
|
+
|
|
170
|
+
if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict):
|
|
171
|
+
return self.actual_instance.to_dict()
|
|
172
|
+
else:
|
|
173
|
+
# primitive type
|
|
174
|
+
return self.actual_instance
|
|
175
|
+
|
|
176
|
+
def to_str(self) -> str:
|
|
177
|
+
"""Returns the string representation of the actual instance"""
|
|
178
|
+
return pprint.pformat(self.model_dump())
|
|
179
|
+
|
|
180
|
+
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hotdata API
|
|
5
|
+
|
|
6
|
+
Powerful data platform API for datasets, queries, and analytics.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: developers@hotdata.dev
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from hotdata.models.category_value_info import CategoryValueInfo
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class ColumnProfileDetailOneOf(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
ColumnProfileDetailOneOf
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
values: List[CategoryValueInfo] = Field(description="Distinct values with their counts, ordered by count descending")
|
|
32
|
+
type: StrictStr
|
|
33
|
+
__properties: ClassVar[List[str]] = ["values", "type"]
|
|
34
|
+
|
|
35
|
+
@field_validator('type')
|
|
36
|
+
def type_validate_enum(cls, value):
|
|
37
|
+
"""Validates the enum"""
|
|
38
|
+
if value not in set(['categorical']):
|
|
39
|
+
raise ValueError("must be one of enum values ('categorical')")
|
|
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 ColumnProfileDetailOneOf 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 values (list)
|
|
82
|
+
_items = []
|
|
83
|
+
if self.values:
|
|
84
|
+
for _item_values in self.values:
|
|
85
|
+
if _item_values:
|
|
86
|
+
_items.append(_item_values.to_dict())
|
|
87
|
+
_dict['values'] = _items
|
|
88
|
+
return _dict
|
|
89
|
+
|
|
90
|
+
@classmethod
|
|
91
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
92
|
+
"""Create an instance of ColumnProfileDetailOneOf 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
|
+
"values": [CategoryValueInfo.from_dict(_item) for _item in obj["values"]] if obj.get("values") is not None else None,
|
|
101
|
+
"type": obj.get("type")
|
|
102
|
+
})
|
|
103
|
+
return _obj
|
|
104
|
+
|
|
105
|
+
|
|
@@ -0,0 +1,102 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hotdata API
|
|
5
|
+
|
|
6
|
+
Powerful data platform API for datasets, queries, and analytics.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: developers@hotdata.dev
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Union
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class ColumnProfileDetailOneOf1(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
ColumnProfileDetailOneOf1
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
avg_length: Union[StrictFloat, StrictInt] = Field(description="Average string length")
|
|
32
|
+
max_length: Annotated[int, Field(strict=True, ge=0)] = Field(description="Longest string length in the column")
|
|
33
|
+
min_length: Annotated[int, Field(strict=True, ge=0)] = Field(description="Shortest string length in the column")
|
|
34
|
+
type: StrictStr
|
|
35
|
+
__properties: ClassVar[List[str]] = ["avg_length", "max_length", "min_length", "type"]
|
|
36
|
+
|
|
37
|
+
@field_validator('type')
|
|
38
|
+
def type_validate_enum(cls, value):
|
|
39
|
+
"""Validates the enum"""
|
|
40
|
+
if value not in set(['text']):
|
|
41
|
+
raise ValueError("must be one of enum values ('text')")
|
|
42
|
+
return value
|
|
43
|
+
|
|
44
|
+
model_config = ConfigDict(
|
|
45
|
+
populate_by_name=True,
|
|
46
|
+
validate_assignment=True,
|
|
47
|
+
protected_namespaces=(),
|
|
48
|
+
)
|
|
49
|
+
|
|
50
|
+
|
|
51
|
+
def to_str(self) -> str:
|
|
52
|
+
"""Returns the string representation of the model using alias"""
|
|
53
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
54
|
+
|
|
55
|
+
def to_json(self) -> str:
|
|
56
|
+
"""Returns the JSON representation of the model using alias"""
|
|
57
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
58
|
+
return json.dumps(self.to_dict())
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
62
|
+
"""Create an instance of ColumnProfileDetailOneOf1 from a JSON string"""
|
|
63
|
+
return cls.from_dict(json.loads(json_str))
|
|
64
|
+
|
|
65
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
66
|
+
"""Return the dictionary representation of the model using alias.
|
|
67
|
+
|
|
68
|
+
This has the following differences from calling pydantic's
|
|
69
|
+
`self.model_dump(by_alias=True)`:
|
|
70
|
+
|
|
71
|
+
* `None` is only added to the output dict for nullable fields that
|
|
72
|
+
were set at model initialization. Other fields with value `None`
|
|
73
|
+
are ignored.
|
|
74
|
+
"""
|
|
75
|
+
excluded_fields: Set[str] = set([
|
|
76
|
+
])
|
|
77
|
+
|
|
78
|
+
_dict = self.model_dump(
|
|
79
|
+
by_alias=True,
|
|
80
|
+
exclude=excluded_fields,
|
|
81
|
+
exclude_none=True,
|
|
82
|
+
)
|
|
83
|
+
return _dict
|
|
84
|
+
|
|
85
|
+
@classmethod
|
|
86
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
87
|
+
"""Create an instance of ColumnProfileDetailOneOf1 from a dict"""
|
|
88
|
+
if obj is None:
|
|
89
|
+
return None
|
|
90
|
+
|
|
91
|
+
if not isinstance(obj, dict):
|
|
92
|
+
return cls.model_validate(obj)
|
|
93
|
+
|
|
94
|
+
_obj = cls.model_validate({
|
|
95
|
+
"avg_length": obj.get("avg_length"),
|
|
96
|
+
"max_length": obj.get("max_length"),
|
|
97
|
+
"min_length": obj.get("min_length"),
|
|
98
|
+
"type": obj.get("type")
|
|
99
|
+
})
|
|
100
|
+
return _obj
|
|
101
|
+
|
|
102
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hotdata API
|
|
5
|
+
|
|
6
|
+
Powerful data platform API for datasets, queries, and analytics.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: developers@hotdata.dev
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictFloat, StrictInt, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Union
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class ColumnProfileDetailOneOf2(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ColumnProfileDetailOneOf2
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
max: StrictStr = Field(description="Maximum value (string to preserve precision for large integers and decimals)")
|
|
31
|
+
mean: Union[StrictFloat, StrictInt] = Field(description="Arithmetic mean")
|
|
32
|
+
min: StrictStr = Field(description="Minimum value (string to preserve precision for large integers and decimals)")
|
|
33
|
+
type: StrictStr
|
|
34
|
+
__properties: ClassVar[List[str]] = ["max", "mean", "min", "type"]
|
|
35
|
+
|
|
36
|
+
@field_validator('type')
|
|
37
|
+
def type_validate_enum(cls, value):
|
|
38
|
+
"""Validates the enum"""
|
|
39
|
+
if value not in set(['numeric']):
|
|
40
|
+
raise ValueError("must be one of enum values ('numeric')")
|
|
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 ColumnProfileDetailOneOf2 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 ColumnProfileDetailOneOf2 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
|
+
"max": obj.get("max"),
|
|
95
|
+
"mean": obj.get("mean"),
|
|
96
|
+
"min": obj.get("min"),
|
|
97
|
+
"type": obj.get("type")
|
|
98
|
+
})
|
|
99
|
+
return _obj
|
|
100
|
+
|
|
101
|
+
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hotdata API
|
|
5
|
+
|
|
6
|
+
Powerful data platform API for datasets, queries, and analytics.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: developers@hotdata.dev
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class ColumnProfileDetailOneOf3(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
ColumnProfileDetailOneOf3
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
max: StrictStr = Field(description="Latest value as ISO-8601 string")
|
|
31
|
+
min: StrictStr = Field(description="Earliest value as ISO-8601 string")
|
|
32
|
+
type: StrictStr
|
|
33
|
+
__properties: ClassVar[List[str]] = ["max", "min", "type"]
|
|
34
|
+
|
|
35
|
+
@field_validator('type')
|
|
36
|
+
def type_validate_enum(cls, value):
|
|
37
|
+
"""Validates the enum"""
|
|
38
|
+
if value not in set(['temporal']):
|
|
39
|
+
raise ValueError("must be one of enum values ('temporal')")
|
|
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 ColumnProfileDetailOneOf3 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
|
+
return _dict
|
|
82
|
+
|
|
83
|
+
@classmethod
|
|
84
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
85
|
+
"""Create an instance of ColumnProfileDetailOneOf3 from a dict"""
|
|
86
|
+
if obj is None:
|
|
87
|
+
return None
|
|
88
|
+
|
|
89
|
+
if not isinstance(obj, dict):
|
|
90
|
+
return cls.model_validate(obj)
|
|
91
|
+
|
|
92
|
+
_obj = cls.model_validate({
|
|
93
|
+
"max": obj.get("max"),
|
|
94
|
+
"min": obj.get("min"),
|
|
95
|
+
"type": obj.get("type")
|
|
96
|
+
})
|
|
97
|
+
return _obj
|
|
98
|
+
|
|
99
|
+
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Hotdata API
|
|
5
|
+
|
|
6
|
+
Powerful data platform API for datasets, queries, and analytics.
|
|
7
|
+
|
|
8
|
+
The version of the OpenAPI document: 1.0.0
|
|
9
|
+
Contact: developers@hotdata.dev
|
|
10
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
11
|
+
|
|
12
|
+
Do not edit the class manually.
|
|
13
|
+
""" # noqa: E501
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
from __future__ import annotations
|
|
17
|
+
import pprint
|
|
18
|
+
import re # noqa: F401
|
|
19
|
+
import json
|
|
20
|
+
|
|
21
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictStr, field_validator
|
|
22
|
+
from typing import Any, ClassVar, Dict, List
|
|
23
|
+
from typing_extensions import Annotated
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class ColumnProfileDetailOneOf4(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
ColumnProfileDetailOneOf4
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
false_count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of false values")
|
|
32
|
+
true_count: Annotated[int, Field(strict=True, ge=0)] = Field(description="Number of true values")
|
|
33
|
+
type: StrictStr
|
|
34
|
+
__properties: ClassVar[List[str]] = ["false_count", "true_count", "type"]
|
|
35
|
+
|
|
36
|
+
@field_validator('type')
|
|
37
|
+
def type_validate_enum(cls, value):
|
|
38
|
+
"""Validates the enum"""
|
|
39
|
+
if value not in set(['boolean']):
|
|
40
|
+
raise ValueError("must be one of enum values ('boolean')")
|
|
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 ColumnProfileDetailOneOf4 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 ColumnProfileDetailOneOf4 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
|
+
"false_count": obj.get("false_count"),
|
|
95
|
+
"true_count": obj.get("true_count"),
|
|
96
|
+
"type": obj.get("type")
|
|
97
|
+
})
|
|
98
|
+
return _obj
|
|
99
|
+
|
|
100
|
+
|