workos 1.0.0

Official Rust SDK for the WorkOS API
Documentation
// Code generated by oagen. DO NOT EDIT.

#[allow(unused_imports)]
use super::*;
#[allow(unused_imports)]
use crate::enums::*;
use serde::{Deserialize, Serialize};
#[derive(Debug, Clone, Serialize, Deserialize)]
pub struct Profile {
    /// Distinguishes the profile object.
    pub object: String,
    /// Unique identifier of the profile.
    pub id: String,
    /// The ID of the organization the user belongs to.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub organization_id: Option<String>,
    /// The ID of the SSO connection used for authentication.
    pub connection_id: String,
    /// The type of SSO connection.
    pub connection_type: ProfileConnectionType,
    /// The user's unique identifier from the identity provider.
    pub idp_id: String,
    /// The user's email address.
    pub email: String,
    /// The user's first name.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub first_name: Option<String>,
    /// The user's last name.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub last_name: Option<String>,
    /// The user's full name.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub name: Option<String>,
    /// The role assigned to the user within the organization, if applicable.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub role: Option<SlimRole>,
    /// The roles assigned to the user within the organization, if applicable.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub roles: Option<Vec<SlimRole>>,
    /// The groups the user belongs to, as returned by the identity provider.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub groups: Option<Vec<String>>,
    /// Custom attribute mappings defined for the connection, returned as key-value pairs.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub custom_attributes: Option<std::collections::HashMap<String, serde_json::Value>>,
    /// The complete set of raw attributes returned by the identity provider.
    pub raw_attributes: std::collections::HashMap<String, serde_json::Value>,
}