Skip to main content

hanzo_client/models/
reference_receipt.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 ReferenceReceipt {
16    /// AsOf is when the load happened, RFC 3339. Absent is dated on arrival, which can only make the list look older than it is.
17    #[serde(rename = "asOf", skip_serializing_if = "Option::is_none")]
18    pub as_of: Option<String>,
19    /// Keys is how many designations that load carried. Zero from a publisher who designates somebody is a failed load wearing a successful one's clothes, and belongs in Refusal instead.
20    #[serde(rename = "keys", skip_serializing_if = "Option::is_none")]
21    pub keys: Option<i32>,
22    /// Refusal is why the load failed, when it did.
23    #[serde(rename = "refusal", skip_serializing_if = "Option::is_none")]
24    pub refusal: Option<String>,
25    /// Source is the publisher this receipt is for.
26    #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
27    pub source: Option<String>,
28    /// Version is the digest of what that publisher supplied, so a refresh that changed nothing can be told from a refresh that did not run.
29    #[serde(rename = "version", skip_serializing_if = "Option::is_none")]
30    pub version: Option<String>,
31}
32
33impl ReferenceReceipt {
34    pub fn new() -> ReferenceReceipt {
35        ReferenceReceipt {
36            as_of: None,
37            keys: None,
38            refusal: None,
39            source: None,
40            version: None,
41        }
42    }
43}
44