1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
/*
* Hanzo Cloud API
*
* The Hanzo Cloud API as a customer calls it: every operation under /v1/ except the operator's admin product, relay routes, legacy spellings and capabilities still reached by flag. Tagged by product: the first path segment after /v1/.
*
* The version of the OpenAPI document: v1
*
* Generated by: https://openapi-generator.tech
*/
use crate::models;
use serde::{Deserialize, Serialize};
#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct LicensingPeriodIssueResponse {
/// AppID is the brand this token runs under (\"hanzo\" | \"lux\" | \"zoo\"). The engine refuses a token whose app_id is not the one it was built for.
#[serde(rename = "app_id", skip_serializing_if = "Option::is_none")]
pub app_id: Option<String>,
/// Exp is the token's expiry, Unix seconds.
#[serde(rename = "exp", skip_serializing_if = "Option::is_none")]
pub exp: Option<i32>,
/// Features are the capability grants copied verbatim from the plan the org bought. The engine enforces exactly these.
#[serde(rename = "features", skip_serializing_if = "Option::is_none")]
pub features: Option<Vec<String>>,
/// Bound reports whether a device fingerprint was folded into the token. An unbound token runs on any machine; a bound one runs only on the machine it was bound to.
#[serde(rename = "fingerprint_bound", skip_serializing_if = "Option::is_none")]
pub fingerprint_bound: Option<bool>,
/// Holder is who the token was issued to.
#[serde(rename = "holder", skip_serializing_if = "Option::is_none")]
pub holder: Option<String>,
/// Nonce uniquely identifies this token, and is what a per-token revocation names.
#[serde(rename = "nonce", skip_serializing_if = "Option::is_none")]
pub nonce: Option<String>,
/// Token is the signed license, `base64url(payload).base64url(ed25519_sig)`. It is the credential the engine runs on — treat it as a secret.
#[serde(rename = "token", skip_serializing_if = "Option::is_none")]
pub token: Option<String>,
}
impl LicensingPeriodIssueResponse {
pub fn new() -> LicensingPeriodIssueResponse {
LicensingPeriodIssueResponse {
app_id: None,
exp: None,
features: None,
fingerprint_bound: None,
holder: None,
nonce: None,
token: None,
}
}
}