From 5946ec3d8562c3e4a141e5180bfae6dd3f652c49 Mon Sep 17 00:00:00 2001 From: "hotdata-automation[bot]" <267177015+hotdata-automation[bot]@users.noreply.github.com> Date: Mon, 16 Mar 2026 17:49:55 +0000 Subject: [PATCH] chore: regenerate client from OpenAPI spec --- .openapi-generator/FILES | 21 +- docs/ConnectionTypeDetail.md | 32 + docs/ConnectionTypeSummary.md | 30 + docs/ConnectionTypesApi.md | 163 ++++++ docs/ListConnectionTypesResponse.md | 29 + hotdata/__init__.py | 8 + hotdata/api/__init__.py | 1 + hotdata/api/connection_types_api.py | 549 ++++++++++++++++++ hotdata/models/__init__.py | 3 + hotdata/models/connection_type_detail.py | 104 ++++ hotdata/models/connection_type_summary.py | 90 +++ .../models/list_connection_types_response.py | 96 +++ test/test_connection_type_detail.py | 57 ++ test/test_connection_type_summary.py | 55 ++ test/test_connection_types_api.py | 46 ++ test/test_list_connection_types_response.py | 61 ++ 16 files changed, 1336 insertions(+), 9 deletions(-) create mode 100644 docs/ConnectionTypeDetail.md create mode 100644 docs/ConnectionTypeSummary.md create mode 100644 docs/ConnectionTypesApi.md create mode 100644 docs/ListConnectionTypesResponse.md create mode 100644 hotdata/api/connection_types_api.py create mode 100644 hotdata/models/connection_type_detail.py create mode 100644 hotdata/models/connection_type_summary.py create mode 100644 hotdata/models/list_connection_types_response.py create mode 100644 test/test_connection_type_detail.py create mode 100644 test/test_connection_type_summary.py create mode 100644 test/test_connection_types_api.py create mode 100644 test/test_list_connection_types_response.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index c9d6801..60b2d3a 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -19,6 +19,9 @@ 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 @@ -43,6 +46,7 @@ docs/InformationSchemaApi.md docs/InformationSchemaResponse.md docs/InlineData.md docs/InlineDatasetSource.md +docs/ListConnectionTypesResponse.md docs/ListConnectionsResponse.md docs/ListDatasetsResponse.md docs/ListQueryRunsResponse.md @@ -91,6 +95,7 @@ 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/information_schema_api.py @@ -125,6 +130,8 @@ 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 @@ -146,6 +153,7 @@ hotdata/models/get_secret_response.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_datasets_response.py hotdata/models/list_query_runs_response.py @@ -192,13 +200,8 @@ 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_list_connection_types_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/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/hotdata/__init__.py b/hotdata/__init__.py index 9f720a1..e6f704f 100644 --- a/hotdata/__init__.py +++ b/hotdata/__init__.py @@ -19,6 +19,7 @@ # Define package exports __all__ = [ + "ConnectionTypesApi", "ConnectionsApi", "DatasetsApi", "InformationSchemaApi", @@ -57,6 +58,8 @@ "ConnectionInfo", "ConnectionRefreshResult", "ConnectionSchemaError", + "ConnectionTypeDetail", + "ConnectionTypeSummary", "CreateConnectionRequest", "CreateConnectionResponse", "CreateDatasetRequest", @@ -78,6 +81,7 @@ "InformationSchemaResponse", "InlineData", "InlineDatasetSource", + "ListConnectionTypesResponse", "ListConnectionsResponse", "ListDatasetsResponse", "ListQueryRunsResponse", @@ -119,6 +123,7 @@ ] # 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.information_schema_api import InformationSchemaApi as InformationSchemaApi @@ -161,6 +166,8 @@ 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 @@ -182,6 +189,7 @@ 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_datasets_response import ListDatasetsResponse as ListDatasetsResponse from hotdata.models.list_query_runs_response import ListQueryRunsResponse as ListQueryRunsResponse diff --git a/hotdata/api/__init__.py b/hotdata/api/__init__.py index b901c79..148a7e3 100644 --- a/hotdata/api/__init__.py +++ b/hotdata/api/__init__.py @@ -1,6 +1,7 @@ # 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.information_schema_api import InformationSchemaApi diff --git a/hotdata/api/connection_types_api.py b/hotdata/api/connection_types_api.py new file mode 100644 index 0000000..dbdb732 --- /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/models/__init__.py b/hotdata/models/__init__.py index afea775..a97a1f3 100644 --- a/hotdata/models/__init__.py +++ b/hotdata/models/__init__.py @@ -32,6 +32,8 @@ 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 @@ -53,6 +55,7 @@ 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_datasets_response import ListDatasetsResponse from hotdata.models.list_query_runs_response import ListQueryRunsResponse diff --git a/hotdata/models/connection_type_detail.py b/hotdata/models/connection_type_detail.py new file mode 100644 index 0000000..88fac56 --- /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..5cf2653 --- /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/list_connection_types_response.py b/hotdata/models/list_connection_types_response.py new file mode 100644 index 0000000..0ec8689 --- /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/test/test_connection_type_detail.py b/test/test_connection_type_detail.py new file mode 100644 index 0000000..9ec6e0a --- /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..21cfae6 --- /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..b9ae7af --- /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_list_connection_types_response.py b/test/test_list_connection_types_response.py new file mode 100644 index 0000000..5203345 --- /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()