github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/rust/src/models/repository.rs (about)

     1  /*
     2   * lakeFS API
     3   *
     4   * lakeFS HTTP API
     5   *
     6   * The version of the OpenAPI document: 1.0.0
     7   * Contact: services@treeverse.io
     8   * Generated by: https://openapi-generator.tech
     9   */
    10  
    11  use crate::models;
    12  
    13  #[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
    14  pub struct Repository {
    15      #[serde(rename = "id")]
    16      pub id: String,
    17      /// Unix Epoch in seconds
    18      #[serde(rename = "creation_date")]
    19      pub creation_date: i64,
    20      #[serde(rename = "default_branch")]
    21      pub default_branch: String,
    22      /// Filesystem URI to store the underlying data in (e.g. \"s3://my-bucket/some/path/\")
    23      #[serde(rename = "storage_namespace")]
    24      pub storage_namespace: String,
    25      /// Whether the repository is a read-only repository- not relevant for bare repositories
    26      #[serde(rename = "read_only", skip_serializing_if = "Option::is_none")]
    27      pub read_only: Option<bool>,
    28  }
    29  
    30  impl Repository {
    31      pub fn new(id: String, creation_date: i64, default_branch: String, storage_namespace: String) -> Repository {
    32          Repository {
    33              id,
    34              creation_date,
    35              default_branch,
    36              storage_namespace,
    37              read_only: None,
    38          }
    39      }
    40  }
    41