Skip to main content

clientapi_pbs/models/
access_ticket_create_ticket_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 AccessTicketCreateTicketResponseData {
16
17    /// The CSRF prevention token.
18    #[serde(rename = "CSRFPreventionToken", skip_serializing_if = "Option::is_none")]
19    pub csrf_prevention_token: Option<String>,
20
21    /// The ticket as is supposed to be used in the authentication header. Not provided here if the endpoint uses HttpOnly cookies to supply the actual ticket.
22    #[serde(rename = "ticket", skip_serializing_if = "Option::is_none")]
23    pub ticket: Option<String>,
24
25    /// Like a full ticket, except the signature is missing. Useful in HttpOnly-contexts (browsers).
26    #[serde(rename = "ticket-info", skip_serializing_if = "Option::is_none")]
27    pub ticket_info: Option<String>,
28
29    /// User ID
30    #[serde(rename = "username")]
31    pub username: String,
32
33
34}
35
36impl AccessTicketCreateTicketResponseData {
37    pub fn new(username: String) -> AccessTicketCreateTicketResponseData {
38        AccessTicketCreateTicketResponseData {
39            
40            csrf_prevention_token: None,
41            
42            ticket: None,
43            
44            ticket_info: None,
45            
46            username,
47            
48        }
49    }
50}
51
52