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