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

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct GetQueueInfoPost200ResponseResult {
    #[serde(rename = "queues")]
    pub queues: Vec<QueueInfo>,
    #[serde(rename = "slot")]
    pub slot: u64,
}

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct QueueInfo {
    #[serde(rename = "tree")]
    pub tree: String,
    #[serde(rename = "queue")]
    pub queue: String,
    #[serde(rename = "queueType")]
    pub queue_type: u8,
    #[serde(rename = "queueSize")]
    pub queue_size: u64,
}

impl GetQueueInfoPost200ResponseResult {
    pub fn new(queues: Vec<QueueInfo>, slot: u64) -> GetQueueInfoPost200ResponseResult {
        GetQueueInfoPost200ResponseResult { queues, slot }
    }
}

impl QueueInfo {
    pub fn new(tree: String, queue: String, queue_type: u8, queue_size: u64) -> QueueInfo {
        QueueInfo {
            tree,
            queue,
            queue_type,
            queue_size,
        }
    }
}
