photon_api/models/
get_queue_elements_response_value.rs

1/*
2 * photon-indexer
3 *
4 * Solana indexer for general compression
5 *
6 * The version of the OpenAPI document: 0.50.0
7 *
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12
13#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
14pub struct GetQueueElementsResponseValue {
15    /// A 32-byte hash represented as a base58 string.
16    #[serde(rename = "accountHash")]
17    pub account_hash: String,
18    /// A 32-byte hash represented as a base58 string.
19    #[serde(rename = "leaf")]
20    pub leaf: String,
21    #[serde(rename = "leafIndex")]
22    pub leaf_index: u64,
23    #[serde(rename = "proof")]
24    pub proof: Vec<String>,
25    /// A 32-byte hash represented as a base58 string.
26    #[serde(rename = "root")]
27    pub root: String,
28    #[serde(rename = "rootSeq")]
29    pub root_seq: u64,
30    /// A 32-byte hash represented as a base58 string.
31    #[serde(rename = "tree")]
32    pub tree: String,
33    /// A 32-byte hash represented as a base58 string.
34    #[serde(rename = "txHash", skip_serializing_if = "Option::is_none")]
35    pub tx_hash: Option<String>,
36}
37
38impl GetQueueElementsResponseValue {
39    pub fn new(
40        account_hash: String,
41        leaf: String,
42        leaf_index: u64,
43        proof: Vec<String>,
44        root: String,
45        root_seq: u64,
46        tree: String,
47    ) -> GetQueueElementsResponseValue {
48        GetQueueElementsResponseValue {
49            account_hash,
50            leaf,
51            leaf_index,
52            proof,
53            root,
54            root_seq,
55            tree,
56            tx_hash: None,
57        }
58    }
59}