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