github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/rust/src/models/repository_creation.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 RepositoryCreation {
    15      #[serde(rename = "name")]
    16      pub name: String,
    17      /// Filesystem URI to store the underlying data in (e.g. \"s3://my-bucket/some/path/\")
    18      #[serde(rename = "storage_namespace")]
    19      pub storage_namespace: String,
    20      #[serde(rename = "default_branch", skip_serializing_if = "Option::is_none")]
    21      pub default_branch: Option<String>,
    22      #[serde(rename = "sample_data", skip_serializing_if = "Option::is_none")]
    23      pub sample_data: Option<bool>,
    24      #[serde(rename = "read_only", skip_serializing_if = "Option::is_none")]
    25      pub read_only: Option<bool>,
    26  }
    27  
    28  impl RepositoryCreation {
    29      pub fn new(name: String, storage_namespace: String) -> RepositoryCreation {
    30          RepositoryCreation {
    31              name,
    32              storage_namespace,
    33              default_branch: None,
    34              sample_data: None,
    35              read_only: None,
    36          }
    37      }
    38  }
    39