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;

/// IdentitytoolkitRelyingpartyVerifyPasswordRequest : Request to verify the password.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct IdentitytoolkitRelyingpartyVerifyPasswordRequest {
    /// 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>,
    /// GCP project number of the requesting delegated app. Currently only intended for Firebase V1 migration.
    #[serde(
        rename = "delegatedProjectNumber",
        skip_serializing_if = "Option::is_none"
    )]
    pub delegated_project_number: Option<String>,
    /// The email of the user.
    #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
    pub email: Option<String>,
    /// 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>,
    /// The password inputed by the user.
    #[serde(rename = "password", skip_serializing_if = "Option::is_none")]
    pub password: Option<String>,
    /// The GITKit token for the non-trusted IDP, which is to be confirmed by the user.
    #[serde(rename = "pendingIdToken", skip_serializing_if = "Option::is_none")]
    pub pending_id_token: Option<String>,
    /// Whether return sts id token and refresh token instead of gitkit token.
    #[serde(rename = "returnSecureToken", skip_serializing_if = "Option::is_none")]
    pub return_secure_token: Option<bool>,
    /// 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 IdentitytoolkitRelyingpartyVerifyPasswordRequest {
    /// Request to verify the password.
    pub fn new() -> IdentitytoolkitRelyingpartyVerifyPasswordRequest {
        IdentitytoolkitRelyingpartyVerifyPasswordRequest {
            captcha_challenge: None,
            captcha_response: None,
            delegated_project_number: None,
            email: None,
            id_token: None,
            instance_id: None,
            password: None,
            pending_id_token: None,
            return_secure_token: None,
            tenant_id: None,
            tenant_project_number: None,
        }
    }
}
