Skip to main content

lance_namespace_reqwest_client/models/
branch_contents.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 BranchContents {
16    /// Name of the branch this branch was created from. Absent when the branch was created from the main branch. 
17    #[serde(rename = "parentBranch", skip_serializing_if = "Option::is_none")]
18    pub parent_branch: Option<String>,
19    /// Version of the parent (branch or main) this branch was created from
20    #[serde(rename = "parentVersion")]
21    pub parent_version: i64,
22    /// Unix timestamp (in seconds) when the branch was created
23    #[serde(rename = "createAt")]
24    pub create_at: i64,
25    /// Size of the branch's manifest file in bytes
26    #[serde(rename = "manifestSize")]
27    pub manifest_size: i64,
28    /// Key-value metadata associated with the branch
29    #[serde(rename = "metadata", skip_serializing_if = "Option::is_none")]
30    pub metadata: Option<std::collections::HashMap<String, String>>,
31}
32
33impl BranchContents {
34    pub fn new(parent_version: i64, create_at: i64, manifest_size: i64) -> BranchContents {
35        BranchContents {
36            parent_branch: None,
37            parent_version,
38            create_at,
39            manifest_size,
40            metadata: None,
41        }
42    }
43}
44