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;

/// SignupNewUserResponse : Response of signing up new user, creating anonymous user or anonymous user reauth.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct SignupNewUserResponse {
    /// 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 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#SignupNewUserResponse\".
    #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
    pub kind: Option<String>,
    /// The RP local ID of the user.
    #[serde(rename = "localId", skip_serializing_if = "Option::is_none")]
    pub local_id: Option<String>,
    /// 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 SignupNewUserResponse {
    /// Response of signing up new user, creating anonymous user or anonymous user reauth.
    pub fn new() -> SignupNewUserResponse {
        SignupNewUserResponse {
            display_name: None,
            email: None,
            expires_in: None,
            id_token: None,
            kind: None,
            local_id: None,
            refresh_token: None,
        }
    }
}
