Skip to main content

hanzo_client/models/
chain_status.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 ChainStatus {
16    #[serde(rename = "chainId", skip_serializing_if = "Option::is_none")]
17    pub chain_id: Option<i32>,
18    /// Height is the latest block, omitted when the chain did not answer rather than reported as zero — a zero height is a real value on a fresh chain.
19    #[serde(rename = "height", skip_serializing_if = "Option::is_none")]
20    pub height: Option<i32>,
21    #[serde(rename = "id", skip_serializing_if = "Option::is_none")]
22    pub id: Option<String>,
23    /// Live is whether the upstream answered eth_blockNumber.
24    #[serde(rename = "live", skip_serializing_if = "Option::is_none")]
25    pub live: Option<bool>,
26    #[serde(rename = "name", skip_serializing_if = "Option::is_none")]
27    pub name: Option<String>,
28}
29
30impl ChainStatus {
31    pub fn new() -> ChainStatus {
32        ChainStatus {
33            chain_id: None,
34            height: None,
35            id: None,
36            live: None,
37            name: None,
38        }
39    }
40}
41