bitwarden-api-api 3.0.0

Api bindings for the Bitwarden API.
Documentation
/*
 * Bitwarden Internal API
 *
 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
 *
 * The version of the OpenAPI document: latest
 *
 * Generated by: https://openapi-generator.tech
 */

use serde::{Deserialize, Serialize};

use crate::models;

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct UpdateTwoFactorDuoRequestModel {
    #[serde(
        rename = "masterPasswordHash",
        alias = "MasterPasswordHash",
        skip_serializing_if = "Option::is_none"
    )]
    pub master_password_hash: Option<String>,
    #[serde(rename = "otp", alias = "Otp", skip_serializing_if = "Option::is_none")]
    pub otp: Option<String>,
    #[serde(
        rename = "authRequestAccessCode",
        alias = "AuthRequestAccessCode",
        skip_serializing_if = "Option::is_none"
    )]
    pub auth_request_access_code: Option<String>,
    #[serde(
        rename = "secret",
        alias = "Secret",
        skip_serializing_if = "Option::is_none"
    )]
    pub secret: Option<String>,
    #[serde(rename = "clientId", alias = "ClientId")]
    pub client_id: String,
    #[serde(rename = "clientSecret", alias = "ClientSecret")]
    pub client_secret: String,
    #[serde(rename = "host", alias = "Host")]
    pub host: String,
}

impl UpdateTwoFactorDuoRequestModel {
    pub fn new(
        client_id: String,
        client_secret: String,
        host: String,
    ) -> UpdateTwoFactorDuoRequestModel {
        UpdateTwoFactorDuoRequestModel {
            master_password_hash: None,
            otp: None,
            auth_request_access_code: None,
            secret: None,
            client_id,
            client_secret,
            host,
        }
    }
}