// 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 ConnectedAccount {
/// Distinguishes the connected account object.
pub object: String,
/// The unique identifier of the connected account.
pub id: String,
/// The [User](https://workos.com/docs/reference/authkit/user) identifier associated with this connection.
#[serde(skip_serializing_if = "Option::is_none", default)]
pub user_id: Option<String>,
/// The [Organization](https://workos.com/docs/reference/organization) identifier associated with this connection, or `null` if not scoped to an organization.
#[serde(skip_serializing_if = "Option::is_none", default)]
pub organization_id: Option<String>,
/// The OAuth scopes granted for this connection.
pub scopes: Vec<String>,
/// The state of the connected account:
/// - `connected`: The connection is active and tokens are valid.
/// - `needs_reauthorization`: The user needs to reauthorize the connection, typically because required scopes have changed.
/// - `disconnected`: The connection has been disconnected.
pub state: ConnectedAccountState,
/// The timestamp when the connection was created.
pub created_at: String,
/// The timestamp when the connection was last updated.
pub updated_at: String,
}