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;

/// Relyingparty : Request of getting a code for user confirmation (reset password, change email etc.)
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct Relyingparty {
    /// whether or not to install the android app on the device where the link is opened
    #[serde(rename = "androidInstallApp", skip_serializing_if = "Option::is_none")]
    pub android_install_app: Option<bool>,
    /// minimum version of the app. if the version on the device is lower than this version then the user is taken to the play store to upgrade the app
    #[serde(
        rename = "androidMinimumVersion",
        skip_serializing_if = "Option::is_none"
    )]
    pub android_minimum_version: Option<String>,
    /// android package name of the android app to handle the action code
    #[serde(rename = "androidPackageName", skip_serializing_if = "Option::is_none")]
    pub android_package_name: Option<String>,
    /// whether or not the app can handle the oob code without first going to web
    #[serde(rename = "canHandleCodeInApp", skip_serializing_if = "Option::is_none")]
    pub can_handle_code_in_app: Option<bool>,
    /// The recaptcha response from the user.
    #[serde(rename = "captchaResp", skip_serializing_if = "Option::is_none")]
    pub captcha_resp: Option<String>,
    /// The recaptcha challenge presented to the user.
    #[serde(rename = "challenge", skip_serializing_if = "Option::is_none")]
    pub challenge: Option<String>,
    /// The url to continue to the Gitkit app
    #[serde(rename = "continueUrl", skip_serializing_if = "Option::is_none")]
    pub continue_url: Option<String>,
    /// The email of the user.
    #[serde(rename = "email", skip_serializing_if = "Option::is_none")]
    pub email: Option<String>,
    /// iOS app store id to download the app if it's not already installed
    #[serde(rename = "iOSAppStoreId", skip_serializing_if = "Option::is_none")]
    pub i_os_app_store_id: Option<String>,
    /// the iOS bundle id of iOS app to handle the action code
    #[serde(rename = "iOSBundleId", skip_serializing_if = "Option::is_none")]
    pub i_os_bundle_id: Option<String>,
    /// The user's Gitkit login token for email change.
    #[serde(rename = "idToken", skip_serializing_if = "Option::is_none")]
    pub id_token: Option<String>,
    /// The fixed string \"identitytoolkit#relyingparty\".
    #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
    pub kind: Option<String>,
    /// The new email if the code is for email change.
    #[serde(rename = "newEmail", skip_serializing_if = "Option::is_none")]
    pub new_email: Option<String>,
    /// The request type.
    #[serde(rename = "requestType", skip_serializing_if = "Option::is_none")]
    pub request_type: Option<String>,
    /// The IP address of the user.
    #[serde(rename = "userIp", skip_serializing_if = "Option::is_none")]
    pub user_ip: Option<String>,
}

impl Relyingparty {
    /// Request of getting a code for user confirmation (reset password, change email etc.)
    pub fn new() -> Relyingparty {
        Relyingparty {
            android_install_app: None,
            android_minimum_version: None,
            android_package_name: None,
            can_handle_code_in_app: None,
            captcha_resp: None,
            challenge: None,
            continue_url: None,
            email: None,
            i_os_app_store_id: None,
            i_os_bundle_id: None,
            id_token: None,
            kind: None,
            new_email: None,
            request_type: None,
            user_ip: None,
        }
    }
}
