Skip to main content

hanzo_client/models/
graph_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 GraphFact {
16    /// At is when the thing was so, RFC 3339. Required, and refused when it sits more than five minutes ahead of the server clock — an assertion dated further out would never mature and would skew every read until it did.
17    #[serde(rename = "at", skip_serializing_if = "Option::is_none")]
18    pub at: Option<String>,
19    /// Confidence in [0,1]. A tie-breaker within the order, never a substitute for it. Absent is 0, the weakest an assertion can be.
20    #[serde(rename = "confidence", skip_serializing_if = "Option::is_none")]
21    pub confidence: Option<f64>,
22    /// Entity is the thing being described, in the organization's own namespace. It is not created: an entity exists because something was asserted about it. Required, 512 bytes at most.
23    #[serde(rename = "entity", skip_serializing_if = "Option::is_none")]
24    pub entity: Option<String>,
25    /// Evidence points at the record this claim came from, 512 bytes at most. An assertion without one is admitted and carries no defence.
26    #[serde(rename = "evidence", skip_serializing_if = "Option::is_none")]
27    pub evidence: Option<String>,
28    /// Names says the value is an entity. A walk reads only the edges, so this is a declaration and never a guess about the value's shape.
29    #[serde(rename = "names", skip_serializing_if = "Option::is_none")]
30    pub names: Option<bool>,
31    /// Relation is what is being asserted — `depends`, `owner`, `same`, `title`. It is open: this plane holds no vocabulary of its own. Required, 128 bytes at most.
32    #[serde(rename = "relation", skip_serializing_if = "Option::is_none")]
33    pub relation: Option<String>,
34    /// Seen is when this assertion became knowable, RFC 3339. Defaults to At and may not precede it. It is provenance and it decides nothing: the instant every read uses is derived as the later of Seen and the server's own clock.
35    #[serde(rename = "seen", skip_serializing_if = "Option::is_none")]
36    pub seen: Option<String>,
37    /// Source names who asserted. Required, because an assertion nobody is named for cannot be weighed against one that is. Open text: this plane ranks no source above another.
38    #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
39    pub source: Option<String>,
40    /// Value is what the relation points at. When Names is true it is another entity's key and the assertion is an EDGE; otherwise it is a scalar and the assertion is a property. 2048 bytes at most, or 512 when it names an entity.
41    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
42    pub value: Option<String>,
43}
44
45impl GraphFact {
46    pub fn new() -> GraphFact {
47        GraphFact {
48            at: None,
49            confidence: None,
50            entity: None,
51            evidence: None,
52            names: None,
53            relation: None,
54            seen: None,
55            source: None,
56            value: None,
57        }
58    }
59}
60