coinbase_mesh/models/
block_transaction_request.rs

1/*
2 * Rosetta
3 *
4 * Build Once. Integrate Your Blockchain Everywhere. 
5 *
6 * The version of the OpenAPI document: 1.4.13
7 * 
8 * Generated by: https://openapi-generator.tech
9 */
10
11use crate::models;
12use serde::{Deserialize, Serialize};
13
14/// BlockTransactionRequest : A BlockTransactionRequest is used to fetch a Transaction included in a block that is not returned in a BlockResponse. 
15#[derive(Clone, Default, Debug, PartialEq, Serialize, Deserialize)]
16pub struct BlockTransactionRequest {
17    #[serde(rename = "network_identifier")]
18    pub network_identifier: Box<models::NetworkIdentifier>,
19    #[serde(rename = "block_identifier")]
20    pub block_identifier: Box<models::BlockIdentifier>,
21    #[serde(rename = "transaction_identifier")]
22    pub transaction_identifier: Box<models::TransactionIdentifier>,
23}
24
25impl BlockTransactionRequest {
26    /// A BlockTransactionRequest is used to fetch a Transaction included in a block that is not returned in a BlockResponse. 
27    pub fn new(network_identifier: models::NetworkIdentifier, block_identifier: models::BlockIdentifier, transaction_identifier: models::TransactionIdentifier) -> BlockTransactionRequest {
28        BlockTransactionRequest {
29            network_identifier: Box::new(network_identifier),
30            block_identifier: Box::new(block_identifier),
31            transaction_identifier: Box::new(transaction_identifier),
32        }
33    }
34}
35