hanzo_client/models/wire_fact.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 WireFact {
16 /// At is when the thing was so, RFC 3339, as the asserter gave it.
17 #[serde(rename = "at", skip_serializing_if = "Option::is_none")]
18 pub at: Option<String>,
19 /// By is the identity that filed it — `owner` or `owner/user` — stamped from the validated principal at the write, never from the body.
20 #[serde(rename = "by", skip_serializing_if = "Option::is_none")]
21 pub by: Option<String>,
22 /// Confidence in [0,1] as the asserter gave it; absent is 0. It breaks a tie between two assertions equally knowable and decides nothing else.
23 #[serde(rename = "confidence", skip_serializing_if = "Option::is_none")]
24 pub confidence: Option<f64>,
25 /// Entity is the thing described, in the organization's own namespace.
26 #[serde(rename = "entity", skip_serializing_if = "Option::is_none")]
27 pub entity: Option<String>,
28 /// Evidence points at the record the claim came from. Absent when the asserter gave none.
29 #[serde(rename = "evidence", skip_serializing_if = "Option::is_none")]
30 pub evidence: Option<String>,
31 /// ID is the assertion's content address, minted by the server from what was asserted. Two callers who assert the identical thing land on one ID and one row; changing any asserted field makes a different ID and a second row.
32 #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
33 pub id: Option<String>,
34 /// Knowable is the first instant this plane could have answered with the assertion, RFC 3339: the later of Seen and the server's clock at the write. Derived and never supplied, which is what stops history filed today from being backdated into a past read.
35 #[serde(rename = "knowable", skip_serializing_if = "Option::is_none")]
36 pub knowable: Option<String>,
37 /// Names true means the assertion is an edge and Value is an entity. A walk reads only these.
38 #[serde(rename = "names", skip_serializing_if = "Option::is_none")]
39 pub names: Option<bool>,
40 /// Relation is what was asserted of it.
41 #[serde(rename = "relation", skip_serializing_if = "Option::is_none")]
42 pub relation: Option<String>,
43 /// Seen is when the asserter says it became knowable, RFC 3339. Provenance only — Knowable is what an as-of read is bounded by.
44 #[serde(rename = "seen", skip_serializing_if = "Option::is_none")]
45 pub seen: Option<String>,
46 /// Source names who asserted, as the caller gave it. This plane ranks no source above another, so it never outweighs a later Knowable.
47 #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
48 pub source: Option<String>,
49 /// Value is what the relation points at: another entity's key when Names is true, otherwise a scalar.
50 #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
51 pub value: Option<String>,
52}
53
54impl WireFact {
55 pub fn new() -> WireFact {
56 WireFact {
57 at: None,
58 by: None,
59 confidence: None,
60 entity: None,
61 evidence: None,
62 id: None,
63 knowable: None,
64 names: None,
65 relation: None,
66 seen: None,
67 source: None,
68 value: None,
69 }
70 }
71}
72