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
/*
* 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 LicensingPeriodIssueRequest {
/// Fingerprint is a previously-registered device binding value, as returned by POST /v1/licensing/fingerprint. Leave it empty and pass Signals to bind the device at issue time instead.
#[serde(rename = "fingerprint", skip_serializing_if = "Option::is_none")]
pub fingerprint: Option<String>,
/// Holder overrides who the token is issued to; defaults to the caller's own validated subject. It NAMES the token's bearer and grants nothing on its own — the entitlement checked is always the caller's org's.
#[serde(rename = "holder", skip_serializing_if = "Option::is_none")]
pub holder: Option<String>,
/// Product is the licensed commerce product the caller wants a token for.
#[serde(rename = "product")]
pub product: String,
/// Release scopes the token to one signed binary release, recorded as a \"release:<id>\" feature so a single bad release can be revoked on its own.
#[serde(rename = "release", skip_serializing_if = "Option::is_none")]
pub release: Option<String>,
/// Signals binds the device at issue time, as an alternative to a pre-registered fingerprint. The raw signals are never stored or echoed — they are folded immediately into the one-way binding value.
#[serde(rename = "signals", skip_serializing_if = "Option::is_none")]
pub signals: Option<Box<models::LicensingPeriodDeviceSignals>>,
/// TTLSeconds requests a token lifetime in seconds. It is clamped to the deployment maximum AND to the entitlement's own expiry — a token never outlives the subscription that paid for it.
#[serde(rename = "ttl_seconds", skip_serializing_if = "Option::is_none")]
pub ttl_seconds: Option<i32>,
}
impl LicensingPeriodIssueRequest {
pub fn new(product: String) -> LicensingPeriodIssueRequest {
LicensingPeriodIssueRequest {
fingerprint: None,
holder: None,
product,
release: None,
signals: None,
ttl_seconds: None,
}
}
}