Skip to main content

lance_namespace_reqwest_client/models/
table_version.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 TableVersion {
16    /// Version number
17    #[serde(rename = "version")]
18    pub version: i64,
19    /// Path to the manifest file for this version.
20    #[serde(rename = "manifest_path")]
21    pub manifest_path: String,
22    /// Size of the manifest file in bytes
23    #[serde(rename = "manifest_size", skip_serializing_if = "Option::is_none")]
24    pub manifest_size: Option<i64>,
25    /// Optional ETag for optimistic concurrency control. Useful for S3 and similar object stores. 
26    #[serde(rename = "e_tag", skip_serializing_if = "Option::is_none")]
27    pub e_tag: Option<String>,
28    /// Timestamp when the version was created, in milliseconds since epoch (Unix time)
29    #[serde(rename = "timestamp_millis", skip_serializing_if = "Option::is_none")]
30    pub timestamp_millis: Option<i64>,
31    /// Optional key-value pairs of metadata
32    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
33    pub metadata: Option<std::collections::HashMap<String, String>>,
34}
35
36impl TableVersion {
37    pub fn new(version: i64, manifest_path: String) -> TableVersion {
38        TableVersion {
39            version,
40            manifest_path,
41            manifest_size: None,
42            e_tag: None,
43            timestamp_millis: None,
44            metadata: None,
45        }
46    }
47}
48