/*
 * 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 MerkleContextV2 {
    /// A Solana public key represented as a base58 string.
    #[serde(rename = "cpiContext", skip_serializing_if = "Option::is_none")]
    pub cpi_context: Option<String>,
    #[serde(rename = "nextTreeContext", skip_serializing_if = "Option::is_none")]
    pub next_tree_context: Option<Box<models::TreeContextInfo>>,
    /// A Solana public key represented as a base58 string.
    #[serde(rename = "queue")]
    pub queue: String,
    /// A Solana public key represented as a base58 string.
    #[serde(rename = "tree")]
    pub tree: String,
    #[serde(rename = "treeType")]
    pub tree_type: u16,
}

impl MerkleContextV2 {
    pub fn new(queue: String, tree: String, tree_type: u16) -> MerkleContextV2 {
        MerkleContextV2 {
            cpi_context: None,
            next_tree_context: None,
            queue,
            tree,
            tree_type,
        }
    }
}
