lance_namespace_reqwest_client/models/alter_columns_entry.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 AlterColumnsEntry {
16 /// Column path to alter
17 #[serde(rename = "path")]
18 pub path: String,
19 /// New data type for the column using JSON representation (optional)
20 #[serde(rename = "data_type", skip_serializing_if = "Option::is_none")]
21 pub data_type: Option<serde_json::Value>,
22 /// New name for the column (optional)
23 #[serde(rename = "rename", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
24 pub rename: Option<Option<String>>,
25 /// Whether the column should be nullable (optional)
26 #[serde(rename = "nullable", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
27 pub nullable: Option<Option<bool>>,
28 #[serde(rename = "virtual_column", default, with = "::serde_with::rust::double_option", skip_serializing_if = "Option::is_none")]
29 pub virtual_column: Option<Option<Box<models::AlterVirtualColumnEntry>>>,
30}
31
32impl AlterColumnsEntry {
33 pub fn new(path: String) -> AlterColumnsEntry {
34 AlterColumnsEntry {
35 path,
36 data_type: None,
37 rename: None,
38 nullable: None,
39 virtual_column: None,
40 }
41 }
42}
43