aws_sdk_managedblockchainquery/operation/get_transaction/
_get_transaction_input.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct GetTransactionInput {
6 pub transaction_hash: ::std::option::Option<::std::string::String>,
8 pub transaction_id: ::std::option::Option<::std::string::String>,
12 pub network: ::std::option::Option<crate::types::QueryNetwork>,
14}
15impl GetTransactionInput {
16 pub fn transaction_hash(&self) -> ::std::option::Option<&str> {
18 self.transaction_hash.as_deref()
19 }
20 pub fn transaction_id(&self) -> ::std::option::Option<&str> {
24 self.transaction_id.as_deref()
25 }
26 pub fn network(&self) -> ::std::option::Option<&crate::types::QueryNetwork> {
28 self.network.as_ref()
29 }
30}
31impl GetTransactionInput {
32 pub fn builder() -> crate::operation::get_transaction::builders::GetTransactionInputBuilder {
34 crate::operation::get_transaction::builders::GetTransactionInputBuilder::default()
35 }
36}
37
38#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
40#[non_exhaustive]
41pub struct GetTransactionInputBuilder {
42 pub(crate) transaction_hash: ::std::option::Option<::std::string::String>,
43 pub(crate) transaction_id: ::std::option::Option<::std::string::String>,
44 pub(crate) network: ::std::option::Option<crate::types::QueryNetwork>,
45}
46impl GetTransactionInputBuilder {
47 pub fn transaction_hash(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
49 self.transaction_hash = ::std::option::Option::Some(input.into());
50 self
51 }
52 pub fn set_transaction_hash(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
54 self.transaction_hash = input;
55 self
56 }
57 pub fn get_transaction_hash(&self) -> &::std::option::Option<::std::string::String> {
59 &self.transaction_hash
60 }
61 pub fn transaction_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
65 self.transaction_id = ::std::option::Option::Some(input.into());
66 self
67 }
68 pub fn set_transaction_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
72 self.transaction_id = input;
73 self
74 }
75 pub fn get_transaction_id(&self) -> &::std::option::Option<::std::string::String> {
79 &self.transaction_id
80 }
81 pub fn network(mut self, input: crate::types::QueryNetwork) -> Self {
84 self.network = ::std::option::Option::Some(input);
85 self
86 }
87 pub fn set_network(mut self, input: ::std::option::Option<crate::types::QueryNetwork>) -> Self {
89 self.network = input;
90 self
91 }
92 pub fn get_network(&self) -> &::std::option::Option<crate::types::QueryNetwork> {
94 &self.network
95 }
96 pub fn build(
98 self,
99 ) -> ::std::result::Result<crate::operation::get_transaction::GetTransactionInput, ::aws_smithy_types::error::operation::BuildError> {
100 ::std::result::Result::Ok(crate::operation::get_transaction::GetTransactionInput {
101 transaction_hash: self.transaction_hash,
102 transaction_id: self.transaction_id,
103 network: self.network,
104 })
105 }
106}