Skip to main content

clientapi_pve/models/
nodes_subscription_get_subscription_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 NodesSubscriptionGetSubscriptionResponseData {
16
17    /// Timestamp of the last check done.
18    #[serde(rename = "checktime", skip_serializing_if = "Option::is_none")]
19    pub checktime: Option<i64>,
20
21    /// The subscription key, if set and permitted to access.
22    #[serde(rename = "key", skip_serializing_if = "Option::is_none")]
23    pub key: Option<String>,
24
25    /// A short code for the subscription level.
26    #[serde(rename = "level", skip_serializing_if = "Option::is_none")]
27    pub level: Option<String>,
28
29    /// A more human readable status message.
30    #[serde(rename = "message", skip_serializing_if = "Option::is_none")]
31    pub message: Option<String>,
32
33    /// Next due date of the set subscription.
34    #[serde(rename = "nextduedate", skip_serializing_if = "Option::is_none")]
35    pub nextduedate: Option<String>,
36
37    /// Human readable productname of the set subscription.
38    #[serde(rename = "productname", skip_serializing_if = "Option::is_none")]
39    pub productname: Option<String>,
40
41    /// Register date of the set subscription.
42    #[serde(rename = "regdate", skip_serializing_if = "Option::is_none")]
43    pub regdate: Option<String>,
44
45    /// The server ID, if permitted to access.
46    #[serde(rename = "serverid", skip_serializing_if = "Option::is_none")]
47    pub serverid: Option<String>,
48
49    /// Signature for offline keys
50    #[serde(rename = "signature", skip_serializing_if = "Option::is_none")]
51    pub signature: Option<String>,
52
53    /// The number of sockets for this host.
54    #[serde(rename = "sockets", skip_serializing_if = "Option::is_none")]
55    pub sockets: Option<i64>,
56
57    /// The current subscription status.
58    #[serde(rename = "status")]
59    pub status: models::PveNodesSubscriptionStatusEnum,
60
61    /// URL to the web shop.
62    #[serde(rename = "url", skip_serializing_if = "Option::is_none")]
63    pub url: Option<String>,
64
65
66}
67
68impl NodesSubscriptionGetSubscriptionResponseData {
69    pub fn new(status: models::PveNodesSubscriptionStatusEnum) -> NodesSubscriptionGetSubscriptionResponseData {
70        NodesSubscriptionGetSubscriptionResponseData {
71            
72            checktime: None,
73            
74            key: None,
75            
76            level: None,
77            
78            message: None,
79            
80            nextduedate: None,
81            
82            productname: None,
83            
84            regdate: None,
85            
86            serverid: None,
87            
88            signature: None,
89            
90            sockets: None,
91            
92            status,
93            
94            url: None,
95            
96        }
97    }
98}
99
100