aws_sdk_rdsdata/operation/commit_transaction/
_commit_transaction_input.rs1#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CommitTransactionInput {
7 pub resource_arn: ::std::option::Option<::std::string::String>,
9 pub secret_arn: ::std::option::Option<::std::string::String>,
11 pub transaction_id: ::std::option::Option<::std::string::String>,
13}
14impl CommitTransactionInput {
15 pub fn resource_arn(&self) -> ::std::option::Option<&str> {
17 self.resource_arn.as_deref()
18 }
19 pub fn secret_arn(&self) -> ::std::option::Option<&str> {
21 self.secret_arn.as_deref()
22 }
23 pub fn transaction_id(&self) -> ::std::option::Option<&str> {
25 self.transaction_id.as_deref()
26 }
27}
28impl CommitTransactionInput {
29 pub fn builder() -> crate::operation::commit_transaction::builders::CommitTransactionInputBuilder {
31 crate::operation::commit_transaction::builders::CommitTransactionInputBuilder::default()
32 }
33}
34
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct CommitTransactionInputBuilder {
39 pub(crate) resource_arn: ::std::option::Option<::std::string::String>,
40 pub(crate) secret_arn: ::std::option::Option<::std::string::String>,
41 pub(crate) transaction_id: ::std::option::Option<::std::string::String>,
42}
43impl CommitTransactionInputBuilder {
44 pub fn resource_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
47 self.resource_arn = ::std::option::Option::Some(input.into());
48 self
49 }
50 pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52 self.resource_arn = input;
53 self
54 }
55 pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
57 &self.resource_arn
58 }
59 pub fn secret_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
62 self.secret_arn = ::std::option::Option::Some(input.into());
63 self
64 }
65 pub fn set_secret_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67 self.secret_arn = input;
68 self
69 }
70 pub fn get_secret_arn(&self) -> &::std::option::Option<::std::string::String> {
72 &self.secret_arn
73 }
74 pub fn transaction_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
77 self.transaction_id = ::std::option::Option::Some(input.into());
78 self
79 }
80 pub fn set_transaction_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
82 self.transaction_id = input;
83 self
84 }
85 pub fn get_transaction_id(&self) -> &::std::option::Option<::std::string::String> {
87 &self.transaction_id
88 }
89 pub fn build(
91 self,
92 ) -> ::std::result::Result<crate::operation::commit_transaction::CommitTransactionInput, ::aws_smithy_types::error::operation::BuildError> {
93 ::std::result::Result::Ok(crate::operation::commit_transaction::CommitTransactionInput {
94 resource_arn: self.resource_arn,
95 secret_arn: self.secret_arn,
96 transaction_id: self.transaction_id,
97 })
98 }
99}