Skip to main content

clientapi_pbs/models/
access_users_get_token_response_data_inner.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 AccessUsersGetTokenResponseDataInner {
16
17    /// Comment.
18    #[serde(rename = "comment", skip_serializing_if = "Option::is_none")]
19    pub comment: Option<String>,
20
21    /// Enable the account (default). You can set this to '0' to disable the account.
22    #[serde(rename = "enable", skip_serializing_if = "Option::is_none")]
23    pub enable: Option<bool>,
24
25    /// Account expiration date (seconds since epoch). '0' means no expiration date.
26    #[serde(rename = "expire", skip_serializing_if = "Option::is_none")]
27    pub expire: Option<i64>,
28
29    /// The token ID part of an API token authentication id.  This alone does NOT uniquely identify the API token - use a full `Authid` for such use cases.
30    #[serde(rename = "token-name")]
31    pub token_name: String,
32
33    /// API Token ID
34    #[serde(rename = "tokenid")]
35    pub tokenid: String,
36
37
38}
39
40impl AccessUsersGetTokenResponseDataInner {
41    pub fn new(token_name: String, tokenid: String) -> AccessUsersGetTokenResponseDataInner {
42        AccessUsersGetTokenResponseDataInner {
43            
44            comment: None,
45            
46            enable: None,
47            
48            expire: None,
49            
50            token_name,
51            
52            tokenid,
53            
54        }
55    }
56}
57
58