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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
* 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 ReferenceSet {
/// Age is how long ago that was.
#[serde(rename = "age", skip_serializing_if = "Option::is_none")]
pub age: Option<String>,
/// AsOf is when the OLDEST contributing publisher was current, RFC 3339. The oldest and not the newest: a set is exactly as fresh as its weakest source.
#[serde(rename = "asOf", skip_serializing_if = "Option::is_none")]
pub as_of: Option<String>,
/// Keys is how many members the baseline carries.
#[serde(rename = "keys", skip_serializing_if = "Option::is_none")]
pub keys: Option<i32>,
/// Kind is how the baseline comes to exist: fetch (downloaded from a publisher), local (computed here), attest (held by the component that screens against it, freshness reported), or gap (declared and NOT held, because the source needs a licence we do not have).
#[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
pub kind: Option<String>,
/// Match is how a key is tested: exact, domain, net, digits, pattern or range.
#[serde(rename = "match", skip_serializing_if = "Option::is_none")]
pub r#match: Option<String>,
/// MaxAge is how old this set may be before it is stale.
#[serde(rename = "maxAge", skip_serializing_if = "Option::is_none")]
pub max_age: Option<String>,
/// Overrides is how many entries YOUR org has laid over this baseline.
#[serde(rename = "overrides", skip_serializing_if = "Option::is_none")]
pub overrides: Option<i32>,
/// Refusal names why the set cannot be relied on, when it cannot: never loaded, held elsewhere, or a licence we do not hold. Non-empty means a lookup against this set will not answer, rather than answering clean.
#[serde(rename = "refusal", skip_serializing_if = "Option::is_none")]
pub refusal: Option<String>,
/// Set is the name this set is addressed by.
#[serde(rename = "set", skip_serializing_if = "Option::is_none")]
pub set: Option<String>,
/// Sources is each contributing publisher, its licence and its own freshness.
#[serde(rename = "sources", skip_serializing_if = "Option::is_none")]
pub sources: Option<Vec<models::ReferenceSource>>,
/// Stale is whether it is past that bound. A stale set still answers and says so, because yesterday's list beats none.
#[serde(rename = "stale", skip_serializing_if = "Option::is_none")]
pub stale: Option<bool>,
/// Version is the exact baseline consulted — every contributing publisher and its content digest. A decision records this and an auditor resolves it back.
#[serde(rename = "version", skip_serializing_if = "Option::is_none")]
pub version: Option<String>,
/// What the set holds, in one sentence.
#[serde(rename = "what", skip_serializing_if = "Option::is_none")]
pub what: Option<String>,
}
impl ReferenceSet {
pub fn new() -> ReferenceSet {
ReferenceSet {
age: None,
as_of: None,
keys: None,
kind: None,
r#match: None,
max_age: None,
overrides: None,
refusal: None,
set: None,
sources: None,
stale: None,
version: None,
what: None,
}
}
}