photon_api/models/
address_queue_data_v2.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
11#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
12#[allow(clippy::too_many_arguments)]
13pub struct AddressQueueDataV2 {
14    #[serde(rename = "addresses")]
15    pub addresses: Vec<String>,
16    #[serde(rename = "queueIndices")]
17    pub queue_indices: Vec<u64>,
18    /// Deduplicated tree nodes for address tree non-inclusion proofs
19    /// node_index encoding: (level << 56) | position
20    #[serde(rename = "nodes")]
21    pub nodes: Vec<u64>,
22    #[serde(rename = "nodeHashes")]
23    pub node_hashes: Vec<String>,
24    #[serde(rename = "lowElementIndices")]
25    pub low_element_indices: Vec<u64>,
26    #[serde(rename = "lowElementValues")]
27    pub low_element_values: Vec<String>,
28    #[serde(rename = "lowElementNextIndices")]
29    pub low_element_next_indices: Vec<u64>,
30    #[serde(rename = "lowElementNextValues")]
31    pub low_element_next_values: Vec<String>,
32    #[serde(rename = "lowElementProofs", default)]
33    pub low_element_proofs: Vec<Vec<String>>,
34    #[serde(rename = "leavesHashChains", default)]
35    pub leaves_hash_chains: Vec<String>,
36    #[serde(rename = "initialRoot")]
37    pub initial_root: String,
38    #[serde(rename = "startIndex")]
39    pub start_index: u64,
40    #[serde(rename = "subtrees", default)]
41    pub subtrees: Vec<String>,
42}
43
44impl AddressQueueDataV2 {
45    #[allow(clippy::too_many_arguments)]
46    pub fn new(
47        addresses: Vec<String>,
48        queue_indices: Vec<u64>,
49        nodes: Vec<u64>,
50        node_hashes: Vec<String>,
51        low_element_indices: Vec<u64>,
52        low_element_values: Vec<String>,
53        low_element_next_indices: Vec<u64>,
54        low_element_next_values: Vec<String>,
55        low_element_proofs: Vec<Vec<String>>,
56        leaves_hash_chains: Vec<String>,
57        initial_root: String,
58        start_index: u64,
59        subtrees: Vec<String>,
60    ) -> AddressQueueDataV2 {
61        AddressQueueDataV2 {
62            addresses,
63            queue_indices,
64            nodes,
65            node_hashes,
66            low_element_indices,
67            low_element_values,
68            low_element_next_indices,
69            low_element_next_values,
70            low_element_proofs,
71            leaves_hash_chains,
72            initial_root,
73            start_index,
74            subtrees,
75        }
76    }
77}