coinbase_mesh/models/
partial_block_identifier.rs

1/*
2 * Rosetta
3 *
4 * Build Once. Integrate Your Blockchain Everywhere. 
5 *
6 * The version of the OpenAPI document: 1.4.13
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// PartialBlockIdentifier : When fetching data by BlockIdentifier, it may be possible to only specify the index or hash. If neither property is specified, it is assumed that the client is making a request at the current block. 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct PartialBlockIdentifier {
17    #[serde(rename = "index", skip_serializing_if = "Option::is_none")]
18    pub index: Option<i64>,
19    #[serde(rename = "hash", skip_serializing_if = "Option::is_none")]
20    pub hash: Option<String>,
21}
22
23impl PartialBlockIdentifier {
24    /// When fetching data by BlockIdentifier, it may be possible to only specify the index or hash. If neither property is specified, it is assumed that the client is making a request at the current block. 
25    pub fn new() -> PartialBlockIdentifier {
26        PartialBlockIdentifier {
27            index: None,
28            hash: None,
29        }
30    }
31}
32