Skip to main content

clientapi_pve/models/
access_tfa_add_tfa_entry_response_data.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 AccessTfaAddTfaEntryResponseData {
16
17    /// When adding u2f entries, this contains a challenge the user must respond to in order to finish the registration.
18    #[serde(rename = "challenge", skip_serializing_if = "Option::is_none")]
19    pub challenge: Option<String>,
20
21    /// The id of a newly added TFA entry.
22    #[serde(rename = "id")]
23    pub id: String,
24
25    /// When adding recovery codes, this contains the list of codes to be displayed to the user
26    #[serde(rename = "recovery", skip_serializing_if = "Option::is_none")]
27    pub recovery: Option<Vec<String>>,
28
29
30}
31
32impl AccessTfaAddTfaEntryResponseData {
33    pub fn new(id: String) -> AccessTfaAddTfaEntryResponseData {
34        AccessTfaAddTfaEntryResponseData {
35            
36            challenge: None,
37            
38            id,
39            
40            recovery: None,
41            
42        }
43    }
44}
45
46