diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 0781a8f..10cd8b9 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -25,13 +25,7 @@ docs/ColumnProfileDetailOneOf3.md docs/ColumnProfileDetailOneOf4.md docs/ColumnProfileInfo.md docs/ColumnTypeSpec.md -docs/ConnectionHealthResponse.md docs/ConnectionInfo.md -docs/ConnectionRefreshResult.md -docs/ConnectionSchemaError.md -docs/ConnectionTypeDetail.md -docs/ConnectionTypeSummary.md -docs/ConnectionTypesApi.md docs/ConnectionsApi.md docs/CreateConnectionRequest.md docs/CreateConnectionResponse.md @@ -41,8 +35,6 @@ docs/CreateEmbeddingProviderRequest.md docs/CreateEmbeddingProviderResponse.md docs/CreateIndexRequest.md docs/CreateSavedQueryRequest.md -docs/CreateSecretRequest.md -docs/CreateSecretResponse.md docs/CreateUploadRequest.md docs/CreateWorkspaceRequest.md docs/CreateWorkspaceResponse.md @@ -69,7 +61,6 @@ docs/ForkDatabaseRequest.md docs/GetConnectionResponse.md docs/GetDatabaseContextResponse.md docs/GetResultResponse.md -docs/GetSecretResponse.md docs/IndexEntryResponse.md docs/IndexInfoResponse.md docs/IndexStatus.md @@ -81,7 +72,6 @@ docs/JobStatus.md docs/JobStatusResponse.md docs/JobType.md docs/JobsApi.md -docs/ListConnectionTypesResponse.md docs/ListConnectionsResponse.md docs/ListDatabaseContextsResponse.md docs/ListDatabasesResponse.md @@ -93,7 +83,6 @@ docs/ListQueryRunsResponse.md docs/ListResultsResponse.md docs/ListSavedQueriesResponse.md docs/ListSavedQueryVersionsResponse.md -docs/ListSecretsResponse.md docs/ListWorkspacesResponse.md docs/LoadManagedTableRequest.md docs/LoadManagedTableResponse.md @@ -108,9 +97,6 @@ docs/QueryRequest.md docs/QueryResponse.md docs/QueryRunInfo.md docs/QueryRunsApi.md -docs/RefreshApi.md -docs/RefreshRequest.md -docs/RefreshResponse.md docs/RefreshWarning.md docs/ResultInfo.md docs/ResultsApi.md @@ -119,14 +105,10 @@ docs/SavedQueriesApi.md docs/SavedQueryDetail.md docs/SavedQuerySummary.md docs/SavedQueryVersionInfo.md -docs/SchemaRefreshResult.md -docs/SecretMetadataResponse.md -docs/SecretsApi.md docs/SubmitJobResponse.md docs/TableInfo.md docs/TablePartitionKey.md docs/TableProfileResponse.md -docs/TableRefreshError.md docs/TableRefreshResult.md docs/TableSortKey.md docs/TemporalProfileDetail.md @@ -134,8 +116,6 @@ docs/TextProfileDetail.md docs/UpdateEmbeddingProviderRequest.md docs/UpdateEmbeddingProviderResponse.md docs/UpdateSavedQueryRequest.md -docs/UpdateSecretRequest.md -docs/UpdateSecretResponse.md docs/UploadSessionResponse.md docs/UploadsApi.md docs/UpsertDatabaseContextRequest.md @@ -147,7 +127,6 @@ docs/WorkspaceUsageResponse.md docs/WorkspacesApi.md hotdata/__init__.py hotdata/api/__init__.py -hotdata/api/connection_types_api.py hotdata/api/connections_api.py hotdata/api/database_context_api.py hotdata/api/databases_api.py @@ -157,10 +136,8 @@ hotdata/api/information_schema_api.py hotdata/api/jobs_api.py hotdata/api/query_api.py hotdata/api/query_runs_api.py -hotdata/api/refresh_api.py hotdata/api/results_api.py hotdata/api/saved_queries_api.py -hotdata/api/secrets_api.py hotdata/api/uploads_api.py hotdata/api/usage_api.py hotdata/api/workspaces_api.py @@ -193,12 +170,7 @@ hotdata/models/column_profile_detail_one_of3.py hotdata/models/column_profile_detail_one_of4.py hotdata/models/column_profile_info.py hotdata/models/column_type_spec.py -hotdata/models/connection_health_response.py hotdata/models/connection_info.py -hotdata/models/connection_refresh_result.py -hotdata/models/connection_schema_error.py -hotdata/models/connection_type_detail.py -hotdata/models/connection_type_summary.py hotdata/models/create_connection_request.py hotdata/models/create_connection_response.py hotdata/models/create_database_request.py @@ -207,8 +179,6 @@ hotdata/models/create_embedding_provider_request.py hotdata/models/create_embedding_provider_response.py hotdata/models/create_index_request.py hotdata/models/create_saved_query_request.py -hotdata/models/create_secret_request.py -hotdata/models/create_secret_response.py hotdata/models/create_upload_request.py hotdata/models/create_workspace_request.py hotdata/models/create_workspace_response.py @@ -232,7 +202,6 @@ hotdata/models/fork_database_request.py hotdata/models/get_connection_response.py hotdata/models/get_database_context_response.py hotdata/models/get_result_response.py -hotdata/models/get_secret_response.py hotdata/models/index_entry_response.py hotdata/models/index_info_response.py hotdata/models/index_status.py @@ -241,7 +210,6 @@ hotdata/models/job_result.py hotdata/models/job_status.py hotdata/models/job_status_response.py hotdata/models/job_type.py -hotdata/models/list_connection_types_response.py hotdata/models/list_connections_response.py hotdata/models/list_database_contexts_response.py hotdata/models/list_databases_response.py @@ -253,7 +221,6 @@ hotdata/models/list_query_runs_response.py hotdata/models/list_results_response.py hotdata/models/list_saved_queries_response.py hotdata/models/list_saved_query_versions_response.py -hotdata/models/list_secrets_response.py hotdata/models/list_workspaces_response.py hotdata/models/load_managed_table_request.py hotdata/models/load_managed_table_response.py @@ -266,21 +233,16 @@ hotdata/models/numeric_profile_detail.py hotdata/models/query_request.py hotdata/models/query_response.py hotdata/models/query_run_info.py -hotdata/models/refresh_request.py -hotdata/models/refresh_response.py hotdata/models/refresh_warning.py hotdata/models/result_info.py hotdata/models/results_format_query.py hotdata/models/saved_query_detail.py hotdata/models/saved_query_summary.py hotdata/models/saved_query_version_info.py -hotdata/models/schema_refresh_result.py -hotdata/models/secret_metadata_response.py hotdata/models/submit_job_response.py hotdata/models/table_info.py hotdata/models/table_partition_key.py hotdata/models/table_profile_response.py -hotdata/models/table_refresh_error.py hotdata/models/table_refresh_result.py hotdata/models/table_sort_key.py hotdata/models/temporal_profile_detail.py @@ -288,8 +250,6 @@ hotdata/models/text_profile_detail.py hotdata/models/update_embedding_provider_request.py hotdata/models/update_embedding_provider_response.py hotdata/models/update_saved_query_request.py -hotdata/models/update_secret_request.py -hotdata/models/update_secret_response.py hotdata/models/upload_session_response.py hotdata/models/upsert_database_context_request.py hotdata/models/upsert_database_context_response.py @@ -324,13 +284,7 @@ test/test_column_profile_detail_one_of3.py test/test_column_profile_detail_one_of4.py test/test_column_profile_info.py test/test_column_type_spec.py -test/test_connection_health_response.py test/test_connection_info.py -test/test_connection_refresh_result.py -test/test_connection_schema_error.py -test/test_connection_type_detail.py -test/test_connection_type_summary.py -test/test_connection_types_api.py test/test_connections_api.py test/test_create_connection_request.py test/test_create_connection_response.py @@ -340,8 +294,6 @@ test/test_create_embedding_provider_request.py test/test_create_embedding_provider_response.py test/test_create_index_request.py test/test_create_saved_query_request.py -test/test_create_secret_request.py -test/test_create_secret_response.py test/test_create_upload_request.py test/test_create_workspace_request.py test/test_create_workspace_response.py @@ -368,7 +320,6 @@ test/test_fork_database_request.py test/test_get_connection_response.py test/test_get_database_context_response.py test/test_get_result_response.py -test/test_get_secret_response.py test/test_index_entry_response.py test/test_index_info_response.py test/test_index_status.py @@ -380,7 +331,6 @@ test/test_job_status.py test/test_job_status_response.py test/test_job_type.py test/test_jobs_api.py -test/test_list_connection_types_response.py test/test_list_connections_response.py test/test_list_database_contexts_response.py test/test_list_databases_response.py @@ -392,7 +342,6 @@ test/test_list_query_runs_response.py test/test_list_results_response.py test/test_list_saved_queries_response.py test/test_list_saved_query_versions_response.py -test/test_list_secrets_response.py test/test_list_workspaces_response.py test/test_load_managed_table_request.py test/test_load_managed_table_response.py @@ -407,9 +356,6 @@ test/test_query_request.py test/test_query_response.py test/test_query_run_info.py test/test_query_runs_api.py -test/test_refresh_api.py -test/test_refresh_request.py -test/test_refresh_response.py test/test_refresh_warning.py test/test_result_info.py test/test_results_api.py @@ -418,14 +364,10 @@ test/test_saved_queries_api.py test/test_saved_query_detail.py test/test_saved_query_summary.py test/test_saved_query_version_info.py -test/test_schema_refresh_result.py -test/test_secret_metadata_response.py -test/test_secrets_api.py test/test_submit_job_response.py test/test_table_info.py test/test_table_partition_key.py test/test_table_profile_response.py -test/test_table_refresh_error.py test/test_table_refresh_result.py test/test_table_sort_key.py test/test_temporal_profile_detail.py @@ -433,8 +375,6 @@ test/test_text_profile_detail.py test/test_update_embedding_provider_request.py test/test_update_embedding_provider_response.py test/test_update_saved_query_request.py -test/test_update_secret_request.py -test/test_update_secret_response.py test/test_upload_session_response.py test/test_uploads_api.py test/test_upsert_database_context_request.py diff --git a/CHANGELOG.md b/CHANGELOG.md index 2bcba5a..9d97c8d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Changed +- docs(api): exclude retiring connection endpoints from the public spec - feat(query): add dialect parameter to query request ## [0.10.0] - 2026-08-18 diff --git a/docs/ConnectionHealthResponse.md b/docs/ConnectionHealthResponse.md deleted file mode 100644 index 4a9e9e7..0000000 --- a/docs/ConnectionHealthResponse.md +++ /dev/null @@ -1,33 +0,0 @@ -# ConnectionHealthResponse - -Response body for GET /connections/{connection_id}/health - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**connection_id** | **str** | | -**error** | **str** | | [optional] -**healthy** | **bool** | | -**latency_ms** | **int** | | - -## Example - -```python -from hotdata.models.connection_health_response import ConnectionHealthResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of ConnectionHealthResponse from a JSON string -connection_health_response_instance = ConnectionHealthResponse.from_json(json) -# print the JSON string representation of the object -print(ConnectionHealthResponse.to_json()) - -# convert the object into a dict -connection_health_response_dict = connection_health_response_instance.to_dict() -# create an instance of ConnectionHealthResponse from a dict -connection_health_response_from_dict = ConnectionHealthResponse.from_dict(connection_health_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ConnectionRefreshResult.md b/docs/ConnectionRefreshResult.md deleted file mode 100644 index e0e3fcf..0000000 --- a/docs/ConnectionRefreshResult.md +++ /dev/null @@ -1,36 +0,0 @@ -# ConnectionRefreshResult - -Result payload for a `data_refresh_connection` job. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**connection_id** | **str** | | -**duration_ms** | **int** | | -**errors** | [**List[TableRefreshError]**](TableRefreshError.md) | | [optional] -**tables_failed** | **int** | | -**tables_refreshed** | **int** | | -**total_rows** | **int** | | -**warnings** | [**List[RefreshWarning]**](RefreshWarning.md) | | [optional] - -## Example - -```python -from hotdata.models.connection_refresh_result import ConnectionRefreshResult - -# TODO update the JSON string below -json = "{}" -# create an instance of ConnectionRefreshResult from a JSON string -connection_refresh_result_instance = ConnectionRefreshResult.from_json(json) -# print the JSON string representation of the object -print(ConnectionRefreshResult.to_json()) - -# convert the object into a dict -connection_refresh_result_dict = connection_refresh_result_instance.to_dict() -# create an instance of ConnectionRefreshResult from a dict -connection_refresh_result_from_dict = ConnectionRefreshResult.from_dict(connection_refresh_result_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ConnectionSchemaError.md b/docs/ConnectionSchemaError.md deleted file mode 100644 index 3da6e07..0000000 --- a/docs/ConnectionSchemaError.md +++ /dev/null @@ -1,31 +0,0 @@ -# ConnectionSchemaError - -Error details for a failed connection schema refresh - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**connection_id** | **str** | | -**error** | **str** | | - -## Example - -```python -from hotdata.models.connection_schema_error import ConnectionSchemaError - -# TODO update the JSON string below -json = "{}" -# create an instance of ConnectionSchemaError from a JSON string -connection_schema_error_instance = ConnectionSchemaError.from_json(json) -# print the JSON string representation of the object -print(ConnectionSchemaError.to_json()) - -# convert the object into a dict -connection_schema_error_dict = connection_schema_error_instance.to_dict() -# create an instance of ConnectionSchemaError from a dict -connection_schema_error_from_dict = ConnectionSchemaError.from_dict(connection_schema_error_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ConnectionTypeDetail.md b/docs/ConnectionTypeDetail.md deleted file mode 100644 index de627ec..0000000 --- a/docs/ConnectionTypeDetail.md +++ /dev/null @@ -1,33 +0,0 @@ -# ConnectionTypeDetail - -Detailed configuration and authentication schema for a single connection type. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**auth** | **object** | | [optional] -**config_schema** | **object** | | [optional] -**label** | **str** | | -**name** | **str** | | - -## Example - -```python -from hotdata.models.connection_type_detail import ConnectionTypeDetail - -# TODO update the JSON string below -json = "{}" -# create an instance of ConnectionTypeDetail from a JSON string -connection_type_detail_instance = ConnectionTypeDetail.from_json(json) -# print the JSON string representation of the object -print(ConnectionTypeDetail.to_json()) - -# convert the object into a dict -connection_type_detail_dict = connection_type_detail_instance.to_dict() -# create an instance of ConnectionTypeDetail from a dict -connection_type_detail_from_dict = ConnectionTypeDetail.from_dict(connection_type_detail_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ConnectionTypeSummary.md b/docs/ConnectionTypeSummary.md deleted file mode 100644 index ba7dab9..0000000 --- a/docs/ConnectionTypeSummary.md +++ /dev/null @@ -1,31 +0,0 @@ -# ConnectionTypeSummary - -Summary entry for the connection-type list endpoint. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**label** | **str** | | -**name** | **str** | | - -## Example - -```python -from hotdata.models.connection_type_summary import ConnectionTypeSummary - -# TODO update the JSON string below -json = "{}" -# create an instance of ConnectionTypeSummary from a JSON string -connection_type_summary_instance = ConnectionTypeSummary.from_json(json) -# print the JSON string representation of the object -print(ConnectionTypeSummary.to_json()) - -# convert the object into a dict -connection_type_summary_dict = connection_type_summary_instance.to_dict() -# create an instance of ConnectionTypeSummary from a dict -connection_type_summary_from_dict = ConnectionTypeSummary.from_dict(connection_type_summary_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ConnectionTypesApi.md b/docs/ConnectionTypesApi.md deleted file mode 100644 index eb35cad..0000000 --- a/docs/ConnectionTypesApi.md +++ /dev/null @@ -1,177 +0,0 @@ -# hotdata.ConnectionTypesApi - -All URIs are relative to *https://api.hotdata.dev* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**get_connection_type**](ConnectionTypesApi.md#get_connection_type) | **GET** /v1/connection-types/{name} | Get connection type details -[**list_connection_types**](ConnectionTypesApi.md#list_connection_types) | **GET** /v1/connection-types | List connection types - - -# **get_connection_type** -> ConnectionTypeDetail get_connection_type(name) - -Get connection type details - -Get configuration schema and authentication requirements for a specific connection type. - -### Example - -* Api Key Authentication (WorkspaceId): -* Bearer Authentication (BearerAuth): - -```python -import hotdata -from hotdata.models.connection_type_detail import ConnectionTypeDetail -from hotdata.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.hotdata.dev -# See configuration.py for a list of all supported configuration parameters. -configuration = hotdata.Configuration( - host = "https://api.hotdata.dev" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: WorkspaceId -configuration.api_key['WorkspaceId'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['WorkspaceId'] = 'Bearer' - -# Configure Bearer authorization: BearerAuth -configuration = hotdata.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with hotdata.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = hotdata.ConnectionTypesApi(api_client) - name = 'name_example' # str | Connection type name (e.g. postgres, mysql, snowflake) - - try: - # Get connection type details - api_response = api_instance.get_connection_type(name) - print("The response of ConnectionTypesApi->get_connection_type:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ConnectionTypesApi->get_connection_type: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **str**| Connection type name (e.g. postgres, mysql, snowflake) | - -### Return type - -[**ConnectionTypeDetail**](ConnectionTypeDetail.md) - -### Authorization - -[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Connection type details | - | -**404** | Unknown connection type | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_connection_types** -> ListConnectionTypesResponse list_connection_types() - -List connection types - -List all available connection types, including native sources and FlightDLT services. - -### Example - -* Api Key Authentication (WorkspaceId): -* Bearer Authentication (BearerAuth): - -```python -import hotdata -from hotdata.models.list_connection_types_response import ListConnectionTypesResponse -from hotdata.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.hotdata.dev -# See configuration.py for a list of all supported configuration parameters. -configuration = hotdata.Configuration( - host = "https://api.hotdata.dev" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: WorkspaceId -configuration.api_key['WorkspaceId'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['WorkspaceId'] = 'Bearer' - -# Configure Bearer authorization: BearerAuth -configuration = hotdata.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with hotdata.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = hotdata.ConnectionTypesApi(api_client) - - try: - # List connection types - api_response = api_instance.list_connection_types() - print("The response of ConnectionTypesApi->list_connection_types:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ConnectionTypesApi->list_connection_types: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**ListConnectionTypesResponse**](ListConnectionTypesResponse.md) - -### Authorization - -[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Available connection types | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/ConnectionsApi.md b/docs/ConnectionsApi.md index 5a89ddb..05aab61 100644 --- a/docs/ConnectionsApi.md +++ b/docs/ConnectionsApi.md @@ -6,7 +6,6 @@ Method | HTTP request | Description ------------- | ------------- | ------------- [**add_managed_schema**](ConnectionsApi.md#add_managed_schema) | **POST** /v1/connections/{connection_id}/schemas | Add managed schema [**add_managed_table**](ConnectionsApi.md#add_managed_table) | **POST** /v1/connections/{connection_id}/schemas/{schema}/tables | Add managed table -[**check_connection_health**](ConnectionsApi.md#check_connection_health) | **GET** /v1/connections/{connection_id}/health | Check connection health [**create_connection**](ConnectionsApi.md#create_connection) | **POST** /v1/connections | Create connection [**delete_connection**](ConnectionsApi.md#delete_connection) | **DELETE** /v1/connections/{connection_id} | Delete connection [**delete_managed_table**](ConnectionsApi.md#delete_managed_table) | **DELETE** /v1/connections/{connection_id}/schemas/{schema}/tables/{table} | Delete managed table @@ -202,92 +201,6 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) -# **check_connection_health** -> ConnectionHealthResponse check_connection_health(connection_id) - -Check connection health - -Test connectivity to the remote database. Returns health status and latency. - -### Example - -* Api Key Authentication (WorkspaceId): -* Bearer Authentication (BearerAuth): - -```python -import hotdata -from hotdata.models.connection_health_response import ConnectionHealthResponse -from hotdata.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.hotdata.dev -# See configuration.py for a list of all supported configuration parameters. -configuration = hotdata.Configuration( - host = "https://api.hotdata.dev" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: WorkspaceId -configuration.api_key['WorkspaceId'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['WorkspaceId'] = 'Bearer' - -# Configure Bearer authorization: BearerAuth -configuration = hotdata.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with hotdata.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = hotdata.ConnectionsApi(api_client) - connection_id = 'connection_id_example' # str | Connection ID - - try: - # Check connection health - api_response = api_instance.check_connection_health(connection_id) - print("The response of ConnectionsApi->check_connection_health:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling ConnectionsApi->check_connection_health: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **connection_id** | **str**| Connection ID | - -### Return type - -[**ConnectionHealthResponse**](ConnectionHealthResponse.md) - -### Authorization - -[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Connection health status | - | -**404** | Connection not found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - # **create_connection** > CreateConnectionResponse create_connection(create_connection_request) diff --git a/docs/CreateSecretRequest.md b/docs/CreateSecretRequest.md deleted file mode 100644 index 4390937..0000000 --- a/docs/CreateSecretRequest.md +++ /dev/null @@ -1,31 +0,0 @@ -# CreateSecretRequest - -Request body for POST /secrets - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | -**value** | **str** | | - -## Example - -```python -from hotdata.models.create_secret_request import CreateSecretRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateSecretRequest from a JSON string -create_secret_request_instance = CreateSecretRequest.from_json(json) -# print the JSON string representation of the object -print(CreateSecretRequest.to_json()) - -# convert the object into a dict -create_secret_request_dict = create_secret_request_instance.to_dict() -# create an instance of CreateSecretRequest from a dict -create_secret_request_from_dict = CreateSecretRequest.from_dict(create_secret_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/CreateSecretResponse.md b/docs/CreateSecretResponse.md deleted file mode 100644 index b032875..0000000 --- a/docs/CreateSecretResponse.md +++ /dev/null @@ -1,32 +0,0 @@ -# CreateSecretResponse - -Response body for POST /secrets - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | **datetime** | | -**id** | **str** | | -**name** | **str** | | - -## Example - -```python -from hotdata.models.create_secret_response import CreateSecretResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of CreateSecretResponse from a JSON string -create_secret_response_instance = CreateSecretResponse.from_json(json) -# print the JSON string representation of the object -print(CreateSecretResponse.to_json()) - -# convert the object into a dict -create_secret_response_dict = create_secret_response_instance.to_dict() -# create an instance of CreateSecretResponse from a dict -create_secret_response_from_dict = CreateSecretResponse.from_dict(create_secret_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/GetSecretResponse.md b/docs/GetSecretResponse.md deleted file mode 100644 index d49870c..0000000 --- a/docs/GetSecretResponse.md +++ /dev/null @@ -1,32 +0,0 @@ -# GetSecretResponse - -Response body for GET /secrets/{name} - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | **datetime** | | -**name** | **str** | | -**updated_at** | **datetime** | | - -## Example - -```python -from hotdata.models.get_secret_response import GetSecretResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of GetSecretResponse from a JSON string -get_secret_response_instance = GetSecretResponse.from_json(json) -# print the JSON string representation of the object -print(GetSecretResponse.to_json()) - -# convert the object into a dict -get_secret_response_dict = get_secret_response_instance.to_dict() -# create an instance of GetSecretResponse from a dict -get_secret_response_from_dict = GetSecretResponse.from_dict(get_secret_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/JobResult.md b/docs/JobResult.md index de4688e..d9a8cd1 100644 --- a/docs/JobResult.md +++ b/docs/JobResult.md @@ -12,10 +12,6 @@ Name | Type | Description | Notes **schema_name** | **str** | | **table_name** | **str** | | **warnings** | [**List[RefreshWarning]**](RefreshWarning.md) | | [optional] -**errors** | [**List[TableRefreshError]**](TableRefreshError.md) | | [optional] -**tables_failed** | **int** | | -**tables_refreshed** | **int** | | -**total_rows** | **int** | | **columns** | **List[str]** | | **created_at** | **datetime** | | **index_name** | **str** | | diff --git a/docs/ListConnectionTypesResponse.md b/docs/ListConnectionTypesResponse.md deleted file mode 100644 index d841c94..0000000 --- a/docs/ListConnectionTypesResponse.md +++ /dev/null @@ -1,30 +0,0 @@ -# ListConnectionTypesResponse - -Envelope for the connection-types list response. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**connection_types** | [**List[ConnectionTypeSummary]**](ConnectionTypeSummary.md) | | - -## Example - -```python -from hotdata.models.list_connection_types_response import ListConnectionTypesResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of ListConnectionTypesResponse from a JSON string -list_connection_types_response_instance = ListConnectionTypesResponse.from_json(json) -# print the JSON string representation of the object -print(ListConnectionTypesResponse.to_json()) - -# convert the object into a dict -list_connection_types_response_dict = list_connection_types_response_instance.to_dict() -# create an instance of ListConnectionTypesResponse from a dict -list_connection_types_response_from_dict = ListConnectionTypesResponse.from_dict(list_connection_types_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/ListSecretsResponse.md b/docs/ListSecretsResponse.md deleted file mode 100644 index 3457f87..0000000 --- a/docs/ListSecretsResponse.md +++ /dev/null @@ -1,30 +0,0 @@ -# ListSecretsResponse - -Response body for GET /secrets - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**secrets** | [**List[SecretMetadataResponse]**](SecretMetadataResponse.md) | | - -## Example - -```python -from hotdata.models.list_secrets_response import ListSecretsResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of ListSecretsResponse from a JSON string -list_secrets_response_instance = ListSecretsResponse.from_json(json) -# print the JSON string representation of the object -print(ListSecretsResponse.to_json()) - -# convert the object into a dict -list_secrets_response_dict = list_secrets_response_instance.to_dict() -# create an instance of ListSecretsResponse from a dict -list_secrets_response_from_dict = ListSecretsResponse.from_dict(list_secrets_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RefreshApi.md b/docs/RefreshApi.md deleted file mode 100644 index f6f09e8..0000000 --- a/docs/RefreshApi.md +++ /dev/null @@ -1,106 +0,0 @@ -# hotdata.RefreshApi - -All URIs are relative to *https://api.hotdata.dev* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**refresh**](RefreshApi.md#refresh) | **POST** /v1/refresh | Refresh connection data - - -# **refresh** -> RefreshResponse refresh(refresh_request) - -Refresh connection data - -Refresh schema metadata or table data. The behavior depends on the request fields: - -- **Schema refresh (all)**: omit all fields — re-discovers tables for every connection. -- **Schema refresh (single)**: set `connection_id` — re-discovers tables for one connection. -- **Data refresh (single table)**: set `connection_id`, `schema_name`, `table_name`, and `data: true`. -- **Data refresh (connection)**: set `connection_id` and `data: true` — refreshes all cached tables. Set `include_uncached: true` to also sync tables that haven't been cached yet. - -Set `async: true` on data refresh operations to run in the background and return a job ID for polling. - -### Example - -* Api Key Authentication (WorkspaceId): -* Bearer Authentication (BearerAuth): - -```python -import hotdata -from hotdata.models.refresh_request import RefreshRequest -from hotdata.models.refresh_response import RefreshResponse -from hotdata.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.hotdata.dev -# See configuration.py for a list of all supported configuration parameters. -configuration = hotdata.Configuration( - host = "https://api.hotdata.dev" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: WorkspaceId -configuration.api_key['WorkspaceId'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['WorkspaceId'] = 'Bearer' - -# Configure Bearer authorization: BearerAuth -configuration = hotdata.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with hotdata.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = hotdata.RefreshApi(api_client) - refresh_request = hotdata.RefreshRequest() # RefreshRequest | - - try: - # Refresh connection data - api_response = api_instance.refresh(refresh_request) - print("The response of RefreshApi->refresh:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling RefreshApi->refresh: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **refresh_request** | [**RefreshRequest**](RefreshRequest.md)| | - -### Return type - -[**RefreshResponse**](RefreshResponse.md) - -### Authorization - -[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Refresh completed | - | -**202** | Refresh accepted and running in the background; poll the returned job for status | - | -**400** | Invalid request | - | -**404** | Connection not found | - | -**409** | A column's type changed incompatibly and can't be applied automatically (only widening to a larger compatible type is). The existing data is unchanged and remains queryable. | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/RefreshRequest.md b/docs/RefreshRequest.md deleted file mode 100644 index 71d928d..0000000 --- a/docs/RefreshRequest.md +++ /dev/null @@ -1,36 +0,0 @@ -# RefreshRequest - -Request body for POST /refresh - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**var_async** | **bool** | 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. | [optional] [default to False] -**async_after_ms** | **int** | If set (requires `async` = true), wait up to this many milliseconds for the refresh to finish: if it completes in time the full result is returned, otherwise a `202` with a job ID to poll. Must be between 1000 and the server maximum; a value out of that range, or set without `async` = true, is rejected with 400. Only applies to data refresh. | [optional] -**connection_id** | **str** | | [optional] -**data** | **bool** | | [optional] [default to False] -**include_uncached** | **bool** | 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. | [optional] [default to False] -**schema_name** | **str** | | [optional] -**table_name** | **str** | | [optional] - -## Example - -```python -from hotdata.models.refresh_request import RefreshRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of RefreshRequest from a JSON string -refresh_request_instance = RefreshRequest.from_json(json) -# print the JSON string representation of the object -print(RefreshRequest.to_json()) - -# convert the object into a dict -refresh_request_dict = refresh_request_instance.to_dict() -# create an instance of RefreshRequest from a dict -refresh_request_from_dict = RefreshRequest.from_dict(refresh_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/RefreshResponse.md b/docs/RefreshResponse.md deleted file mode 100644 index 4dd1b73..0000000 --- a/docs/RefreshResponse.md +++ /dev/null @@ -1,44 +0,0 @@ -# RefreshResponse - -Unified response type for refresh operations - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**connections_failed** | **int** | | -**connections_refreshed** | **int** | | -**errors** | [**List[TableRefreshError]**](TableRefreshError.md) | | [optional] -**tables_added** | **int** | | -**tables_discovered** | **int** | | -**tables_modified** | **int** | | -**connection_id** | **str** | | -**duration_ms** | **int** | | -**rows_synced** | **int** | | -**schema_name** | **str** | | -**table_name** | **str** | | -**warnings** | [**List[RefreshWarning]**](RefreshWarning.md) | | [optional] -**tables_failed** | **int** | | -**tables_refreshed** | **int** | | -**total_rows** | **int** | | - -## Example - -```python -from hotdata.models.refresh_response import RefreshResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of RefreshResponse from a JSON string -refresh_response_instance = RefreshResponse.from_json(json) -# print the JSON string representation of the object -print(RefreshResponse.to_json()) - -# convert the object into a dict -refresh_response_dict = refresh_response_instance.to_dict() -# create an instance of RefreshResponse from a dict -refresh_response_from_dict = RefreshResponse.from_dict(refresh_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SchemaRefreshResult.md b/docs/SchemaRefreshResult.md deleted file mode 100644 index ed2a860..0000000 --- a/docs/SchemaRefreshResult.md +++ /dev/null @@ -1,35 +0,0 @@ -# SchemaRefreshResult - -Response for schema refresh operations - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**connections_failed** | **int** | | -**connections_refreshed** | **int** | | -**errors** | [**List[ConnectionSchemaError]**](ConnectionSchemaError.md) | | [optional] -**tables_added** | **int** | | -**tables_discovered** | **int** | | -**tables_modified** | **int** | | - -## Example - -```python -from hotdata.models.schema_refresh_result import SchemaRefreshResult - -# TODO update the JSON string below -json = "{}" -# create an instance of SchemaRefreshResult from a JSON string -schema_refresh_result_instance = SchemaRefreshResult.from_json(json) -# print the JSON string representation of the object -print(SchemaRefreshResult.to_json()) - -# convert the object into a dict -schema_refresh_result_dict = schema_refresh_result_instance.to_dict() -# create an instance of SchemaRefreshResult from a dict -schema_refresh_result_from_dict = SchemaRefreshResult.from_dict(schema_refresh_result_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SecretMetadataResponse.md b/docs/SecretMetadataResponse.md deleted file mode 100644 index 97064a3..0000000 --- a/docs/SecretMetadataResponse.md +++ /dev/null @@ -1,32 +0,0 @@ -# SecretMetadataResponse - -Single secret metadata for API responses - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**created_at** | **datetime** | | -**name** | **str** | | -**updated_at** | **datetime** | | - -## Example - -```python -from hotdata.models.secret_metadata_response import SecretMetadataResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of SecretMetadataResponse from a JSON string -secret_metadata_response_instance = SecretMetadataResponse.from_json(json) -# print the JSON string representation of the object -print(SecretMetadataResponse.to_json()) - -# convert the object into a dict -secret_metadata_response_dict = secret_metadata_response_instance.to_dict() -# create an instance of SecretMetadataResponse from a dict -secret_metadata_response_from_dict = SecretMetadataResponse.from_dict(secret_metadata_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/SecretsApi.md b/docs/SecretsApi.md deleted file mode 100644 index 0d9d3c9..0000000 --- a/docs/SecretsApi.md +++ /dev/null @@ -1,435 +0,0 @@ -# hotdata.SecretsApi - -All URIs are relative to *https://api.hotdata.dev* - -Method | HTTP request | Description -------------- | ------------- | ------------- -[**create_secret**](SecretsApi.md#create_secret) | **POST** /v1/secrets | Create secret -[**delete_secret**](SecretsApi.md#delete_secret) | **DELETE** /v1/secrets/{name} | Delete secret -[**get_secret**](SecretsApi.md#get_secret) | **GET** /v1/secrets/{name} | Get secret -[**list_secrets**](SecretsApi.md#list_secrets) | **GET** /v1/secrets | List secrets -[**update_secret**](SecretsApi.md#update_secret) | **PUT** /v1/secrets/{name} | Update secret - - -# **create_secret** -> CreateSecretResponse create_secret(create_secret_request) - -Create secret - -Store a new named secret. The value is encrypted at rest and can be referenced by connections for authentication. Secret names must be unique. - -### Example - -* Api Key Authentication (WorkspaceId): -* Bearer Authentication (BearerAuth): - -```python -import hotdata -from hotdata.models.create_secret_request import CreateSecretRequest -from hotdata.models.create_secret_response import CreateSecretResponse -from hotdata.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.hotdata.dev -# See configuration.py for a list of all supported configuration parameters. -configuration = hotdata.Configuration( - host = "https://api.hotdata.dev" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: WorkspaceId -configuration.api_key['WorkspaceId'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['WorkspaceId'] = 'Bearer' - -# Configure Bearer authorization: BearerAuth -configuration = hotdata.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with hotdata.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = hotdata.SecretsApi(api_client) - create_secret_request = hotdata.CreateSecretRequest() # CreateSecretRequest | - - try: - # Create secret - api_response = api_instance.create_secret(create_secret_request) - print("The response of SecretsApi->create_secret:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling SecretsApi->create_secret: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **create_secret_request** | [**CreateSecretRequest**](CreateSecretRequest.md)| | - -### Return type - -[**CreateSecretResponse**](CreateSecretResponse.md) - -### Authorization - -[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**201** | Secret created | - | -**409** | Secret already exists | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **delete_secret** -> delete_secret(name) - -Delete secret - -### Example - -* Api Key Authentication (WorkspaceId): -* Bearer Authentication (BearerAuth): - -```python -import hotdata -from hotdata.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.hotdata.dev -# See configuration.py for a list of all supported configuration parameters. -configuration = hotdata.Configuration( - host = "https://api.hotdata.dev" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: WorkspaceId -configuration.api_key['WorkspaceId'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['WorkspaceId'] = 'Bearer' - -# Configure Bearer authorization: BearerAuth -configuration = hotdata.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with hotdata.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = hotdata.SecretsApi(api_client) - name = 'name_example' # str | Secret name - - try: - # Delete secret - api_instance.delete_secret(name) - except Exception as e: - print("Exception when calling SecretsApi->delete_secret: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **str**| Secret name | - -### Return type - -void (empty response body) - -### Authorization - -[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**204** | Secret deleted | - | -**404** | Secret not found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **get_secret** -> GetSecretResponse get_secret(name) - -Get secret - -Get metadata for a secret. The secret value is never returned. - -### Example - -* Api Key Authentication (WorkspaceId): -* Bearer Authentication (BearerAuth): - -```python -import hotdata -from hotdata.models.get_secret_response import GetSecretResponse -from hotdata.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.hotdata.dev -# See configuration.py for a list of all supported configuration parameters. -configuration = hotdata.Configuration( - host = "https://api.hotdata.dev" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: WorkspaceId -configuration.api_key['WorkspaceId'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['WorkspaceId'] = 'Bearer' - -# Configure Bearer authorization: BearerAuth -configuration = hotdata.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with hotdata.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = hotdata.SecretsApi(api_client) - name = 'name_example' # str | Secret name - - try: - # Get secret - api_response = api_instance.get_secret(name) - print("The response of SecretsApi->get_secret:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling SecretsApi->get_secret: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **str**| Secret name | - -### Return type - -[**GetSecretResponse**](GetSecretResponse.md) - -### Authorization - -[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Secret metadata | - | -**404** | Secret not found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **list_secrets** -> ListSecretsResponse list_secrets() - -List secrets - -List all stored secrets. Only metadata (name, timestamps) is returned — secret values are never exposed. - -### Example - -* Api Key Authentication (WorkspaceId): -* Bearer Authentication (BearerAuth): - -```python -import hotdata -from hotdata.models.list_secrets_response import ListSecretsResponse -from hotdata.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.hotdata.dev -# See configuration.py for a list of all supported configuration parameters. -configuration = hotdata.Configuration( - host = "https://api.hotdata.dev" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: WorkspaceId -configuration.api_key['WorkspaceId'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['WorkspaceId'] = 'Bearer' - -# Configure Bearer authorization: BearerAuth -configuration = hotdata.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with hotdata.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = hotdata.SecretsApi(api_client) - - try: - # List secrets - api_response = api_instance.list_secrets() - print("The response of SecretsApi->list_secrets:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling SecretsApi->list_secrets: %s\n" % e) -``` - - - -### Parameters - -This endpoint does not need any parameter. - -### Return type - -[**ListSecretsResponse**](ListSecretsResponse.md) - -### Authorization - -[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: Not defined - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | List of secrets | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - -# **update_secret** -> UpdateSecretResponse update_secret(name, update_secret_request) - -Update secret - -### Example - -* Api Key Authentication (WorkspaceId): -* Bearer Authentication (BearerAuth): - -```python -import hotdata -from hotdata.models.update_secret_request import UpdateSecretRequest -from hotdata.models.update_secret_response import UpdateSecretResponse -from hotdata.rest import ApiException -from pprint import pprint - -# Defining the host is optional and defaults to https://api.hotdata.dev -# See configuration.py for a list of all supported configuration parameters. -configuration = hotdata.Configuration( - host = "https://api.hotdata.dev" -) - -# The client must configure the authentication and authorization parameters -# in accordance with the API server security policy. -# Examples for each auth method are provided below, use the example that -# satisfies your auth use case. - -# Configure API key authorization: WorkspaceId -configuration.api_key['WorkspaceId'] = os.environ["API_KEY"] - -# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed -# configuration.api_key_prefix['WorkspaceId'] = 'Bearer' - -# Configure Bearer authorization: BearerAuth -configuration = hotdata.Configuration( - access_token = os.environ["BEARER_TOKEN"] -) - -# Enter a context with an instance of the API client -with hotdata.ApiClient(configuration) as api_client: - # Create an instance of the API class - api_instance = hotdata.SecretsApi(api_client) - name = 'name_example' # str | Secret name - update_secret_request = hotdata.UpdateSecretRequest() # UpdateSecretRequest | - - try: - # Update secret - api_response = api_instance.update_secret(name, update_secret_request) - print("The response of SecretsApi->update_secret:\n") - pprint(api_response) - except Exception as e: - print("Exception when calling SecretsApi->update_secret: %s\n" % e) -``` - - - -### Parameters - - -Name | Type | Description | Notes -------------- | ------------- | ------------- | ------------- - **name** | **str**| Secret name | - **update_secret_request** | [**UpdateSecretRequest**](UpdateSecretRequest.md)| | - -### Return type - -[**UpdateSecretResponse**](UpdateSecretResponse.md) - -### Authorization - -[WorkspaceId](../README.md#WorkspaceId), [BearerAuth](../README.md#BearerAuth) - -### HTTP request headers - - - **Content-Type**: application/json - - **Accept**: application/json - -### HTTP response details - -| Status code | Description | Response headers | -|-------------|-------------|------------------| -**200** | Secret updated | - | -**404** | Secret not found | - | - -[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) - diff --git a/docs/TableRefreshError.md b/docs/TableRefreshError.md deleted file mode 100644 index a035047..0000000 --- a/docs/TableRefreshError.md +++ /dev/null @@ -1,32 +0,0 @@ -# TableRefreshError - -Error details for a failed table refresh. - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**error** | **str** | | -**schema_name** | **str** | | -**table_name** | **str** | | - -## Example - -```python -from hotdata.models.table_refresh_error import TableRefreshError - -# TODO update the JSON string below -json = "{}" -# create an instance of TableRefreshError from a JSON string -table_refresh_error_instance = TableRefreshError.from_json(json) -# print the JSON string representation of the object -print(TableRefreshError.to_json()) - -# convert the object into a dict -table_refresh_error_dict = table_refresh_error_instance.to_dict() -# create an instance of TableRefreshError from a dict -table_refresh_error_from_dict = TableRefreshError.from_dict(table_refresh_error_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UpdateSecretRequest.md b/docs/UpdateSecretRequest.md deleted file mode 100644 index 5587d57..0000000 --- a/docs/UpdateSecretRequest.md +++ /dev/null @@ -1,30 +0,0 @@ -# UpdateSecretRequest - -Request body for PUT /secrets/{name} - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**value** | **str** | | - -## Example - -```python -from hotdata.models.update_secret_request import UpdateSecretRequest - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateSecretRequest from a JSON string -update_secret_request_instance = UpdateSecretRequest.from_json(json) -# print the JSON string representation of the object -print(UpdateSecretRequest.to_json()) - -# convert the object into a dict -update_secret_request_dict = update_secret_request_instance.to_dict() -# create an instance of UpdateSecretRequest from a dict -update_secret_request_from_dict = UpdateSecretRequest.from_dict(update_secret_request_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/UpdateSecretResponse.md b/docs/UpdateSecretResponse.md deleted file mode 100644 index e8802a8..0000000 --- a/docs/UpdateSecretResponse.md +++ /dev/null @@ -1,31 +0,0 @@ -# UpdateSecretResponse - -Response body for PUT /secrets/{name} - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**name** | **str** | | -**updated_at** | **datetime** | | - -## Example - -```python -from hotdata.models.update_secret_response import UpdateSecretResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of UpdateSecretResponse from a JSON string -update_secret_response_instance = UpdateSecretResponse.from_json(json) -# print the JSON string representation of the object -print(UpdateSecretResponse.to_json()) - -# convert the object into a dict -update_secret_response_dict = update_secret_response_instance.to_dict() -# create an instance of UpdateSecretResponse from a dict -update_secret_response_from_dict = UpdateSecretResponse.from_dict(update_secret_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/hotdata/__init__.py b/hotdata/__init__.py index 9211ac1..80b275c 100644 --- a/hotdata/__init__.py +++ b/hotdata/__init__.py @@ -24,7 +24,6 @@ # Define package exports __all__ = [ - "ConnectionTypesApi", "ConnectionsApi", "DatabaseContextApi", "DatabasesApi", @@ -34,10 +33,8 @@ "JobsApi", "QueryApi", "QueryRunsApi", - "RefreshApi", "ResultsApi", "SavedQueriesApi", - "SecretsApi", "UploadsApi", "UsageApi", "WorkspacesApi", @@ -74,12 +71,7 @@ "ColumnProfileDetailOneOf4", "ColumnProfileInfo", "ColumnTypeSpec", - "ConnectionHealthResponse", "ConnectionInfo", - "ConnectionRefreshResult", - "ConnectionSchemaError", - "ConnectionTypeDetail", - "ConnectionTypeSummary", "CreateConnectionRequest", "CreateConnectionResponse", "CreateDatabaseRequest", @@ -88,8 +80,6 @@ "CreateEmbeddingProviderResponse", "CreateIndexRequest", "CreateSavedQueryRequest", - "CreateSecretRequest", - "CreateSecretResponse", "CreateUploadRequest", "CreateWorkspaceRequest", "CreateWorkspaceResponse", @@ -113,7 +103,6 @@ "GetConnectionResponse", "GetDatabaseContextResponse", "GetResultResponse", - "GetSecretResponse", "IndexEntryResponse", "IndexInfoResponse", "IndexStatus", @@ -122,7 +111,6 @@ "JobStatus", "JobStatusResponse", "JobType", - "ListConnectionTypesResponse", "ListConnectionsResponse", "ListDatabaseContextsResponse", "ListDatabasesResponse", @@ -134,7 +122,6 @@ "ListResultsResponse", "ListSavedQueriesResponse", "ListSavedQueryVersionsResponse", - "ListSecretsResponse", "ListWorkspacesResponse", "LoadManagedTableRequest", "LoadManagedTableResponse", @@ -147,21 +134,16 @@ "QueryRequest", "QueryResponse", "QueryRunInfo", - "RefreshRequest", - "RefreshResponse", "RefreshWarning", "ResultInfo", "ResultsFormatQuery", "SavedQueryDetail", "SavedQuerySummary", "SavedQueryVersionInfo", - "SchemaRefreshResult", - "SecretMetadataResponse", "SubmitJobResponse", "TableInfo", "TablePartitionKey", "TableProfileResponse", - "TableRefreshError", "TableRefreshResult", "TableSortKey", "TemporalProfileDetail", @@ -169,8 +151,6 @@ "UpdateEmbeddingProviderRequest", "UpdateEmbeddingProviderResponse", "UpdateSavedQueryRequest", - "UpdateSecretRequest", - "UpdateSecretResponse", "UploadSessionResponse", "UpsertDatabaseContextRequest", "UpsertDatabaseContextResponse", @@ -180,7 +160,6 @@ ] # import apis into sdk package -from hotdata.api.connection_types_api import ConnectionTypesApi as ConnectionTypesApi from hotdata.api.connections_api import ConnectionsApi as ConnectionsApi from hotdata.api.database_context_api import DatabaseContextApi as DatabaseContextApi from hotdata.api.databases_api import DatabasesApi as DatabasesApi @@ -190,10 +169,8 @@ from hotdata.api.jobs_api import JobsApi as JobsApi from hotdata.api.query_api import QueryApi as QueryApi from hotdata.api.query_runs_api import QueryRunsApi as QueryRunsApi -from hotdata.api.refresh_api import RefreshApi as RefreshApi from hotdata.api.results_api import ResultsApi as ResultsApi from hotdata.api.saved_queries_api import SavedQueriesApi as SavedQueriesApi -from hotdata.api.secrets_api import SecretsApi as SecretsApi from hotdata.api.uploads_api import UploadsApi as UploadsApi from hotdata.api.usage_api import UsageApi as UsageApi from hotdata.api.workspaces_api import WorkspacesApi as WorkspacesApi @@ -234,12 +211,7 @@ from hotdata.models.column_profile_detail_one_of4 import ColumnProfileDetailOneOf4 as ColumnProfileDetailOneOf4 from hotdata.models.column_profile_info import ColumnProfileInfo as ColumnProfileInfo from hotdata.models.column_type_spec import ColumnTypeSpec as ColumnTypeSpec -from hotdata.models.connection_health_response import ConnectionHealthResponse as ConnectionHealthResponse from hotdata.models.connection_info import ConnectionInfo as ConnectionInfo -from hotdata.models.connection_refresh_result import ConnectionRefreshResult as ConnectionRefreshResult -from hotdata.models.connection_schema_error import ConnectionSchemaError as ConnectionSchemaError -from hotdata.models.connection_type_detail import ConnectionTypeDetail as ConnectionTypeDetail -from hotdata.models.connection_type_summary import ConnectionTypeSummary as ConnectionTypeSummary from hotdata.models.create_connection_request import CreateConnectionRequest as CreateConnectionRequest from hotdata.models.create_connection_response import CreateConnectionResponse as CreateConnectionResponse from hotdata.models.create_database_request import CreateDatabaseRequest as CreateDatabaseRequest @@ -248,8 +220,6 @@ from hotdata.models.create_embedding_provider_response import CreateEmbeddingProviderResponse as CreateEmbeddingProviderResponse from hotdata.models.create_index_request import CreateIndexRequest as CreateIndexRequest from hotdata.models.create_saved_query_request import CreateSavedQueryRequest as CreateSavedQueryRequest -from hotdata.models.create_secret_request import CreateSecretRequest as CreateSecretRequest -from hotdata.models.create_secret_response import CreateSecretResponse as CreateSecretResponse from hotdata.models.create_upload_request import CreateUploadRequest as CreateUploadRequest from hotdata.models.create_workspace_request import CreateWorkspaceRequest as CreateWorkspaceRequest from hotdata.models.create_workspace_response import CreateWorkspaceResponse as CreateWorkspaceResponse @@ -273,7 +243,6 @@ from hotdata.models.get_connection_response import GetConnectionResponse as GetConnectionResponse from hotdata.models.get_database_context_response import GetDatabaseContextResponse as GetDatabaseContextResponse from hotdata.models.get_result_response import GetResultResponse as GetResultResponse -from hotdata.models.get_secret_response import GetSecretResponse as GetSecretResponse from hotdata.models.index_entry_response import IndexEntryResponse as IndexEntryResponse from hotdata.models.index_info_response import IndexInfoResponse as IndexInfoResponse from hotdata.models.index_status import IndexStatus as IndexStatus @@ -282,7 +251,6 @@ from hotdata.models.job_status import JobStatus as JobStatus from hotdata.models.job_status_response import JobStatusResponse as JobStatusResponse from hotdata.models.job_type import JobType as JobType -from hotdata.models.list_connection_types_response import ListConnectionTypesResponse as ListConnectionTypesResponse from hotdata.models.list_connections_response import ListConnectionsResponse as ListConnectionsResponse from hotdata.models.list_database_contexts_response import ListDatabaseContextsResponse as ListDatabaseContextsResponse from hotdata.models.list_databases_response import ListDatabasesResponse as ListDatabasesResponse @@ -294,7 +262,6 @@ from hotdata.models.list_results_response import ListResultsResponse as ListResultsResponse from hotdata.models.list_saved_queries_response import ListSavedQueriesResponse as ListSavedQueriesResponse from hotdata.models.list_saved_query_versions_response import ListSavedQueryVersionsResponse as ListSavedQueryVersionsResponse -from hotdata.models.list_secrets_response import ListSecretsResponse as ListSecretsResponse from hotdata.models.list_workspaces_response import ListWorkspacesResponse as ListWorkspacesResponse from hotdata.models.load_managed_table_request import LoadManagedTableRequest as LoadManagedTableRequest from hotdata.models.load_managed_table_response import LoadManagedTableResponse as LoadManagedTableResponse @@ -307,21 +274,16 @@ from hotdata.models.query_request import QueryRequest as QueryRequest from hotdata.models.query_response import QueryResponse as QueryResponse from hotdata.models.query_run_info import QueryRunInfo as QueryRunInfo -from hotdata.models.refresh_request import RefreshRequest as RefreshRequest -from hotdata.models.refresh_response import RefreshResponse as RefreshResponse from hotdata.models.refresh_warning import RefreshWarning as RefreshWarning from hotdata.models.result_info import ResultInfo as ResultInfo from hotdata.models.results_format_query import ResultsFormatQuery as ResultsFormatQuery from hotdata.models.saved_query_detail import SavedQueryDetail as SavedQueryDetail from hotdata.models.saved_query_summary import SavedQuerySummary as SavedQuerySummary from hotdata.models.saved_query_version_info import SavedQueryVersionInfo as SavedQueryVersionInfo -from hotdata.models.schema_refresh_result import SchemaRefreshResult as SchemaRefreshResult -from hotdata.models.secret_metadata_response import SecretMetadataResponse as SecretMetadataResponse from hotdata.models.submit_job_response import SubmitJobResponse as SubmitJobResponse from hotdata.models.table_info import TableInfo as TableInfo from hotdata.models.table_partition_key import TablePartitionKey as TablePartitionKey from hotdata.models.table_profile_response import TableProfileResponse as TableProfileResponse -from hotdata.models.table_refresh_error import TableRefreshError as TableRefreshError from hotdata.models.table_refresh_result import TableRefreshResult as TableRefreshResult from hotdata.models.table_sort_key import TableSortKey as TableSortKey from hotdata.models.temporal_profile_detail import TemporalProfileDetail as TemporalProfileDetail @@ -329,8 +291,6 @@ from hotdata.models.update_embedding_provider_request import UpdateEmbeddingProviderRequest as UpdateEmbeddingProviderRequest from hotdata.models.update_embedding_provider_response import UpdateEmbeddingProviderResponse as UpdateEmbeddingProviderResponse from hotdata.models.update_saved_query_request import UpdateSavedQueryRequest as UpdateSavedQueryRequest -from hotdata.models.update_secret_request import UpdateSecretRequest as UpdateSecretRequest -from hotdata.models.update_secret_response import UpdateSecretResponse as UpdateSecretResponse from hotdata.models.upload_session_response import UploadSessionResponse as UploadSessionResponse from hotdata.models.upsert_database_context_request import UpsertDatabaseContextRequest as UpsertDatabaseContextRequest from hotdata.models.upsert_database_context_response import UpsertDatabaseContextResponse as UpsertDatabaseContextResponse diff --git a/hotdata/api/__init__.py b/hotdata/api/__init__.py index 5471f7c..1ccead0 100644 --- a/hotdata/api/__init__.py +++ b/hotdata/api/__init__.py @@ -1,7 +1,6 @@ # flake8: noqa # import apis into api package -from hotdata.api.connection_types_api import ConnectionTypesApi from hotdata.api.connections_api import ConnectionsApi from hotdata.api.database_context_api import DatabaseContextApi from hotdata.api.databases_api import DatabasesApi @@ -11,10 +10,8 @@ from hotdata.api.jobs_api import JobsApi from hotdata.api.query_api import QueryApi from hotdata.api.query_runs_api import QueryRunsApi -from hotdata.api.refresh_api import RefreshApi from hotdata.api.results_api import ResultsApi from hotdata.api.saved_queries_api import SavedQueriesApi -from hotdata.api.secrets_api import SecretsApi from hotdata.api.uploads_api import UploadsApi from hotdata.api.usage_api import UsageApi from hotdata.api.workspaces_api import WorkspacesApi diff --git a/hotdata/api/connection_types_api.py b/hotdata/api/connection_types_api.py deleted file mode 100644 index f2896ab..0000000 --- a/hotdata/api/connection_types_api.py +++ /dev/null @@ -1,551 +0,0 @@ -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field, StrictStr -from typing_extensions import Annotated -from hotdata.models.connection_type_detail import ConnectionTypeDetail -from hotdata.models.list_connection_types_response import ListConnectionTypesResponse - -from hotdata.api_client import ApiClient, RequestSerialized -from hotdata.api_response import ApiResponse -from hotdata.rest import RESTResponseType - - -class ConnectionTypesApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def get_connection_type( - self, - name: Annotated[StrictStr, Field(description="Connection type name (e.g. postgres, mysql, snowflake)")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ConnectionTypeDetail: - """Get connection type details - - Get configuration schema and authentication requirements for a specific connection type. - - :param name: Connection type name (e.g. postgres, mysql, snowflake) (required) - :type name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_connection_type_serialize( - name=name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ConnectionTypeDetail", - '404': "ApiErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_connection_type_with_http_info( - self, - name: Annotated[StrictStr, Field(description="Connection type name (e.g. postgres, mysql, snowflake)")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ConnectionTypeDetail]: - """Get connection type details - - Get configuration schema and authentication requirements for a specific connection type. - - :param name: Connection type name (e.g. postgres, mysql, snowflake) (required) - :type name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_connection_type_serialize( - name=name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ConnectionTypeDetail", - '404': "ApiErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_connection_type_without_preload_content( - self, - name: Annotated[StrictStr, Field(description="Connection type name (e.g. postgres, mysql, snowflake)")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get connection type details - - Get configuration schema and authentication requirements for a specific connection type. - - :param name: Connection type name (e.g. postgres, mysql, snowflake) (required) - :type name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_connection_type_serialize( - name=name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ConnectionTypeDetail", - '404': "ApiErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_connection_type_serialize( - self, - name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if name is not None: - _path_params['name'] = name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'WorkspaceId', - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v1/connection-types/{name}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def list_connection_types( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListConnectionTypesResponse: - """List connection types - - List all available connection types, including native sources and FlightDLT services. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_connection_types_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListConnectionTypesResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def list_connection_types_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListConnectionTypesResponse]: - """List connection types - - List all available connection types, including native sources and FlightDLT services. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_connection_types_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListConnectionTypesResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def list_connection_types_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List connection types - - List all available connection types, including native sources and FlightDLT services. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_connection_types_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListConnectionTypesResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_connection_types_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'WorkspaceId', - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v1/connection-types', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/hotdata/api/connections_api.py b/hotdata/api/connections_api.py index 25bda41..8e6c258 100644 --- a/hotdata/api/connections_api.py +++ b/hotdata/api/connections_api.py @@ -20,7 +20,6 @@ from typing_extensions import Annotated from hotdata.models.add_managed_schema_request import AddManagedSchemaRequest from hotdata.models.add_managed_table_request import AddManagedTableRequest -from hotdata.models.connection_health_response import ConnectionHealthResponse from hotdata.models.create_connection_request import CreateConnectionRequest from hotdata.models.create_connection_response import CreateConnectionResponse from hotdata.models.get_connection_response import GetConnectionResponse @@ -662,271 +661,6 @@ def _add_managed_table_serialize( - @validate_call - def check_connection_health( - self, - connection_id: Annotated[StrictStr, Field(description="Connection ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ConnectionHealthResponse: - """Check connection health - - Test connectivity to the remote database. Returns health status and latency. - - :param connection_id: Connection ID (required) - :type connection_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._check_connection_health_serialize( - connection_id=connection_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ConnectionHealthResponse", - '404': "ApiErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def check_connection_health_with_http_info( - self, - connection_id: Annotated[StrictStr, Field(description="Connection ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ConnectionHealthResponse]: - """Check connection health - - Test connectivity to the remote database. Returns health status and latency. - - :param connection_id: Connection ID (required) - :type connection_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._check_connection_health_serialize( - connection_id=connection_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ConnectionHealthResponse", - '404': "ApiErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def check_connection_health_without_preload_content( - self, - connection_id: Annotated[StrictStr, Field(description="Connection ID")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Check connection health - - Test connectivity to the remote database. Returns health status and latency. - - :param connection_id: Connection ID (required) - :type connection_id: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._check_connection_health_serialize( - connection_id=connection_id, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ConnectionHealthResponse", - '404': "ApiErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _check_connection_health_serialize( - self, - connection_id, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if connection_id is not None: - _path_params['connection_id'] = connection_id - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'WorkspaceId', - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v1/connections/{connection_id}/health', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - @validate_call def create_connection( self, diff --git a/hotdata/api/refresh_api.py b/hotdata/api/refresh_api.py deleted file mode 100644 index 0e2b587..0000000 --- a/hotdata/api/refresh_api.py +++ /dev/null @@ -1,324 +0,0 @@ -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from hotdata.models.refresh_request import RefreshRequest -from hotdata.models.refresh_response import RefreshResponse - -from hotdata.api_client import ApiClient, RequestSerialized -from hotdata.api_response import ApiResponse -from hotdata.rest import RESTResponseType - - -class RefreshApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def refresh( - self, - refresh_request: RefreshRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RefreshResponse: - """Refresh connection data - - Refresh schema metadata or table data. The behavior depends on the request fields: - **Schema refresh (all)**: omit all fields — re-discovers tables for every connection. - **Schema refresh (single)**: set `connection_id` — re-discovers tables for one connection. - **Data refresh (single table)**: set `connection_id`, `schema_name`, `table_name`, and `data: true`. - **Data refresh (connection)**: set `connection_id` and `data: true` — refreshes all cached tables. Set `include_uncached: true` to also sync tables that haven't been cached yet. Set `async: true` on data refresh operations to run in the background and return a job ID for polling. - - :param refresh_request: (required) - :type refresh_request: RefreshRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._refresh_serialize( - refresh_request=refresh_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RefreshResponse", - '202': "SubmitJobResponse", - '400': "ApiErrorResponse", - '404': "ApiErrorResponse", - '409': "ApiErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def refresh_with_http_info( - self, - refresh_request: RefreshRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[RefreshResponse]: - """Refresh connection data - - Refresh schema metadata or table data. The behavior depends on the request fields: - **Schema refresh (all)**: omit all fields — re-discovers tables for every connection. - **Schema refresh (single)**: set `connection_id` — re-discovers tables for one connection. - **Data refresh (single table)**: set `connection_id`, `schema_name`, `table_name`, and `data: true`. - **Data refresh (connection)**: set `connection_id` and `data: true` — refreshes all cached tables. Set `include_uncached: true` to also sync tables that haven't been cached yet. Set `async: true` on data refresh operations to run in the background and return a job ID for polling. - - :param refresh_request: (required) - :type refresh_request: RefreshRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._refresh_serialize( - refresh_request=refresh_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RefreshResponse", - '202': "SubmitJobResponse", - '400': "ApiErrorResponse", - '404': "ApiErrorResponse", - '409': "ApiErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def refresh_without_preload_content( - self, - refresh_request: RefreshRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Refresh connection data - - Refresh schema metadata or table data. The behavior depends on the request fields: - **Schema refresh (all)**: omit all fields — re-discovers tables for every connection. - **Schema refresh (single)**: set `connection_id` — re-discovers tables for one connection. - **Data refresh (single table)**: set `connection_id`, `schema_name`, `table_name`, and `data: true`. - **Data refresh (connection)**: set `connection_id` and `data: true` — refreshes all cached tables. Set `include_uncached: true` to also sync tables that haven't been cached yet. Set `async: true` on data refresh operations to run in the background and return a job ID for polling. - - :param refresh_request: (required) - :type refresh_request: RefreshRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._refresh_serialize( - refresh_request=refresh_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "RefreshResponse", - '202': "SubmitJobResponse", - '400': "ApiErrorResponse", - '404': "ApiErrorResponse", - '409': "ApiErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _refresh_serialize( - self, - refresh_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if refresh_request is not None: - _body_params = refresh_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'WorkspaceId', - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v1/refresh', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/hotdata/api/secrets_api.py b/hotdata/api/secrets_api.py deleted file mode 100644 index 7060cbf..0000000 --- a/hotdata/api/secrets_api.py +++ /dev/null @@ -1,1385 +0,0 @@ -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import warnings -from pydantic import validate_call, Field, StrictFloat, StrictStr, StrictInt -from typing import Any, Dict, List, Optional, Tuple, Union -from typing_extensions import Annotated - -from pydantic import Field, StrictStr -from typing_extensions import Annotated -from hotdata.models.create_secret_request import CreateSecretRequest -from hotdata.models.create_secret_response import CreateSecretResponse -from hotdata.models.get_secret_response import GetSecretResponse -from hotdata.models.list_secrets_response import ListSecretsResponse -from hotdata.models.update_secret_request import UpdateSecretRequest -from hotdata.models.update_secret_response import UpdateSecretResponse - -from hotdata.api_client import ApiClient, RequestSerialized -from hotdata.api_response import ApiResponse -from hotdata.rest import RESTResponseType - - -class SecretsApi: - """NOTE: This class is auto generated by OpenAPI Generator - Ref: https://openapi-generator.tech - - Do not edit the class manually. - """ - - def __init__(self, api_client=None) -> None: - if api_client is None: - api_client = ApiClient.get_default() - self.api_client = api_client - - - @validate_call - def create_secret( - self, - create_secret_request: CreateSecretRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> CreateSecretResponse: - """Create secret - - Store a new named secret. The value is encrypted at rest and can be referenced by connections for authentication. Secret names must be unique. - - :param create_secret_request: (required) - :type create_secret_request: CreateSecretRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_secret_serialize( - create_secret_request=create_secret_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateSecretResponse", - '409': "ApiErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def create_secret_with_http_info( - self, - create_secret_request: CreateSecretRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[CreateSecretResponse]: - """Create secret - - Store a new named secret. The value is encrypted at rest and can be referenced by connections for authentication. Secret names must be unique. - - :param create_secret_request: (required) - :type create_secret_request: CreateSecretRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_secret_serialize( - create_secret_request=create_secret_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateSecretResponse", - '409': "ApiErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def create_secret_without_preload_content( - self, - create_secret_request: CreateSecretRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Create secret - - Store a new named secret. The value is encrypted at rest and can be referenced by connections for authentication. Secret names must be unique. - - :param create_secret_request: (required) - :type create_secret_request: CreateSecretRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._create_secret_serialize( - create_secret_request=create_secret_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '201': "CreateSecretResponse", - '409': "ApiErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _create_secret_serialize( - self, - create_secret_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if create_secret_request is not None: - _body_params = create_secret_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'WorkspaceId', - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='POST', - resource_path='/v1/secrets', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def delete_secret( - self, - name: Annotated[StrictStr, Field(description="Secret name")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> None: - """Delete secret - - - :param name: Secret name (required) - :type name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_secret_serialize( - name=name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '404': "ApiErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def delete_secret_with_http_info( - self, - name: Annotated[StrictStr, Field(description="Secret name")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[None]: - """Delete secret - - - :param name: Secret name (required) - :type name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_secret_serialize( - name=name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '404': "ApiErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def delete_secret_without_preload_content( - self, - name: Annotated[StrictStr, Field(description="Secret name")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Delete secret - - - :param name: Secret name (required) - :type name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._delete_secret_serialize( - name=name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '204': None, - '404': "ApiErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _delete_secret_serialize( - self, - name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if name is not None: - _path_params['name'] = name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'WorkspaceId', - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='DELETE', - resource_path='/v1/secrets/{name}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def get_secret( - self, - name: Annotated[StrictStr, Field(description="Secret name")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> GetSecretResponse: - """Get secret - - Get metadata for a secret. The secret value is never returned. - - :param name: Secret name (required) - :type name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_secret_serialize( - name=name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSecretResponse", - '404': "ApiErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def get_secret_with_http_info( - self, - name: Annotated[StrictStr, Field(description="Secret name")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[GetSecretResponse]: - """Get secret - - Get metadata for a secret. The secret value is never returned. - - :param name: Secret name (required) - :type name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_secret_serialize( - name=name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSecretResponse", - '404': "ApiErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def get_secret_without_preload_content( - self, - name: Annotated[StrictStr, Field(description="Secret name")], - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Get secret - - Get metadata for a secret. The secret value is never returned. - - :param name: Secret name (required) - :type name: str - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._get_secret_serialize( - name=name, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "GetSecretResponse", - '404': "ApiErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _get_secret_serialize( - self, - name, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if name is not None: - _path_params['name'] = name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'WorkspaceId', - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v1/secrets/{name}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def list_secrets( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ListSecretsResponse: - """List secrets - - List all stored secrets. Only metadata (name, timestamps) is returned — secret values are never exposed. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_secrets_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListSecretsResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def list_secrets_with_http_info( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[ListSecretsResponse]: - """List secrets - - List all stored secrets. Only metadata (name, timestamps) is returned — secret values are never exposed. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_secrets_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListSecretsResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def list_secrets_without_preload_content( - self, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """List secrets - - List all stored secrets. Only metadata (name, timestamps) is returned — secret values are never exposed. - - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._list_secrets_serialize( - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "ListSecretsResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _list_secrets_serialize( - self, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - - # authentication setting - _auth_settings: List[str] = [ - 'WorkspaceId', - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='GET', - resource_path='/v1/secrets', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - - - - @validate_call - def update_secret( - self, - name: Annotated[StrictStr, Field(description="Secret name")], - update_secret_request: UpdateSecretRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> UpdateSecretResponse: - """Update secret - - - :param name: Secret name (required) - :type name: str - :param update_secret_request: (required) - :type update_secret_request: UpdateSecretRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_secret_serialize( - name=name, - update_secret_request=update_secret_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UpdateSecretResponse", - '404': "ApiErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ).data - - - @validate_call - def update_secret_with_http_info( - self, - name: Annotated[StrictStr, Field(description="Secret name")], - update_secret_request: UpdateSecretRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> ApiResponse[UpdateSecretResponse]: - """Update secret - - - :param name: Secret name (required) - :type name: str - :param update_secret_request: (required) - :type update_secret_request: UpdateSecretRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_secret_serialize( - name=name, - update_secret_request=update_secret_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UpdateSecretResponse", - '404': "ApiErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - response_data.read() - return self.api_client.response_deserialize( - response_data=response_data, - response_types_map=_response_types_map, - ) - - - @validate_call - def update_secret_without_preload_content( - self, - name: Annotated[StrictStr, Field(description="Secret name")], - update_secret_request: UpdateSecretRequest, - _request_timeout: Union[ - None, - Annotated[StrictFloat, Field(gt=0)], - Tuple[ - Annotated[StrictFloat, Field(gt=0)], - Annotated[StrictFloat, Field(gt=0)] - ] - ] = None, - _request_auth: Optional[Dict[StrictStr, Any]] = None, - _content_type: Optional[StrictStr] = None, - _headers: Optional[Dict[StrictStr, Any]] = None, - _host_index: Annotated[StrictInt, Field(ge=0, le=0)] = 0, - ) -> RESTResponseType: - """Update secret - - - :param name: Secret name (required) - :type name: str - :param update_secret_request: (required) - :type update_secret_request: UpdateSecretRequest - :param _request_timeout: timeout setting for this request. If one - number provided, it will be total request - timeout. It can also be a pair (tuple) of - (connection, read) timeouts. - :type _request_timeout: int, tuple(int, int), optional - :param _request_auth: set to override the auth_settings for an a single - request; this effectively ignores the - authentication in the spec for a single request. - :type _request_auth: dict, optional - :param _content_type: force content-type for the request. - :type _content_type: str, Optional - :param _headers: set to override the headers for a single - request; this effectively ignores the headers - in the spec for a single request. - :type _headers: dict, optional - :param _host_index: set to override the host_index for a single - request; this effectively ignores the host_index - in the spec for a single request. - :type _host_index: int, optional - :return: Returns the result object. - """ # noqa: E501 - - _param = self._update_secret_serialize( - name=name, - update_secret_request=update_secret_request, - _request_auth=_request_auth, - _content_type=_content_type, - _headers=_headers, - _host_index=_host_index - ) - - _response_types_map: Dict[str, Optional[str]] = { - '200': "UpdateSecretResponse", - '404': "ApiErrorResponse", - } - response_data = self.api_client.call_api( - *_param, - _request_timeout=_request_timeout - ) - return response_data.response - - - def _update_secret_serialize( - self, - name, - update_secret_request, - _request_auth, - _content_type, - _headers, - _host_index, - ) -> RequestSerialized: - - _host = None - - _collection_formats: Dict[str, str] = { - } - - _path_params: Dict[str, str] = {} - _query_params: List[Tuple[str, str]] = [] - _header_params: Dict[str, Optional[str]] = _headers or {} - _form_params: List[Tuple[str, str]] = [] - _files: Dict[ - str, Union[str, bytes, List[str], List[bytes], List[Tuple[str, bytes]]] - ] = {} - _body_params: Optional[bytes] = None - - # process the path parameters - if name is not None: - _path_params['name'] = name - # process the query parameters - # process the header parameters - # process the form parameters - # process the body parameter - if update_secret_request is not None: - _body_params = update_secret_request - - - # set the HTTP header `Accept` - if 'Accept' not in _header_params: - _header_params['Accept'] = self.api_client.select_header_accept( - [ - 'application/json' - ] - ) - - # set the HTTP header `Content-Type` - if _content_type: - _header_params['Content-Type'] = _content_type - else: - _default_content_type = ( - self.api_client.select_header_content_type( - [ - 'application/json' - ] - ) - ) - if _default_content_type is not None: - _header_params['Content-Type'] = _default_content_type - - # authentication setting - _auth_settings: List[str] = [ - 'WorkspaceId', - 'BearerAuth' - ] - - return self.api_client.param_serialize( - method='PUT', - resource_path='/v1/secrets/{name}', - path_params=_path_params, - query_params=_query_params, - header_params=_header_params, - body=_body_params, - post_params=_form_params, - files=_files, - auth_settings=_auth_settings, - collection_formats=_collection_formats, - _host=_host, - _request_auth=_request_auth - ) - - diff --git a/hotdata/models/__init__.py b/hotdata/models/__init__.py index d86df66..a49bac7 100644 --- a/hotdata/models/__init__.py +++ b/hotdata/models/__init__.py @@ -38,12 +38,7 @@ from hotdata.models.column_profile_detail_one_of4 import ColumnProfileDetailOneOf4 from hotdata.models.column_profile_info import ColumnProfileInfo from hotdata.models.column_type_spec import ColumnTypeSpec -from hotdata.models.connection_health_response import ConnectionHealthResponse from hotdata.models.connection_info import ConnectionInfo -from hotdata.models.connection_refresh_result import ConnectionRefreshResult -from hotdata.models.connection_schema_error import ConnectionSchemaError -from hotdata.models.connection_type_detail import ConnectionTypeDetail -from hotdata.models.connection_type_summary import ConnectionTypeSummary from hotdata.models.create_connection_request import CreateConnectionRequest from hotdata.models.create_connection_response import CreateConnectionResponse from hotdata.models.create_database_request import CreateDatabaseRequest @@ -52,8 +47,6 @@ from hotdata.models.create_embedding_provider_response import CreateEmbeddingProviderResponse from hotdata.models.create_index_request import CreateIndexRequest from hotdata.models.create_saved_query_request import CreateSavedQueryRequest -from hotdata.models.create_secret_request import CreateSecretRequest -from hotdata.models.create_secret_response import CreateSecretResponse from hotdata.models.create_upload_request import CreateUploadRequest from hotdata.models.create_workspace_request import CreateWorkspaceRequest from hotdata.models.create_workspace_response import CreateWorkspaceResponse @@ -77,7 +70,6 @@ from hotdata.models.get_connection_response import GetConnectionResponse from hotdata.models.get_database_context_response import GetDatabaseContextResponse from hotdata.models.get_result_response import GetResultResponse -from hotdata.models.get_secret_response import GetSecretResponse from hotdata.models.index_entry_response import IndexEntryResponse from hotdata.models.index_info_response import IndexInfoResponse from hotdata.models.index_status import IndexStatus @@ -86,7 +78,6 @@ from hotdata.models.job_status import JobStatus from hotdata.models.job_status_response import JobStatusResponse from hotdata.models.job_type import JobType -from hotdata.models.list_connection_types_response import ListConnectionTypesResponse from hotdata.models.list_connections_response import ListConnectionsResponse from hotdata.models.list_database_contexts_response import ListDatabaseContextsResponse from hotdata.models.list_databases_response import ListDatabasesResponse @@ -98,7 +89,6 @@ from hotdata.models.list_results_response import ListResultsResponse from hotdata.models.list_saved_queries_response import ListSavedQueriesResponse from hotdata.models.list_saved_query_versions_response import ListSavedQueryVersionsResponse -from hotdata.models.list_secrets_response import ListSecretsResponse from hotdata.models.list_workspaces_response import ListWorkspacesResponse from hotdata.models.load_managed_table_request import LoadManagedTableRequest from hotdata.models.load_managed_table_response import LoadManagedTableResponse @@ -111,21 +101,16 @@ from hotdata.models.query_request import QueryRequest from hotdata.models.query_response import QueryResponse from hotdata.models.query_run_info import QueryRunInfo -from hotdata.models.refresh_request import RefreshRequest -from hotdata.models.refresh_response import RefreshResponse from hotdata.models.refresh_warning import RefreshWarning from hotdata.models.result_info import ResultInfo from hotdata.models.results_format_query import ResultsFormatQuery from hotdata.models.saved_query_detail import SavedQueryDetail from hotdata.models.saved_query_summary import SavedQuerySummary from hotdata.models.saved_query_version_info import SavedQueryVersionInfo -from hotdata.models.schema_refresh_result import SchemaRefreshResult -from hotdata.models.secret_metadata_response import SecretMetadataResponse from hotdata.models.submit_job_response import SubmitJobResponse from hotdata.models.table_info import TableInfo from hotdata.models.table_partition_key import TablePartitionKey from hotdata.models.table_profile_response import TableProfileResponse -from hotdata.models.table_refresh_error import TableRefreshError from hotdata.models.table_refresh_result import TableRefreshResult from hotdata.models.table_sort_key import TableSortKey from hotdata.models.temporal_profile_detail import TemporalProfileDetail @@ -133,8 +118,6 @@ from hotdata.models.update_embedding_provider_request import UpdateEmbeddingProviderRequest from hotdata.models.update_embedding_provider_response import UpdateEmbeddingProviderResponse from hotdata.models.update_saved_query_request import UpdateSavedQueryRequest -from hotdata.models.update_secret_request import UpdateSecretRequest -from hotdata.models.update_secret_response import UpdateSecretResponse from hotdata.models.upload_session_response import UploadSessionResponse from hotdata.models.upsert_database_context_request import UpsertDatabaseContextRequest from hotdata.models.upsert_database_context_response import UpsertDatabaseContextResponse diff --git a/hotdata/models/connection_health_response.py b/hotdata/models/connection_health_response.py deleted file mode 100644 index 50a24f9..0000000 --- a/hotdata/models/connection_health_response.py +++ /dev/null @@ -1,100 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class ConnectionHealthResponse(BaseModel): - """ - Response body for GET /connections/{connection_id}/health - """ # noqa: E501 - connection_id: StrictStr - error: Optional[StrictStr] = None - healthy: StrictBool - latency_ms: Annotated[int, Field(strict=True, ge=0)] - __properties: ClassVar[List[str]] = ["connection_id", "error", "healthy", "latency_ms"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ConnectionHealthResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if error (nullable) is None - # and model_fields_set contains the field - if self.error is None and "error" in self.model_fields_set: - _dict['error'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ConnectionHealthResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "connection_id": obj.get("connection_id"), - "error": obj.get("error"), - "healthy": obj.get("healthy"), - "latency_ms": obj.get("latency_ms") - }) - return _obj - - diff --git a/hotdata/models/connection_refresh_result.py b/hotdata/models/connection_refresh_result.py deleted file mode 100644 index 3485e49..0000000 --- a/hotdata/models/connection_refresh_result.py +++ /dev/null @@ -1,117 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from hotdata.models.refresh_warning import RefreshWarning -from hotdata.models.table_refresh_error import TableRefreshError -from typing import Optional, Set -from typing_extensions import Self - -class ConnectionRefreshResult(BaseModel): - """ - Result payload for a `data_refresh_connection` job. - """ # noqa: E501 - connection_id: StrictStr - duration_ms: Annotated[int, Field(strict=True, ge=0)] - errors: Optional[List[TableRefreshError]] = None - tables_failed: Annotated[int, Field(strict=True, ge=0)] - tables_refreshed: Annotated[int, Field(strict=True, ge=0)] - total_rows: Annotated[int, Field(strict=True, ge=0)] - warnings: Optional[List[RefreshWarning]] = None - __properties: ClassVar[List[str]] = ["connection_id", "duration_ms", "errors", "tables_failed", "tables_refreshed", "total_rows", "warnings"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ConnectionRefreshResult from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in errors (list) - _items = [] - if self.errors: - for _item_errors in self.errors: - if _item_errors: - _items.append(_item_errors.to_dict()) - _dict['errors'] = _items - # override the default output from pydantic by calling `to_dict()` of each item in warnings (list) - _items = [] - if self.warnings: - for _item_warnings in self.warnings: - if _item_warnings: - _items.append(_item_warnings.to_dict()) - _dict['warnings'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ConnectionRefreshResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "connection_id": obj.get("connection_id"), - "duration_ms": obj.get("duration_ms"), - "errors": [TableRefreshError.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, - "tables_failed": obj.get("tables_failed"), - "tables_refreshed": obj.get("tables_refreshed"), - "total_rows": obj.get("total_rows"), - "warnings": [RefreshWarning.from_dict(_item) for _item in obj["warnings"]] if obj.get("warnings") is not None else None - }) - return _obj - - diff --git a/hotdata/models/connection_schema_error.py b/hotdata/models/connection_schema_error.py deleted file mode 100644 index 1a2ca82..0000000 --- a/hotdata/models/connection_schema_error.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class ConnectionSchemaError(BaseModel): - """ - Error details for a failed connection schema refresh - """ # noqa: E501 - connection_id: StrictStr - error: StrictStr - __properties: ClassVar[List[str]] = ["connection_id", "error"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ConnectionSchemaError from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ConnectionSchemaError from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "connection_id": obj.get("connection_id"), - "error": obj.get("error") - }) - return _obj - - diff --git a/hotdata/models/connection_type_detail.py b/hotdata/models/connection_type_detail.py deleted file mode 100644 index 978c863..0000000 --- a/hotdata/models/connection_type_detail.py +++ /dev/null @@ -1,104 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing import Optional, Set -from typing_extensions import Self - -class ConnectionTypeDetail(BaseModel): - """ - Detailed configuration and authentication schema for a single connection type. - """ # noqa: E501 - auth: Optional[Any] = None - config_schema: Optional[Any] = None - label: StrictStr - name: StrictStr - __properties: ClassVar[List[str]] = ["auth", "config_schema", "label", "name"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ConnectionTypeDetail from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if auth (nullable) is None - # and model_fields_set contains the field - if self.auth is None and "auth" in self.model_fields_set: - _dict['auth'] = None - - # set to None if config_schema (nullable) is None - # and model_fields_set contains the field - if self.config_schema is None and "config_schema" in self.model_fields_set: - _dict['config_schema'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ConnectionTypeDetail from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "auth": obj.get("auth"), - "config_schema": obj.get("config_schema"), - "label": obj.get("label"), - "name": obj.get("name") - }) - return _obj - - diff --git a/hotdata/models/connection_type_summary.py b/hotdata/models/connection_type_summary.py deleted file mode 100644 index 48bb845..0000000 --- a/hotdata/models/connection_type_summary.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class ConnectionTypeSummary(BaseModel): - """ - Summary entry for the connection-type list endpoint. - """ # noqa: E501 - label: StrictStr - name: StrictStr - __properties: ClassVar[List[str]] = ["label", "name"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ConnectionTypeSummary from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ConnectionTypeSummary from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "label": obj.get("label"), - "name": obj.get("name") - }) - return _obj - - diff --git a/hotdata/models/create_secret_request.py b/hotdata/models/create_secret_request.py deleted file mode 100644 index c6bbdb9..0000000 --- a/hotdata/models/create_secret_request.py +++ /dev/null @@ -1,90 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class CreateSecretRequest(BaseModel): - """ - Request body for POST /secrets - """ # noqa: E501 - name: StrictStr - value: StrictStr - __properties: ClassVar[List[str]] = ["name", "value"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CreateSecretRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreateSecretRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "value": obj.get("value") - }) - return _obj - - diff --git a/hotdata/models/create_secret_response.py b/hotdata/models/create_secret_response.py deleted file mode 100644 index 2f4ead8..0000000 --- a/hotdata/models/create_secret_response.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class CreateSecretResponse(BaseModel): - """ - Response body for POST /secrets - """ # noqa: E501 - created_at: datetime - id: StrictStr - name: StrictStr - __properties: ClassVar[List[str]] = ["created_at", "id", "name"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of CreateSecretResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of CreateSecretResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "created_at": obj.get("created_at"), - "id": obj.get("id"), - "name": obj.get("name") - }) - return _obj - - diff --git a/hotdata/models/get_secret_response.py b/hotdata/models/get_secret_response.py deleted file mode 100644 index feb0fec..0000000 --- a/hotdata/models/get_secret_response.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class GetSecretResponse(BaseModel): - """ - Response body for GET /secrets/{name} - """ # noqa: E501 - created_at: datetime - name: StrictStr - updated_at: datetime - __properties: ClassVar[List[str]] = ["created_at", "name", "updated_at"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of GetSecretResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of GetSecretResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "created_at": obj.get("created_at"), - "name": obj.get("name"), - "updated_at": obj.get("updated_at") - }) - return _obj - - diff --git a/hotdata/models/job_result.py b/hotdata/models/job_result.py index 80566e1..4ffbd33 100644 --- a/hotdata/models/job_result.py +++ b/hotdata/models/job_result.py @@ -19,7 +19,6 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional from hotdata.models.bulk_create_databases_result import BulkCreateDatabasesResult -from hotdata.models.connection_refresh_result import ConnectionRefreshResult from hotdata.models.index_info_response import IndexInfoResponse from hotdata.models.load_managed_table_response import LoadManagedTableResponse from hotdata.models.table_refresh_result import TableRefreshResult @@ -27,7 +26,7 @@ from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -JOBRESULT_ONE_OF_SCHEMAS = ["BulkCreateDatabasesResult", "ConnectionRefreshResult", "IndexInfoResponse", "LoadManagedTableResponse", "TableRefreshResult"] +JOBRESULT_ONE_OF_SCHEMAS = ["BulkCreateDatabasesResult", "IndexInfoResponse", "LoadManagedTableResponse", "TableRefreshResult"] class JobResult(BaseModel): """ @@ -35,16 +34,14 @@ class JobResult(BaseModel): """ # data type: TableRefreshResult oneof_schema_1_validator: Optional[TableRefreshResult] = Field(default=None, description="Result of a single table data refresh.") - # data type: ConnectionRefreshResult - oneof_schema_2_validator: Optional[ConnectionRefreshResult] = Field(default=None, description="Result of a connection-wide data refresh.") # data type: IndexInfoResponse - oneof_schema_3_validator: Optional[IndexInfoResponse] = Field(default=None, description="Result of an index creation.") + oneof_schema_2_validator: Optional[IndexInfoResponse] = Field(default=None, description="Result of an index creation.") # data type: LoadManagedTableResponse - oneof_schema_4_validator: Optional[LoadManagedTableResponse] = Field(default=None, description="Result of a managed-table load (row count + published schema).") + oneof_schema_3_validator: Optional[LoadManagedTableResponse] = Field(default=None, description="Result of a managed-table load (row count + published schema).") # data type: BulkCreateDatabasesResult - oneof_schema_5_validator: Optional[BulkCreateDatabasesResult] = Field(default=None, description="Counters from a bulk database creation.") - actual_instance: Optional[Union[BulkCreateDatabasesResult, ConnectionRefreshResult, IndexInfoResponse, LoadManagedTableResponse, TableRefreshResult]] = None - one_of_schemas: Set[str] = { "BulkCreateDatabasesResult", "ConnectionRefreshResult", "IndexInfoResponse", "LoadManagedTableResponse", "TableRefreshResult" } + oneof_schema_4_validator: Optional[BulkCreateDatabasesResult] = Field(default=None, description="Counters from a bulk database creation.") + actual_instance: Optional[Union[BulkCreateDatabasesResult, IndexInfoResponse, LoadManagedTableResponse, TableRefreshResult]] = None + one_of_schemas: Set[str] = { "BulkCreateDatabasesResult", "IndexInfoResponse", "LoadManagedTableResponse", "TableRefreshResult" } model_config = ConfigDict( validate_assignment=True, @@ -72,11 +69,6 @@ def actual_instance_must_validate_oneof(cls, v): error_messages.append(f"Error! Input type `{type(v)}` is not `TableRefreshResult`") else: match += 1 - # validate data type: ConnectionRefreshResult - if not isinstance(v, ConnectionRefreshResult): - error_messages.append(f"Error! Input type `{type(v)}` is not `ConnectionRefreshResult`") - else: - match += 1 # validate data type: IndexInfoResponse if not isinstance(v, IndexInfoResponse): error_messages.append(f"Error! Input type `{type(v)}` is not `IndexInfoResponse`") @@ -94,10 +86,10 @@ def actual_instance_must_validate_oneof(cls, v): match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in JobResult with oneOf schemas: BulkCreateDatabasesResult, ConnectionRefreshResult, IndexInfoResponse, LoadManagedTableResponse, TableRefreshResult. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in JobResult with oneOf schemas: BulkCreateDatabasesResult, IndexInfoResponse, LoadManagedTableResponse, TableRefreshResult. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in JobResult with oneOf schemas: BulkCreateDatabasesResult, ConnectionRefreshResult, IndexInfoResponse, LoadManagedTableResponse, TableRefreshResult. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in JobResult with oneOf schemas: BulkCreateDatabasesResult, IndexInfoResponse, LoadManagedTableResponse, TableRefreshResult. Details: " + ", ".join(error_messages)) else: return v @@ -118,12 +110,6 @@ def from_json(cls, json_str: str) -> Self: match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) - # deserialize data into ConnectionRefreshResult - try: - instance.actual_instance = ConnectionRefreshResult.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) # deserialize data into IndexInfoResponse try: instance.actual_instance = IndexInfoResponse.from_json(json_str) @@ -145,10 +131,10 @@ def from_json(cls, json_str: str) -> Self: if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into JobResult with oneOf schemas: BulkCreateDatabasesResult, ConnectionRefreshResult, IndexInfoResponse, LoadManagedTableResponse, TableRefreshResult. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into JobResult with oneOf schemas: BulkCreateDatabasesResult, IndexInfoResponse, LoadManagedTableResponse, TableRefreshResult. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when deserializing the JSON string into JobResult with oneOf schemas: BulkCreateDatabasesResult, ConnectionRefreshResult, IndexInfoResponse, LoadManagedTableResponse, TableRefreshResult. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when deserializing the JSON string into JobResult with oneOf schemas: BulkCreateDatabasesResult, IndexInfoResponse, LoadManagedTableResponse, TableRefreshResult. Details: " + ", ".join(error_messages)) else: return instance @@ -162,7 +148,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], BulkCreateDatabasesResult, ConnectionRefreshResult, IndexInfoResponse, LoadManagedTableResponse, TableRefreshResult]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], BulkCreateDatabasesResult, IndexInfoResponse, LoadManagedTableResponse, TableRefreshResult]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/hotdata/models/list_connection_types_response.py b/hotdata/models/list_connection_types_response.py deleted file mode 100644 index 69c188a..0000000 --- a/hotdata/models/list_connection_types_response.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from hotdata.models.connection_type_summary import ConnectionTypeSummary -from typing import Optional, Set -from typing_extensions import Self - -class ListConnectionTypesResponse(BaseModel): - """ - Envelope for the connection-types list response. - """ # noqa: E501 - connection_types: List[ConnectionTypeSummary] - __properties: ClassVar[List[str]] = ["connection_types"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ListConnectionTypesResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in connection_types (list) - _items = [] - if self.connection_types: - for _item_connection_types in self.connection_types: - if _item_connection_types: - _items.append(_item_connection_types.to_dict()) - _dict['connection_types'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ListConnectionTypesResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "connection_types": [ConnectionTypeSummary.from_dict(_item) for _item in obj["connection_types"]] if obj.get("connection_types") is not None else None - }) - return _obj - - diff --git a/hotdata/models/list_secrets_response.py b/hotdata/models/list_secrets_response.py deleted file mode 100644 index 70aba65..0000000 --- a/hotdata/models/list_secrets_response.py +++ /dev/null @@ -1,96 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict -from typing import Any, ClassVar, Dict, List -from hotdata.models.secret_metadata_response import SecretMetadataResponse -from typing import Optional, Set -from typing_extensions import Self - -class ListSecretsResponse(BaseModel): - """ - Response body for GET /secrets - """ # noqa: E501 - secrets: List[SecretMetadataResponse] - __properties: ClassVar[List[str]] = ["secrets"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of ListSecretsResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in secrets (list) - _items = [] - if self.secrets: - for _item_secrets in self.secrets: - if _item_secrets: - _items.append(_item_secrets.to_dict()) - _dict['secrets'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of ListSecretsResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "secrets": [SecretMetadataResponse.from_dict(_item) for _item in obj["secrets"]] if obj.get("secrets") is not None else None - }) - return _obj - - diff --git a/hotdata/models/refresh_request.py b/hotdata/models/refresh_request.py deleted file mode 100644 index a3638f5..0000000 --- a/hotdata/models/refresh_request.py +++ /dev/null @@ -1,121 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from typing import Optional, Set -from typing_extensions import Self - -class RefreshRequest(BaseModel): - """ - Request body for POST /refresh - """ # noqa: E501 - var_async: Optional[StrictBool] = Field(default=False, 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") - async_after_ms: Optional[Annotated[int, Field(strict=True, ge=1000)]] = Field(default=None, description="If set (requires `async` = true), wait up to this many milliseconds for the refresh to finish: if it completes in time the full result is returned, otherwise a `202` with a job ID to poll. Must be between 1000 and the server maximum; a value out of that range, or set without `async` = true, is rejected with 400. Only applies to data refresh.") - connection_id: Optional[StrictStr] = None - data: Optional[StrictBool] = False - include_uncached: Optional[StrictBool] = Field(default=False, 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.") - schema_name: Optional[StrictStr] = None - table_name: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["async", "async_after_ms", "connection_id", "data", "include_uncached", "schema_name", "table_name"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of RefreshRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # set to None if async_after_ms (nullable) is None - # and model_fields_set contains the field - if self.async_after_ms is None and "async_after_ms" in self.model_fields_set: - _dict['async_after_ms'] = None - - # set to None if connection_id (nullable) is None - # and model_fields_set contains the field - if self.connection_id is None and "connection_id" in self.model_fields_set: - _dict['connection_id'] = None - - # set to None if schema_name (nullable) is None - # and model_fields_set contains the field - if self.schema_name is None and "schema_name" in self.model_fields_set: - _dict['schema_name'] = None - - # set to None if table_name (nullable) is None - # and model_fields_set contains the field - if self.table_name is None and "table_name" in self.model_fields_set: - _dict['table_name'] = None - - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of RefreshRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "async": obj.get("async") if obj.get("async") is not None else False, - "async_after_ms": obj.get("async_after_ms"), - "connection_id": obj.get("connection_id"), - "data": obj.get("data") if obj.get("data") is not None else False, - "include_uncached": obj.get("include_uncached") if obj.get("include_uncached") is not None else False, - "schema_name": obj.get("schema_name"), - "table_name": obj.get("table_name") - }) - return _obj - - diff --git a/hotdata/models/refresh_response.py b/hotdata/models/refresh_response.py deleted file mode 100644 index 3ca404c..0000000 --- a/hotdata/models/refresh_response.py +++ /dev/null @@ -1,152 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import json -import pprint -from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator -from typing import Any, List, Optional -from hotdata.models.connection_refresh_result import ConnectionRefreshResult -from hotdata.models.schema_refresh_result import SchemaRefreshResult -from hotdata.models.table_refresh_result import TableRefreshResult -from pydantic import StrictStr, Field -from typing import Union, List, Set, Optional, Dict -from typing_extensions import Literal, Self - -REFRESHRESPONSE_ONE_OF_SCHEMAS = ["ConnectionRefreshResult", "SchemaRefreshResult", "TableRefreshResult"] - -class RefreshResponse(BaseModel): - """ - Unified response type for refresh operations - """ - # data type: SchemaRefreshResult - oneof_schema_1_validator: Optional[SchemaRefreshResult] = None - # data type: TableRefreshResult - oneof_schema_2_validator: Optional[TableRefreshResult] = None - # data type: ConnectionRefreshResult - oneof_schema_3_validator: Optional[ConnectionRefreshResult] = None - actual_instance: Optional[Union[ConnectionRefreshResult, SchemaRefreshResult, TableRefreshResult]] = None - one_of_schemas: Set[str] = { "ConnectionRefreshResult", "SchemaRefreshResult", "TableRefreshResult" } - - model_config = ConfigDict( - validate_assignment=True, - protected_namespaces=(), - ) - - - def __init__(self, *args, **kwargs) -> None: - if args: - if len(args) > 1: - raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`") - if kwargs: - raise ValueError("If a position argument is used, keyword arguments cannot be used.") - super().__init__(actual_instance=args[0]) - else: - super().__init__(**kwargs) - - @field_validator('actual_instance') - def actual_instance_must_validate_oneof(cls, v): - instance = RefreshResponse.model_construct() - error_messages = [] - match = 0 - # validate data type: SchemaRefreshResult - if not isinstance(v, SchemaRefreshResult): - error_messages.append(f"Error! Input type `{type(v)}` is not `SchemaRefreshResult`") - else: - match += 1 - # validate data type: TableRefreshResult - if not isinstance(v, TableRefreshResult): - error_messages.append(f"Error! Input type `{type(v)}` is not `TableRefreshResult`") - else: - match += 1 - # validate data type: ConnectionRefreshResult - if not isinstance(v, ConnectionRefreshResult): - error_messages.append(f"Error! Input type `{type(v)}` is not `ConnectionRefreshResult`") - else: - match += 1 - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in RefreshResponse with oneOf schemas: ConnectionRefreshResult, SchemaRefreshResult, TableRefreshResult. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when setting `actual_instance` in RefreshResponse with oneOf schemas: ConnectionRefreshResult, SchemaRefreshResult, TableRefreshResult. Details: " + ", ".join(error_messages)) - else: - return v - - @classmethod - def from_dict(cls, obj: Union[str, Dict[str, Any]]) -> Self: - return cls.from_json(json.dumps(obj)) - - @classmethod - def from_json(cls, json_str: str) -> Self: - """Returns the object represented by the json string""" - instance = cls.model_construct() - error_messages = [] - match = 0 - - # deserialize data into SchemaRefreshResult - try: - instance.actual_instance = SchemaRefreshResult.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into TableRefreshResult - try: - instance.actual_instance = TableRefreshResult.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - # deserialize data into ConnectionRefreshResult - try: - instance.actual_instance = ConnectionRefreshResult.from_json(json_str) - match += 1 - except (ValidationError, ValueError) as e: - error_messages.append(str(e)) - - if match > 1: - # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into RefreshResponse with oneOf schemas: ConnectionRefreshResult, SchemaRefreshResult, TableRefreshResult. Details: " + ", ".join(error_messages)) - elif match == 0: - # no match - raise ValueError("No match found when deserializing the JSON string into RefreshResponse with oneOf schemas: ConnectionRefreshResult, SchemaRefreshResult, TableRefreshResult. Details: " + ", ".join(error_messages)) - else: - return instance - - def to_json(self) -> str: - """Returns the JSON representation of the actual instance""" - if self.actual_instance is None: - return "null" - - if hasattr(self.actual_instance, "to_json") and callable(self.actual_instance.to_json): - return self.actual_instance.to_json() - else: - return json.dumps(self.actual_instance) - - def to_dict(self) -> Optional[Union[Dict[str, Any], ConnectionRefreshResult, SchemaRefreshResult, TableRefreshResult]]: - """Returns the dict representation of the actual instance""" - if self.actual_instance is None: - return None - - if hasattr(self.actual_instance, "to_dict") and callable(self.actual_instance.to_dict): - return self.actual_instance.to_dict() - else: - # primitive type - return self.actual_instance - - def to_str(self) -> str: - """Returns the string representation of the actual instance""" - return pprint.pformat(self.model_dump()) - - diff --git a/hotdata/models/schema_refresh_result.py b/hotdata/models/schema_refresh_result.py deleted file mode 100644 index aeba507..0000000 --- a/hotdata/models/schema_refresh_result.py +++ /dev/null @@ -1,107 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, Field -from typing import Any, ClassVar, Dict, List, Optional -from typing_extensions import Annotated -from hotdata.models.connection_schema_error import ConnectionSchemaError -from typing import Optional, Set -from typing_extensions import Self - -class SchemaRefreshResult(BaseModel): - """ - Response for schema refresh operations - """ # noqa: E501 - connections_failed: Annotated[int, Field(strict=True, ge=0)] - connections_refreshed: Annotated[int, Field(strict=True, ge=0)] - errors: Optional[List[ConnectionSchemaError]] = None - tables_added: Annotated[int, Field(strict=True, ge=0)] - tables_discovered: Annotated[int, Field(strict=True, ge=0)] - tables_modified: Annotated[int, Field(strict=True, ge=0)] - __properties: ClassVar[List[str]] = ["connections_failed", "connections_refreshed", "errors", "tables_added", "tables_discovered", "tables_modified"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SchemaRefreshResult from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - # override the default output from pydantic by calling `to_dict()` of each item in errors (list) - _items = [] - if self.errors: - for _item_errors in self.errors: - if _item_errors: - _items.append(_item_errors.to_dict()) - _dict['errors'] = _items - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SchemaRefreshResult from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "connections_failed": obj.get("connections_failed"), - "connections_refreshed": obj.get("connections_refreshed"), - "errors": [ConnectionSchemaError.from_dict(_item) for _item in obj["errors"]] if obj.get("errors") is not None else None, - "tables_added": obj.get("tables_added"), - "tables_discovered": obj.get("tables_discovered"), - "tables_modified": obj.get("tables_modified") - }) - return _obj - - diff --git a/hotdata/models/secret_metadata_response.py b/hotdata/models/secret_metadata_response.py deleted file mode 100644 index 0380417..0000000 --- a/hotdata/models/secret_metadata_response.py +++ /dev/null @@ -1,93 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class SecretMetadataResponse(BaseModel): - """ - Single secret metadata for API responses - """ # noqa: E501 - created_at: datetime - name: StrictStr - updated_at: datetime - __properties: ClassVar[List[str]] = ["created_at", "name", "updated_at"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of SecretMetadataResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of SecretMetadataResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "created_at": obj.get("created_at"), - "name": obj.get("name"), - "updated_at": obj.get("updated_at") - }) - return _obj - - diff --git a/hotdata/models/table_refresh_error.py b/hotdata/models/table_refresh_error.py deleted file mode 100644 index c5000e2..0000000 --- a/hotdata/models/table_refresh_error.py +++ /dev/null @@ -1,92 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class TableRefreshError(BaseModel): - """ - Error details for a failed table refresh. - """ # noqa: E501 - error: StrictStr - schema_name: StrictStr - table_name: StrictStr - __properties: ClassVar[List[str]] = ["error", "schema_name", "table_name"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of TableRefreshError from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of TableRefreshError from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "error": obj.get("error"), - "schema_name": obj.get("schema_name"), - "table_name": obj.get("table_name") - }) - return _obj - - diff --git a/hotdata/models/update_secret_request.py b/hotdata/models/update_secret_request.py deleted file mode 100644 index 5da7899..0000000 --- a/hotdata/models/update_secret_request.py +++ /dev/null @@ -1,88 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class UpdateSecretRequest(BaseModel): - """ - Request body for PUT /secrets/{name} - """ # noqa: E501 - value: StrictStr - __properties: ClassVar[List[str]] = ["value"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UpdateSecretRequest from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UpdateSecretRequest from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "value": obj.get("value") - }) - return _obj - - diff --git a/hotdata/models/update_secret_response.py b/hotdata/models/update_secret_response.py deleted file mode 100644 index 2374e31..0000000 --- a/hotdata/models/update_secret_response.py +++ /dev/null @@ -1,91 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -from __future__ import annotations -import pprint -import re # noqa: F401 -import json - -from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List -from typing import Optional, Set -from typing_extensions import Self - -class UpdateSecretResponse(BaseModel): - """ - Response body for PUT /secrets/{name} - """ # noqa: E501 - name: StrictStr - updated_at: datetime - __properties: ClassVar[List[str]] = ["name", "updated_at"] - - model_config = ConfigDict( - populate_by_name=True, - validate_assignment=True, - protected_namespaces=(), - ) - - - def to_str(self) -> str: - """Returns the string representation of the model using alias""" - return pprint.pformat(self.model_dump(by_alias=True)) - - def to_json(self) -> str: - """Returns the JSON representation of the model using alias""" - # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead - return json.dumps(self.to_dict()) - - @classmethod - def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of UpdateSecretResponse from a JSON string""" - return cls.from_dict(json.loads(json_str)) - - def to_dict(self) -> Dict[str, Any]: - """Return the dictionary representation of the model using alias. - - This has the following differences from calling pydantic's - `self.model_dump(by_alias=True)`: - - * `None` is only added to the output dict for nullable fields that - were set at model initialization. Other fields with value `None` - are ignored. - """ - excluded_fields: Set[str] = set([ - ]) - - _dict = self.model_dump( - by_alias=True, - exclude=excluded_fields, - exclude_none=True, - ) - return _dict - - @classmethod - def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of UpdateSecretResponse from a dict""" - if obj is None: - return None - - if not isinstance(obj, dict): - return cls.model_validate(obj) - - _obj = cls.model_validate({ - "name": obj.get("name"), - "updated_at": obj.get("updated_at") - }) - return _obj - - diff --git a/test/test_connection_health_response.py b/test/test_connection_health_response.py deleted file mode 100644 index 9607032..0000000 --- a/test/test_connection_health_response.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from hotdata.models.connection_health_response import ConnectionHealthResponse - -class TestConnectionHealthResponse(unittest.TestCase): - """ConnectionHealthResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ConnectionHealthResponse: - """Test ConnectionHealthResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ConnectionHealthResponse` - """ - model = ConnectionHealthResponse() - if include_optional: - return ConnectionHealthResponse( - connection_id = '', - error = '', - healthy = True, - latency_ms = 0 - ) - else: - return ConnectionHealthResponse( - connection_id = '', - healthy = True, - latency_ms = 0, - ) - """ - - def testConnectionHealthResponse(self): - """Test ConnectionHealthResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_connection_refresh_result.py b/test/test_connection_refresh_result.py deleted file mode 100644 index b6e4d91..0000000 --- a/test/test_connection_refresh_result.py +++ /dev/null @@ -1,73 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from hotdata.models.connection_refresh_result import ConnectionRefreshResult - -class TestConnectionRefreshResult(unittest.TestCase): - """ConnectionRefreshResult unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ConnectionRefreshResult: - """Test ConnectionRefreshResult - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ConnectionRefreshResult` - """ - model = ConnectionRefreshResult() - if include_optional: - return ConnectionRefreshResult( - connection_id = '', - duration_ms = 0, - errors = [ - hotdata.models.table_refresh_error.TableRefreshError( - error = '', - schema_name = '', - table_name = '', ) - ], - tables_failed = 0, - tables_refreshed = 0, - total_rows = 0, - warnings = [ - hotdata.models.refresh_warning.RefreshWarning( - message = '', - schema_name = '', - table_name = '', ) - ] - ) - else: - return ConnectionRefreshResult( - connection_id = '', - duration_ms = 0, - tables_failed = 0, - tables_refreshed = 0, - total_rows = 0, - ) - """ - - def testConnectionRefreshResult(self): - """Test ConnectionRefreshResult""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_connection_schema_error.py b/test/test_connection_schema_error.py deleted file mode 100644 index 7980b46..0000000 --- a/test/test_connection_schema_error.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from hotdata.models.connection_schema_error import ConnectionSchemaError - -class TestConnectionSchemaError(unittest.TestCase): - """ConnectionSchemaError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ConnectionSchemaError: - """Test ConnectionSchemaError - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ConnectionSchemaError` - """ - model = ConnectionSchemaError() - if include_optional: - return ConnectionSchemaError( - connection_id = '', - error = '' - ) - else: - return ConnectionSchemaError( - connection_id = '', - error = '', - ) - """ - - def testConnectionSchemaError(self): - """Test ConnectionSchemaError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_connection_type_detail.py b/test/test_connection_type_detail.py deleted file mode 100644 index 04ec462..0000000 --- a/test/test_connection_type_detail.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from hotdata.models.connection_type_detail import ConnectionTypeDetail - -class TestConnectionTypeDetail(unittest.TestCase): - """ConnectionTypeDetail unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ConnectionTypeDetail: - """Test ConnectionTypeDetail - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ConnectionTypeDetail` - """ - model = ConnectionTypeDetail() - if include_optional: - return ConnectionTypeDetail( - auth = None, - config_schema = None, - label = '', - name = '' - ) - else: - return ConnectionTypeDetail( - label = '', - name = '', - ) - """ - - def testConnectionTypeDetail(self): - """Test ConnectionTypeDetail""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_connection_type_summary.py b/test/test_connection_type_summary.py deleted file mode 100644 index d0ea83d..0000000 --- a/test/test_connection_type_summary.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from hotdata.models.connection_type_summary import ConnectionTypeSummary - -class TestConnectionTypeSummary(unittest.TestCase): - """ConnectionTypeSummary unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ConnectionTypeSummary: - """Test ConnectionTypeSummary - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ConnectionTypeSummary` - """ - model = ConnectionTypeSummary() - if include_optional: - return ConnectionTypeSummary( - label = '', - name = '' - ) - else: - return ConnectionTypeSummary( - label = '', - name = '', - ) - """ - - def testConnectionTypeSummary(self): - """Test ConnectionTypeSummary""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_connection_types_api.py b/test/test_connection_types_api.py deleted file mode 100644 index 78750d3..0000000 --- a/test/test_connection_types_api.py +++ /dev/null @@ -1,46 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from hotdata.api.connection_types_api import ConnectionTypesApi - - -class TestConnectionTypesApi(unittest.TestCase): - """ConnectionTypesApi unit test stubs""" - - def setUp(self) -> None: - self.api = ConnectionTypesApi() - - def tearDown(self) -> None: - pass - - def test_get_connection_type(self) -> None: - """Test case for get_connection_type - - Get connection type details - """ - pass - - def test_list_connection_types(self) -> None: - """Test case for list_connection_types - - List connection types - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_connections_api.py b/test/test_connections_api.py index cfde0f4..a2d9241 100644 --- a/test/test_connections_api.py +++ b/test/test_connections_api.py @@ -41,13 +41,6 @@ def test_add_managed_table(self) -> None: """ pass - def test_check_connection_health(self) -> None: - """Test case for check_connection_health - - Check connection health - """ - pass - def test_create_connection(self) -> None: """Test case for create_connection diff --git a/test/test_create_secret_request.py b/test/test_create_secret_request.py deleted file mode 100644 index a1c51fb..0000000 --- a/test/test_create_secret_request.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from hotdata.models.create_secret_request import CreateSecretRequest - -class TestCreateSecretRequest(unittest.TestCase): - """CreateSecretRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateSecretRequest: - """Test CreateSecretRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CreateSecretRequest` - """ - model = CreateSecretRequest() - if include_optional: - return CreateSecretRequest( - name = 'prod-postgres-password', - value = 's3cr3t-p4ssw0rd' - ) - else: - return CreateSecretRequest( - name = 'prod-postgres-password', - value = 's3cr3t-p4ssw0rd', - ) - """ - - def testCreateSecretRequest(self): - """Test CreateSecretRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_create_secret_response.py b/test/test_create_secret_response.py deleted file mode 100644 index 448638f..0000000 --- a/test/test_create_secret_response.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from hotdata.models.create_secret_response import CreateSecretResponse - -class TestCreateSecretResponse(unittest.TestCase): - """CreateSecretResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> CreateSecretResponse: - """Test CreateSecretResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `CreateSecretResponse` - """ - model = CreateSecretResponse() - if include_optional: - return CreateSecretResponse( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - name = '' - ) - else: - return CreateSecretResponse( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - id = '', - name = '', - ) - """ - - def testCreateSecretResponse(self): - """Test CreateSecretResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_get_secret_response.py b/test/test_get_secret_response.py deleted file mode 100644 index 4fd1a29..0000000 --- a/test/test_get_secret_response.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from hotdata.models.get_secret_response import GetSecretResponse - -class TestGetSecretResponse(unittest.TestCase): - """GetSecretResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> GetSecretResponse: - """Test GetSecretResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `GetSecretResponse` - """ - model = GetSecretResponse() - if include_optional: - return GetSecretResponse( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - name = '', - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') - ) - else: - return GetSecretResponse( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - name = '', - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - ) - """ - - def testGetSecretResponse(self): - """Test GetSecretResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_job_result.py b/test/test_job_result.py index cf2ff31..f89dceb 100644 --- a/test/test_job_result.py +++ b/test/test_job_result.py @@ -47,15 +47,6 @@ def make_instance(self, include_optional) -> JobResult: schema_name = '', table_name = '', ) ], - errors = [ - hotdata.models.table_refresh_error.TableRefreshError( - error = '', - schema_name = '', - table_name = '', ) - ], - tables_failed = 0, - tables_refreshed = 0, - total_rows = 0, columns = [ '' ], @@ -80,9 +71,6 @@ def make_instance(self, include_optional) -> JobResult: rows_synced = 0, schema_name = '', table_name = '', - tables_failed = 0, - tables_refreshed = 0, - total_rows = 0, columns = [ '' ], diff --git a/test/test_list_connection_types_response.py b/test/test_list_connection_types_response.py deleted file mode 100644 index 3d168e6..0000000 --- a/test/test_list_connection_types_response.py +++ /dev/null @@ -1,61 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from hotdata.models.list_connection_types_response import ListConnectionTypesResponse - -class TestListConnectionTypesResponse(unittest.TestCase): - """ListConnectionTypesResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListConnectionTypesResponse: - """Test ListConnectionTypesResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ListConnectionTypesResponse` - """ - model = ListConnectionTypesResponse() - if include_optional: - return ListConnectionTypesResponse( - connection_types = [ - hotdata.models.connection_type_summary.ConnectionTypeSummary( - label = '', - name = '', ) - ] - ) - else: - return ListConnectionTypesResponse( - connection_types = [ - hotdata.models.connection_type_summary.ConnectionTypeSummary( - label = '', - name = '', ) - ], - ) - """ - - def testListConnectionTypesResponse(self): - """Test ListConnectionTypesResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_list_secrets_response.py b/test/test_list_secrets_response.py deleted file mode 100644 index 0c06aab..0000000 --- a/test/test_list_secrets_response.py +++ /dev/null @@ -1,63 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from hotdata.models.list_secrets_response import ListSecretsResponse - -class TestListSecretsResponse(unittest.TestCase): - """ListSecretsResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> ListSecretsResponse: - """Test ListSecretsResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `ListSecretsResponse` - """ - model = ListSecretsResponse() - if include_optional: - return ListSecretsResponse( - secrets = [ - hotdata.models.secret_metadata_response.SecretMetadataResponse( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - name = '', - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) - ] - ) - else: - return ListSecretsResponse( - secrets = [ - hotdata.models.secret_metadata_response.SecretMetadataResponse( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - name = '', - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), ) - ], - ) - """ - - def testListSecretsResponse(self): - """Test ListSecretsResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_refresh_api.py b/test/test_refresh_api.py deleted file mode 100644 index efcc595..0000000 --- a/test/test_refresh_api.py +++ /dev/null @@ -1,39 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from hotdata.api.refresh_api import RefreshApi - - -class TestRefreshApi(unittest.TestCase): - """RefreshApi unit test stubs""" - - def setUp(self) -> None: - self.api = RefreshApi() - - def tearDown(self) -> None: - pass - - def test_refresh(self) -> None: - """Test case for refresh - - Refresh connection data - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_refresh_request.py b/test/test_refresh_request.py deleted file mode 100644 index 2038a55..0000000 --- a/test/test_refresh_request.py +++ /dev/null @@ -1,58 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from hotdata.models.refresh_request import RefreshRequest - -class TestRefreshRequest(unittest.TestCase): - """RefreshRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RefreshRequest: - """Test RefreshRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `RefreshRequest` - """ - model = RefreshRequest() - if include_optional: - return RefreshRequest( - var_async = True, - async_after_ms = 1000, - connection_id = '', - data = True, - include_uncached = True, - schema_name = '', - table_name = '' - ) - else: - return RefreshRequest( - ) - """ - - def testRefreshRequest(self): - """Test RefreshRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_refresh_response.py b/test/test_refresh_response.py deleted file mode 100644 index 9db2b9b..0000000 --- a/test/test_refresh_response.py +++ /dev/null @@ -1,89 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from hotdata.models.refresh_response import RefreshResponse - -class TestRefreshResponse(unittest.TestCase): - """RefreshResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> RefreshResponse: - """Test RefreshResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `RefreshResponse` - """ - model = RefreshResponse() - if include_optional: - return RefreshResponse( - connections_failed = 0, - connections_refreshed = 0, - errors = [ - hotdata.models.table_refresh_error.TableRefreshError( - error = '', - schema_name = '', - table_name = '', ) - ], - tables_added = 0, - tables_discovered = 0, - tables_modified = 0, - connection_id = '', - duration_ms = 0, - rows_synced = 0, - schema_name = '', - table_name = '', - warnings = [ - hotdata.models.refresh_warning.RefreshWarning( - message = '', - schema_name = '', - table_name = '', ) - ], - tables_failed = 0, - tables_refreshed = 0, - total_rows = 0 - ) - else: - return RefreshResponse( - connections_failed = 0, - connections_refreshed = 0, - tables_added = 0, - tables_discovered = 0, - tables_modified = 0, - connection_id = '', - duration_ms = 0, - rows_synced = 0, - schema_name = '', - table_name = '', - tables_failed = 0, - tables_refreshed = 0, - total_rows = 0, - ) - """ - - def testRefreshResponse(self): - """Test RefreshResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_schema_refresh_result.py b/test/test_schema_refresh_result.py deleted file mode 100644 index 54d9b18..0000000 --- a/test/test_schema_refresh_result.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from hotdata.models.schema_refresh_result import SchemaRefreshResult - -class TestSchemaRefreshResult(unittest.TestCase): - """SchemaRefreshResult unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SchemaRefreshResult: - """Test SchemaRefreshResult - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SchemaRefreshResult` - """ - model = SchemaRefreshResult() - if include_optional: - return SchemaRefreshResult( - connections_failed = 0, - connections_refreshed = 0, - errors = [ - hotdata.models.connection_schema_error.ConnectionSchemaError( - connection_id = '', - error = '', ) - ], - tables_added = 0, - tables_discovered = 0, - tables_modified = 0 - ) - else: - return SchemaRefreshResult( - connections_failed = 0, - connections_refreshed = 0, - tables_added = 0, - tables_discovered = 0, - tables_modified = 0, - ) - """ - - def testSchemaRefreshResult(self): - """Test SchemaRefreshResult""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_secret_metadata_response.py b/test/test_secret_metadata_response.py deleted file mode 100644 index 3a163f4..0000000 --- a/test/test_secret_metadata_response.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from hotdata.models.secret_metadata_response import SecretMetadataResponse - -class TestSecretMetadataResponse(unittest.TestCase): - """SecretMetadataResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> SecretMetadataResponse: - """Test SecretMetadataResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `SecretMetadataResponse` - """ - model = SecretMetadataResponse() - if include_optional: - return SecretMetadataResponse( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - name = '', - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') - ) - else: - return SecretMetadataResponse( - created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - name = '', - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - ) - """ - - def testSecretMetadataResponse(self): - """Test SecretMetadataResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_secrets_api.py b/test/test_secrets_api.py deleted file mode 100644 index b7d46c9..0000000 --- a/test/test_secrets_api.py +++ /dev/null @@ -1,67 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from hotdata.api.secrets_api import SecretsApi - - -class TestSecretsApi(unittest.TestCase): - """SecretsApi unit test stubs""" - - def setUp(self) -> None: - self.api = SecretsApi() - - def tearDown(self) -> None: - pass - - def test_create_secret(self) -> None: - """Test case for create_secret - - Create secret - """ - pass - - def test_delete_secret(self) -> None: - """Test case for delete_secret - - Delete secret - """ - pass - - def test_get_secret(self) -> None: - """Test case for get_secret - - Get secret - """ - pass - - def test_list_secrets(self) -> None: - """Test case for list_secrets - - List secrets - """ - pass - - def test_update_secret(self) -> None: - """Test case for update_secret - - Update secret - """ - pass - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_table_refresh_error.py b/test/test_table_refresh_error.py deleted file mode 100644 index 6375cc9..0000000 --- a/test/test_table_refresh_error.py +++ /dev/null @@ -1,57 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from hotdata.models.table_refresh_error import TableRefreshError - -class TestTableRefreshError(unittest.TestCase): - """TableRefreshError unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TableRefreshError: - """Test TableRefreshError - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TableRefreshError` - """ - model = TableRefreshError() - if include_optional: - return TableRefreshError( - error = '', - schema_name = '', - table_name = '' - ) - else: - return TableRefreshError( - error = '', - schema_name = '', - table_name = '', - ) - """ - - def testTableRefreshError(self): - """Test TableRefreshError""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_update_secret_request.py b/test/test_update_secret_request.py deleted file mode 100644 index 05cbb1f..0000000 --- a/test/test_update_secret_request.py +++ /dev/null @@ -1,53 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from hotdata.models.update_secret_request import UpdateSecretRequest - -class TestUpdateSecretRequest(unittest.TestCase): - """UpdateSecretRequest unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UpdateSecretRequest: - """Test UpdateSecretRequest - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UpdateSecretRequest` - """ - model = UpdateSecretRequest() - if include_optional: - return UpdateSecretRequest( - value = 's3cr3t-p4ssw0rd' - ) - else: - return UpdateSecretRequest( - value = 's3cr3t-p4ssw0rd', - ) - """ - - def testUpdateSecretRequest(self): - """Test UpdateSecretRequest""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_update_secret_response.py b/test/test_update_secret_response.py deleted file mode 100644 index 9e0ff9b..0000000 --- a/test/test_update_secret_response.py +++ /dev/null @@ -1,55 +0,0 @@ -# coding: utf-8 - -""" - Hotdata API - - Powerful data platform API for managed databases, queries, and analytics. - - The version of the OpenAPI document: 1.0.0 - Contact: developers@hotdata.dev - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from hotdata.models.update_secret_response import UpdateSecretResponse - -class TestUpdateSecretResponse(unittest.TestCase): - """UpdateSecretResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> UpdateSecretResponse: - """Test UpdateSecretResponse - include_optional is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `UpdateSecretResponse` - """ - model = UpdateSecretResponse() - if include_optional: - return UpdateSecretResponse( - name = '', - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f') - ) - else: - return UpdateSecretResponse( - name = '', - updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), - ) - """ - - def testUpdateSecretResponse(self): - """Test UpdateSecretResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - -if __name__ == '__main__': - unittest.main()