Skip to main content

bitwarden_api_api/models/
two_factor_duo_details.rs

1/*
2 * Bitwarden Internal API
3 *
4 * No description provided (generated by Openapi Generator https://github.com/openapitools/openapi-generator)
5 *
6 * The version of the OpenAPI document: latest
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use serde::{Deserialize, Serialize};
12
13use crate::models;
14
15/// TwoFactorDuoDetails : Duo provider details for both user and organization scopes. Hydrated from
16/// Bit.Core.Entities.User or Bit.Core.AdminConsole.Entities.Organization; embedded by the
17/// per-action `TwoFactorDuo*ResponseModel` / `TwoFactorOrganizationDuo*ResponseModel` wrappers.
18#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
19pub struct TwoFactorDuoDetails {
20    #[serde(
21        rename = "enabled",
22        alias = "Enabled",
23        skip_serializing_if = "Option::is_none"
24    )]
25    pub enabled: Option<bool>,
26    #[serde(
27        rename = "host",
28        alias = "Host",
29        skip_serializing_if = "Option::is_none"
30    )]
31    pub host: Option<String>,
32    #[serde(
33        rename = "clientId",
34        alias = "ClientId",
35        skip_serializing_if = "Option::is_none"
36    )]
37    pub client_id: Option<String>,
38    #[serde(
39        rename = "clientSecret",
40        alias = "ClientSecret",
41        skip_serializing_if = "Option::is_none"
42    )]
43    pub client_secret: Option<String>,
44}
45
46impl TwoFactorDuoDetails {
47    /// Duo provider details for both user and organization scopes. Hydrated from
48    /// Bit.Core.Entities.User or Bit.Core.AdminConsole.Entities.Organization; embedded by the
49    /// per-action `TwoFactorDuo*ResponseModel` / `TwoFactorOrganizationDuo*ResponseModel` wrappers.
50    pub fn new() -> TwoFactorDuoDetails {
51        TwoFactorDuoDetails {
52            enabled: None,
53            host: None,
54            client_id: None,
55            client_secret: None,
56        }
57    }
58}