Skip to main content

hanzo_client/models/
oracle_view.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 OracleView {
16    /// Feed is the trading pair this feed prices.
17    #[serde(rename = "feed", skip_serializing_if = "Option::is_none")]
18    pub feed: Option<String>,
19    /// ID is the feed's own id, else its trading pair.
20    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
21    pub id: Option<String>,
22    /// Name is the feed's display name — the trading pair, e.g. \"LUX/USD\".
23    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
24    pub name: Option<String>,
25    /// Source is the oracle network the feed originates from; \"O-Chain\" by default.
26    #[serde(rename = "source", skip_serializing_if = "Option::is_none")]
27    pub source: Option<String>,
28    /// Status is \"active\" for a listed feed.
29    #[serde(rename = "status", skip_serializing_if = "Option::is_none")]
30    pub status: Option<String>,
31    /// UpdatedAt is the feed's own timestamp, RFC 3339 UTC.
32    #[serde(rename = "updatedAt", skip_serializing_if = "Option::is_none")]
33    pub updated_at: Option<String>,
34    /// Value is the feed's price, verbatim as the registry carries it.
35    #[serde(rename = "value", skip_serializing_if = "Option::is_none")]
36    pub value: Option<String>,
37}
38
39impl OracleView {
40    pub fn new() -> OracleView {
41        OracleView {
42            feed: None,
43            id: None,
44            name: None,
45            source: None,
46            status: None,
47            updated_at: None,
48            value: None,
49        }
50    }
51}
52