use serde::{Deserialize, Serialize}; /*
                                      * Google Identity Toolkit API
                                      *
                                      * Help the third party sites to implement federated login.
                                      *
                                      * The version of the OpenAPI document: v3
                                      *
                                      * Generated by: https://openapi-generator.tech
                                      */

use crate::google_rest_apis::identitytoolkit_v3::models;

/// SetAccountInfoResponse : Respone of setting the account information.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SetAccountInfoResponse {
    /// The name of the user.
    #[serde(rename = "displayName", skip_serializing_if = "Option::is_none")]
    pub display_name: Option<String>,
    /// The email of the user.
    #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
    pub email: Option<String>,
    /// If email has been verified.
    #[serde(rename = "emailVerified", skip_serializing_if = "Option::is_none")]
    pub email_verified: Option<bool>,
    /// If idToken is STS id token, then this field will be expiration time of STS id token in seconds.
    #[serde(rename = "expiresIn", skip_serializing_if = "Option::is_none")]
    pub expires_in: Option<String>,
    /// The Gitkit id token to login the newly sign up user.
    #[serde(rename = "idToken", skip_serializing_if = "Option::is_none")]
    pub id_token: Option<String>,
    /// The fixed string \"identitytoolkit#SetAccountInfoResponse\".
    #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
    pub kind: Option<String>,
    /// The local ID of the user.
    #[serde(rename = "localId", skip_serializing_if = "Option::is_none")]
    pub local_id: Option<String>,
    /// The new email the user attempts to change to.
    #[serde(rename = "newEmail", skip_serializing_if = "Option::is_none")]
    pub new_email: Option<String>,
    /// The user's hashed password.
    #[serde(rename = "passwordHash", skip_serializing_if = "Option::is_none")]
    pub password_hash: Option<String>,
    /// The photo url of the user.
    #[serde(rename = "photoUrl", skip_serializing_if = "Option::is_none")]
    pub photo_url: Option<String>,
    /// The user's profiles at the associated IdPs.
    #[serde(rename = "providerUserInfo", skip_serializing_if = "Option::is_none")]
    pub provider_user_info: Option<Vec<models::SetAccountInfoResponseProviderUserInfoInner>>,
    /// If idToken is STS id token, then this field will be refresh token.
    #[serde(rename = "refreshToken", skip_serializing_if = "Option::is_none")]
    pub refresh_token: Option<String>,
}

impl SetAccountInfoResponse {
    /// Respone of setting the account information.
    pub fn new() -> SetAccountInfoResponse {
        SetAccountInfoResponse {
            display_name: None,
            email: None,
            email_verified: None,
            expires_in: None,
            id_token: None,
            kind: None,
            local_id: None,
            new_email: None,
            password_hash: None,
            photo_url: None,
            provider_user_info: None,
            refresh_token: None,
        }
    }
}
