/*
 * photon-indexer
 *
 * Solana indexer for general compression
 *
 * The version of the OpenAPI document: 0.50.0
 *
 * Generated by: https://openapi-generator.tech
 */

use crate::models;

#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
pub struct GetQueueElementsResponseValue {
    /// A 32-byte hash represented as a base58 string.
    #[serde(rename = "accountHash")]
    pub account_hash: String,
    /// A 32-byte hash represented as a base58 string.
    #[serde(rename = "leaf")]
    pub leaf: String,
    #[serde(rename = "leafIndex")]
    pub leaf_index: u64,
    #[serde(rename = "proof")]
    pub proof: Vec<String>,
    /// A 32-byte hash represented as a base58 string.
    #[serde(rename = "root")]
    pub root: String,
    #[serde(rename = "rootSeq")]
    pub root_seq: u64,
    /// A 32-byte hash represented as a base58 string.
    #[serde(rename = "tree")]
    pub tree: String,
    /// A 32-byte hash represented as a base58 string.
    #[serde(rename = "txHash", skip_serializing_if = "Option::is_none")]
    pub tx_hash: Option<String>,
}

impl GetQueueElementsResponseValue {
    pub fn new(
        account_hash: String,
        leaf: String,
        leaf_index: u64,
        proof: Vec<String>,
        root: String,
        root_seq: u64,
        tree: String,
    ) -> GetQueueElementsResponseValue {
        GetQueueElementsResponseValue {
            account_hash,
            leaf,
            leaf_index,
            proof,
            root,
            root_seq,
            tree,
            tx_hash: None,
        }
    }
}
