Skip to main content

lance_namespace_reqwest_client/models/
commit_table_operation.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/// CommitTableOperation : A single operation within a batch commit. Provide exactly one of the operation fields to specify the operation kind. 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct CommitTableOperation {
17    /// Declare (reserve) a new table in the namespace
18    #[serde(rename = "declare_table", skip_serializing_if = "Option::is_none")]
19    pub declare_table: Option<Box<models::DeclareTableRequest>>,
20    /// Create a new version entry for a table
21    #[serde(rename = "create_table_version", skip_serializing_if = "Option::is_none")]
22    pub create_table_version: Option<Box<models::CreateTableVersionRequest>>,
23    /// Delete version ranges from a table
24    #[serde(rename = "delete_table_versions", skip_serializing_if = "Option::is_none")]
25    pub delete_table_versions: Option<Box<models::BatchDeleteTableVersionsRequest>>,
26    /// Deregister (soft-delete) a table
27    #[serde(rename = "deregister_table", skip_serializing_if = "Option::is_none")]
28    pub deregister_table: Option<Box<models::DeregisterTableRequest>>,
29}
30
31impl CommitTableOperation {
32    /// A single operation within a batch commit. Provide exactly one of the operation fields to specify the operation kind. 
33    pub fn new() -> CommitTableOperation {
34        CommitTableOperation {
35            declare_table: None,
36            create_table_version: None,
37            delete_table_versions: None,
38            deregister_table: None,
39        }
40    }
41}
42