lance-namespace-reqwest-client 0.7.5

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://lancedb.github.io/lance-namespace/spec/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://lancedb.github.io/lance-namespace/spec/impls/rest for more details.
Documentation
/*
 * Lance Namespace Specification
 *
 * 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. 
 *
 * The version of the OpenAPI document: 1.0.0
 * 
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct TableVersion {
    /// Version number
    #[serde(rename = "version")]
    pub version: i64,
    /// Path to the manifest file for this version.
    #[serde(rename = "manifest_path")]
    pub manifest_path: String,
    /// Size of the manifest file in bytes
    #[serde(rename = "manifest_size", skip_serializing_if = "Option::is_none")]
    pub manifest_size: Option<i64>,
    /// Optional ETag for optimistic concurrency control. Useful for S3 and similar object stores. 
    #[serde(rename = "e_tag", skip_serializing_if = "Option::is_none")]
    pub e_tag: Option<String>,
    /// Timestamp when the version was created, in milliseconds since epoch (Unix time)
    #[serde(rename = "timestamp_millis", skip_serializing_if = "Option::is_none")]
    pub timestamp_millis: Option<i64>,
    /// Optional key-value pairs of metadata
    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
    pub metadata: Option<std::collections::HashMap<String, String>>,
}

impl TableVersion {
    pub fn new(version: i64, manifest_path: String) -> TableVersion {
        TableVersion {
            version,
            manifest_path,
            manifest_size: None,
            e_tag: None,
            timestamp_millis: None,
            metadata: None,
        }
    }
}