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,176 @@
|
|
|
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 datetime import datetime
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr
|
|
23
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class QueryRunInfo(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Single query run for listing
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
completed_at: Optional[datetime] = None
|
|
32
|
+
created_at: datetime
|
|
33
|
+
error_message: Optional[StrictStr] = None
|
|
34
|
+
execution_time_ms: Optional[StrictInt] = None
|
|
35
|
+
id: StrictStr
|
|
36
|
+
result_id: Optional[StrictStr] = None
|
|
37
|
+
row_count: Optional[StrictInt] = None
|
|
38
|
+
saved_query_id: Optional[StrictStr] = None
|
|
39
|
+
saved_query_version: Optional[StrictInt] = None
|
|
40
|
+
server_processing_ms: Optional[StrictInt] = Field(default=None, description="Total server-side processing time for this query (milliseconds). Measured from query start to result ready. Includes SQL execution, task spawning, and result preparation. Does not include network transit. Populated for all completed query runs (sync and async).")
|
|
41
|
+
snapshot_id: StrictStr
|
|
42
|
+
sql_hash: StrictStr
|
|
43
|
+
sql_text: StrictStr
|
|
44
|
+
status: StrictStr
|
|
45
|
+
trace_id: Optional[StrictStr] = None
|
|
46
|
+
user_public_id: Optional[StrictStr] = Field(default=None, description="Caller identity derived from the Authorization Bearer token (SHA-256 hash). Format: `user_{first_10_hex_chars}`. Mirrors the webapp's `user_public_id_from_auth_header`.")
|
|
47
|
+
warning_message: Optional[StrictStr] = None
|
|
48
|
+
__properties: ClassVar[List[str]] = ["completed_at", "created_at", "error_message", "execution_time_ms", "id", "result_id", "row_count", "saved_query_id", "saved_query_version", "server_processing_ms", "snapshot_id", "sql_hash", "sql_text", "status", "trace_id", "user_public_id", "warning_message"]
|
|
49
|
+
|
|
50
|
+
model_config = ConfigDict(
|
|
51
|
+
populate_by_name=True,
|
|
52
|
+
validate_assignment=True,
|
|
53
|
+
protected_namespaces=(),
|
|
54
|
+
)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
def to_str(self) -> str:
|
|
58
|
+
"""Returns the string representation of the model using alias"""
|
|
59
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
60
|
+
|
|
61
|
+
def to_json(self) -> str:
|
|
62
|
+
"""Returns the JSON representation of the model using alias"""
|
|
63
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
64
|
+
return json.dumps(self.to_dict())
|
|
65
|
+
|
|
66
|
+
@classmethod
|
|
67
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
68
|
+
"""Create an instance of QueryRunInfo from a JSON string"""
|
|
69
|
+
return cls.from_dict(json.loads(json_str))
|
|
70
|
+
|
|
71
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
72
|
+
"""Return the dictionary representation of the model using alias.
|
|
73
|
+
|
|
74
|
+
This has the following differences from calling pydantic's
|
|
75
|
+
`self.model_dump(by_alias=True)`:
|
|
76
|
+
|
|
77
|
+
* `None` is only added to the output dict for nullable fields that
|
|
78
|
+
were set at model initialization. Other fields with value `None`
|
|
79
|
+
are ignored.
|
|
80
|
+
"""
|
|
81
|
+
excluded_fields: Set[str] = set([
|
|
82
|
+
])
|
|
83
|
+
|
|
84
|
+
_dict = self.model_dump(
|
|
85
|
+
by_alias=True,
|
|
86
|
+
exclude=excluded_fields,
|
|
87
|
+
exclude_none=True,
|
|
88
|
+
)
|
|
89
|
+
# set to None if completed_at (nullable) is None
|
|
90
|
+
# and model_fields_set contains the field
|
|
91
|
+
if self.completed_at is None and "completed_at" in self.model_fields_set:
|
|
92
|
+
_dict['completed_at'] = None
|
|
93
|
+
|
|
94
|
+
# set to None if error_message (nullable) is None
|
|
95
|
+
# and model_fields_set contains the field
|
|
96
|
+
if self.error_message is None and "error_message" in self.model_fields_set:
|
|
97
|
+
_dict['error_message'] = None
|
|
98
|
+
|
|
99
|
+
# set to None if execution_time_ms (nullable) is None
|
|
100
|
+
# and model_fields_set contains the field
|
|
101
|
+
if self.execution_time_ms is None and "execution_time_ms" in self.model_fields_set:
|
|
102
|
+
_dict['execution_time_ms'] = None
|
|
103
|
+
|
|
104
|
+
# set to None if result_id (nullable) is None
|
|
105
|
+
# and model_fields_set contains the field
|
|
106
|
+
if self.result_id is None and "result_id" in self.model_fields_set:
|
|
107
|
+
_dict['result_id'] = None
|
|
108
|
+
|
|
109
|
+
# set to None if row_count (nullable) is None
|
|
110
|
+
# and model_fields_set contains the field
|
|
111
|
+
if self.row_count is None and "row_count" in self.model_fields_set:
|
|
112
|
+
_dict['row_count'] = None
|
|
113
|
+
|
|
114
|
+
# set to None if saved_query_id (nullable) is None
|
|
115
|
+
# and model_fields_set contains the field
|
|
116
|
+
if self.saved_query_id is None and "saved_query_id" in self.model_fields_set:
|
|
117
|
+
_dict['saved_query_id'] = None
|
|
118
|
+
|
|
119
|
+
# set to None if saved_query_version (nullable) is None
|
|
120
|
+
# and model_fields_set contains the field
|
|
121
|
+
if self.saved_query_version is None and "saved_query_version" in self.model_fields_set:
|
|
122
|
+
_dict['saved_query_version'] = None
|
|
123
|
+
|
|
124
|
+
# set to None if server_processing_ms (nullable) is None
|
|
125
|
+
# and model_fields_set contains the field
|
|
126
|
+
if self.server_processing_ms is None and "server_processing_ms" in self.model_fields_set:
|
|
127
|
+
_dict['server_processing_ms'] = None
|
|
128
|
+
|
|
129
|
+
# set to None if trace_id (nullable) is None
|
|
130
|
+
# and model_fields_set contains the field
|
|
131
|
+
if self.trace_id is None and "trace_id" in self.model_fields_set:
|
|
132
|
+
_dict['trace_id'] = None
|
|
133
|
+
|
|
134
|
+
# set to None if user_public_id (nullable) is None
|
|
135
|
+
# and model_fields_set contains the field
|
|
136
|
+
if self.user_public_id is None and "user_public_id" in self.model_fields_set:
|
|
137
|
+
_dict['user_public_id'] = None
|
|
138
|
+
|
|
139
|
+
# set to None if warning_message (nullable) is None
|
|
140
|
+
# and model_fields_set contains the field
|
|
141
|
+
if self.warning_message is None and "warning_message" in self.model_fields_set:
|
|
142
|
+
_dict['warning_message'] = None
|
|
143
|
+
|
|
144
|
+
return _dict
|
|
145
|
+
|
|
146
|
+
@classmethod
|
|
147
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
148
|
+
"""Create an instance of QueryRunInfo from a dict"""
|
|
149
|
+
if obj is None:
|
|
150
|
+
return None
|
|
151
|
+
|
|
152
|
+
if not isinstance(obj, dict):
|
|
153
|
+
return cls.model_validate(obj)
|
|
154
|
+
|
|
155
|
+
_obj = cls.model_validate({
|
|
156
|
+
"completed_at": obj.get("completed_at"),
|
|
157
|
+
"created_at": obj.get("created_at"),
|
|
158
|
+
"error_message": obj.get("error_message"),
|
|
159
|
+
"execution_time_ms": obj.get("execution_time_ms"),
|
|
160
|
+
"id": obj.get("id"),
|
|
161
|
+
"result_id": obj.get("result_id"),
|
|
162
|
+
"row_count": obj.get("row_count"),
|
|
163
|
+
"saved_query_id": obj.get("saved_query_id"),
|
|
164
|
+
"saved_query_version": obj.get("saved_query_version"),
|
|
165
|
+
"server_processing_ms": obj.get("server_processing_ms"),
|
|
166
|
+
"snapshot_id": obj.get("snapshot_id"),
|
|
167
|
+
"sql_hash": obj.get("sql_hash"),
|
|
168
|
+
"sql_text": obj.get("sql_text"),
|
|
169
|
+
"status": obj.get("status"),
|
|
170
|
+
"trace_id": obj.get("trace_id"),
|
|
171
|
+
"user_public_id": obj.get("user_public_id"),
|
|
172
|
+
"warning_message": obj.get("warning_message")
|
|
173
|
+
})
|
|
174
|
+
return _obj
|
|
175
|
+
|
|
176
|
+
|
|
@@ -0,0 +1,95 @@
|
|
|
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 datetime import datetime
|
|
22
|
+
from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr
|
|
23
|
+
from typing import Any, ClassVar, Dict, List
|
|
24
|
+
from typing import Optional, Set
|
|
25
|
+
from typing_extensions import Self
|
|
26
|
+
|
|
27
|
+
class RefreshDatasetResponse(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
Response body for POST /v1/datasets/{id}/refresh
|
|
30
|
+
""" # noqa: E501
|
|
31
|
+
created_at: datetime
|
|
32
|
+
id: StrictStr
|
|
33
|
+
status: StrictStr
|
|
34
|
+
version: StrictInt
|
|
35
|
+
__properties: ClassVar[List[str]] = ["created_at", "id", "status", "version"]
|
|
36
|
+
|
|
37
|
+
model_config = ConfigDict(
|
|
38
|
+
populate_by_name=True,
|
|
39
|
+
validate_assignment=True,
|
|
40
|
+
protected_namespaces=(),
|
|
41
|
+
)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
def to_str(self) -> str:
|
|
45
|
+
"""Returns the string representation of the model using alias"""
|
|
46
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
47
|
+
|
|
48
|
+
def to_json(self) -> str:
|
|
49
|
+
"""Returns the JSON representation of the model using alias"""
|
|
50
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
51
|
+
return json.dumps(self.to_dict())
|
|
52
|
+
|
|
53
|
+
@classmethod
|
|
54
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
55
|
+
"""Create an instance of RefreshDatasetResponse from a JSON string"""
|
|
56
|
+
return cls.from_dict(json.loads(json_str))
|
|
57
|
+
|
|
58
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
59
|
+
"""Return the dictionary representation of the model using alias.
|
|
60
|
+
|
|
61
|
+
This has the following differences from calling pydantic's
|
|
62
|
+
`self.model_dump(by_alias=True)`:
|
|
63
|
+
|
|
64
|
+
* `None` is only added to the output dict for nullable fields that
|
|
65
|
+
were set at model initialization. Other fields with value `None`
|
|
66
|
+
are ignored.
|
|
67
|
+
"""
|
|
68
|
+
excluded_fields: Set[str] = set([
|
|
69
|
+
])
|
|
70
|
+
|
|
71
|
+
_dict = self.model_dump(
|
|
72
|
+
by_alias=True,
|
|
73
|
+
exclude=excluded_fields,
|
|
74
|
+
exclude_none=True,
|
|
75
|
+
)
|
|
76
|
+
return _dict
|
|
77
|
+
|
|
78
|
+
@classmethod
|
|
79
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
80
|
+
"""Create an instance of RefreshDatasetResponse from a dict"""
|
|
81
|
+
if obj is None:
|
|
82
|
+
return None
|
|
83
|
+
|
|
84
|
+
if not isinstance(obj, dict):
|
|
85
|
+
return cls.model_validate(obj)
|
|
86
|
+
|
|
87
|
+
_obj = cls.model_validate({
|
|
88
|
+
"created_at": obj.get("created_at"),
|
|
89
|
+
"id": obj.get("id"),
|
|
90
|
+
"status": obj.get("status"),
|
|
91
|
+
"version": obj.get("version")
|
|
92
|
+
})
|
|
93
|
+
return _obj
|
|
94
|
+
|
|
95
|
+
|
|
@@ -0,0 +1,120 @@
|
|
|
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, StrictBool, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class RefreshRequest(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
Request body for POST /refresh
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
var_async: Optional[StrictBool] = Field(default=None, description="When true, submit the refresh as a background job and return immediately with a job ID for status polling. Only supported for data refresh operations.", alias="async")
|
|
31
|
+
connection_id: Optional[StrictStr] = None
|
|
32
|
+
data: Optional[StrictBool] = None
|
|
33
|
+
dataset_id: Optional[StrictStr] = None
|
|
34
|
+
include_uncached: Optional[StrictBool] = Field(default=None, description="Controls whether uncached tables are included in connection-wide data refresh. - `false` (default): Only refresh tables that already have cached data. This is the common case for keeping existing data up-to-date. - `true`: Also sync tables that haven't been cached yet, essentially performing an initial sync for any new tables discovered since the connection was created. This field only applies to connection-wide data refresh (when `data=true` and `table_name` is not specified). It has no effect on single-table refresh or schema refresh operations.")
|
|
35
|
+
schema_name: Optional[StrictStr] = None
|
|
36
|
+
table_name: Optional[StrictStr] = None
|
|
37
|
+
__properties: ClassVar[List[str]] = ["async", "connection_id", "data", "dataset_id", "include_uncached", "schema_name", "table_name"]
|
|
38
|
+
|
|
39
|
+
model_config = ConfigDict(
|
|
40
|
+
populate_by_name=True,
|
|
41
|
+
validate_assignment=True,
|
|
42
|
+
protected_namespaces=(),
|
|
43
|
+
)
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
def to_str(self) -> str:
|
|
47
|
+
"""Returns the string representation of the model using alias"""
|
|
48
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
49
|
+
|
|
50
|
+
def to_json(self) -> str:
|
|
51
|
+
"""Returns the JSON representation of the model using alias"""
|
|
52
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
53
|
+
return json.dumps(self.to_dict())
|
|
54
|
+
|
|
55
|
+
@classmethod
|
|
56
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
57
|
+
"""Create an instance of RefreshRequest from a JSON string"""
|
|
58
|
+
return cls.from_dict(json.loads(json_str))
|
|
59
|
+
|
|
60
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
61
|
+
"""Return the dictionary representation of the model using alias.
|
|
62
|
+
|
|
63
|
+
This has the following differences from calling pydantic's
|
|
64
|
+
`self.model_dump(by_alias=True)`:
|
|
65
|
+
|
|
66
|
+
* `None` is only added to the output dict for nullable fields that
|
|
67
|
+
were set at model initialization. Other fields with value `None`
|
|
68
|
+
are ignored.
|
|
69
|
+
"""
|
|
70
|
+
excluded_fields: Set[str] = set([
|
|
71
|
+
])
|
|
72
|
+
|
|
73
|
+
_dict = self.model_dump(
|
|
74
|
+
by_alias=True,
|
|
75
|
+
exclude=excluded_fields,
|
|
76
|
+
exclude_none=True,
|
|
77
|
+
)
|
|
78
|
+
# set to None if connection_id (nullable) is None
|
|
79
|
+
# and model_fields_set contains the field
|
|
80
|
+
if self.connection_id is None and "connection_id" in self.model_fields_set:
|
|
81
|
+
_dict['connection_id'] = None
|
|
82
|
+
|
|
83
|
+
# set to None if dataset_id (nullable) is None
|
|
84
|
+
# and model_fields_set contains the field
|
|
85
|
+
if self.dataset_id is None and "dataset_id" in self.model_fields_set:
|
|
86
|
+
_dict['dataset_id'] = None
|
|
87
|
+
|
|
88
|
+
# set to None if schema_name (nullable) is None
|
|
89
|
+
# and model_fields_set contains the field
|
|
90
|
+
if self.schema_name is None and "schema_name" in self.model_fields_set:
|
|
91
|
+
_dict['schema_name'] = None
|
|
92
|
+
|
|
93
|
+
# set to None if table_name (nullable) is None
|
|
94
|
+
# and model_fields_set contains the field
|
|
95
|
+
if self.table_name is None and "table_name" in self.model_fields_set:
|
|
96
|
+
_dict['table_name'] = None
|
|
97
|
+
|
|
98
|
+
return _dict
|
|
99
|
+
|
|
100
|
+
@classmethod
|
|
101
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
102
|
+
"""Create an instance of RefreshRequest from a dict"""
|
|
103
|
+
if obj is None:
|
|
104
|
+
return None
|
|
105
|
+
|
|
106
|
+
if not isinstance(obj, dict):
|
|
107
|
+
return cls.model_validate(obj)
|
|
108
|
+
|
|
109
|
+
_obj = cls.model_validate({
|
|
110
|
+
"async": obj.get("async"),
|
|
111
|
+
"connection_id": obj.get("connection_id"),
|
|
112
|
+
"data": obj.get("data"),
|
|
113
|
+
"dataset_id": obj.get("dataset_id"),
|
|
114
|
+
"include_uncached": obj.get("include_uncached"),
|
|
115
|
+
"schema_name": obj.get("schema_name"),
|
|
116
|
+
"table_name": obj.get("table_name")
|
|
117
|
+
})
|
|
118
|
+
return _obj
|
|
119
|
+
|
|
120
|
+
|
|
@@ -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.connection_refresh_result import ConnectionRefreshResult
|
|
22
|
+
from hotdata.models.refresh_dataset_response import RefreshDatasetResponse
|
|
23
|
+
from hotdata.models.schema_refresh_result import SchemaRefreshResult
|
|
24
|
+
from hotdata.models.submit_job_response import SubmitJobResponse
|
|
25
|
+
from hotdata.models.table_refresh_result import TableRefreshResult
|
|
26
|
+
from pydantic import StrictStr, Field
|
|
27
|
+
from typing import Union, List, Set, Optional, Dict
|
|
28
|
+
from typing_extensions import Literal, Self
|
|
29
|
+
|
|
30
|
+
REFRESHRESPONSE_ONE_OF_SCHEMAS = ["ConnectionRefreshResult", "RefreshDatasetResponse", "SchemaRefreshResult", "SubmitJobResponse", "TableRefreshResult"]
|
|
31
|
+
|
|
32
|
+
class RefreshResponse(BaseModel):
|
|
33
|
+
"""
|
|
34
|
+
Unified response type for refresh operations
|
|
35
|
+
"""
|
|
36
|
+
# data type: SchemaRefreshResult
|
|
37
|
+
oneof_schema_1_validator: Optional[SchemaRefreshResult] = None
|
|
38
|
+
# data type: TableRefreshResult
|
|
39
|
+
oneof_schema_2_validator: Optional[TableRefreshResult] = None
|
|
40
|
+
# data type: ConnectionRefreshResult
|
|
41
|
+
oneof_schema_3_validator: Optional[ConnectionRefreshResult] = None
|
|
42
|
+
# data type: RefreshDatasetResponse
|
|
43
|
+
oneof_schema_4_validator: Optional[RefreshDatasetResponse] = None
|
|
44
|
+
# data type: SubmitJobResponse
|
|
45
|
+
oneof_schema_5_validator: Optional[SubmitJobResponse] = None
|
|
46
|
+
actual_instance: Optional[Union[ConnectionRefreshResult, RefreshDatasetResponse, SchemaRefreshResult, SubmitJobResponse, TableRefreshResult]] = None
|
|
47
|
+
one_of_schemas: Set[str] = { "ConnectionRefreshResult", "RefreshDatasetResponse", "SchemaRefreshResult", "SubmitJobResponse", "TableRefreshResult" }
|
|
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 = RefreshResponse.model_construct()
|
|
68
|
+
error_messages = []
|
|
69
|
+
match = 0
|
|
70
|
+
# validate data type: SchemaRefreshResult
|
|
71
|
+
if not isinstance(v, SchemaRefreshResult):
|
|
72
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `SchemaRefreshResult`")
|
|
73
|
+
else:
|
|
74
|
+
match += 1
|
|
75
|
+
# validate data type: TableRefreshResult
|
|
76
|
+
if not isinstance(v, TableRefreshResult):
|
|
77
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `TableRefreshResult`")
|
|
78
|
+
else:
|
|
79
|
+
match += 1
|
|
80
|
+
# validate data type: ConnectionRefreshResult
|
|
81
|
+
if not isinstance(v, ConnectionRefreshResult):
|
|
82
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `ConnectionRefreshResult`")
|
|
83
|
+
else:
|
|
84
|
+
match += 1
|
|
85
|
+
# validate data type: RefreshDatasetResponse
|
|
86
|
+
if not isinstance(v, RefreshDatasetResponse):
|
|
87
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `RefreshDatasetResponse`")
|
|
88
|
+
else:
|
|
89
|
+
match += 1
|
|
90
|
+
# validate data type: SubmitJobResponse
|
|
91
|
+
if not isinstance(v, SubmitJobResponse):
|
|
92
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `SubmitJobResponse`")
|
|
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 RefreshResponse with oneOf schemas: ConnectionRefreshResult, RefreshDatasetResponse, SchemaRefreshResult, SubmitJobResponse, TableRefreshResult. Details: " + ", ".join(error_messages))
|
|
98
|
+
elif match == 0:
|
|
99
|
+
# no match
|
|
100
|
+
raise ValueError("No match found when setting `actual_instance` in RefreshResponse with oneOf schemas: ConnectionRefreshResult, RefreshDatasetResponse, SchemaRefreshResult, SubmitJobResponse, TableRefreshResult. 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 SchemaRefreshResult
|
|
116
|
+
try:
|
|
117
|
+
instance.actual_instance = SchemaRefreshResult.from_json(json_str)
|
|
118
|
+
match += 1
|
|
119
|
+
except (ValidationError, ValueError) as e:
|
|
120
|
+
error_messages.append(str(e))
|
|
121
|
+
# deserialize data into TableRefreshResult
|
|
122
|
+
try:
|
|
123
|
+
instance.actual_instance = TableRefreshResult.from_json(json_str)
|
|
124
|
+
match += 1
|
|
125
|
+
except (ValidationError, ValueError) as e:
|
|
126
|
+
error_messages.append(str(e))
|
|
127
|
+
# deserialize data into ConnectionRefreshResult
|
|
128
|
+
try:
|
|
129
|
+
instance.actual_instance = ConnectionRefreshResult.from_json(json_str)
|
|
130
|
+
match += 1
|
|
131
|
+
except (ValidationError, ValueError) as e:
|
|
132
|
+
error_messages.append(str(e))
|
|
133
|
+
# deserialize data into RefreshDatasetResponse
|
|
134
|
+
try:
|
|
135
|
+
instance.actual_instance = RefreshDatasetResponse.from_json(json_str)
|
|
136
|
+
match += 1
|
|
137
|
+
except (ValidationError, ValueError) as e:
|
|
138
|
+
error_messages.append(str(e))
|
|
139
|
+
# deserialize data into SubmitJobResponse
|
|
140
|
+
try:
|
|
141
|
+
instance.actual_instance = SubmitJobResponse.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 RefreshResponse with oneOf schemas: ConnectionRefreshResult, RefreshDatasetResponse, SchemaRefreshResult, SubmitJobResponse, TableRefreshResult. Details: " + ", ".join(error_messages))
|
|
149
|
+
elif match == 0:
|
|
150
|
+
# no match
|
|
151
|
+
raise ValueError("No match found when deserializing the JSON string into RefreshResponse with oneOf schemas: ConnectionRefreshResult, RefreshDatasetResponse, SchemaRefreshResult, SubmitJobResponse, TableRefreshResult. 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], ConnectionRefreshResult, RefreshDatasetResponse, SchemaRefreshResult, SubmitJobResponse, TableRefreshResult]]:
|
|
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,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, StrictStr
|
|
22
|
+
from typing import Any, ClassVar, Dict, List, Optional
|
|
23
|
+
from typing import Optional, Set
|
|
24
|
+
from typing_extensions import Self
|
|
25
|
+
|
|
26
|
+
class RefreshWarning(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
Non-fatal warning that occurred during a refresh operation. Used to report issues like failed deletion scheduling that don't prevent the refresh from succeeding.
|
|
29
|
+
""" # noqa: E501
|
|
30
|
+
message: StrictStr
|
|
31
|
+
schema_name: Optional[StrictStr] = None
|
|
32
|
+
table_name: Optional[StrictStr] = None
|
|
33
|
+
__properties: ClassVar[List[str]] = ["message", "schema_name", "table_name"]
|
|
34
|
+
|
|
35
|
+
model_config = ConfigDict(
|
|
36
|
+
populate_by_name=True,
|
|
37
|
+
validate_assignment=True,
|
|
38
|
+
protected_namespaces=(),
|
|
39
|
+
)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
def to_str(self) -> str:
|
|
43
|
+
"""Returns the string representation of the model using alias"""
|
|
44
|
+
return pprint.pformat(self.model_dump(by_alias=True))
|
|
45
|
+
|
|
46
|
+
def to_json(self) -> str:
|
|
47
|
+
"""Returns the JSON representation of the model using alias"""
|
|
48
|
+
# TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> Optional[Self]:
|
|
53
|
+
"""Create an instance of RefreshWarning from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self) -> Dict[str, Any]:
|
|
57
|
+
"""Return the dictionary representation of the model using alias.
|
|
58
|
+
|
|
59
|
+
This has the following differences from calling pydantic's
|
|
60
|
+
`self.model_dump(by_alias=True)`:
|
|
61
|
+
|
|
62
|
+
* `None` is only added to the output dict for nullable fields that
|
|
63
|
+
were set at model initialization. Other fields with value `None`
|
|
64
|
+
are ignored.
|
|
65
|
+
"""
|
|
66
|
+
excluded_fields: Set[str] = set([
|
|
67
|
+
])
|
|
68
|
+
|
|
69
|
+
_dict = self.model_dump(
|
|
70
|
+
by_alias=True,
|
|
71
|
+
exclude=excluded_fields,
|
|
72
|
+
exclude_none=True,
|
|
73
|
+
)
|
|
74
|
+
# set to None if schema_name (nullable) is None
|
|
75
|
+
# and model_fields_set contains the field
|
|
76
|
+
if self.schema_name is None and "schema_name" in self.model_fields_set:
|
|
77
|
+
_dict['schema_name'] = None
|
|
78
|
+
|
|
79
|
+
# set to None if table_name (nullable) is None
|
|
80
|
+
# and model_fields_set contains the field
|
|
81
|
+
if self.table_name is None and "table_name" in self.model_fields_set:
|
|
82
|
+
_dict['table_name'] = None
|
|
83
|
+
|
|
84
|
+
return _dict
|
|
85
|
+
|
|
86
|
+
@classmethod
|
|
87
|
+
def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]:
|
|
88
|
+
"""Create an instance of RefreshWarning from a dict"""
|
|
89
|
+
if obj is None:
|
|
90
|
+
return None
|
|
91
|
+
|
|
92
|
+
if not isinstance(obj, dict):
|
|
93
|
+
return cls.model_validate(obj)
|
|
94
|
+
|
|
95
|
+
_obj = cls.model_validate({
|
|
96
|
+
"message": obj.get("message"),
|
|
97
|
+
"schema_name": obj.get("schema_name"),
|
|
98
|
+
"table_name": obj.get("table_name")
|
|
99
|
+
})
|
|
100
|
+
return _obj
|
|
101
|
+
|
|
102
|
+
|