Skip to main content

clientapi_pve/models/
access_tfa_add_tfa_entry_request.rs

1/*
2 * Proxmox Virtual Environment API
3 *
4 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pve.proxmox.com/pve-docs/api-viewer/ for the upstream documentation.
5 *
6 * The version of the OpenAPI document: 9.x
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
15pub struct AccessTfaAddTfaEntryRequest {
16
17    /// When responding to a u2f challenge: the original challenge string
18    #[serde(rename = "challenge", skip_serializing_if = "Option::is_none")]
19    pub challenge: Option<String>,
20
21    /// A description to distinguish multiple entries from one another
22    #[serde(rename = "description", skip_serializing_if = "Option::is_none")]
23    pub description: Option<String>,
24
25    /// The current password of the user performing the change.
26    #[serde(rename = "password", skip_serializing_if = "Option::is_none")]
27    pub password: Option<String>,
28
29    /// A totp URI.
30    #[serde(rename = "totp", skip_serializing_if = "Option::is_none")]
31    pub totp: Option<String>,
32
33    /// TFA Entry Type.
34    #[serde(rename = "type")]
35    pub r#type: models::PveTypeEnum,
36
37    /// The current value for the provided totp URI, or a Webauthn/U2F challenge response
38    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
39    pub value: Option<String>,
40
41
42}
43
44impl AccessTfaAddTfaEntryRequest {
45    pub fn new(r#type: models::PveTypeEnum) -> AccessTfaAddTfaEntryRequest {
46        AccessTfaAddTfaEntryRequest {
47            
48            challenge: None,
49            
50            description: None,
51            
52            password: None,
53            
54            totp: None,
55            
56            r#type,
57            
58            value: None,
59            
60        }
61    }
62}
63
64