hanzo_client/models/reference_source.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 ReferenceSource {
16 /// AsOf is when this publisher was current, RFC 3339.
17 #[serde(rename = "asOf", skip_serializing_if = "Option::is_none")]
18 pub as_of: Option<String>,
19 /// Basis is the KIND of permission this publisher's data reaches you under: licence (an explicit grant), registry (the registry of record publishing for anyone to consult), operator (an operator's own machine-readable statement about its own network, published for third parties to filter by — not a licence, and not claimed as one), own (computed here), or none (nothing reaches you: the membership is held by the component that screens against it). It is on the wire so the licence position is an audit you can run.
20 #[serde(rename = "basis", skip_serializing_if = "Option::is_none")]
21 pub basis: Option<String>,
22 /// Keys is how many members this publisher contributed.
23 #[serde(rename = "keys", skip_serializing_if = "Option::is_none")]
24 pub keys: Option<i32>,
25 /// Origin is exactly where it was taken from, so it can be taken again.
26 #[serde(rename = "origin", skip_serializing_if = "Option::is_none")]
27 pub origin: Option<String>,
28 /// Refusal is why this publisher's last take failed, if it did. The set keeps its previous version of this source and ages out visibly rather than silently shrinking.
29 #[serde(rename = "refusal", skip_serializing_if = "Option::is_none")]
30 pub refusal: Option<String>,
31 /// Source is the publisher.
32 #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
33 pub source: Option<String>,
34 /// Terms is the CITATION that basis points at — the licence identifier, the registry, or the operator publication. A source with no stated terms is not in the catalog.
35 #[serde(rename = "terms", skip_serializing_if = "Option::is_none")]
36 pub terms: Option<String>,
37 /// Version is the content digest of what this publisher last supplied. Two refreshes that agree on it took the same data.
38 #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
39 pub version: Option<String>,
40}
41
42impl ReferenceSource {
43 pub fn new() -> ReferenceSource {
44 ReferenceSource {
45 as_of: None,
46 basis: None,
47 keys: None,
48 origin: None,
49 refusal: None,
50 source: None,
51 terms: None,
52 version: None,
53 }
54 }
55}
56