github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/rust/src/models/reset_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 ResetCreation {
    15      /// What to reset according to path.
    16      #[serde(rename = "type")]
    17      pub r#type: Type,
    18      #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
    19      pub path: Option<String>,
    20      #[serde(rename = "force", skip_serializing_if = "Option::is_none")]
    21      pub force: Option<bool>,
    22  }
    23  
    24  impl ResetCreation {
    25      pub fn new(r#type: Type) -> ResetCreation {
    26          ResetCreation {
    27              r#type,
    28              path: None,
    29              force: None,
    30          }
    31      }
    32  }
    33  /// What to reset according to path.
    34  #[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
    35  pub enum Type {
    36      #[serde(rename = "object")]
    37      Object,
    38      #[serde(rename = "common_prefix")]
    39      CommonPrefix,
    40      #[serde(rename = "reset")]
    41      Reset,
    42  }
    43  
    44  impl Default for Type {
    45      fn default() -> Type {
    46          Self::Object
    47      }
    48  }
    49