/*
 * 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, Debug, PartialEq, Serialize, Deserialize)]
#[serde(rename_all = "camelCase")]
pub struct JsonRpcError {
    pub code: i32,
    pub message: String,
    #[serde(skip_serializing_if = "Option::is_none")]
    pub data: Option<serde_json::Value>,
}

#[derive(Clone, Debug, PartialEq, Default, Serialize, Deserialize)]
pub struct GetQueueInfoPost200Response {
    #[serde(rename = "jsonrpc")]
    pub jsonrpc: String,
    #[serde(rename = "result", skip_serializing_if = "Option::is_none")]
    pub result: Option<models::GetQueueInfoPost200ResponseResult>,
    #[serde(rename = "error", skip_serializing_if = "Option::is_none")]
    pub error: Option<JsonRpcError>,
    #[serde(rename = "id")]
    pub id: Option<i32>,
}

impl GetQueueInfoPost200Response {
    pub fn new(
        jsonrpc: String,
        result: Option<models::GetQueueInfoPost200ResponseResult>,
        id: Option<i32>,
    ) -> GetQueueInfoPost200Response {
        GetQueueInfoPost200Response {
            jsonrpc,
            result,
            error: None,
            id,
        }
    }
}
