photon_api/models/
_get_queue_info_post_request.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)]
12pub struct GetQueueInfoPostRequest {
13    /// An ID to identify the request.
14    #[serde(rename = "id")]
15    pub id: i32,
16    /// The version of the JSON-RPC protocol.
17    #[serde(rename = "jsonrpc")]
18    pub jsonrpc: Jsonrpc,
19    /// The name of the method to invoke.
20    #[serde(rename = "method")]
21    pub method: Method,
22    #[serde(rename = "params")]
23    pub params: GetQueueInfoParams,
24}
25
26impl GetQueueInfoPostRequest {
27    pub fn new(id: i32, jsonrpc: Jsonrpc, method: Method) -> GetQueueInfoPostRequest {
28        GetQueueInfoPostRequest {
29            id,
30            jsonrpc,
31            method,
32            params: GetQueueInfoParams::default(),
33        }
34    }
35}
36
37#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
38pub struct GetQueueInfoParams {}
39
40/// The version of the JSON-RPC protocol.
41#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
42pub enum Jsonrpc {
43    #[serde(rename = "2.0")]
44    Variant2Period0,
45}
46
47impl Default for Jsonrpc {
48    fn default() -> Jsonrpc {
49        Self::Variant2Period0
50    }
51}
52
53/// The name of the method to invoke.
54#[derive(Clone, Copy, Debug, Eq, PartialEq, Ord, PartialOrd, Hash, Serialize, Deserialize)]
55pub enum Method {
56    #[serde(rename = "getQueueInfo")]
57    GetQueueInfo,
58}
59
60impl Default for Method {
61    fn default() -> Method {
62        Self::GetQueueInfo
63    }
64}