github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/rust/src/models/storage_config.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 StorageConfig {
    15      #[serde(rename = "blockstore_type")]
    16      pub blockstore_type: String,
    17      #[serde(rename = "blockstore_namespace_example")]
    18      pub blockstore_namespace_example: String,
    19      #[serde(rename = "blockstore_namespace_ValidityRegex")]
    20      pub blockstore_namespace_validity_regex: String,
    21      #[serde(rename = "default_namespace_prefix", skip_serializing_if = "Option::is_none")]
    22      pub default_namespace_prefix: Option<String>,
    23      #[serde(rename = "pre_sign_support")]
    24      pub pre_sign_support: bool,
    25      #[serde(rename = "pre_sign_support_ui")]
    26      pub pre_sign_support_ui: bool,
    27      #[serde(rename = "import_support")]
    28      pub import_support: bool,
    29      #[serde(rename = "import_validity_regex")]
    30      pub import_validity_regex: String,
    31      #[serde(rename = "pre_sign_multipart_upload", skip_serializing_if = "Option::is_none")]
    32      pub pre_sign_multipart_upload: Option<bool>,
    33  }
    34  
    35  impl StorageConfig {
    36      pub fn new(blockstore_type: String, blockstore_namespace_example: String, blockstore_namespace_validity_regex: String, pre_sign_support: bool, pre_sign_support_ui: bool, import_support: bool, import_validity_regex: String) -> StorageConfig {
    37          StorageConfig {
    38              blockstore_type,
    39              blockstore_namespace_example,
    40              blockstore_namespace_validity_regex,
    41              default_namespace_prefix: None,
    42              pre_sign_support,
    43              pre_sign_support_ui,
    44              import_support,
    45              import_validity_regex,
    46              pre_sign_multipart_upload: None,
    47          }
    48      }
    49  }
    50