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;

/// CreateAuthUriResponse : Response of creating the IDP authentication URL.
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct CreateAuthUriResponse {
    /// all providers the user has once used to do federated login
    #[serde(rename = "allProviders", skip_serializing_if = "Option::is_none")]
    pub all_providers: Option<Vec<String>>,
    /// The URI used by the IDP to authenticate the user.
    #[serde(rename = "authUri", skip_serializing_if = "Option::is_none")]
    pub auth_uri: Option<String>,
    /// True if captcha is required.
    #[serde(rename = "captchaRequired", skip_serializing_if = "Option::is_none")]
    pub captcha_required: Option<bool>,
    /// True if the authUri is for user's existing provider.
    #[serde(
        rename = "forExistingProvider",
        skip_serializing_if = "Option::is_none"
    )]
    pub for_existing_provider: Option<bool>,
    /// The fixed string identitytoolkit#CreateAuthUriResponse\".
    #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
    pub kind: Option<String>,
    /// The provider ID of the auth URI.
    #[serde(rename = "providerId", skip_serializing_if = "Option::is_none")]
    pub provider_id: Option<String>,
    /// Whether the user is registered if the identifier is an email.
    #[serde(rename = "registered", skip_serializing_if = "Option::is_none")]
    pub registered: Option<bool>,
    /// Session ID which should be passed in the following verifyAssertion request.
    #[serde(rename = "sessionId", skip_serializing_if = "Option::is_none")]
    pub session_id: Option<String>,
    /// All sign-in methods this user has used.
    #[serde(rename = "signinMethods", skip_serializing_if = "Option::is_none")]
    pub signin_methods: Option<Vec<String>>,
}

impl CreateAuthUriResponse {
    /// Response of creating the IDP authentication URL.
    pub fn new() -> CreateAuthUriResponse {
        CreateAuthUriResponse {
            all_providers: None,
            auth_uri: None,
            captcha_required: None,
            for_existing_provider: None,
            kind: None,
            provider_id: None,
            registered: None,
            session_id: None,
            signin_methods: None,
        }
    }
}
