/*
 * Zernio API
 *
 * API reference for Zernio. Authenticate with a Bearer API key. Base URL: https://zernio.com/api
 *
 * The version of the OpenAPI document: 1.0.1
 * Contact: support@zernio.com
 * Generated by: https://openapi-generator.tech
 */

use crate::models;
use serde::{Deserialize, Serialize};

/// ConnectionLogSuccess : Success details (present on successful events)
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct ConnectionLogSuccess {
    #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")]
    pub display_name: Option<String>,
    #[serde(rename = "username", skip_serializing_if = "Option::is_none")]
    pub username: Option<String>,
    #[serde(rename = "profilePicture", skip_serializing_if = "Option::is_none")]
    pub profile_picture: Option<String>,
    /// OAuth scopes/permissions granted
    #[serde(rename = "permissions", skip_serializing_if = "Option::is_none")]
    pub permissions: Option<Vec<String>>,
    #[serde(rename = "tokenExpiresAt", skip_serializing_if = "Option::is_none")]
    pub token_expires_at: Option<String>,
    /// Account type (personal, business, organization)
    #[serde(rename = "accountType", skip_serializing_if = "Option::is_none")]
    pub account_type: Option<String>,
}

impl ConnectionLogSuccess {
    /// Success details (present on successful events)
    pub fn new() -> ConnectionLogSuccess {
        ConnectionLogSuccess {
            display_name: None,
            username: None,
            profile_picture: None,
            permissions: None,
            token_expires_at: None,
            account_type: None,
        }
    }
}
