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 UserOrganizationMembership {
    /// Distinguishes the organization membership object.
    pub object: String,
    /// The unique ID of the organization membership.
    pub id: String,
    /// The ID of the user.
    pub user_id: String,
    /// The ID of the organization which the user belongs to.
    pub organization_id: String,
    /// The status of the organization membership. One of `active`, `inactive`, or `pending`.
    pub status: UserOrganizationMembershipStatus,
    /// Whether this organization membership is managed by a directory sync connection.
    pub directory_managed: bool,
    /// The name of the organization which the user belongs to.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub organization_name: Option<String>,
    /// An object containing IdP-sourced attributes from the linked [Directory User](https://workos.com/docs/reference/directory-sync/directory-user) or [SSO Profile](https://workos.com/docs/reference/sso/profile). Directory User attributes take precedence when both are linked.
    #[serde(skip_serializing_if = "Option::is_none", default)]
    pub custom_attributes: Option<std::collections::HashMap<String, serde_json::Value>>,
    /// An ISO 8601 timestamp.
    pub created_at: String,
    /// An ISO 8601 timestamp.
    pub updated_at: String,
    /// The primary role assigned to the user within the organization.
    pub role: SlimRole,
    /// The user that belongs to the organization through this membership.
    pub user: User,
}