Skip to main content

clientapi_pbs/models/
access_tfa_create_tfa_response_data.rs

1/*
2 * Proxmox Backup Server API
3 *
4 * Generated from apidoc.js. NOT an official Proxmox specification. See https://pbs.proxmox.com/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 AccessTfaCreateTfaResponseData {
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 if a newly added TFA entry.
22    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
23    pub id: Option<String>,
24
25    /// A list of recovery codes as integers.
26    #[serde(rename = "recovery")]
27    pub recovery: Vec<i64>,
28
29
30}
31
32impl AccessTfaCreateTfaResponseData {
33    pub fn new(recovery: Vec<i64>) -> AccessTfaCreateTfaResponseData {
34        AccessTfaCreateTfaResponseData {
35            
36            challenge: None,
37            
38            id: None,
39            
40            recovery,
41            
42        }
43    }
44}
45
46