diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index 07c0d64..653c1bd 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -18,11 +18,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 @@ -30,6 +34,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 @@ -38,12 +43,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 @@ -89,8 +100,10 @@ docs/WorkspaceDetail.md docs/WorkspaceListItem.md docs/WorkspacesApi.md src/apis/configuration.rs +src/apis/connection_types_api.rs src/apis/connections_api.rs src/apis/datasets_api.rs +src/apis/indexes_api.rs src/apis/information_schema_api.rs src/apis/mod.rs src/apis/query_api.rs @@ -120,10 +133,13 @@ src/models/connection_health_response.rs src/models/connection_info.rs src/models/connection_refresh_result.rs src/models/connection_schema_error.rs +src/models/connection_type_detail.rs +src/models/connection_type_summary.rs src/models/create_connection_request.rs src/models/create_connection_response.rs src/models/create_dataset_request.rs src/models/create_dataset_response.rs +src/models/create_index_request.rs src/models/create_saved_query_request.rs src/models/create_secret_request.rs src/models/create_secret_response.rs @@ -131,6 +147,7 @@ src/models/create_workspace_request.rs src/models/create_workspace_response.rs src/models/dataset_source.rs src/models/dataset_summary.rs +src/models/dataset_version_summary.rs src/models/discovery_status.rs src/models/error.rs src/models/execute_saved_query_request.rs @@ -138,11 +155,16 @@ src/models/get_connection_response.rs src/models/get_dataset_response.rs src/models/get_result_response.rs src/models/get_secret_response.rs +src/models/index_info_response.rs +src/models/index_status.rs src/models/information_schema_response.rs src/models/inline_data.rs src/models/inline_dataset_source.rs +src/models/list_connection_types_response.rs src/models/list_connections_response.rs +src/models/list_dataset_versions_response.rs src/models/list_datasets_response.rs +src/models/list_indexes_response.rs src/models/list_query_runs_response.rs src/models/list_results_response.rs src/models/list_saved_queries_response.rs diff --git a/docs/ConnectionTypeDetail.md b/docs/ConnectionTypeDetail.md new file mode 100644 index 0000000..b5b36c4 --- /dev/null +++ b/docs/ConnectionTypeDetail.md @@ -0,0 +1,14 @@ +# ConnectionTypeDetail + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**auth** | Option<**serde_json::Value**> | | [optional] +**config_schema** | Option<**serde_json::Value**> | | [optional] +**label** | **String** | | +**name** | **String** | | + +[[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..3937178 --- /dev/null +++ b/docs/ConnectionTypeSummary.md @@ -0,0 +1,12 @@ +# ConnectionTypeSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**label** | **String** | | +**name** | **String** | | + +[[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..03ee407 --- /dev/null +++ b/docs/ConnectionTypesApi.md @@ -0,0 +1,67 @@ +# \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 + +> models::ConnectionTypeDetail get_connection_type(name) +Get connection type details + +Get configuration schema and authentication requirements for a specific connection type. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**name** | **String** | Connection type name (e.g. postgres, mysql, snowflake) | [required] | + +### Return type + +[**models::ConnectionTypeDetail**](ConnectionTypeDetail.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> models::ListConnectionTypesResponse list_connection_types() +List connection types + +List all available connection types, including native sources and FlightDLT services. + +### Parameters + +This endpoint does not need any parameter. + +### Return type + +[**models::ListConnectionTypesResponse**](ListConnectionTypesResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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..495a05f --- /dev/null +++ b/docs/CreateIndexRequest.md @@ -0,0 +1,16 @@ +# CreateIndexRequest + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**index_name** | **String** | | +**index_type** | Option<**String**> | Index type: \"sorted\" (default), \"bm25\", or \"vector\" | [optional] +**metric** | Option<**String**> | Distance metric for vector indexes: \"l2\" (default), \"cosine\", or \"dot\". Only relevant when index_type = \"vector\". | [optional] +**sort_columns** | Option<**Vec**> | | [optional] +**text_columns** | Option<**Vec**> | Text columns for BM25 indexes | [optional] +**vector_columns** | Option<**Vec**> | Vector column for vector indexes (exactly one entry required) | [optional] + +[[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 f10bd36..88eae66 100644 --- a/docs/DatasetSummary.md +++ b/docs/DatasetSummary.md @@ -7,6 +7,8 @@ Name | Type | Description | Notes **created_at** | **String** | | **id** | **String** | | **label** | **String** | | +**latest_version** | **i32** | | +**pinned_version** | Option<**i32**> | | [optional] **table_name** | **String** | | **updated_at** | **String** | | diff --git a/docs/DatasetVersionSummary.md b/docs/DatasetVersionSummary.md new file mode 100644 index 0000000..0ef88bb --- /dev/null +++ b/docs/DatasetVersionSummary.md @@ -0,0 +1,14 @@ +# DatasetVersionSummary + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **String** | | +**id** | **String** | | +**source_type** | **String** | | +**version** | **i32** | | + +[[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 e2ab20b..705a45c 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 @@ -98,6 +99,36 @@ Name | Type | Description | Required | 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 + +> models::ListDatasetVersionsResponse list_dataset_versions(id, limit, offset) +List dataset versions + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**id** | **String** | Dataset ID | [required] | +**limit** | Option<**i32**> | Maximum number of versions (default: 100, max: 1000) | | +**offset** | Option<**i32**> | Pagination offset (default: 0) | | + +### Return type + +[**models::ListDatasetVersionsResponse**](ListDatasetVersionsResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 > models::ListDatasetsResponse list_datasets(limit, offset) diff --git a/docs/GetDatasetResponse.md b/docs/GetDatasetResponse.md index aa8fa00..7db9ee3 100644 --- a/docs/GetDatasetResponse.md +++ b/docs/GetDatasetResponse.md @@ -8,6 +8,8 @@ Name | Type | Description | Notes **created_at** | **String** | | **id** | **String** | | **label** | **String** | | +**latest_version** | **i32** | | +**pinned_version** | Option<**i32**> | | [optional] **schema_name** | **String** | | **source_type** | **String** | | **table_name** | **String** | | diff --git a/docs/IndexInfoResponse.md b/docs/IndexInfoResponse.md new file mode 100644 index 0000000..d8ac00f --- /dev/null +++ b/docs/IndexInfoResponse.md @@ -0,0 +1,19 @@ +# IndexInfoResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**created_at** | **String** | | +**index_name** | **String** | | +**index_type** | **String** | | +**metric** | Option<**String**> | Distance metric this index was built with. Only present for vector indexes. | [optional] +**sort_columns** | **Vec** | | +**status** | [**models::IndexStatus**](IndexStatus.md) | | +**text_columns** | **Vec** | | +**updated_at** | **String** | | +**vector_columns** | **Vec** | | + +[[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..53332a9 --- /dev/null +++ b/docs/IndexStatus.md @@ -0,0 +1,13 @@ +# IndexStatus + +## Enum Variants + +| Name | Value | +|---- | -----| +| Ready | ready | +| Pending | 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..9cd151a --- /dev/null +++ b/docs/IndexesApi.md @@ -0,0 +1,109 @@ +# \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 + +> models::IndexInfoResponse create_index(connection_id, schema, table, create_index_request) +Create an index on a table + +Create a sorted or BM25 full-text index on a cached table. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**connection_id** | **String** | Connection identifier | [required] | +**schema** | **String** | Schema name | [required] | +**table** | **String** | Table name | [required] | +**create_index_request** | [**CreateIndexRequest**](CreateIndexRequest.md) | | [required] | + +### Return type + +[**models::IndexInfoResponse**](IndexInfoResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: application/json +- **Accept**: application/json + +[[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, schema, table, index_name) +Delete an index + +Delete a specific index from a cached table. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**connection_id** | **String** | Connection identifier | [required] | +**schema** | **String** | Schema name | [required] | +**table** | **String** | Table name | [required] | +**index_name** | **String** | Index name | [required] | + +### Return type + + (empty response body) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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 + +> models::ListIndexesResponse list_indexes(connection_id, schema, table) +List indexes on a table + +List all indexes created on a cached table. + +### Parameters + + +Name | Type | Description | Required | Notes +------------- | ------------- | ------------- | ------------- | ------------- +**connection_id** | **String** | Connection identifier | [required] | +**schema** | **String** | Schema name | [required] | +**table** | **String** | Table name | [required] | + +### Return type + +[**models::ListIndexesResponse**](ListIndexesResponse.md) + +### Authorization + +[BearerAuth](../README.md#BearerAuth) + +### HTTP request headers + +- **Content-Type**: Not defined +- **Accept**: application/json + +[[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..b310c5c --- /dev/null +++ b/docs/ListConnectionTypesResponse.md @@ -0,0 +1,11 @@ +# ListConnectionTypesResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**connection_types** | [**Vec**](ConnectionTypeSummary.md) | | + +[[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..0202ec4 --- /dev/null +++ b/docs/ListDatasetVersionsResponse.md @@ -0,0 +1,16 @@ +# ListDatasetVersionsResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**count** | **i32** | | +**dataset_id** | **String** | | +**has_more** | **bool** | | +**limit** | **i32** | | +**offset** | **i32** | | +**versions** | [**Vec**](DatasetVersionSummary.md) | | + +[[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..49c5dc5 --- /dev/null +++ b/docs/ListIndexesResponse.md @@ -0,0 +1,11 @@ +# ListIndexesResponse + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**indexes** | [**Vec**](IndexInfoResponse.md) | | + +[[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 ce31193..0341012 100644 --- a/docs/UpdateDatasetRequest.md +++ b/docs/UpdateDatasetRequest.md @@ -5,6 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **label** | Option<**String**> | | [optional] +**pinned_version** | Option<**i32**> | Pin to a specific version, or send null to unpin. Omit the field entirely to leave pinning unchanged. | [optional] **table_name** | Option<**String**> | | [optional] [[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/UpdateDatasetResponse.md b/docs/UpdateDatasetResponse.md index 9e81eba..51b0b4a 100644 --- a/docs/UpdateDatasetResponse.md +++ b/docs/UpdateDatasetResponse.md @@ -6,6 +6,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **id** | **String** | | **label** | **String** | | +**latest_version** | **i32** | | +**pinned_version** | Option<**i32**> | | [optional] **table_name** | **String** | | **updated_at** | **String** | | diff --git a/src/apis/configuration.rs b/src/apis/configuration.rs index 95bf139..e11936e 100644 --- a/src/apis/configuration.rs +++ b/src/apis/configuration.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/apis/connection_types_api.rs b/src/apis/connection_types_api.rs new file mode 100644 index 0000000..f479a25 --- /dev/null +++ b/src/apis/connection_types_api.rs @@ -0,0 +1,111 @@ +/* + * 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: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + + +/// struct for typed errors of method [`get_connection_type`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum GetConnectionTypeError { + Status404(models::ApiErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_connection_types`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListConnectionTypesError { + UnknownValue(serde_json::Value), +} + + +/// Get configuration schema and authentication requirements for a specific connection type. +pub async fn get_connection_type(configuration: &configuration::Configuration, name: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_name = name; + + let uri_str = format!("{}/v1/connection-types/{name}", configuration.base_path, name=crate::apis::urlencode(p_path_name)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ConnectionTypeDetail`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ConnectionTypeDetail`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// List all available connection types, including native sources and FlightDLT services. +pub async fn list_connection_types(configuration: &configuration::Configuration, ) -> Result> { + + let uri_str = format!("{}/v1/connection-types", configuration.base_path); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ListConnectionTypesResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ListConnectionTypesResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/src/apis/connections_api.rs b/src/apis/connections_api.rs index 4e6aa99..f312de0 100644 --- a/src/apis/connections_api.rs +++ b/src/apis/connections_api.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/apis/datasets_api.rs b/src/apis/datasets_api.rs index fac8ac8..dd9f937 100644 --- a/src/apis/datasets_api.rs +++ b/src/apis/datasets_api.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * @@ -40,6 +40,14 @@ pub enum GetDatasetError { UnknownValue(serde_json::Value), } +/// struct for typed errors of method [`list_dataset_versions`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListDatasetVersionsError { + Status404(models::ApiErrorResponse), + UnknownValue(serde_json::Value), +} + /// struct for typed errors of method [`list_datasets`] #[derive(Debug, Clone, Serialize, Deserialize)] #[serde(untagged)] @@ -165,6 +173,53 @@ pub async fn get_dataset(configuration: &configuration::Configuration, id: &str) } } +pub async fn list_dataset_versions(configuration: &configuration::Configuration, id: &str, limit: Option, offset: Option) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_id = id; + let p_query_limit = limit; + let p_query_offset = offset; + + let uri_str = format!("{}/v1/datasets/{id}/versions", configuration.base_path, id=crate::apis::urlencode(p_path_id)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref param_value) = p_query_limit { + req_builder = req_builder.query(&[("limit", ¶m_value.to_string())]); + } + if let Some(ref param_value) = p_query_offset { + req_builder = req_builder.query(&[("offset", ¶m_value.to_string())]); + } + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ListDatasetVersionsResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ListDatasetVersionsResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + pub async fn list_datasets(configuration: &configuration::Configuration, limit: Option, offset: Option) -> Result> { // add a prefix to parameters to efficiently prevent name collisions let p_query_limit = limit; diff --git a/src/apis/indexes_api.rs b/src/apis/indexes_api.rs new file mode 100644 index 0000000..45678a2 --- /dev/null +++ b/src/apis/indexes_api.rs @@ -0,0 +1,163 @@ +/* + * 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: https://openapi-generator.tech + */ + + +use reqwest; +use serde::{Deserialize, Serialize, de::Error as _}; +use crate::{apis::ResponseContent, models}; +use super::{Error, configuration, ContentType}; + + +/// struct for typed errors of method [`create_index`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum CreateIndexError { + Status400(models::ApiErrorResponse), + Status404(models::ApiErrorResponse), + Status500(models::ApiErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`delete_index`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum DeleteIndexError { + Status404(models::ApiErrorResponse), + Status500(models::ApiErrorResponse), + UnknownValue(serde_json::Value), +} + +/// struct for typed errors of method [`list_indexes`] +#[derive(Debug, Clone, Serialize, Deserialize)] +#[serde(untagged)] +pub enum ListIndexesError { + Status500(models::ApiErrorResponse), + UnknownValue(serde_json::Value), +} + + +/// Create a sorted or BM25 full-text index on a cached table. +pub async fn create_index(configuration: &configuration::Configuration, connection_id: &str, schema: &str, table: &str, create_index_request: models::CreateIndexRequest) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_connection_id = connection_id; + let p_path_schema = schema; + let p_path_table = table; + let p_body_create_index_request = create_index_request; + + let uri_str = format!("{}/v1/connections/{connection_id}/tables/{schema}/{table}/indexes", configuration.base_path, connection_id=crate::apis::urlencode(p_path_connection_id), schema=crate::apis::urlencode(p_path_schema), table=crate::apis::urlencode(p_path_table)); + let mut req_builder = configuration.client.request(reqwest::Method::POST, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + req_builder = req_builder.json(&p_body_create_index_request); + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::IndexInfoResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::IndexInfoResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// Delete a specific index from a cached table. +pub async fn delete_index(configuration: &configuration::Configuration, connection_id: &str, schema: &str, table: &str, index_name: &str) -> Result<(), Error> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_connection_id = connection_id; + let p_path_schema = schema; + let p_path_table = table; + let p_path_index_name = index_name; + + let uri_str = format!("{}/v1/connections/{connection_id}/tables/{schema}/{table}/indexes/{index_name}", configuration.base_path, connection_id=crate::apis::urlencode(p_path_connection_id), schema=crate::apis::urlencode(p_path_schema), table=crate::apis::urlencode(p_path_table), index_name=crate::apis::urlencode(p_path_index_name)); + let mut req_builder = configuration.client.request(reqwest::Method::DELETE, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + + if !status.is_client_error() && !status.is_server_error() { + Ok(()) + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + +/// List all indexes created on a cached table. +pub async fn list_indexes(configuration: &configuration::Configuration, connection_id: &str, schema: &str, table: &str) -> Result> { + // add a prefix to parameters to efficiently prevent name collisions + let p_path_connection_id = connection_id; + let p_path_schema = schema; + let p_path_table = table; + + let uri_str = format!("{}/v1/connections/{connection_id}/tables/{schema}/{table}/indexes", configuration.base_path, connection_id=crate::apis::urlencode(p_path_connection_id), schema=crate::apis::urlencode(p_path_schema), table=crate::apis::urlencode(p_path_table)); + let mut req_builder = configuration.client.request(reqwest::Method::GET, &uri_str); + + if let Some(ref user_agent) = configuration.user_agent { + req_builder = req_builder.header(reqwest::header::USER_AGENT, user_agent.clone()); + } + if let Some(ref token) = configuration.bearer_access_token { + req_builder = req_builder.bearer_auth(token.to_owned()); + }; + + let req = req_builder.build()?; + let resp = configuration.client.execute(req).await?; + + let status = resp.status(); + let content_type = resp + .headers() + .get("content-type") + .and_then(|v| v.to_str().ok()) + .unwrap_or("application/octet-stream"); + let content_type = super::ContentType::from(content_type); + + if !status.is_client_error() && !status.is_server_error() { + let content = resp.text().await?; + match content_type { + ContentType::Json => serde_json::from_str(&content).map_err(Error::from), + ContentType::Text => return Err(Error::from(serde_json::Error::custom("Received `text/plain` content type response that cannot be converted to `models::ListIndexesResponse`"))), + ContentType::Unsupported(unknown_type) => return Err(Error::from(serde_json::Error::custom(format!("Received `{unknown_type}` content type response that cannot be converted to `models::ListIndexesResponse`")))), + } + } else { + let content = resp.text().await?; + let entity: Option = serde_json::from_str(&content).ok(); + Err(Error::ResponseError(ResponseContent { status, content, entity })) + } +} + diff --git a/src/apis/information_schema_api.rs b/src/apis/information_schema_api.rs index 75fcfeb..9db5377 100644 --- a/src/apis/information_schema_api.rs +++ b/src/apis/information_schema_api.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/apis/mod.rs b/src/apis/mod.rs index 74fe0be..870780e 100644 --- a/src/apis/mod.rs +++ b/src/apis/mod.rs @@ -111,8 +111,10 @@ impl From<&str> for ContentType { } } +pub mod connection_types_api; pub mod connections_api; pub mod datasets_api; +pub mod indexes_api; pub mod information_schema_api; pub mod query_api; pub mod query_runs_api; diff --git a/src/apis/query_api.rs b/src/apis/query_api.rs index 3099b7c..d62aea3 100644 --- a/src/apis/query_api.rs +++ b/src/apis/query_api.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/apis/query_runs_api.rs b/src/apis/query_runs_api.rs index 2e6dc9f..0f2c363 100644 --- a/src/apis/query_runs_api.rs +++ b/src/apis/query_runs_api.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/apis/refresh_api.rs b/src/apis/refresh_api.rs index 686c775..3eeac31 100644 --- a/src/apis/refresh_api.rs +++ b/src/apis/refresh_api.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/apis/results_api.rs b/src/apis/results_api.rs index c6f965e..a5c644f 100644 --- a/src/apis/results_api.rs +++ b/src/apis/results_api.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/apis/saved_queries_api.rs b/src/apis/saved_queries_api.rs index 96e1629..8af2bf0 100644 --- a/src/apis/saved_queries_api.rs +++ b/src/apis/saved_queries_api.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/apis/secrets_api.rs b/src/apis/secrets_api.rs index be373cc..b182c3e 100644 --- a/src/apis/secrets_api.rs +++ b/src/apis/secrets_api.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/apis/uploads_api.rs b/src/apis/uploads_api.rs index 15de5b1..3af8a6f 100644 --- a/src/apis/uploads_api.rs +++ b/src/apis/uploads_api.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/apis/workspaces_api.rs b/src/apis/workspaces_api.rs index e11636c..eef13c9 100644 --- a/src/apis/workspaces_api.rs +++ b/src/apis/workspaces_api.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/api_error_detail.rs b/src/models/api_error_detail.rs index bd6a871..ac116c7 100644 --- a/src/models/api_error_detail.rs +++ b/src/models/api_error_detail.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/api_error_response.rs b/src/models/api_error_response.rs index 82b722f..70eac5b 100644 --- a/src/models/api_error_response.rs +++ b/src/models/api_error_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/boolean_profile_detail.rs b/src/models/boolean_profile_detail.rs index ca4034f..fbe152f 100644 --- a/src/models/boolean_profile_detail.rs +++ b/src/models/boolean_profile_detail.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/categorical_profile_detail.rs b/src/models/categorical_profile_detail.rs index 7036db4..97e44ec 100644 --- a/src/models/categorical_profile_detail.rs +++ b/src/models/categorical_profile_detail.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/category_value_info.rs b/src/models/category_value_info.rs index 19eb387..71d6bb5 100644 --- a/src/models/category_value_info.rs +++ b/src/models/category_value_info.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/column_info.rs b/src/models/column_info.rs index 6b066e9..955559d 100644 --- a/src/models/column_info.rs +++ b/src/models/column_info.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/column_profile_detail.rs b/src/models/column_profile_detail.rs index d87bed8..7ea2dfc 100644 --- a/src/models/column_profile_detail.rs +++ b/src/models/column_profile_detail.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/column_profile_detail_one_of.rs b/src/models/column_profile_detail_one_of.rs index ef57a9f..9d51877 100644 --- a/src/models/column_profile_detail_one_of.rs +++ b/src/models/column_profile_detail_one_of.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/column_profile_detail_one_of_1.rs b/src/models/column_profile_detail_one_of_1.rs index cbf8f67..6959c97 100644 --- a/src/models/column_profile_detail_one_of_1.rs +++ b/src/models/column_profile_detail_one_of_1.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/column_profile_detail_one_of_2.rs b/src/models/column_profile_detail_one_of_2.rs index 6eb3c80..1400c5b 100644 --- a/src/models/column_profile_detail_one_of_2.rs +++ b/src/models/column_profile_detail_one_of_2.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/column_profile_detail_one_of_3.rs b/src/models/column_profile_detail_one_of_3.rs index 16ed3a6..3896f25 100644 --- a/src/models/column_profile_detail_one_of_3.rs +++ b/src/models/column_profile_detail_one_of_3.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/column_profile_detail_one_of_4.rs b/src/models/column_profile_detail_one_of_4.rs index acef72a..95f689a 100644 --- a/src/models/column_profile_detail_one_of_4.rs +++ b/src/models/column_profile_detail_one_of_4.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/column_profile_info.rs b/src/models/column_profile_info.rs index d9093a1..f65b01d 100644 --- a/src/models/column_profile_info.rs +++ b/src/models/column_profile_info.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/column_type_spec.rs b/src/models/column_type_spec.rs index 06bb905..8d8087f 100644 --- a/src/models/column_type_spec.rs +++ b/src/models/column_type_spec.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/connection_health_response.rs b/src/models/connection_health_response.rs index d3479dd..0e60464 100644 --- a/src/models/connection_health_response.rs +++ b/src/models/connection_health_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/connection_info.rs b/src/models/connection_info.rs index 9f74b37..36808e4 100644 --- a/src/models/connection_info.rs +++ b/src/models/connection_info.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/connection_refresh_result.rs b/src/models/connection_refresh_result.rs index 4b4cc9d..6fc540f 100644 --- a/src/models/connection_refresh_result.rs +++ b/src/models/connection_refresh_result.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/connection_schema_error.rs b/src/models/connection_schema_error.rs index f058c35..30902d4 100644 --- a/src/models/connection_schema_error.rs +++ b/src/models/connection_schema_error.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/connection_type_detail.rs b/src/models/connection_type_detail.rs new file mode 100644 index 0000000..e18d982 --- /dev/null +++ b/src/models/connection_type_detail.rs @@ -0,0 +1,36 @@ +/* + * 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: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ConnectionTypeDetail { + #[serde(rename = "auth", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub auth: Option>, + #[serde(rename = "config_schema", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub config_schema: Option>, + #[serde(rename = "label")] + pub label: String, + #[serde(rename = "name")] + pub name: String, +} + +impl ConnectionTypeDetail { + pub fn new(label: String, name: String) -> ConnectionTypeDetail { + ConnectionTypeDetail { + auth: None, + config_schema: None, + label, + name, + } + } +} + diff --git a/src/models/connection_type_summary.rs b/src/models/connection_type_summary.rs new file mode 100644 index 0000000..b5874e1 --- /dev/null +++ b/src/models/connection_type_summary.rs @@ -0,0 +1,30 @@ +/* + * 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: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ConnectionTypeSummary { + #[serde(rename = "label")] + pub label: String, + #[serde(rename = "name")] + pub name: String, +} + +impl ConnectionTypeSummary { + pub fn new(label: String, name: String) -> ConnectionTypeSummary { + ConnectionTypeSummary { + label, + name, + } + } +} + diff --git a/src/models/create_connection_request.rs b/src/models/create_connection_request.rs index 4daa18f..4285f6c 100644 --- a/src/models/create_connection_request.rs +++ b/src/models/create_connection_request.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/create_connection_response.rs b/src/models/create_connection_response.rs index a4a1a2b..593dffc 100644 --- a/src/models/create_connection_response.rs +++ b/src/models/create_connection_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/create_dataset_request.rs b/src/models/create_dataset_request.rs index b2c1d68..8e5afe5 100644 --- a/src/models/create_dataset_request.rs +++ b/src/models/create_dataset_request.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/create_dataset_response.rs b/src/models/create_dataset_response.rs index 6e4e525..d758e1e 100644 --- a/src/models/create_dataset_response.rs +++ b/src/models/create_dataset_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/create_index_request.rs b/src/models/create_index_request.rs new file mode 100644 index 0000000..6d192b0 --- /dev/null +++ b/src/models/create_index_request.rs @@ -0,0 +1,48 @@ +/* + * 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: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// CreateIndexRequest : Request body for POST .../indexes +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct CreateIndexRequest { + #[serde(rename = "index_name")] + pub index_name: String, + /// Index type: \"sorted\" (default), \"bm25\", or \"vector\" + #[serde(rename = "index_type", skip_serializing_if = "Option::is_none")] + pub index_type: Option, + /// Distance metric for vector indexes: \"l2\" (default), \"cosine\", or \"dot\". Only relevant when index_type = \"vector\". + #[serde(rename = "metric", skip_serializing_if = "Option::is_none")] + pub metric: Option, + #[serde(rename = "sort_columns", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub sort_columns: Option>>, + /// Text columns for BM25 indexes + #[serde(rename = "text_columns", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub text_columns: Option>>, + /// Vector column for vector indexes (exactly one entry required) + #[serde(rename = "vector_columns", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub vector_columns: Option>>, +} + +impl CreateIndexRequest { + /// Request body for POST .../indexes + pub fn new(index_name: String) -> CreateIndexRequest { + CreateIndexRequest { + index_name, + index_type: None, + metric: None, + sort_columns: None, + text_columns: None, + vector_columns: None, + } + } +} + diff --git a/src/models/create_saved_query_request.rs b/src/models/create_saved_query_request.rs index d8336f3..ed5a6f5 100644 --- a/src/models/create_saved_query_request.rs +++ b/src/models/create_saved_query_request.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/create_secret_request.rs b/src/models/create_secret_request.rs index 33acb54..12e8005 100644 --- a/src/models/create_secret_request.rs +++ b/src/models/create_secret_request.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/create_secret_response.rs b/src/models/create_secret_response.rs index ad75f73..076066c 100644 --- a/src/models/create_secret_response.rs +++ b/src/models/create_secret_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/create_workspace_request.rs b/src/models/create_workspace_request.rs index 4dd9825..e33a528 100644 --- a/src/models/create_workspace_request.rs +++ b/src/models/create_workspace_request.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/create_workspace_response.rs b/src/models/create_workspace_response.rs index afa57c9..7924c01 100644 --- a/src/models/create_workspace_response.rs +++ b/src/models/create_workspace_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/dataset_source.rs b/src/models/dataset_source.rs index c35c9fb..dd34197 100644 --- a/src/models/dataset_source.rs +++ b/src/models/dataset_source.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/dataset_summary.rs b/src/models/dataset_summary.rs index cdc2831..5c84ee0 100644 --- a/src/models/dataset_summary.rs +++ b/src/models/dataset_summary.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * @@ -20,6 +20,10 @@ pub struct DatasetSummary { pub id: String, #[serde(rename = "label")] pub label: String, + #[serde(rename = "latest_version")] + pub latest_version: i32, + #[serde(rename = "pinned_version", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub pinned_version: Option>, #[serde(rename = "table_name")] pub table_name: String, #[serde(rename = "updated_at")] @@ -28,11 +32,13 @@ pub struct DatasetSummary { impl DatasetSummary { /// Dataset summary for listing - pub fn new(created_at: String, id: String, label: String, table_name: String, updated_at: String) -> DatasetSummary { + pub fn new(created_at: String, id: String, label: String, latest_version: i32, table_name: String, updated_at: String) -> DatasetSummary { DatasetSummary { created_at, id, label, + latest_version, + pinned_version: None, table_name, updated_at, } diff --git a/src/models/dataset_version_summary.rs b/src/models/dataset_version_summary.rs new file mode 100644 index 0000000..8f0d984 --- /dev/null +++ b/src/models/dataset_version_summary.rs @@ -0,0 +1,38 @@ +/* + * 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: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// DatasetVersionSummary : Dataset version summary +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct DatasetVersionSummary { + #[serde(rename = "created_at")] + pub created_at: String, + #[serde(rename = "id")] + pub id: String, + #[serde(rename = "source_type")] + pub source_type: String, + #[serde(rename = "version")] + pub version: i32, +} + +impl DatasetVersionSummary { + /// Dataset version summary + pub fn new(created_at: String, id: String, source_type: String, version: i32) -> DatasetVersionSummary { + DatasetVersionSummary { + created_at, + id, + source_type, + version, + } + } +} + diff --git a/src/models/discovery_status.rs b/src/models/discovery_status.rs index 8128d57..2cb04c4 100644 --- a/src/models/discovery_status.rs +++ b/src/models/discovery_status.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/error.rs b/src/models/error.rs index 2377ce5..b46fd36 100644 --- a/src/models/error.rs +++ b/src/models/error.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/execute_saved_query_request.rs b/src/models/execute_saved_query_request.rs index 17e9355..f6aca24 100644 --- a/src/models/execute_saved_query_request.rs +++ b/src/models/execute_saved_query_request.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/get_connection_response.rs b/src/models/get_connection_response.rs index 2e1bb2e..59b375d 100644 --- a/src/models/get_connection_response.rs +++ b/src/models/get_connection_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/get_dataset_response.rs b/src/models/get_dataset_response.rs index 8caeb05..2c48bb5 100644 --- a/src/models/get_dataset_response.rs +++ b/src/models/get_dataset_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * @@ -22,6 +22,10 @@ pub struct GetDatasetResponse { pub id: String, #[serde(rename = "label")] pub label: String, + #[serde(rename = "latest_version")] + pub latest_version: i32, + #[serde(rename = "pinned_version", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub pinned_version: Option>, #[serde(rename = "schema_name")] pub schema_name: String, #[serde(rename = "source_type")] @@ -34,12 +38,14 @@ pub struct GetDatasetResponse { impl GetDatasetResponse { /// Response body for GET /v1/datasets/{id} - pub fn new(columns: Vec, created_at: String, id: String, label: String, schema_name: String, source_type: String, table_name: String, updated_at: String) -> GetDatasetResponse { + pub fn new(columns: Vec, created_at: String, id: String, label: String, latest_version: i32, schema_name: String, source_type: String, table_name: String, updated_at: String) -> GetDatasetResponse { GetDatasetResponse { columns, created_at, id, label, + latest_version, + pinned_version: None, schema_name, source_type, table_name, diff --git a/src/models/get_result_response.rs b/src/models/get_result_response.rs index 6ee60f1..e608de7 100644 --- a/src/models/get_result_response.rs +++ b/src/models/get_result_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/get_secret_response.rs b/src/models/get_secret_response.rs index b84ca82..f70528a 100644 --- a/src/models/get_secret_response.rs +++ b/src/models/get_secret_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/index_info_response.rs b/src/models/index_info_response.rs new file mode 100644 index 0000000..994eeaa --- /dev/null +++ b/src/models/index_info_response.rs @@ -0,0 +1,54 @@ +/* + * 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: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// IndexInfoResponse : Response for index endpoints. +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct IndexInfoResponse { + #[serde(rename = "created_at")] + pub created_at: String, + #[serde(rename = "index_name")] + pub index_name: String, + #[serde(rename = "index_type")] + pub index_type: String, + /// Distance metric this index was built with. Only present for vector indexes. + #[serde(rename = "metric", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub metric: Option>, + #[serde(rename = "sort_columns")] + pub sort_columns: Vec, + #[serde(rename = "status")] + pub status: models::IndexStatus, + #[serde(rename = "text_columns")] + pub text_columns: Vec, + #[serde(rename = "updated_at")] + pub updated_at: String, + #[serde(rename = "vector_columns")] + pub vector_columns: Vec, +} + +impl IndexInfoResponse { + /// Response for index endpoints. + pub fn new(created_at: String, index_name: String, index_type: String, sort_columns: Vec, status: models::IndexStatus, text_columns: Vec, updated_at: String, vector_columns: Vec) -> IndexInfoResponse { + IndexInfoResponse { + created_at, + index_name, + index_type, + metric: None, + sort_columns, + status, + text_columns, + updated_at, + vector_columns, + } + } +} + diff --git a/src/models/index_status.rs b/src/models/index_status.rs new file mode 100644 index 0000000..088af30 --- /dev/null +++ b/src/models/index_status.rs @@ -0,0 +1,39 @@ +/* + * 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: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// IndexStatus : Index build status exposed to API consumers. +/// Index build status exposed to API consumers. +#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)] +pub enum IndexStatus { + #[serde(rename = "ready")] + Ready, + #[serde(rename = "pending")] + Pending, + +} + +impl std::fmt::Display for IndexStatus { + fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { + match self { + Self::Ready => write!(f, "ready"), + Self::Pending => write!(f, "pending"), + } + } +} + +impl Default for IndexStatus { + fn default() -> IndexStatus { + Self::Ready + } +} + diff --git a/src/models/information_schema_response.rs b/src/models/information_schema_response.rs index 7683b95..f75781f 100644 --- a/src/models/information_schema_response.rs +++ b/src/models/information_schema_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/inline_data.rs b/src/models/inline_data.rs index ee2f305..3e90a58 100644 --- a/src/models/inline_data.rs +++ b/src/models/inline_data.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/inline_dataset_source.rs b/src/models/inline_dataset_source.rs index 4013cf9..3765628 100644 --- a/src/models/inline_dataset_source.rs +++ b/src/models/inline_dataset_source.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/list_connection_types_response.rs b/src/models/list_connection_types_response.rs new file mode 100644 index 0000000..89ffb46 --- /dev/null +++ b/src/models/list_connection_types_response.rs @@ -0,0 +1,27 @@ +/* + * 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: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ListConnectionTypesResponse { + #[serde(rename = "connection_types")] + pub connection_types: Vec, +} + +impl ListConnectionTypesResponse { + pub fn new(connection_types: Vec) -> ListConnectionTypesResponse { + ListConnectionTypesResponse { + connection_types, + } + } +} + diff --git a/src/models/list_connections_response.rs b/src/models/list_connections_response.rs index 8a3edd6..dc798d6 100644 --- a/src/models/list_connections_response.rs +++ b/src/models/list_connections_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/list_dataset_versions_response.rs b/src/models/list_dataset_versions_response.rs new file mode 100644 index 0000000..b155529 --- /dev/null +++ b/src/models/list_dataset_versions_response.rs @@ -0,0 +1,44 @@ +/* + * 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: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ListDatasetVersionsResponse : Response body for GET /v1/datasets/{id}/versions +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ListDatasetVersionsResponse { + #[serde(rename = "count")] + pub count: i32, + #[serde(rename = "dataset_id")] + pub dataset_id: String, + #[serde(rename = "has_more")] + pub has_more: bool, + #[serde(rename = "limit")] + pub limit: i32, + #[serde(rename = "offset")] + pub offset: i32, + #[serde(rename = "versions")] + pub versions: Vec, +} + +impl ListDatasetVersionsResponse { + /// Response body for GET /v1/datasets/{id}/versions + pub fn new(count: i32, dataset_id: String, has_more: bool, limit: i32, offset: i32, versions: Vec) -> ListDatasetVersionsResponse { + ListDatasetVersionsResponse { + count, + dataset_id, + has_more, + limit, + offset, + versions, + } + } +} + diff --git a/src/models/list_datasets_response.rs b/src/models/list_datasets_response.rs index 2eaf1e2..3e1660a 100644 --- a/src/models/list_datasets_response.rs +++ b/src/models/list_datasets_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/list_indexes_response.rs b/src/models/list_indexes_response.rs new file mode 100644 index 0000000..df01808 --- /dev/null +++ b/src/models/list_indexes_response.rs @@ -0,0 +1,29 @@ +/* + * 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: https://openapi-generator.tech + */ + +use crate::models; +use serde::{Deserialize, Serialize}; + +/// ListIndexesResponse : Response body for GET .../indexes +#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)] +pub struct ListIndexesResponse { + #[serde(rename = "indexes")] + pub indexes: Vec, +} + +impl ListIndexesResponse { + /// Response body for GET .../indexes + pub fn new(indexes: Vec) -> ListIndexesResponse { + ListIndexesResponse { + indexes, + } + } +} + diff --git a/src/models/list_query_runs_response.rs b/src/models/list_query_runs_response.rs index 3fabf04..82b374f 100644 --- a/src/models/list_query_runs_response.rs +++ b/src/models/list_query_runs_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/list_results_response.rs b/src/models/list_results_response.rs index 966af50..3221dbc 100644 --- a/src/models/list_results_response.rs +++ b/src/models/list_results_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/list_saved_queries_response.rs b/src/models/list_saved_queries_response.rs index df5ef1c..f0d5e64 100644 --- a/src/models/list_saved_queries_response.rs +++ b/src/models/list_saved_queries_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/list_saved_query_versions_response.rs b/src/models/list_saved_query_versions_response.rs index a163a19..3ed4488 100644 --- a/src/models/list_saved_query_versions_response.rs +++ b/src/models/list_saved_query_versions_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/list_secrets_response.rs b/src/models/list_secrets_response.rs index f14728c..57a8935 100644 --- a/src/models/list_secrets_response.rs +++ b/src/models/list_secrets_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/list_uploads_response.rs b/src/models/list_uploads_response.rs index 2c26d19..9390721 100644 --- a/src/models/list_uploads_response.rs +++ b/src/models/list_uploads_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/list_workspaces_response.rs b/src/models/list_workspaces_response.rs index ab04685..51863b2 100644 --- a/src/models/list_workspaces_response.rs +++ b/src/models/list_workspaces_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/mod.rs b/src/models/mod.rs index f0b3998..972967d 100644 --- a/src/models/mod.rs +++ b/src/models/mod.rs @@ -34,6 +34,10 @@ pub mod connection_refresh_result; pub use self::connection_refresh_result::ConnectionRefreshResult; pub mod connection_schema_error; pub use self::connection_schema_error::ConnectionSchemaError; +pub mod connection_type_detail; +pub use self::connection_type_detail::ConnectionTypeDetail; +pub mod connection_type_summary; +pub use self::connection_type_summary::ConnectionTypeSummary; pub mod create_connection_request; pub use self::create_connection_request::CreateConnectionRequest; pub mod create_connection_response; @@ -42,6 +46,8 @@ pub mod create_dataset_request; pub use self::create_dataset_request::CreateDatasetRequest; pub mod create_dataset_response; pub use self::create_dataset_response::CreateDatasetResponse; +pub mod create_index_request; +pub use self::create_index_request::CreateIndexRequest; pub mod create_saved_query_request; pub use self::create_saved_query_request::CreateSavedQueryRequest; pub mod create_secret_request; @@ -56,6 +62,8 @@ pub mod dataset_source; pub use self::dataset_source::DatasetSource; pub mod dataset_summary; pub use self::dataset_summary::DatasetSummary; +pub mod dataset_version_summary; +pub use self::dataset_version_summary::DatasetVersionSummary; pub mod discovery_status; pub use self::discovery_status::DiscoveryStatus; pub mod error; @@ -70,16 +78,26 @@ pub mod get_result_response; pub use self::get_result_response::GetResultResponse; pub mod get_secret_response; pub use self::get_secret_response::GetSecretResponse; +pub mod index_info_response; +pub use self::index_info_response::IndexInfoResponse; +pub mod index_status; +pub use self::index_status::IndexStatus; pub mod information_schema_response; pub use self::information_schema_response::InformationSchemaResponse; pub mod inline_data; pub use self::inline_data::InlineData; pub mod inline_dataset_source; pub use self::inline_dataset_source::InlineDatasetSource; +pub mod list_connection_types_response; +pub use self::list_connection_types_response::ListConnectionTypesResponse; pub mod list_connections_response; pub use self::list_connections_response::ListConnectionsResponse; +pub mod list_dataset_versions_response; +pub use self::list_dataset_versions_response::ListDatasetVersionsResponse; pub mod list_datasets_response; pub use self::list_datasets_response::ListDatasetsResponse; +pub mod list_indexes_response; +pub use self::list_indexes_response::ListIndexesResponse; pub mod list_query_runs_response; pub use self::list_query_runs_response::ListQueryRunsResponse; pub mod list_results_response; diff --git a/src/models/numeric_profile_detail.rs b/src/models/numeric_profile_detail.rs index a0c39fb..ea726c5 100644 --- a/src/models/numeric_profile_detail.rs +++ b/src/models/numeric_profile_detail.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/query_request.rs b/src/models/query_request.rs index 18c157e..a3597cc 100644 --- a/src/models/query_request.rs +++ b/src/models/query_request.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/query_response.rs b/src/models/query_response.rs index 3f0ba5d..baf47b9 100644 --- a/src/models/query_response.rs +++ b/src/models/query_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/query_run_info.rs b/src/models/query_run_info.rs index e5e2b4e..ad15a1f 100644 --- a/src/models/query_run_info.rs +++ b/src/models/query_run_info.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/refresh_request.rs b/src/models/refresh_request.rs index 39479d6..27fb2ca 100644 --- a/src/models/refresh_request.rs +++ b/src/models/refresh_request.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/refresh_response.rs b/src/models/refresh_response.rs index d95ca02..7beae39 100644 --- a/src/models/refresh_response.rs +++ b/src/models/refresh_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/refresh_warning.rs b/src/models/refresh_warning.rs index f7c7079..0b3d53e 100644 --- a/src/models/refresh_warning.rs +++ b/src/models/refresh_warning.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/result_info.rs b/src/models/result_info.rs index a8e7342..5cd2634 100644 --- a/src/models/result_info.rs +++ b/src/models/result_info.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/saved_query_detail.rs b/src/models/saved_query_detail.rs index 79c9e54..51d2c5f 100644 --- a/src/models/saved_query_detail.rs +++ b/src/models/saved_query_detail.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/saved_query_summary.rs b/src/models/saved_query_summary.rs index 7f64bc8..906c438 100644 --- a/src/models/saved_query_summary.rs +++ b/src/models/saved_query_summary.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/saved_query_version_info.rs b/src/models/saved_query_version_info.rs index c364dad..1a9174f 100644 --- a/src/models/saved_query_version_info.rs +++ b/src/models/saved_query_version_info.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/schema_refresh_result.rs b/src/models/schema_refresh_result.rs index dc98bac..eed3e8d 100644 --- a/src/models/schema_refresh_result.rs +++ b/src/models/schema_refresh_result.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/secret_metadata_response.rs b/src/models/secret_metadata_response.rs index ba0397c..250e96f 100644 --- a/src/models/secret_metadata_response.rs +++ b/src/models/secret_metadata_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/table_info.rs b/src/models/table_info.rs index 91dcfd6..2ef2880 100644 --- a/src/models/table_info.rs +++ b/src/models/table_info.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/table_profile_response.rs b/src/models/table_profile_response.rs index 7bd1604..7a0eae8 100644 --- a/src/models/table_profile_response.rs +++ b/src/models/table_profile_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/table_refresh_error.rs b/src/models/table_refresh_error.rs index 4918296..d7dcf2e 100644 --- a/src/models/table_refresh_error.rs +++ b/src/models/table_refresh_error.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/table_refresh_result.rs b/src/models/table_refresh_result.rs index 76f03ea..a5e38e5 100644 --- a/src/models/table_refresh_result.rs +++ b/src/models/table_refresh_result.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/temporal_profile_detail.rs b/src/models/temporal_profile_detail.rs index 19513bd..c492a4b 100644 --- a/src/models/temporal_profile_detail.rs +++ b/src/models/temporal_profile_detail.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/text_profile_detail.rs b/src/models/text_profile_detail.rs index bb4c899..8b68ac7 100644 --- a/src/models/text_profile_detail.rs +++ b/src/models/text_profile_detail.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/update_dataset_request.rs b/src/models/update_dataset_request.rs index 60ae8bd..247f61e 100644 --- a/src/models/update_dataset_request.rs +++ b/src/models/update_dataset_request.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * @@ -16,6 +16,9 @@ use serde::{Deserialize, Serialize}; pub struct UpdateDatasetRequest { #[serde(rename = "label", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub label: Option>, + /// Pin to a specific version, or send null to unpin. Omit the field entirely to leave pinning unchanged. + #[serde(rename = "pinned_version", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub pinned_version: Option>, #[serde(rename = "table_name", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] pub table_name: Option>, } @@ -25,6 +28,7 @@ impl UpdateDatasetRequest { pub fn new() -> UpdateDatasetRequest { UpdateDatasetRequest { label: None, + pinned_version: None, table_name: None, } } diff --git a/src/models/update_dataset_response.rs b/src/models/update_dataset_response.rs index 80cdae5..d3a0361 100644 --- a/src/models/update_dataset_response.rs +++ b/src/models/update_dataset_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * @@ -18,6 +18,10 @@ pub struct UpdateDatasetResponse { pub id: String, #[serde(rename = "label")] pub label: String, + #[serde(rename = "latest_version")] + pub latest_version: i32, + #[serde(rename = "pinned_version", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")] + pub pinned_version: Option>, #[serde(rename = "table_name")] pub table_name: String, #[serde(rename = "updated_at")] @@ -26,10 +30,12 @@ pub struct UpdateDatasetResponse { impl UpdateDatasetResponse { /// Response body for PUT /v1/datasets/{id} - pub fn new(id: String, label: String, table_name: String, updated_at: String) -> UpdateDatasetResponse { + pub fn new(id: String, label: String, latest_version: i32, table_name: String, updated_at: String) -> UpdateDatasetResponse { UpdateDatasetResponse { id, label, + latest_version, + pinned_version: None, table_name, updated_at, } diff --git a/src/models/update_saved_query_request.rs b/src/models/update_saved_query_request.rs index 797c56b..99df16c 100644 --- a/src/models/update_saved_query_request.rs +++ b/src/models/update_saved_query_request.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/update_secret_request.rs b/src/models/update_secret_request.rs index 7c079a9..71c1e38 100644 --- a/src/models/update_secret_request.rs +++ b/src/models/update_secret_request.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/update_secret_response.rs b/src/models/update_secret_response.rs index 09b5fd1..5939a09 100644 --- a/src/models/update_secret_response.rs +++ b/src/models/update_secret_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/upload_dataset_source.rs b/src/models/upload_dataset_source.rs index 1d6511c..094d0d7 100644 --- a/src/models/upload_dataset_source.rs +++ b/src/models/upload_dataset_source.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/upload_info.rs b/src/models/upload_info.rs index 732d3ee..7b9874d 100644 --- a/src/models/upload_info.rs +++ b/src/models/upload_info.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/upload_response.rs b/src/models/upload_response.rs index f8b8246..75c34c8 100644 --- a/src/models/upload_response.rs +++ b/src/models/upload_response.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/workspace_detail.rs b/src/models/workspace_detail.rs index ece2fd6..185b660 100644 --- a/src/models/workspace_detail.rs +++ b/src/models/workspace_detail.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. * diff --git a/src/models/workspace_list_item.rs b/src/models/workspace_list_item.rs index 70680f9..de6c40b 100644 --- a/src/models/workspace_list_item.rs +++ b/src/models/workspace_list_item.rs @@ -1,5 +1,5 @@ /* - * HotData API + * Hotdata API * * Powerful data platform API for datasets, queries, and analytics. *