Skip to main content

clientapi_pbs/models/
access_ticket_create_ticket_request.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 AccessTicketCreateTicketRequest {
16
17    /// Whether the HttpOnly authentication flow should be used.
18    #[serde(rename = "http-only", skip_serializing_if = "Option::is_none")]
19    pub http_only: Option<bool>,
20
21    /// The secret password. This can also be a valid ticket. Only optional if the ticket is provided in a cookie header and only if the endpoint supports this.
22    #[serde(rename = "password", skip_serializing_if = "Option::is_none")]
23    pub password: Option<String>,
24
25    /// Verify ticket, and check if user have access 'privs' on 'path'.
26    #[serde(rename = "path", skip_serializing_if = "Option::is_none")]
27    pub path: Option<String>,
28
29    /// Port for verifying terminal tickets.
30    #[serde(rename = "port", skip_serializing_if = "Option::is_none")]
31    pub port: Option<i32>,
32
33    /// Verify ticket, and check if user have access 'privs' on 'path'.
34    #[serde(rename = "privs", skip_serializing_if = "Option::is_none")]
35    pub privs: Option<String>,
36
37    /// The signed TFA challenge string the user wants to respond to.
38    #[serde(rename = "tfa-challenge", skip_serializing_if = "Option::is_none")]
39    pub tfa_challenge: Option<String>,
40
41    /// User ID
42    #[serde(rename = "username")]
43    pub username: String,
44
45
46}
47
48impl AccessTicketCreateTicketRequest {
49    pub fn new(username: String) -> AccessTicketCreateTicketRequest {
50        AccessTicketCreateTicketRequest {
51            
52            http_only: None,
53            
54            password: None,
55            
56            path: None,
57            
58            port: None,
59            
60            privs: None,
61            
62            tfa_challenge: None,
63            
64            username,
65            
66        }
67    }
68}
69
70