github.com/treeverse/lakefs@v1.24.1-0.20240520134607-95648127bfb0/clients/rust/src/models/external_principal.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 ExternalPrincipal {
    15      /// A unique identifier for the external principal i.e aws:sts::123:assumed-role/role-name
    16      #[serde(rename = "id")]
    17      pub id: String,
    18      /// lakeFS user ID to associate with an external principal. 
    19      #[serde(rename = "user_id")]
    20      pub user_id: String,
    21      #[serde(rename = "settings", skip_serializing_if = "Option::is_none")]
    22      pub settings: Option<Vec<std::collections::HashMap<String, String>>>,
    23  }
    24  
    25  impl ExternalPrincipal {
    26      pub fn new(id: String, user_id: String) -> ExternalPrincipal {
    27          ExternalPrincipal {
    28              id,
    29              user_id,
    30              settings: None,
    31          }
    32      }
    33  }
    34