diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index c9d6801..f40ebaf 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -19,11 +19,15 @@ 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 docs/CreateDatasetRequest.md docs/CreateDatasetResponse.md +docs/CreateIndexRequest.md docs/CreateSavedQueryRequest.md docs/CreateSecretRequest.md docs/CreateSecretResponse.md @@ -31,6 +35,7 @@ docs/CreateWorkspaceRequest.md docs/CreateWorkspaceResponse.md docs/DatasetSource.md docs/DatasetSummary.md +docs/DatasetVersionSummary.md docs/DatasetsApi.md docs/DiscoveryStatus.md docs/Error.md @@ -39,12 +44,18 @@ docs/GetConnectionResponse.md docs/GetDatasetResponse.md docs/GetResultResponse.md docs/GetSecretResponse.md +docs/IndexInfoResponse.md +docs/IndexStatus.md +docs/IndexesApi.md docs/InformationSchemaApi.md docs/InformationSchemaResponse.md docs/InlineData.md docs/InlineDatasetSource.md +docs/ListConnectionTypesResponse.md docs/ListConnectionsResponse.md +docs/ListDatasetVersionsResponse.md docs/ListDatasetsResponse.md +docs/ListIndexesResponse.md docs/ListQueryRunsResponse.md docs/ListResultsResponse.md docs/ListSavedQueriesResponse.md @@ -91,8 +102,10 @@ docs/WorkspaceListItem.md docs/WorkspacesApi.md hotdata/__init__.py hotdata/api/__init__.py +hotdata/api/connection_types_api.py hotdata/api/connections_api.py hotdata/api/datasets_api.py +hotdata/api/indexes_api.py hotdata/api/information_schema_api.py hotdata/api/query_api.py hotdata/api/query_runs_api.py @@ -125,10 +138,13 @@ 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_dataset_request.py hotdata/models/create_dataset_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 @@ -136,6 +152,7 @@ hotdata/models/create_workspace_request.py hotdata/models/create_workspace_response.py hotdata/models/dataset_source.py hotdata/models/dataset_summary.py +hotdata/models/dataset_version_summary.py hotdata/models/discovery_status.py hotdata/models/error.py hotdata/models/execute_saved_query_request.py @@ -143,11 +160,16 @@ hotdata/models/get_connection_response.py hotdata/models/get_dataset_response.py hotdata/models/get_result_response.py hotdata/models/get_secret_response.py +hotdata/models/index_info_response.py +hotdata/models/index_status.py hotdata/models/information_schema_response.py hotdata/models/inline_data.py hotdata/models/inline_dataset_source.py +hotdata/models/list_connection_types_response.py hotdata/models/list_connections_response.py +hotdata/models/list_dataset_versions_response.py hotdata/models/list_datasets_response.py +hotdata/models/list_indexes_response.py hotdata/models/list_query_runs_response.py hotdata/models/list_results_response.py hotdata/models/list_saved_queries_response.py @@ -192,13 +214,15 @@ setup.cfg setup.py test-requirements.txt test/__init__.py -test/test_boolean_profile_detail.py -test/test_categorical_profile_detail.py -test/test_create_workspace_response.py -test/test_inline_dataset_source.py -test/test_list_workspaces_response.py -test/test_numeric_profile_detail.py -test/test_temporal_profile_detail.py -test/test_text_profile_detail.py -test/test_upload_dataset_source.py +test/test_connection_type_detail.py +test/test_connection_type_summary.py +test/test_connection_types_api.py +test/test_create_index_request.py +test/test_dataset_version_summary.py +test/test_index_info_response.py +test/test_index_status.py +test/test_indexes_api.py +test/test_list_connection_types_response.py +test/test_list_dataset_versions_response.py +test/test_list_indexes_response.py tox.ini diff --git a/docs/ConnectionTypeDetail.md b/docs/ConnectionTypeDetail.md new file mode 100644 index 0000000..b98ce11 --- /dev/null +++ b/docs/ConnectionTypeDetail.md @@ -0,0 +1,32 @@ +# ConnectionTypeDetail + + +## 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 new file mode 100644 index 0000000..5d15589 --- /dev/null +++ b/docs/ConnectionTypeSummary.md @@ -0,0 +1,30 @@ +# ConnectionTypeSummary + + +## 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 new file mode 100644 index 0000000..9e084d2 --- /dev/null +++ b/docs/ConnectionTypesApi.md @@ -0,0 +1,163 @@ +# hotdata.ConnectionTypesApi + +All URIs are relative to *https://app.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 + +* 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://app.hotdata.dev +# See configuration.py for a list of all supported configuration parameters. +configuration = hotdata.Configuration( + host = "https://app.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 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 + +[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 + +* 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://app.hotdata.dev +# See configuration.py for a list of all supported configuration parameters. +configuration = hotdata.Configuration( + host = "https://app.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 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 + +[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/CreateIndexRequest.md b/docs/CreateIndexRequest.md new file mode 100644 index 0000000..7469175 --- /dev/null +++ b/docs/CreateIndexRequest.md @@ -0,0 +1,35 @@ +# CreateIndexRequest + +Request body for POST .../indexes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**index_name** | **str** | | +**index_type** | **str** | Index type: \"sorted\" (default), \"bm25\", or \"vector\" | [optional] +**metric** | **str** | Distance metric for vector indexes: \"l2\" (default), \"cosine\", or \"dot\". Only relevant when index_type = \"vector\". | [optional] +**sort_columns** | **List[str]** | | [optional] +**text_columns** | **List[str]** | Text columns for BM25 indexes | [optional] +**vector_columns** | **List[str]** | Vector column for vector indexes (exactly one entry required) | [optional] + +## Example + +```python +from hotdata.models.create_index_request import CreateIndexRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateIndexRequest from a JSON string +create_index_request_instance = CreateIndexRequest.from_json(json) +# print the JSON string representation of the object +print(CreateIndexRequest.to_json()) + +# convert the object into a dict +create_index_request_dict = create_index_request_instance.to_dict() +# create an instance of CreateIndexRequest from a dict +create_index_request_from_dict = CreateIndexRequest.from_dict(create_index_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/DatasetSummary.md b/docs/DatasetSummary.md index b6ce2d2..f9141d4 100644 --- a/docs/DatasetSummary.md +++ b/docs/DatasetSummary.md @@ -9,6 +9,8 @@ Name | Type | Description | Notes **created_at** | **datetime** | | **id** | **str** | | **label** | **str** | | +**latest_version** | **int** | | +**pinned_version** | **int** | | [optional] **table_name** | **str** | | **updated_at** | **datetime** | | diff --git a/docs/DatasetVersionSummary.md b/docs/DatasetVersionSummary.md new file mode 100644 index 0000000..53582fa --- /dev/null +++ b/docs/DatasetVersionSummary.md @@ -0,0 +1,33 @@ +# DatasetVersionSummary + +Dataset version summary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **datetime** | | +**id** | **str** | | +**source_type** | **str** | | +**version** | **int** | | + +## Example + +```python +from hotdata.models.dataset_version_summary import DatasetVersionSummary + +# TODO update the JSON string below +json = "{}" +# create an instance of DatasetVersionSummary from a JSON string +dataset_version_summary_instance = DatasetVersionSummary.from_json(json) +# print the JSON string representation of the object +print(DatasetVersionSummary.to_json()) + +# convert the object into a dict +dataset_version_summary_dict = dataset_version_summary_instance.to_dict() +# create an instance of DatasetVersionSummary from a dict +dataset_version_summary_from_dict = DatasetVersionSummary.from_dict(dataset_version_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/DatasetsApi.md b/docs/DatasetsApi.md index ee52c62..29f9b9b 100644 --- a/docs/DatasetsApi.md +++ b/docs/DatasetsApi.md @@ -7,6 +7,7 @@ Method | HTTP request | Description [**create_dataset**](DatasetsApi.md#create_dataset) | **POST** /v1/datasets | Create dataset [**delete_dataset**](DatasetsApi.md#delete_dataset) | **DELETE** /v1/datasets/{id} | Delete dataset [**get_dataset**](DatasetsApi.md#get_dataset) | **GET** /v1/datasets/{id} | Get dataset +[**list_dataset_versions**](DatasetsApi.md#list_dataset_versions) | **GET** /v1/datasets/{id}/versions | List dataset versions [**list_datasets**](DatasetsApi.md#list_datasets) | **GET** /v1/datasets | List datasets [**update_dataset**](DatasetsApi.md#update_dataset) | **PUT** /v1/datasets/{id} | Update dataset @@ -243,6 +244,87 @@ 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) +# **list_dataset_versions** +> ListDatasetVersionsResponse list_dataset_versions(id, limit=limit, offset=offset) + +List dataset versions + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import hotdata +from hotdata.models.list_dataset_versions_response import ListDatasetVersionsResponse +from hotdata.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.hotdata.dev +# See configuration.py for a list of all supported configuration parameters. +configuration = hotdata.Configuration( + host = "https://app.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 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.DatasetsApi(api_client) + id = 'id_example' # str | Dataset ID + limit = 56 # int | Maximum number of versions (default: 100, max: 1000) (optional) + offset = 56 # int | Pagination offset (default: 0) (optional) + + try: + # List dataset versions + api_response = api_instance.list_dataset_versions(id, limit=limit, offset=offset) + print("The response of DatasetsApi->list_dataset_versions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling DatasetsApi->list_dataset_versions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **id** | **str**| Dataset ID | + **limit** | **int**| Maximum number of versions (default: 100, max: 1000) | [optional] + **offset** | **int**| Pagination offset (default: 0) | [optional] + +### Return type + +[**ListDatasetVersionsResponse**](ListDatasetVersionsResponse.md) + +### Authorization + +[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 dataset versions | - | +**404** | Dataset 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_datasets** > ListDatasetsResponse list_datasets(limit=limit, offset=offset) diff --git a/docs/GetDatasetResponse.md b/docs/GetDatasetResponse.md index 7311e5f..5a4119b 100644 --- a/docs/GetDatasetResponse.md +++ b/docs/GetDatasetResponse.md @@ -10,6 +10,8 @@ Name | Type | Description | Notes **created_at** | **datetime** | | **id** | **str** | | **label** | **str** | | +**latest_version** | **int** | | +**pinned_version** | **int** | | [optional] **schema_name** | **str** | | **source_type** | **str** | | **table_name** | **str** | | diff --git a/docs/IndexInfoResponse.md b/docs/IndexInfoResponse.md new file mode 100644 index 0000000..8666a2f --- /dev/null +++ b/docs/IndexInfoResponse.md @@ -0,0 +1,38 @@ +# IndexInfoResponse + +Response for index endpoints. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **datetime** | | +**index_name** | **str** | | +**index_type** | **str** | | +**metric** | **str** | Distance metric this index was built with. Only present for vector indexes. | [optional] +**sort_columns** | **List[str]** | | +**status** | [**IndexStatus**](IndexStatus.md) | | +**text_columns** | **List[str]** | | +**updated_at** | **datetime** | | +**vector_columns** | **List[str]** | | + +## Example + +```python +from hotdata.models.index_info_response import IndexInfoResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of IndexInfoResponse from a JSON string +index_info_response_instance = IndexInfoResponse.from_json(json) +# print the JSON string representation of the object +print(IndexInfoResponse.to_json()) + +# convert the object into a dict +index_info_response_dict = index_info_response_instance.to_dict() +# create an instance of IndexInfoResponse from a dict +index_info_response_from_dict = IndexInfoResponse.from_dict(index_info_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/IndexStatus.md b/docs/IndexStatus.md new file mode 100644 index 0000000..129ccfb --- /dev/null +++ b/docs/IndexStatus.md @@ -0,0 +1,13 @@ +# IndexStatus + +Index build status exposed to API consumers. + +## Enum + +* `READY` (value: `'ready'`) + +* `PENDING` (value: `'pending'`) + +[[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/IndexesApi.md b/docs/IndexesApi.md new file mode 100644 index 0000000..66dac2c --- /dev/null +++ b/docs/IndexesApi.md @@ -0,0 +1,265 @@ +# hotdata.IndexesApi + +All URIs are relative to *https://app.hotdata.dev* + +Method | HTTP request | Description +------------- | ------------- | ------------- +[**create_index**](IndexesApi.md#create_index) | **POST** /v1/connections/{connection_id}/tables/{schema}/{table}/indexes | Create an index on a table +[**delete_index**](IndexesApi.md#delete_index) | **DELETE** /v1/connections/{connection_id}/tables/{schema}/{table}/indexes/{index_name} | Delete an index +[**list_indexes**](IndexesApi.md#list_indexes) | **GET** /v1/connections/{connection_id}/tables/{schema}/{table}/indexes | List indexes on a table + + +# **create_index** +> IndexInfoResponse create_index(connection_id, var_schema, table, create_index_request) + +Create an index on a table + +Create a sorted or BM25 full-text index on a cached table. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import hotdata +from hotdata.models.create_index_request import CreateIndexRequest +from hotdata.models.index_info_response import IndexInfoResponse +from hotdata.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.hotdata.dev +# See configuration.py for a list of all supported configuration parameters. +configuration = hotdata.Configuration( + host = "https://app.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 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.IndexesApi(api_client) + connection_id = 'connection_id_example' # str | Connection identifier + var_schema = 'var_schema_example' # str | Schema name + table = 'table_example' # str | Table name + create_index_request = hotdata.CreateIndexRequest() # CreateIndexRequest | + + try: + # Create an index on a table + api_response = api_instance.create_index(connection_id, var_schema, table, create_index_request) + print("The response of IndexesApi->create_index:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexesApi->create_index: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **connection_id** | **str**| Connection identifier | + **var_schema** | **str**| Schema name | + **table** | **str**| Table name | + **create_index_request** | [**CreateIndexRequest**](CreateIndexRequest.md)| | + +### Return type + +[**IndexInfoResponse**](IndexInfoResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Index created | - | +**400** | Invalid request | - | +**404** | Table not found | - | +**500** | Internal server error | - | + +[[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_index** +> delete_index(connection_id, var_schema, table, index_name) + +Delete an index + +Delete a specific index from a cached table. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import hotdata +from hotdata.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.hotdata.dev +# See configuration.py for a list of all supported configuration parameters. +configuration = hotdata.Configuration( + host = "https://app.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 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.IndexesApi(api_client) + connection_id = 'connection_id_example' # str | Connection identifier + var_schema = 'var_schema_example' # str | Schema name + table = 'table_example' # str | Table name + index_name = 'index_name_example' # str | Index name + + try: + # Delete an index + api_instance.delete_index(connection_id, var_schema, table, index_name) + except Exception as e: + print("Exception when calling IndexesApi->delete_index: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **connection_id** | **str**| Connection identifier | + **var_schema** | **str**| Schema name | + **table** | **str**| Table name | + **index_name** | **str**| Index name | + +### Return type + +void (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**204** | Index deleted | - | +**404** | Index not found | - | +**500** | Internal server error | - | + +[[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_indexes** +> ListIndexesResponse list_indexes(connection_id, var_schema, table) + +List indexes on a table + +List all indexes created on a cached table. + +### Example + +* Bearer Authentication (BearerAuth): + +```python +import hotdata +from hotdata.models.list_indexes_response import ListIndexesResponse +from hotdata.rest import ApiException +from pprint import pprint + +# Defining the host is optional and defaults to https://app.hotdata.dev +# See configuration.py for a list of all supported configuration parameters. +configuration = hotdata.Configuration( + host = "https://app.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 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.IndexesApi(api_client) + connection_id = 'connection_id_example' # str | Connection identifier + var_schema = 'var_schema_example' # str | Schema name + table = 'table_example' # str | Table name + + try: + # List indexes on a table + api_response = api_instance.list_indexes(connection_id, var_schema, table) + print("The response of IndexesApi->list_indexes:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling IndexesApi->list_indexes: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **connection_id** | **str**| Connection identifier | + **var_schema** | **str**| Schema name | + **table** | **str**| Table name | + +### Return type + +[**ListIndexesResponse**](ListIndexesResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + + - **Content-Type**: Not defined + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Indexes listed | - | +**500** | Internal server error | - | + +[[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/ListConnectionTypesResponse.md b/docs/ListConnectionTypesResponse.md new file mode 100644 index 0000000..30ec854 --- /dev/null +++ b/docs/ListConnectionTypesResponse.md @@ -0,0 +1,29 @@ +# ListConnectionTypesResponse + + +## 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/ListDatasetVersionsResponse.md b/docs/ListDatasetVersionsResponse.md new file mode 100644 index 0000000..389e9cf --- /dev/null +++ b/docs/ListDatasetVersionsResponse.md @@ -0,0 +1,35 @@ +# ListDatasetVersionsResponse + +Response body for GET /v1/datasets/{id}/versions + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **int** | | +**dataset_id** | **str** | | +**has_more** | **bool** | | +**limit** | **int** | | +**offset** | **int** | | +**versions** | [**List[DatasetVersionSummary]**](DatasetVersionSummary.md) | | + +## Example + +```python +from hotdata.models.list_dataset_versions_response import ListDatasetVersionsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListDatasetVersionsResponse from a JSON string +list_dataset_versions_response_instance = ListDatasetVersionsResponse.from_json(json) +# print the JSON string representation of the object +print(ListDatasetVersionsResponse.to_json()) + +# convert the object into a dict +list_dataset_versions_response_dict = list_dataset_versions_response_instance.to_dict() +# create an instance of ListDatasetVersionsResponse from a dict +list_dataset_versions_response_from_dict = ListDatasetVersionsResponse.from_dict(list_dataset_versions_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/ListIndexesResponse.md b/docs/ListIndexesResponse.md new file mode 100644 index 0000000..a78b6e3 --- /dev/null +++ b/docs/ListIndexesResponse.md @@ -0,0 +1,30 @@ +# ListIndexesResponse + +Response body for GET .../indexes + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**indexes** | [**List[IndexInfoResponse]**](IndexInfoResponse.md) | | + +## Example + +```python +from hotdata.models.list_indexes_response import ListIndexesResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of ListIndexesResponse from a JSON string +list_indexes_response_instance = ListIndexesResponse.from_json(json) +# print the JSON string representation of the object +print(ListIndexesResponse.to_json()) + +# convert the object into a dict +list_indexes_response_dict = list_indexes_response_instance.to_dict() +# create an instance of ListIndexesResponse from a dict +list_indexes_response_from_dict = ListIndexesResponse.from_dict(list_indexes_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/UpdateDatasetRequest.md b/docs/UpdateDatasetRequest.md index a97fab5..fe72f0d 100644 --- a/docs/UpdateDatasetRequest.md +++ b/docs/UpdateDatasetRequest.md @@ -7,6 +7,7 @@ Request body for PUT /v1/datasets/{id} Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **label** | **str** | | [optional] +**pinned_version** | **int** | Pin to a specific version, or send null to unpin. Omit the field entirely to leave pinning unchanged. | [optional] **table_name** | **str** | | [optional] ## Example diff --git a/docs/UpdateDatasetResponse.md b/docs/UpdateDatasetResponse.md index 58884d8..c46d24f 100644 --- a/docs/UpdateDatasetResponse.md +++ b/docs/UpdateDatasetResponse.md @@ -8,6 +8,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **str** | | **label** | **str** | | +**latest_version** | **int** | | +**pinned_version** | **int** | | [optional] **table_name** | **str** | | **updated_at** | **datetime** | | diff --git a/hotdata/__init__.py b/hotdata/__init__.py index 9f720a1..733c9b5 100644 --- a/hotdata/__init__.py +++ b/hotdata/__init__.py @@ -3,7 +3,7 @@ # flake8: noqa """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -19,8 +19,10 @@ # Define package exports __all__ = [ + "ConnectionTypesApi", "ConnectionsApi", "DatasetsApi", + "IndexesApi", "InformationSchemaApi", "QueryApi", "QueryRunsApi", @@ -57,10 +59,13 @@ "ConnectionInfo", "ConnectionRefreshResult", "ConnectionSchemaError", + "ConnectionTypeDetail", + "ConnectionTypeSummary", "CreateConnectionRequest", "CreateConnectionResponse", "CreateDatasetRequest", "CreateDatasetResponse", + "CreateIndexRequest", "CreateSavedQueryRequest", "CreateSecretRequest", "CreateSecretResponse", @@ -68,6 +73,7 @@ "CreateWorkspaceResponse", "DatasetSource", "DatasetSummary", + "DatasetVersionSummary", "DiscoveryStatus", "Error", "ExecuteSavedQueryRequest", @@ -75,11 +81,16 @@ "GetDatasetResponse", "GetResultResponse", "GetSecretResponse", + "IndexInfoResponse", + "IndexStatus", "InformationSchemaResponse", "InlineData", "InlineDatasetSource", + "ListConnectionTypesResponse", "ListConnectionsResponse", + "ListDatasetVersionsResponse", "ListDatasetsResponse", + "ListIndexesResponse", "ListQueryRunsResponse", "ListResultsResponse", "ListSavedQueriesResponse", @@ -119,8 +130,10 @@ ] # 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.datasets_api import DatasetsApi as DatasetsApi +from hotdata.api.indexes_api import IndexesApi as IndexesApi from hotdata.api.information_schema_api import InformationSchemaApi as InformationSchemaApi from hotdata.api.query_api import QueryApi as QueryApi from hotdata.api.query_runs_api import QueryRunsApi as QueryRunsApi @@ -161,10 +174,13 @@ 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_dataset_request import CreateDatasetRequest as CreateDatasetRequest from hotdata.models.create_dataset_response import CreateDatasetResponse as CreateDatasetResponse +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 @@ -172,6 +188,7 @@ from hotdata.models.create_workspace_response import CreateWorkspaceResponse as CreateWorkspaceResponse from hotdata.models.dataset_source import DatasetSource as DatasetSource from hotdata.models.dataset_summary import DatasetSummary as DatasetSummary +from hotdata.models.dataset_version_summary import DatasetVersionSummary as DatasetVersionSummary from hotdata.models.discovery_status import DiscoveryStatus as DiscoveryStatus from hotdata.models.error import Error as Error from hotdata.models.execute_saved_query_request import ExecuteSavedQueryRequest as ExecuteSavedQueryRequest @@ -179,11 +196,16 @@ from hotdata.models.get_dataset_response import GetDatasetResponse as GetDatasetResponse from hotdata.models.get_result_response import GetResultResponse as GetResultResponse from hotdata.models.get_secret_response import GetSecretResponse as GetSecretResponse +from hotdata.models.index_info_response import IndexInfoResponse as IndexInfoResponse +from hotdata.models.index_status import IndexStatus as IndexStatus from hotdata.models.information_schema_response import InformationSchemaResponse as InformationSchemaResponse from hotdata.models.inline_data import InlineData as InlineData from hotdata.models.inline_dataset_source import InlineDatasetSource as InlineDatasetSource +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_dataset_versions_response import ListDatasetVersionsResponse as ListDatasetVersionsResponse from hotdata.models.list_datasets_response import ListDatasetsResponse as ListDatasetsResponse +from hotdata.models.list_indexes_response import ListIndexesResponse as ListIndexesResponse from hotdata.models.list_query_runs_response import ListQueryRunsResponse as ListQueryRunsResponse from hotdata.models.list_results_response import ListResultsResponse as ListResultsResponse from hotdata.models.list_saved_queries_response import ListSavedQueriesResponse as ListSavedQueriesResponse diff --git a/hotdata/api/__init__.py b/hotdata/api/__init__.py index b901c79..692bb4d 100644 --- a/hotdata/api/__init__.py +++ b/hotdata/api/__init__.py @@ -1,8 +1,10 @@ # 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.datasets_api import DatasetsApi +from hotdata.api.indexes_api import IndexesApi from hotdata.api.information_schema_api import InformationSchemaApi from hotdata.api.query_api import QueryApi from hotdata.api.query_runs_api import QueryRunsApi diff --git a/hotdata/api/connection_types_api.py b/hotdata/api/connection_types_api.py new file mode 100644 index 0000000..d8f4c84 --- /dev/null +++ b/hotdata/api/connection_types_api.py @@ -0,0 +1,549 @@ +""" + Hotdata API + + Powerful data platform API for datasets, 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] = [ + '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] = [ + '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 4a46b9c..1c59589 100644 --- a/hotdata/api/connections_api.py +++ b/hotdata/api/connections_api.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/api/datasets_api.py b/hotdata/api/datasets_api.py index f52bdc2..e99a7d7 100644 --- a/hotdata/api/datasets_api.py +++ b/hotdata/api/datasets_api.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -22,6 +22,7 @@ from hotdata.models.create_dataset_request import CreateDatasetRequest from hotdata.models.create_dataset_response import CreateDatasetResponse from hotdata.models.get_dataset_response import GetDatasetResponse +from hotdata.models.list_dataset_versions_response import ListDatasetVersionsResponse from hotdata.models.list_datasets_response import ListDatasetsResponse from hotdata.models.update_dataset_request import UpdateDatasetRequest from hotdata.models.update_dataset_response import UpdateDatasetResponse @@ -846,6 +847,301 @@ def _get_dataset_serialize( + @validate_call + def list_dataset_versions( + self, + id: Annotated[StrictStr, Field(description="Dataset ID")], + limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Maximum number of versions (default: 100, max: 1000)")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset (default: 0)")] = None, + _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, + ) -> ListDatasetVersionsResponse: + """List dataset versions + + + :param id: Dataset ID (required) + :type id: str + :param limit: Maximum number of versions (default: 100, max: 1000) + :type limit: int + :param offset: Pagination offset (default: 0) + :type offset: int + :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_dataset_versions_serialize( + id=id, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListDatasetVersionsResponse", + '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 list_dataset_versions_with_http_info( + self, + id: Annotated[StrictStr, Field(description="Dataset ID")], + limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Maximum number of versions (default: 100, max: 1000)")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset (default: 0)")] = None, + _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[ListDatasetVersionsResponse]: + """List dataset versions + + + :param id: Dataset ID (required) + :type id: str + :param limit: Maximum number of versions (default: 100, max: 1000) + :type limit: int + :param offset: Pagination offset (default: 0) + :type offset: int + :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_dataset_versions_serialize( + id=id, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListDatasetVersionsResponse", + '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 list_dataset_versions_without_preload_content( + self, + id: Annotated[StrictStr, Field(description="Dataset ID")], + limit: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Maximum number of versions (default: 100, max: 1000)")] = None, + offset: Annotated[Optional[Annotated[int, Field(strict=True, ge=0)]], Field(description="Pagination offset (default: 0)")] = None, + _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 dataset versions + + + :param id: Dataset ID (required) + :type id: str + :param limit: Maximum number of versions (default: 100, max: 1000) + :type limit: int + :param offset: Pagination offset (default: 0) + :type offset: int + :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_dataset_versions_serialize( + id=id, + limit=limit, + offset=offset, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListDatasetVersionsResponse", + '404': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_dataset_versions_serialize( + self, + id, + limit, + offset, + _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 id is not None: + _path_params['id'] = id + # process the query parameters + if limit is not None: + + _query_params.append(('limit', limit)) + + if offset is not None: + + _query_params.append(('offset', offset)) + + # 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] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/datasets/{id}/versions', + 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_datasets( self, diff --git a/hotdata/api/indexes_api.py b/hotdata/api/indexes_api.py new file mode 100644 index 0000000..8ab18f0 --- /dev/null +++ b/hotdata/api/indexes_api.py @@ -0,0 +1,974 @@ +""" + Hotdata API + + Powerful data platform API for datasets, 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_index_request import CreateIndexRequest +from hotdata.models.index_info_response import IndexInfoResponse +from hotdata.models.list_indexes_response import ListIndexesResponse + +from hotdata.api_client import ApiClient, RequestSerialized +from hotdata.api_response import ApiResponse +from hotdata.rest import RESTResponseType + + +class IndexesApi: + """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_index( + self, + connection_id: Annotated[StrictStr, Field(description="Connection identifier")], + var_schema: Annotated[StrictStr, Field(description="Schema name")], + table: Annotated[StrictStr, Field(description="Table name")], + create_index_request: CreateIndexRequest, + _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, + ) -> IndexInfoResponse: + """Create an index on a table + + Create a sorted or BM25 full-text index on a cached table. + + :param connection_id: Connection identifier (required) + :type connection_id: str + :param var_schema: Schema name (required) + :type var_schema: str + :param table: Table name (required) + :type table: str + :param create_index_request: (required) + :type create_index_request: CreateIndexRequest + :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_index_serialize( + connection_id=connection_id, + var_schema=var_schema, + table=table, + create_index_request=create_index_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "IndexInfoResponse", + '400': "ApiErrorResponse", + '404': "ApiErrorResponse", + '500': "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_index_with_http_info( + self, + connection_id: Annotated[StrictStr, Field(description="Connection identifier")], + var_schema: Annotated[StrictStr, Field(description="Schema name")], + table: Annotated[StrictStr, Field(description="Table name")], + create_index_request: CreateIndexRequest, + _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[IndexInfoResponse]: + """Create an index on a table + + Create a sorted or BM25 full-text index on a cached table. + + :param connection_id: Connection identifier (required) + :type connection_id: str + :param var_schema: Schema name (required) + :type var_schema: str + :param table: Table name (required) + :type table: str + :param create_index_request: (required) + :type create_index_request: CreateIndexRequest + :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_index_serialize( + connection_id=connection_id, + var_schema=var_schema, + table=table, + create_index_request=create_index_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "IndexInfoResponse", + '400': "ApiErrorResponse", + '404': "ApiErrorResponse", + '500': "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_index_without_preload_content( + self, + connection_id: Annotated[StrictStr, Field(description="Connection identifier")], + var_schema: Annotated[StrictStr, Field(description="Schema name")], + table: Annotated[StrictStr, Field(description="Table name")], + create_index_request: CreateIndexRequest, + _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 an index on a table + + Create a sorted or BM25 full-text index on a cached table. + + :param connection_id: Connection identifier (required) + :type connection_id: str + :param var_schema: Schema name (required) + :type var_schema: str + :param table: Table name (required) + :type table: str + :param create_index_request: (required) + :type create_index_request: CreateIndexRequest + :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_index_serialize( + connection_id=connection_id, + var_schema=var_schema, + table=table, + create_index_request=create_index_request, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "IndexInfoResponse", + '400': "ApiErrorResponse", + '404': "ApiErrorResponse", + '500': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _create_index_serialize( + self, + connection_id, + var_schema, + table, + create_index_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 connection_id is not None: + _path_params['connection_id'] = connection_id + if var_schema is not None: + _path_params['schema'] = var_schema + if table is not None: + _path_params['table'] = table + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_index_request is not None: + _body_params = create_index_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] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='POST', + resource_path='/v1/connections/{connection_id}/tables/{schema}/{table}/indexes', + 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_index( + self, + connection_id: Annotated[StrictStr, Field(description="Connection identifier")], + var_schema: Annotated[StrictStr, Field(description="Schema name")], + table: Annotated[StrictStr, Field(description="Table name")], + index_name: Annotated[StrictStr, Field(description="Index 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 an index + + Delete a specific index from a cached table. + + :param connection_id: Connection identifier (required) + :type connection_id: str + :param var_schema: Schema name (required) + :type var_schema: str + :param table: Table name (required) + :type table: str + :param index_name: Index name (required) + :type index_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_index_serialize( + connection_id=connection_id, + var_schema=var_schema, + table=table, + index_name=index_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", + '500': "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_index_with_http_info( + self, + connection_id: Annotated[StrictStr, Field(description="Connection identifier")], + var_schema: Annotated[StrictStr, Field(description="Schema name")], + table: Annotated[StrictStr, Field(description="Table name")], + index_name: Annotated[StrictStr, Field(description="Index 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 an index + + Delete a specific index from a cached table. + + :param connection_id: Connection identifier (required) + :type connection_id: str + :param var_schema: Schema name (required) + :type var_schema: str + :param table: Table name (required) + :type table: str + :param index_name: Index name (required) + :type index_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_index_serialize( + connection_id=connection_id, + var_schema=var_schema, + table=table, + index_name=index_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", + '500': "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_index_without_preload_content( + self, + connection_id: Annotated[StrictStr, Field(description="Connection identifier")], + var_schema: Annotated[StrictStr, Field(description="Schema name")], + table: Annotated[StrictStr, Field(description="Table name")], + index_name: Annotated[StrictStr, Field(description="Index 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 an index + + Delete a specific index from a cached table. + + :param connection_id: Connection identifier (required) + :type connection_id: str + :param var_schema: Schema name (required) + :type var_schema: str + :param table: Table name (required) + :type table: str + :param index_name: Index name (required) + :type index_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_index_serialize( + connection_id=connection_id, + var_schema=var_schema, + table=table, + index_name=index_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", + '500': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _delete_index_serialize( + self, + connection_id, + var_schema, + table, + index_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 connection_id is not None: + _path_params['connection_id'] = connection_id + if var_schema is not None: + _path_params['schema'] = var_schema + if table is not None: + _path_params['table'] = table + if index_name is not None: + _path_params['index_name'] = index_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] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='DELETE', + resource_path='/v1/connections/{connection_id}/tables/{schema}/{table}/indexes/{index_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_indexes( + self, + connection_id: Annotated[StrictStr, Field(description="Connection identifier")], + var_schema: Annotated[StrictStr, Field(description="Schema name")], + table: Annotated[StrictStr, Field(description="Table 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, + ) -> ListIndexesResponse: + """List indexes on a table + + List all indexes created on a cached table. + + :param connection_id: Connection identifier (required) + :type connection_id: str + :param var_schema: Schema name (required) + :type var_schema: str + :param table: Table name (required) + :type table: 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._list_indexes_serialize( + connection_id=connection_id, + var_schema=var_schema, + table=table, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListIndexesResponse", + '500': "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 list_indexes_with_http_info( + self, + connection_id: Annotated[StrictStr, Field(description="Connection identifier")], + var_schema: Annotated[StrictStr, Field(description="Schema name")], + table: Annotated[StrictStr, Field(description="Table 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[ListIndexesResponse]: + """List indexes on a table + + List all indexes created on a cached table. + + :param connection_id: Connection identifier (required) + :type connection_id: str + :param var_schema: Schema name (required) + :type var_schema: str + :param table: Table name (required) + :type table: 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._list_indexes_serialize( + connection_id=connection_id, + var_schema=var_schema, + table=table, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListIndexesResponse", + '500': "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 list_indexes_without_preload_content( + self, + connection_id: Annotated[StrictStr, Field(description="Connection identifier")], + var_schema: Annotated[StrictStr, Field(description="Schema name")], + table: Annotated[StrictStr, Field(description="Table 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: + """List indexes on a table + + List all indexes created on a cached table. + + :param connection_id: Connection identifier (required) + :type connection_id: str + :param var_schema: Schema name (required) + :type var_schema: str + :param table: Table name (required) + :type table: 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._list_indexes_serialize( + connection_id=connection_id, + var_schema=var_schema, + table=table, + _request_auth=_request_auth, + _content_type=_content_type, + _headers=_headers, + _host_index=_host_index + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "ListIndexesResponse", + '500': "ApiErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + + def _list_indexes_serialize( + self, + connection_id, + var_schema, + table, + _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 + if var_schema is not None: + _path_params['schema'] = var_schema + if table is not None: + _path_params['table'] = table + # 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] = [ + 'BearerAuth' + ] + + return self.api_client.param_serialize( + method='GET', + resource_path='/v1/connections/{connection_id}/tables/{schema}/{table}/indexes', + 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/information_schema_api.py b/hotdata/api/information_schema_api.py index b50e406..40b7c5e 100644 --- a/hotdata/api/information_schema_api.py +++ b/hotdata/api/information_schema_api.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/api/query_api.py b/hotdata/api/query_api.py index 471897c..f32f676 100644 --- a/hotdata/api/query_api.py +++ b/hotdata/api/query_api.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/api/query_runs_api.py b/hotdata/api/query_runs_api.py index 49eb0ba..5376dfa 100644 --- a/hotdata/api/query_runs_api.py +++ b/hotdata/api/query_runs_api.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/api/refresh_api.py b/hotdata/api/refresh_api.py index 5bb5f61..8062057 100644 --- a/hotdata/api/refresh_api.py +++ b/hotdata/api/refresh_api.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/api/results_api.py b/hotdata/api/results_api.py index c388b64..95834b1 100644 --- a/hotdata/api/results_api.py +++ b/hotdata/api/results_api.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/api/saved_queries_api.py b/hotdata/api/saved_queries_api.py index e9bc997..4184e54 100644 --- a/hotdata/api/saved_queries_api.py +++ b/hotdata/api/saved_queries_api.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/api/secrets_api.py b/hotdata/api/secrets_api.py index 65f6ac8..b813096 100644 --- a/hotdata/api/secrets_api.py +++ b/hotdata/api/secrets_api.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/api/uploads_api.py b/hotdata/api/uploads_api.py index b98eb43..22db735 100644 --- a/hotdata/api/uploads_api.py +++ b/hotdata/api/uploads_api.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/api/workspaces_api.py b/hotdata/api/workspaces_api.py index d8f3209..3a562e0 100644 --- a/hotdata/api/workspaces_api.py +++ b/hotdata/api/workspaces_api.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/api_client.py b/hotdata/api_client.py index 7af72f2..926507e 100644 --- a/hotdata/api_client.py +++ b/hotdata/api_client.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/configuration.py b/hotdata/configuration.py index 73e30ac..904220a 100644 --- a/hotdata/configuration.py +++ b/hotdata/configuration.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/exceptions.py b/hotdata/exceptions.py index 74bf2f9..084528e 100644 --- a/hotdata/exceptions.py +++ b/hotdata/exceptions.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/__init__.py b/hotdata/models/__init__.py index afea775..7034001 100644 --- a/hotdata/models/__init__.py +++ b/hotdata/models/__init__.py @@ -2,7 +2,7 @@ # flake8: noqa """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -32,10 +32,13 @@ 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_dataset_request import CreateDatasetRequest from hotdata.models.create_dataset_response import CreateDatasetResponse +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 @@ -43,6 +46,7 @@ from hotdata.models.create_workspace_response import CreateWorkspaceResponse from hotdata.models.dataset_source import DatasetSource from hotdata.models.dataset_summary import DatasetSummary +from hotdata.models.dataset_version_summary import DatasetVersionSummary from hotdata.models.discovery_status import DiscoveryStatus from hotdata.models.error import Error from hotdata.models.execute_saved_query_request import ExecuteSavedQueryRequest @@ -50,11 +54,16 @@ from hotdata.models.get_dataset_response import GetDatasetResponse from hotdata.models.get_result_response import GetResultResponse from hotdata.models.get_secret_response import GetSecretResponse +from hotdata.models.index_info_response import IndexInfoResponse +from hotdata.models.index_status import IndexStatus from hotdata.models.information_schema_response import InformationSchemaResponse from hotdata.models.inline_data import InlineData from hotdata.models.inline_dataset_source import InlineDatasetSource +from hotdata.models.list_connection_types_response import ListConnectionTypesResponse from hotdata.models.list_connections_response import ListConnectionsResponse +from hotdata.models.list_dataset_versions_response import ListDatasetVersionsResponse from hotdata.models.list_datasets_response import ListDatasetsResponse +from hotdata.models.list_indexes_response import ListIndexesResponse from hotdata.models.list_query_runs_response import ListQueryRunsResponse from hotdata.models.list_results_response import ListResultsResponse from hotdata.models.list_saved_queries_response import ListSavedQueriesResponse diff --git a/hotdata/models/api_error_detail.py b/hotdata/models/api_error_detail.py index 5df9a8f..6d0093f 100644 --- a/hotdata/models/api_error_detail.py +++ b/hotdata/models/api_error_detail.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/api_error_response.py b/hotdata/models/api_error_response.py index 4ea2502..75e6aa4 100644 --- a/hotdata/models/api_error_response.py +++ b/hotdata/models/api_error_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/boolean_profile_detail.py b/hotdata/models/boolean_profile_detail.py index f34cb77..4b3887c 100644 --- a/hotdata/models/boolean_profile_detail.py +++ b/hotdata/models/boolean_profile_detail.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/categorical_profile_detail.py b/hotdata/models/categorical_profile_detail.py index ca22cd2..0be6d29 100644 --- a/hotdata/models/categorical_profile_detail.py +++ b/hotdata/models/categorical_profile_detail.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/category_value_info.py b/hotdata/models/category_value_info.py index 9bed8ee..9404b09 100644 --- a/hotdata/models/category_value_info.py +++ b/hotdata/models/category_value_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/column_info.py b/hotdata/models/column_info.py index 35c4436..f594992 100644 --- a/hotdata/models/column_info.py +++ b/hotdata/models/column_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/column_profile_detail.py b/hotdata/models/column_profile_detail.py index f2a4617..27cd083 100644 --- a/hotdata/models/column_profile_detail.py +++ b/hotdata/models/column_profile_detail.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/column_profile_detail_one_of.py b/hotdata/models/column_profile_detail_one_of.py index fb000d5..9471fac 100644 --- a/hotdata/models/column_profile_detail_one_of.py +++ b/hotdata/models/column_profile_detail_one_of.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/column_profile_detail_one_of1.py b/hotdata/models/column_profile_detail_one_of1.py index 55507dd..9e4d720 100644 --- a/hotdata/models/column_profile_detail_one_of1.py +++ b/hotdata/models/column_profile_detail_one_of1.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/column_profile_detail_one_of2.py b/hotdata/models/column_profile_detail_one_of2.py index 1cf3dff..21b4dc0 100644 --- a/hotdata/models/column_profile_detail_one_of2.py +++ b/hotdata/models/column_profile_detail_one_of2.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/column_profile_detail_one_of3.py b/hotdata/models/column_profile_detail_one_of3.py index acbcac9..3988b79 100644 --- a/hotdata/models/column_profile_detail_one_of3.py +++ b/hotdata/models/column_profile_detail_one_of3.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/column_profile_detail_one_of4.py b/hotdata/models/column_profile_detail_one_of4.py index 7d46879..7d7e8a2 100644 --- a/hotdata/models/column_profile_detail_one_of4.py +++ b/hotdata/models/column_profile_detail_one_of4.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/column_profile_info.py b/hotdata/models/column_profile_info.py index 2f676f0..2dba0f7 100644 --- a/hotdata/models/column_profile_info.py +++ b/hotdata/models/column_profile_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/column_type_spec.py b/hotdata/models/column_type_spec.py index 28b6d16..d5bebcc 100644 --- a/hotdata/models/column_type_spec.py +++ b/hotdata/models/column_type_spec.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/connection_health_response.py b/hotdata/models/connection_health_response.py index 0dc0473..be5c615 100644 --- a/hotdata/models/connection_health_response.py +++ b/hotdata/models/connection_health_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/connection_info.py b/hotdata/models/connection_info.py index 93df4c0..8621ef1 100644 --- a/hotdata/models/connection_info.py +++ b/hotdata/models/connection_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/connection_refresh_result.py b/hotdata/models/connection_refresh_result.py index 04d6029..6e36418 100644 --- a/hotdata/models/connection_refresh_result.py +++ b/hotdata/models/connection_refresh_result.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/connection_schema_error.py b/hotdata/models/connection_schema_error.py index c2d0d7d..48a0311 100644 --- a/hotdata/models/connection_schema_error.py +++ b/hotdata/models/connection_schema_error.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/connection_type_detail.py b/hotdata/models/connection_type_detail.py new file mode 100644 index 0000000..9c3cdea --- /dev/null +++ b/hotdata/models/connection_type_detail.py @@ -0,0 +1,104 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, 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): + """ + ConnectionTypeDetail + """ # 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 new file mode 100644 index 0000000..67bdb12 --- /dev/null +++ b/hotdata/models/connection_type_summary.py @@ -0,0 +1,90 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, 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): + """ + ConnectionTypeSummary + """ # 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_connection_request.py b/hotdata/models/create_connection_request.py index 42b7b2c..3bd790b 100644 --- a/hotdata/models/create_connection_request.py +++ b/hotdata/models/create_connection_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/create_connection_response.py b/hotdata/models/create_connection_response.py index 050e248..4b2a2a9 100644 --- a/hotdata/models/create_connection_response.py +++ b/hotdata/models/create_connection_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/create_dataset_request.py b/hotdata/models/create_dataset_request.py index f3cbb1c..f70e5ee 100644 --- a/hotdata/models/create_dataset_request.py +++ b/hotdata/models/create_dataset_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/create_dataset_response.py b/hotdata/models/create_dataset_response.py index f51520d..bc3be53 100644 --- a/hotdata/models/create_dataset_response.py +++ b/hotdata/models/create_dataset_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/create_index_request.py b/hotdata/models/create_index_request.py new file mode 100644 index 0000000..3974c64 --- /dev/null +++ b/hotdata/models/create_index_request.py @@ -0,0 +1,113 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, 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 import Optional, Set +from typing_extensions import Self + +class CreateIndexRequest(BaseModel): + """ + Request body for POST .../indexes + """ # noqa: E501 + index_name: StrictStr + index_type: Optional[StrictStr] = Field(default=None, description="Index type: \"sorted\" (default), \"bm25\", or \"vector\"") + metric: Optional[StrictStr] = Field(default=None, description="Distance metric for vector indexes: \"l2\" (default), \"cosine\", or \"dot\". Only relevant when index_type = \"vector\".") + sort_columns: Optional[List[StrictStr]] = None + text_columns: Optional[List[StrictStr]] = Field(default=None, description="Text columns for BM25 indexes") + vector_columns: Optional[List[StrictStr]] = Field(default=None, description="Vector column for vector indexes (exactly one entry required)") + __properties: ClassVar[List[str]] = ["index_name", "index_type", "metric", "sort_columns", "text_columns", "vector_columns"] + + 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 CreateIndexRequest 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 sort_columns (nullable) is None + # and model_fields_set contains the field + if self.sort_columns is None and "sort_columns" in self.model_fields_set: + _dict['sort_columns'] = None + + # set to None if text_columns (nullable) is None + # and model_fields_set contains the field + if self.text_columns is None and "text_columns" in self.model_fields_set: + _dict['text_columns'] = None + + # set to None if vector_columns (nullable) is None + # and model_fields_set contains the field + if self.vector_columns is None and "vector_columns" in self.model_fields_set: + _dict['vector_columns'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateIndexRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "index_name": obj.get("index_name"), + "index_type": obj.get("index_type"), + "metric": obj.get("metric"), + "sort_columns": obj.get("sort_columns"), + "text_columns": obj.get("text_columns"), + "vector_columns": obj.get("vector_columns") + }) + return _obj + + diff --git a/hotdata/models/create_saved_query_request.py b/hotdata/models/create_saved_query_request.py index 8000cf1..c2278d7 100644 --- a/hotdata/models/create_saved_query_request.py +++ b/hotdata/models/create_saved_query_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/create_secret_request.py b/hotdata/models/create_secret_request.py index 78152e0..3ef43ff 100644 --- a/hotdata/models/create_secret_request.py +++ b/hotdata/models/create_secret_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/create_secret_response.py b/hotdata/models/create_secret_response.py index 1d44b6b..22e5729 100644 --- a/hotdata/models/create_secret_response.py +++ b/hotdata/models/create_secret_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/create_workspace_request.py b/hotdata/models/create_workspace_request.py index 4615362..2b95807 100644 --- a/hotdata/models/create_workspace_request.py +++ b/hotdata/models/create_workspace_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/create_workspace_response.py b/hotdata/models/create_workspace_response.py index bd9821e..a9dc71f 100644 --- a/hotdata/models/create_workspace_response.py +++ b/hotdata/models/create_workspace_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/dataset_source.py b/hotdata/models/dataset_source.py index d9f29ed..38293de 100644 --- a/hotdata/models/dataset_source.py +++ b/hotdata/models/dataset_source.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/dataset_summary.py b/hotdata/models/dataset_summary.py index e0c6d9b..5e478ac 100644 --- a/hotdata/models/dataset_summary.py +++ b/hotdata/models/dataset_summary.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -19,8 +19,8 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -31,9 +31,11 @@ class DatasetSummary(BaseModel): created_at: datetime id: StrictStr label: StrictStr + latest_version: StrictInt + pinned_version: Optional[StrictInt] = None table_name: StrictStr updated_at: datetime - __properties: ClassVar[List[str]] = ["created_at", "id", "label", "table_name", "updated_at"] + __properties: ClassVar[List[str]] = ["created_at", "id", "label", "latest_version", "pinned_version", "table_name", "updated_at"] model_config = ConfigDict( populate_by_name=True, @@ -74,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if pinned_version (nullable) is None + # and model_fields_set contains the field + if self.pinned_version is None and "pinned_version" in self.model_fields_set: + _dict['pinned_version'] = None + return _dict @classmethod @@ -89,6 +96,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "created_at": obj.get("created_at"), "id": obj.get("id"), "label": obj.get("label"), + "latest_version": obj.get("latest_version"), + "pinned_version": obj.get("pinned_version"), "table_name": obj.get("table_name"), "updated_at": obj.get("updated_at") }) diff --git a/hotdata/models/dataset_version_summary.py b/hotdata/models/dataset_version_summary.py new file mode 100644 index 0000000..7dfa1bd --- /dev/null +++ b/hotdata/models/dataset_version_summary.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, 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, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + +class DatasetVersionSummary(BaseModel): + """ + Dataset version summary + """ # noqa: E501 + created_at: datetime + id: StrictStr + source_type: StrictStr + version: StrictInt + __properties: ClassVar[List[str]] = ["created_at", "id", "source_type", "version"] + + 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 DatasetVersionSummary 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 DatasetVersionSummary 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"), + "source_type": obj.get("source_type"), + "version": obj.get("version") + }) + return _obj + + diff --git a/hotdata/models/discovery_status.py b/hotdata/models/discovery_status.py index 18e5bcc..e72b827 100644 --- a/hotdata/models/discovery_status.py +++ b/hotdata/models/discovery_status.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/error.py b/hotdata/models/error.py index 08a2c52..e9519de 100644 --- a/hotdata/models/error.py +++ b/hotdata/models/error.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/execute_saved_query_request.py b/hotdata/models/execute_saved_query_request.py index 520bb9c..aa1f04b 100644 --- a/hotdata/models/execute_saved_query_request.py +++ b/hotdata/models/execute_saved_query_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/get_connection_response.py b/hotdata/models/get_connection_response.py index ef55ba4..5164a6f 100644 --- a/hotdata/models/get_connection_response.py +++ b/hotdata/models/get_connection_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/get_dataset_response.py b/hotdata/models/get_dataset_response.py index ae8cd94..6fc3d5f 100644 --- a/hotdata/models/get_dataset_response.py +++ b/hotdata/models/get_dataset_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -19,8 +19,8 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from hotdata.models.column_info import ColumnInfo from typing import Optional, Set from typing_extensions import Self @@ -33,11 +33,13 @@ class GetDatasetResponse(BaseModel): created_at: datetime id: StrictStr label: StrictStr + latest_version: StrictInt + pinned_version: Optional[StrictInt] = None schema_name: StrictStr source_type: StrictStr table_name: StrictStr updated_at: datetime - __properties: ClassVar[List[str]] = ["columns", "created_at", "id", "label", "schema_name", "source_type", "table_name", "updated_at"] + __properties: ClassVar[List[str]] = ["columns", "created_at", "id", "label", "latest_version", "pinned_version", "schema_name", "source_type", "table_name", "updated_at"] model_config = ConfigDict( populate_by_name=True, @@ -85,6 +87,11 @@ def to_dict(self) -> Dict[str, Any]: if _item_columns: _items.append(_item_columns.to_dict()) _dict['columns'] = _items + # set to None if pinned_version (nullable) is None + # and model_fields_set contains the field + if self.pinned_version is None and "pinned_version" in self.model_fields_set: + _dict['pinned_version'] = None + return _dict @classmethod @@ -101,6 +108,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "created_at": obj.get("created_at"), "id": obj.get("id"), "label": obj.get("label"), + "latest_version": obj.get("latest_version"), + "pinned_version": obj.get("pinned_version"), "schema_name": obj.get("schema_name"), "source_type": obj.get("source_type"), "table_name": obj.get("table_name"), diff --git a/hotdata/models/get_result_response.py b/hotdata/models/get_result_response.py index 611b924..d1b6b12 100644 --- a/hotdata/models/get_result_response.py +++ b/hotdata/models/get_result_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/get_secret_response.py b/hotdata/models/get_secret_response.py index b0529f2..5976b39 100644 --- a/hotdata/models/get_secret_response.py +++ b/hotdata/models/get_secret_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/index_info_response.py b/hotdata/models/index_info_response.py new file mode 100644 index 0000000..0dee454 --- /dev/null +++ b/hotdata/models/index_info_response.py @@ -0,0 +1,111 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, 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, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from hotdata.models.index_status import IndexStatus +from typing import Optional, Set +from typing_extensions import Self + +class IndexInfoResponse(BaseModel): + """ + Response for index endpoints. + """ # noqa: E501 + created_at: datetime + index_name: StrictStr + index_type: StrictStr + metric: Optional[StrictStr] = Field(default=None, description="Distance metric this index was built with. Only present for vector indexes.") + sort_columns: List[StrictStr] + status: IndexStatus + text_columns: List[StrictStr] + updated_at: datetime + vector_columns: List[StrictStr] + __properties: ClassVar[List[str]] = ["created_at", "index_name", "index_type", "metric", "sort_columns", "status", "text_columns", "updated_at", "vector_columns"] + + 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 IndexInfoResponse 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 metric (nullable) is None + # and model_fields_set contains the field + if self.metric is None and "metric" in self.model_fields_set: + _dict['metric'] = None + + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of IndexInfoResponse 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"), + "index_name": obj.get("index_name"), + "index_type": obj.get("index_type"), + "metric": obj.get("metric"), + "sort_columns": obj.get("sort_columns"), + "status": obj.get("status"), + "text_columns": obj.get("text_columns"), + "updated_at": obj.get("updated_at"), + "vector_columns": obj.get("vector_columns") + }) + return _obj + + diff --git a/hotdata/models/index_status.py b/hotdata/models/index_status.py new file mode 100644 index 0000000..e1e7a19 --- /dev/null +++ b/hotdata/models/index_status.py @@ -0,0 +1,38 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, 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 +from enum import Enum +from typing_extensions import Self + + +class IndexStatus(str, Enum): + """ + Index build status exposed to API consumers. + """ + + """ + allowed enum values + """ + READY = 'ready' + PENDING = 'pending' + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of IndexStatus from a JSON string""" + return cls(json.loads(json_str)) + + diff --git a/hotdata/models/information_schema_response.py b/hotdata/models/information_schema_response.py index ce275f8..8c5ce17 100644 --- a/hotdata/models/information_schema_response.py +++ b/hotdata/models/information_schema_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/inline_data.py b/hotdata/models/inline_data.py index 0120af6..bf2d32b 100644 --- a/hotdata/models/inline_data.py +++ b/hotdata/models/inline_data.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/inline_dataset_source.py b/hotdata/models/inline_dataset_source.py index 9ee85ef..d1a4c00 100644 --- a/hotdata/models/inline_dataset_source.py +++ b/hotdata/models/inline_dataset_source.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/list_connection_types_response.py b/hotdata/models/list_connection_types_response.py new file mode 100644 index 0000000..cfe67ba --- /dev/null +++ b/hotdata/models/list_connection_types_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, 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): + """ + ListConnectionTypesResponse + """ # 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_connections_response.py b/hotdata/models/list_connections_response.py index 4a43d1f..a5b6c9c 100644 --- a/hotdata/models/list_connections_response.py +++ b/hotdata/models/list_connections_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/list_dataset_versions_response.py b/hotdata/models/list_dataset_versions_response.py new file mode 100644 index 0000000..6ec6618 --- /dev/null +++ b/hotdata/models/list_dataset_versions_response.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, 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 +from typing_extensions import Annotated +from hotdata.models.dataset_version_summary import DatasetVersionSummary +from typing import Optional, Set +from typing_extensions import Self + +class ListDatasetVersionsResponse(BaseModel): + """ + Response body for GET /v1/datasets/{id}/versions + """ # noqa: E501 + count: Annotated[int, Field(strict=True, ge=0)] + dataset_id: StrictStr + has_more: StrictBool + limit: Annotated[int, Field(strict=True, ge=0)] + offset: Annotated[int, Field(strict=True, ge=0)] + versions: List[DatasetVersionSummary] + __properties: ClassVar[List[str]] = ["count", "dataset_id", "has_more", "limit", "offset", "versions"] + + 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 ListDatasetVersionsResponse 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 versions (list) + _items = [] + if self.versions: + for _item_versions in self.versions: + if _item_versions: + _items.append(_item_versions.to_dict()) + _dict['versions'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListDatasetVersionsResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "count": obj.get("count"), + "dataset_id": obj.get("dataset_id"), + "has_more": obj.get("has_more"), + "limit": obj.get("limit"), + "offset": obj.get("offset"), + "versions": [DatasetVersionSummary.from_dict(_item) for _item in obj["versions"]] if obj.get("versions") is not None else None + }) + return _obj + + diff --git a/hotdata/models/list_datasets_response.py b/hotdata/models/list_datasets_response.py index a2df479..0fe049f 100644 --- a/hotdata/models/list_datasets_response.py +++ b/hotdata/models/list_datasets_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/list_indexes_response.py b/hotdata/models/list_indexes_response.py new file mode 100644 index 0000000..ef27b3d --- /dev/null +++ b/hotdata/models/list_indexes_response.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, 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.index_info_response import IndexInfoResponse +from typing import Optional, Set +from typing_extensions import Self + +class ListIndexesResponse(BaseModel): + """ + Response body for GET .../indexes + """ # noqa: E501 + indexes: List[IndexInfoResponse] + __properties: ClassVar[List[str]] = ["indexes"] + + 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 ListIndexesResponse 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 indexes (list) + _items = [] + if self.indexes: + for _item_indexes in self.indexes: + if _item_indexes: + _items.append(_item_indexes.to_dict()) + _dict['indexes'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of ListIndexesResponse from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "indexes": [IndexInfoResponse.from_dict(_item) for _item in obj["indexes"]] if obj.get("indexes") is not None else None + }) + return _obj + + diff --git a/hotdata/models/list_query_runs_response.py b/hotdata/models/list_query_runs_response.py index ef4e53c..5493960 100644 --- a/hotdata/models/list_query_runs_response.py +++ b/hotdata/models/list_query_runs_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/list_results_response.py b/hotdata/models/list_results_response.py index 35a2683..f5da477 100644 --- a/hotdata/models/list_results_response.py +++ b/hotdata/models/list_results_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/list_saved_queries_response.py b/hotdata/models/list_saved_queries_response.py index 29ab470..110cbc1 100644 --- a/hotdata/models/list_saved_queries_response.py +++ b/hotdata/models/list_saved_queries_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/list_saved_query_versions_response.py b/hotdata/models/list_saved_query_versions_response.py index 1f81a8d..1f0a3c6 100644 --- a/hotdata/models/list_saved_query_versions_response.py +++ b/hotdata/models/list_saved_query_versions_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/list_secrets_response.py b/hotdata/models/list_secrets_response.py index 2cb7b0e..878a553 100644 --- a/hotdata/models/list_secrets_response.py +++ b/hotdata/models/list_secrets_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/list_uploads_response.py b/hotdata/models/list_uploads_response.py index 8fefa4f..8566d5a 100644 --- a/hotdata/models/list_uploads_response.py +++ b/hotdata/models/list_uploads_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/list_workspaces_response.py b/hotdata/models/list_workspaces_response.py index b1aec18..1b01e73 100644 --- a/hotdata/models/list_workspaces_response.py +++ b/hotdata/models/list_workspaces_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/numeric_profile_detail.py b/hotdata/models/numeric_profile_detail.py index 946cb88..d8189ae 100644 --- a/hotdata/models/numeric_profile_detail.py +++ b/hotdata/models/numeric_profile_detail.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/query_request.py b/hotdata/models/query_request.py index abf06b8..4a0309a 100644 --- a/hotdata/models/query_request.py +++ b/hotdata/models/query_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/query_response.py b/hotdata/models/query_response.py index 679bff9..c24eb73 100644 --- a/hotdata/models/query_response.py +++ b/hotdata/models/query_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/query_run_info.py b/hotdata/models/query_run_info.py index cd01211..4146472 100644 --- a/hotdata/models/query_run_info.py +++ b/hotdata/models/query_run_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/refresh_request.py b/hotdata/models/refresh_request.py index 0cbf574..87704d8 100644 --- a/hotdata/models/refresh_request.py +++ b/hotdata/models/refresh_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/refresh_response.py b/hotdata/models/refresh_response.py index 095c42f..12adc35 100644 --- a/hotdata/models/refresh_response.py +++ b/hotdata/models/refresh_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/refresh_warning.py b/hotdata/models/refresh_warning.py index 2b03724..cd46c79 100644 --- a/hotdata/models/refresh_warning.py +++ b/hotdata/models/refresh_warning.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/result_info.py b/hotdata/models/result_info.py index 5af6723..e9dfcea 100644 --- a/hotdata/models/result_info.py +++ b/hotdata/models/result_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/saved_query_detail.py b/hotdata/models/saved_query_detail.py index 4b21272..6bc8977 100644 --- a/hotdata/models/saved_query_detail.py +++ b/hotdata/models/saved_query_detail.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/saved_query_summary.py b/hotdata/models/saved_query_summary.py index 6ea52f6..d3a987d 100644 --- a/hotdata/models/saved_query_summary.py +++ b/hotdata/models/saved_query_summary.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/saved_query_version_info.py b/hotdata/models/saved_query_version_info.py index 0658bda..0c0e64b 100644 --- a/hotdata/models/saved_query_version_info.py +++ b/hotdata/models/saved_query_version_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/schema_refresh_result.py b/hotdata/models/schema_refresh_result.py index 39701e2..278d865 100644 --- a/hotdata/models/schema_refresh_result.py +++ b/hotdata/models/schema_refresh_result.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/secret_metadata_response.py b/hotdata/models/secret_metadata_response.py index f36087c..5b43785 100644 --- a/hotdata/models/secret_metadata_response.py +++ b/hotdata/models/secret_metadata_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/table_info.py b/hotdata/models/table_info.py index cb9927c..6c24aa9 100644 --- a/hotdata/models/table_info.py +++ b/hotdata/models/table_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/table_profile_response.py b/hotdata/models/table_profile_response.py index 879e5c3..f1711dd 100644 --- a/hotdata/models/table_profile_response.py +++ b/hotdata/models/table_profile_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/table_refresh_error.py b/hotdata/models/table_refresh_error.py index abeae62..8a9d9a6 100644 --- a/hotdata/models/table_refresh_error.py +++ b/hotdata/models/table_refresh_error.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/table_refresh_result.py b/hotdata/models/table_refresh_result.py index 35b64da..49868f0 100644 --- a/hotdata/models/table_refresh_result.py +++ b/hotdata/models/table_refresh_result.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/temporal_profile_detail.py b/hotdata/models/temporal_profile_detail.py index 3b0aea4..775b141 100644 --- a/hotdata/models/temporal_profile_detail.py +++ b/hotdata/models/temporal_profile_detail.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/text_profile_detail.py b/hotdata/models/text_profile_detail.py index 0111543..eb3d10a 100644 --- a/hotdata/models/text_profile_detail.py +++ b/hotdata/models/text_profile_detail.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/update_dataset_request.py b/hotdata/models/update_dataset_request.py index ad397ad..c3012a1 100644 --- a/hotdata/models/update_dataset_request.py +++ b/hotdata/models/update_dataset_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -18,7 +18,7 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, StrictStr +from pydantic import BaseModel, ConfigDict, Field, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -28,8 +28,9 @@ class UpdateDatasetRequest(BaseModel): Request body for PUT /v1/datasets/{id} """ # noqa: E501 label: Optional[StrictStr] = None + pinned_version: Optional[StrictInt] = Field(default=None, description="Pin to a specific version, or send null to unpin. Omit the field entirely to leave pinning unchanged.") table_name: Optional[StrictStr] = None - __properties: ClassVar[List[str]] = ["label", "table_name"] + __properties: ClassVar[List[str]] = ["label", "pinned_version", "table_name"] model_config = ConfigDict( populate_by_name=True, @@ -75,6 +76,11 @@ def to_dict(self) -> Dict[str, Any]: if self.label is None and "label" in self.model_fields_set: _dict['label'] = None + # set to None if pinned_version (nullable) is None + # and model_fields_set contains the field + if self.pinned_version is None and "pinned_version" in self.model_fields_set: + _dict['pinned_version'] = 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: @@ -93,6 +99,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "label": obj.get("label"), + "pinned_version": obj.get("pinned_version"), "table_name": obj.get("table_name") }) return _obj diff --git a/hotdata/models/update_dataset_response.py b/hotdata/models/update_dataset_response.py index 672ee99..9cee94f 100644 --- a/hotdata/models/update_dataset_response.py +++ b/hotdata/models/update_dataset_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -19,8 +19,8 @@ import json from datetime import datetime -from pydantic import BaseModel, ConfigDict, StrictStr -from typing import Any, ClassVar, Dict, List +from pydantic import BaseModel, ConfigDict, StrictInt, StrictStr +from typing import Any, ClassVar, Dict, List, Optional from typing import Optional, Set from typing_extensions import Self @@ -30,9 +30,11 @@ class UpdateDatasetResponse(BaseModel): """ # noqa: E501 id: StrictStr label: StrictStr + latest_version: StrictInt + pinned_version: Optional[StrictInt] = None table_name: StrictStr updated_at: datetime - __properties: ClassVar[List[str]] = ["id", "label", "table_name", "updated_at"] + __properties: ClassVar[List[str]] = ["id", "label", "latest_version", "pinned_version", "table_name", "updated_at"] model_config = ConfigDict( populate_by_name=True, @@ -73,6 +75,11 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) + # set to None if pinned_version (nullable) is None + # and model_fields_set contains the field + if self.pinned_version is None and "pinned_version" in self.model_fields_set: + _dict['pinned_version'] = None + return _dict @classmethod @@ -87,6 +94,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "id": obj.get("id"), "label": obj.get("label"), + "latest_version": obj.get("latest_version"), + "pinned_version": obj.get("pinned_version"), "table_name": obj.get("table_name"), "updated_at": obj.get("updated_at") }) diff --git a/hotdata/models/update_saved_query_request.py b/hotdata/models/update_saved_query_request.py index 96635f6..b0996e1 100644 --- a/hotdata/models/update_saved_query_request.py +++ b/hotdata/models/update_saved_query_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/update_secret_request.py b/hotdata/models/update_secret_request.py index 60031ca..118dcab 100644 --- a/hotdata/models/update_secret_request.py +++ b/hotdata/models/update_secret_request.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/update_secret_response.py b/hotdata/models/update_secret_response.py index fe8b2dc..8b05af2 100644 --- a/hotdata/models/update_secret_response.py +++ b/hotdata/models/update_secret_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/upload_dataset_source.py b/hotdata/models/upload_dataset_source.py index 5e4361b..af9a35c 100644 --- a/hotdata/models/upload_dataset_source.py +++ b/hotdata/models/upload_dataset_source.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/upload_info.py b/hotdata/models/upload_info.py index 2b96c3f..2ff8a8b 100644 --- a/hotdata/models/upload_info.py +++ b/hotdata/models/upload_info.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/upload_response.py b/hotdata/models/upload_response.py index c32b3c4..c6b86dd 100644 --- a/hotdata/models/upload_response.py +++ b/hotdata/models/upload_response.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/workspace_detail.py b/hotdata/models/workspace_detail.py index 3612304..5d41b14 100644 --- a/hotdata/models/workspace_detail.py +++ b/hotdata/models/workspace_detail.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/models/workspace_list_item.py b/hotdata/models/workspace_list_item.py index 547bd2e..59ee5c2 100644 --- a/hotdata/models/workspace_list_item.py +++ b/hotdata/models/workspace_list_item.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/hotdata/rest.py b/hotdata/rest.py index 60b03c2..a55f43d 100644 --- a/hotdata/rest.py +++ b/hotdata/rest.py @@ -1,7 +1,7 @@ # coding: utf-8 """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. diff --git a/pyproject.toml b/pyproject.toml index 6282c2a..06bd2e6 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,13 +1,13 @@ [project] name = "hotdata" version = "1.0.0" -description = "HotData API" +description = "Hotdata API" authors = [ - {name = "HotData",email = "developers@hotdata.dev"}, + {name = "Hotdata",email = "developers@hotdata.dev"}, ] license = { text = "MIT" } readme = "README.md" -keywords = ["OpenAPI", "OpenAPI-Generator", "HotData API"] +keywords = ["OpenAPI", "OpenAPI-Generator", "Hotdata API"] requires-python = ">=3.9" dependencies = [ diff --git a/setup.py b/setup.py index 716a551..06e176e 100644 --- a/setup.py +++ b/setup.py @@ -1,5 +1,5 @@ """ - HotData API + Hotdata API Powerful data platform API for datasets, queries, and analytics. @@ -32,11 +32,11 @@ setup( name=NAME, version=VERSION, - description="HotData API", - author="HotData", + description="Hotdata API", + author="Hotdata", author_email="developers@hotdata.dev", url="", - keywords=["OpenAPI", "OpenAPI-Generator", "HotData API"], + keywords=["OpenAPI", "OpenAPI-Generator", "Hotdata API"], install_requires=REQUIRES, packages=find_packages(exclude=["test", "tests"]), include_package_data=True, diff --git a/test/test_connection_type_detail.py b/test/test_connection_type_detail.py new file mode 100644 index 0000000..661ef2c --- /dev/null +++ b/test/test_connection_type_detail.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, 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 new file mode 100644 index 0000000..079c23a --- /dev/null +++ b/test/test_connection_type_summary.py @@ -0,0 +1,55 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, 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 new file mode 100644 index 0000000..a258dda --- /dev/null +++ b/test/test_connection_types_api.py @@ -0,0 +1,46 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, 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_create_index_request.py b/test/test_create_index_request.py new file mode 100644 index 0000000..159dfc7 --- /dev/null +++ b/test/test_create_index_request.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, 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_index_request import CreateIndexRequest + +class TestCreateIndexRequest(unittest.TestCase): + """CreateIndexRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateIndexRequest: + """Test CreateIndexRequest + 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 `CreateIndexRequest` + """ + model = CreateIndexRequest() + if include_optional: + return CreateIndexRequest( + index_name = '', + index_type = '', + metric = '', + sort_columns = [ + '' + ], + text_columns = [ + '' + ], + vector_columns = [ + '' + ] + ) + else: + return CreateIndexRequest( + index_name = '', + ) + """ + + def testCreateIndexRequest(self): + """Test CreateIndexRequest""" + # 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_dataset_version_summary.py b/test/test_dataset_version_summary.py new file mode 100644 index 0000000..2ccabe6 --- /dev/null +++ b/test/test_dataset_version_summary.py @@ -0,0 +1,59 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, 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.dataset_version_summary import DatasetVersionSummary + +class TestDatasetVersionSummary(unittest.TestCase): + """DatasetVersionSummary unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> DatasetVersionSummary: + """Test DatasetVersionSummary + 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 `DatasetVersionSummary` + """ + model = DatasetVersionSummary() + if include_optional: + return DatasetVersionSummary( + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + id = '', + source_type = '', + version = 56 + ) + else: + return DatasetVersionSummary( + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + id = '', + source_type = '', + version = 56, + ) + """ + + def testDatasetVersionSummary(self): + """Test DatasetVersionSummary""" + # 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_index_info_response.py b/test/test_index_info_response.py new file mode 100644 index 0000000..3ab048c --- /dev/null +++ b/test/test_index_info_response.py @@ -0,0 +1,80 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, 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.index_info_response import IndexInfoResponse + +class TestIndexInfoResponse(unittest.TestCase): + """IndexInfoResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> IndexInfoResponse: + """Test IndexInfoResponse + 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 `IndexInfoResponse` + """ + model = IndexInfoResponse() + if include_optional: + return IndexInfoResponse( + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + index_name = '', + index_type = '', + metric = '', + sort_columns = [ + '' + ], + status = 'ready', + text_columns = [ + '' + ], + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + vector_columns = [ + '' + ] + ) + else: + return IndexInfoResponse( + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + index_name = '', + index_type = '', + sort_columns = [ + '' + ], + status = 'ready', + text_columns = [ + '' + ], + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + vector_columns = [ + '' + ], + ) + """ + + def testIndexInfoResponse(self): + """Test IndexInfoResponse""" + # 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_index_status.py b/test/test_index_status.py new file mode 100644 index 0000000..66034a9 --- /dev/null +++ b/test/test_index_status.py @@ -0,0 +1,34 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, 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.index_status import IndexStatus + +class TestIndexStatus(unittest.TestCase): + """IndexStatus unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testIndexStatus(self): + """Test IndexStatus""" + # inst = IndexStatus() + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_indexes_api.py b/test/test_indexes_api.py new file mode 100644 index 0000000..5f848c4 --- /dev/null +++ b/test/test_indexes_api.py @@ -0,0 +1,53 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, 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.indexes_api import IndexesApi + + +class TestIndexesApi(unittest.TestCase): + """IndexesApi unit test stubs""" + + def setUp(self) -> None: + self.api = IndexesApi() + + def tearDown(self) -> None: + pass + + def test_create_index(self) -> None: + """Test case for create_index + + Create an index on a table + """ + pass + + def test_delete_index(self) -> None: + """Test case for delete_index + + Delete an index + """ + pass + + def test_list_indexes(self) -> None: + """Test case for list_indexes + + List indexes on a table + """ + pass + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_list_connection_types_response.py b/test/test_list_connection_types_response.py new file mode 100644 index 0000000..f23f893 --- /dev/null +++ b/test/test_list_connection_types_response.py @@ -0,0 +1,61 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, 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_dataset_versions_response.py b/test/test_list_dataset_versions_response.py new file mode 100644 index 0000000..9fc993b --- /dev/null +++ b/test/test_list_dataset_versions_response.py @@ -0,0 +1,75 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, 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_dataset_versions_response import ListDatasetVersionsResponse + +class TestListDatasetVersionsResponse(unittest.TestCase): + """ListDatasetVersionsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListDatasetVersionsResponse: + """Test ListDatasetVersionsResponse + 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 `ListDatasetVersionsResponse` + """ + model = ListDatasetVersionsResponse() + if include_optional: + return ListDatasetVersionsResponse( + count = 0, + dataset_id = '', + has_more = True, + limit = 0, + offset = 0, + versions = [ + hotdata.models.dataset_version_summary.DatasetVersionSummary( + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + id = '', + source_type = '', + version = 56, ) + ] + ) + else: + return ListDatasetVersionsResponse( + count = 0, + dataset_id = '', + has_more = True, + limit = 0, + offset = 0, + versions = [ + hotdata.models.dataset_version_summary.DatasetVersionSummary( + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + id = '', + source_type = '', + version = 56, ) + ], + ) + """ + + def testListDatasetVersionsResponse(self): + """Test ListDatasetVersionsResponse""" + # 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_indexes_response.py b/test/test_list_indexes_response.py new file mode 100644 index 0000000..4aa671a --- /dev/null +++ b/test/test_list_indexes_response.py @@ -0,0 +1,87 @@ +# coding: utf-8 + +""" + Hotdata API + + Powerful data platform API for datasets, 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_indexes_response import ListIndexesResponse + +class TestListIndexesResponse(unittest.TestCase): + """ListIndexesResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> ListIndexesResponse: + """Test ListIndexesResponse + 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 `ListIndexesResponse` + """ + model = ListIndexesResponse() + if include_optional: + return ListIndexesResponse( + indexes = [ + hotdata.models.index_info_response.IndexInfoResponse( + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + index_name = '', + index_type = '', + metric = '', + sort_columns = [ + '' + ], + status = 'ready', + text_columns = [ + '' + ], + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + vector_columns = [ + '' + ], ) + ] + ) + else: + return ListIndexesResponse( + indexes = [ + hotdata.models.index_info_response.IndexInfoResponse( + created_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + index_name = '', + index_type = '', + metric = '', + sort_columns = [ + '' + ], + status = 'ready', + text_columns = [ + '' + ], + updated_at = datetime.datetime.strptime('2013-10-20 19:20:30.00', '%Y-%m-%d %H:%M:%S.%f'), + vector_columns = [ + '' + ], ) + ], + ) + """ + + def testListIndexesResponse(self): + """Test ListIndexesResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + +if __name__ == '__main__': + unittest.main()