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")]
21    pub data_type: serde_json::Value,
22    /// New name for the column (optional)
23    #[serde(rename = "rename", skip_serializing_if = "Option::is_none")]
24    pub rename: Option<String>,
25    /// Whether the column should be nullable (optional)
26    #[serde(rename = "nullable", skip_serializing_if = "Option::is_none")]
27    pub nullable: Option<bool>,
28    /// Virtual column alterations (optional)
29    #[serde(rename = "virtual_column", skip_serializing_if = "Option::is_none")]
30    pub virtual_column: Option<Box<models::AlterVirtualColumnEntry>>,
31}
32
33impl AlterColumnsEntry {
34    pub fn new(path: String, data_type: serde_json::Value) -> AlterColumnsEntry {
35        AlterColumnsEntry {
36            path,
37            data_type,
38            rename: None,
39            nullable: None,
40            virtual_column: None,
41        }
42    }
43}
44