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;

/// IdentitytoolkitRelyingpartySignupNewUserRequest : Request to signup new user, create anonymous user or anonymous user reauth.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct IdentitytoolkitRelyingpartySignupNewUserRequest {
    /// The captcha challenge.
    #[serde(rename = "captchaChallenge", skip_serializing_if = "Option::is_none")]
    pub captcha_challenge: Option<String>,
    /// Response to the captcha.
    #[serde(rename = "captchaResponse", skip_serializing_if = "Option::is_none")]
    pub captcha_response: Option<String>,
    /// Whether to disable the user. Only can be used by service account.
    #[serde(rename = "disabled", skip_serializing_if = "Option::is_none")]
    pub disabled: Option<bool>,
    /// 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>,
    /// Mark the email as verified or not. Only can be used by service account.
    #[serde(rename = "emailVerified", skip_serializing_if = "Option::is_none")]
    pub email_verified: Option<bool>,
    /// The GITKit token of the authenticated user.
    #[serde(rename = "idToken", skip_serializing_if = "Option::is_none")]
    pub id_token: Option<String>,
    /// Instance id token of the app.
    #[serde(rename = "instanceId", skip_serializing_if = "Option::is_none")]
    pub instance_id: Option<String>,
    /// Privileged caller can create user with specified user id.
    #[serde(rename = "localId", skip_serializing_if = "Option::is_none")]
    pub local_id: Option<String>,
    /// The new password of the user.
    #[serde(rename = "password", skip_serializing_if = "Option::is_none")]
    pub password: Option<String>,
    /// Privileged caller can create user with specified phone number.
    #[serde(rename = "phoneNumber", skip_serializing_if = "Option::is_none")]
    pub phone_number: Option<String>,
    /// The photo url of the user.
    #[serde(rename = "photoUrl", skip_serializing_if = "Option::is_none")]
    pub photo_url: Option<String>,
    /// For multi-tenant use cases, in order to construct sign-in URL with the correct IDP parameters, Firebear needs to know which Tenant to retrieve IDP configs from.
    #[serde(rename = "tenantId", skip_serializing_if = "Option::is_none")]
    pub tenant_id: Option<String>,
    /// Tenant project number to be used for idp discovery.
    #[serde(
        rename = "tenantProjectNumber",
        skip_serializing_if = "Option::is_none"
    )]
    pub tenant_project_number: Option<String>,
}

impl IdentitytoolkitRelyingpartySignupNewUserRequest {
    /// Request to signup new user, create anonymous user or anonymous user reauth.
    pub fn new() -> IdentitytoolkitRelyingpartySignupNewUserRequest {
        IdentitytoolkitRelyingpartySignupNewUserRequest {
            captcha_challenge: None,
            captcha_response: None,
            disabled: None,
            display_name: None,
            email: None,
            email_verified: None,
            id_token: None,
            instance_id: None,
            local_id: None,
            password: None,
            phone_number: None,
            photo_url: None,
            tenant_id: None,
            tenant_project_number: None,
        }
    }
}
