lance_namespace_reqwest_client/models/describe_table_response.rs
1/*
2 * Lance Namespace Specification
3 *
4 * This OpenAPI specification is a part of the Lance namespace specification. It contains 2 parts: The `components/schemas`, `components/responses`, `components/examples`, `tags` sections define the request and response shape for each operation in a Lance Namespace across all implementations. See https://lance.org/format/namespace/operations for more details. The `servers`, `security`, `paths`, `components/parameters` sections are for the Lance REST Namespace implementation, which defines a complete REST server that can work with Lance datasets. See https://lance.org/format/namespace/rest for more details.
5 *
6 * The version of the OpenAPI document: 1.0.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct DescribeTableResponse {
16 /// Table name. Only populated when `load_detailed_metadata` is true.
17 #[serde(rename = "table", skip_serializing_if = "Option::is_none")]
18 pub table: Option<String>,
19 /// The namespace identifier as a list of parts. Only populated when `load_detailed_metadata` is true.
20 #[serde(rename = "namespace", skip_serializing_if = "Option::is_none")]
21 pub namespace: Option<Vec<String>>,
22 /// Table version number. Only populated when `load_detailed_metadata` is true.
23 #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
24 pub version: Option<i64>,
25 /// Table storage location (e.g., S3/GCS path).
26 #[serde(rename = "location", skip_serializing_if = "Option::is_none")]
27 pub location: Option<String>,
28 /// Table URI. Unlike location, this field must be a complete and valid URI. Only returned when `with_table_uri` is true.
29 #[serde(rename = "table_uri", skip_serializing_if = "Option::is_none")]
30 pub table_uri: Option<String>,
31 /// Table schema in JSON Arrow format. Only populated when `load_detailed_metadata` is true.
32 #[serde(rename = "schema", skip_serializing_if = "Option::is_none")]
33 pub schema: Option<Box<models::JsonArrowSchema>>,
34 /// Configuration options to be used to access storage. The available options depend on the type of storage in use. These will be passed directly to Lance to initialize storage access. When `vend_credentials` is true, this field may include vended credentials. If the vended credentials are temporary, the `expires_at_millis` key should be included to indicate the millisecond timestamp when the credentials expire.
35 #[serde(rename = "storage_options", skip_serializing_if = "Option::is_none")]
36 pub storage_options: Option<std::collections::HashMap<String, String>>,
37 /// Table statistics. Only populated when `load_detailed_metadata` is true.
38 #[serde(rename = "stats", skip_serializing_if = "Option::is_none")]
39 pub stats: Option<Box<models::TableBasicStats>>,
40 /// Optional table metadata as key-value pairs. This records the information of the table and requires loading the table. It is only populated when `load_detailed_metadata` is true.
41 #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
42 pub metadata: Option<std::collections::HashMap<String, String>>,
43 /// Properties stored on the table, if supported by the server. This records the information managed by the namespace. If the server does not support table properties, it should return null for this field. If table properties are supported, but none are set, it should return an empty object.
44 #[serde(rename = "properties", skip_serializing_if = "Option::is_none")]
45 pub properties: Option<std::collections::HashMap<String, String>>,
46 /// When true, the caller should use namespace table version operations (CreateTableVersion, DescribeTableVersion, ListTableVersions, BatchDeleteTableVersions) to manage table versions instead of relying on Lance's native version management.
47 #[serde(rename = "managed_versioning", skip_serializing_if = "Option::is_none")]
48 pub managed_versioning: Option<bool>,
49}
50
51impl DescribeTableResponse {
52 pub fn new() -> DescribeTableResponse {
53 DescribeTableResponse {
54 table: None,
55 namespace: None,
56 version: None,
57 location: None,
58 table_uri: None,
59 schema: None,
60 storage_options: None,
61 stats: None,
62 metadata: None,
63 properties: None,
64 managed_versioning: None,
65 }
66 }
67}
68