hanzo_client/models/reference_set.rs
1/*
2 * Hanzo Cloud API
3 *
4 * 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/.
5 *
6 * The version of the OpenAPI document: v1
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 ReferenceSet {
16 /// Age is how long ago that was.
17 #[serde(rename = "age", skip_serializing_if = "Option::is_none")]
18 pub age: Option<String>,
19 /// 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.
20 #[serde(rename = "asOf", skip_serializing_if = "Option::is_none")]
21 pub as_of: Option<String>,
22 /// Keys is how many members the baseline carries.
23 #[serde(rename = "keys", skip_serializing_if = "Option::is_none")]
24 pub keys: Option<i32>,
25 /// 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).
26 #[serde(rename = "kind", skip_serializing_if = "Option::is_none")]
27 pub kind: Option<String>,
28 /// Match is how a key is tested: exact, domain, net, digits, pattern or range.
29 #[serde(rename = "match", skip_serializing_if = "Option::is_none")]
30 pub r#match: Option<String>,
31 /// MaxAge is how old this set may be before it is stale.
32 #[serde(rename = "maxAge", skip_serializing_if = "Option::is_none")]
33 pub max_age: Option<String>,
34 /// Overrides is how many entries YOUR org has laid over this baseline.
35 #[serde(rename = "overrides", skip_serializing_if = "Option::is_none")]
36 pub overrides: Option<i32>,
37 /// 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.
38 #[serde(rename = "refusal", skip_serializing_if = "Option::is_none")]
39 pub refusal: Option<String>,
40 /// Set is the name this set is addressed by.
41 #[serde(rename = "set", skip_serializing_if = "Option::is_none")]
42 pub set: Option<String>,
43 /// Sources is each contributing publisher, its licence and its own freshness.
44 #[serde(rename = "sources", skip_serializing_if = "Option::is_none")]
45 pub sources: Option<Vec<models::ReferenceSource>>,
46 /// Stale is whether it is past that bound. A stale set still answers and says so, because yesterday's list beats none.
47 #[serde(rename = "stale", skip_serializing_if = "Option::is_none")]
48 pub stale: Option<bool>,
49 /// Version is the exact baseline consulted — every contributing publisher and its content digest. A decision records this and an auditor resolves it back.
50 #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
51 pub version: Option<String>,
52 /// What the set holds, in one sentence.
53 #[serde(rename = "what", skip_serializing_if = "Option::is_none")]
54 pub what: Option<String>,
55}
56
57impl ReferenceSet {
58 pub fn new() -> ReferenceSet {
59 ReferenceSet {
60 age: None,
61 as_of: None,
62 keys: None,
63 kind: None,
64 r#match: None,
65 max_age: None,
66 overrides: None,
67 refusal: None,
68 set: None,
69 sources: None,
70 stale: None,
71 version: None,
72 what: None,
73 }
74 }
75}
76