github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/rust/src/models/branch_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 BranchCreation {
    15      #[serde(rename = "name")]
    16      pub name: String,
    17      #[serde(rename = "source")]
    18      pub source: String,
    19      #[serde(rename = "force", skip_serializing_if = "Option::is_none")]
    20      pub force: Option<bool>,
    21  }
    22  
    23  impl BranchCreation {
    24      pub fn new(name: String, source: String) -> BranchCreation {
    25          BranchCreation {
    26              name,
    27              source,
    28              force: None,
    29          }
    30      }
    31  }
    32