aws_sdk_rdsdata/operation/commit_transaction/
_commit_transaction_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>The request parameters represent the input of a commit transaction request.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct CommitTransactionInput {
7    /// <p>The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.</p>
8    pub resource_arn: ::std::option::Option<::std::string::String>,
9    /// <p>The name or ARN of the secret that enables access to the DB cluster.</p>
10    pub secret_arn: ::std::option::Option<::std::string::String>,
11    /// <p>The identifier of the transaction to end and commit.</p>
12    pub transaction_id: ::std::option::Option<::std::string::String>,
13}
14impl CommitTransactionInput {
15    /// <p>The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.</p>
16    pub fn resource_arn(&self) -> ::std::option::Option<&str> {
17        self.resource_arn.as_deref()
18    }
19    /// <p>The name or ARN of the secret that enables access to the DB cluster.</p>
20    pub fn secret_arn(&self) -> ::std::option::Option<&str> {
21        self.secret_arn.as_deref()
22    }
23    /// <p>The identifier of the transaction to end and commit.</p>
24    pub fn transaction_id(&self) -> ::std::option::Option<&str> {
25        self.transaction_id.as_deref()
26    }
27}
28impl CommitTransactionInput {
29    /// Creates a new builder-style object to manufacture [`CommitTransactionInput`](crate::operation::commit_transaction::CommitTransactionInput).
30    pub fn builder() -> crate::operation::commit_transaction::builders::CommitTransactionInputBuilder {
31        crate::operation::commit_transaction::builders::CommitTransactionInputBuilder::default()
32    }
33}
34
35/// A builder for [`CommitTransactionInput`](crate::operation::commit_transaction::CommitTransactionInput).
36#[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    /// <p>The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.</p>
45    /// This field is required.
46    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    /// <p>The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.</p>
51    pub fn set_resource_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
52        self.resource_arn = input;
53        self
54    }
55    /// <p>The Amazon Resource Name (ARN) of the Aurora Serverless DB cluster.</p>
56    pub fn get_resource_arn(&self) -> &::std::option::Option<::std::string::String> {
57        &self.resource_arn
58    }
59    /// <p>The name or ARN of the secret that enables access to the DB cluster.</p>
60    /// This field is required.
61    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    /// <p>The name or ARN of the secret that enables access to the DB cluster.</p>
66    pub fn set_secret_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
67        self.secret_arn = input;
68        self
69    }
70    /// <p>The name or ARN of the secret that enables access to the DB cluster.</p>
71    pub fn get_secret_arn(&self) -> &::std::option::Option<::std::string::String> {
72        &self.secret_arn
73    }
74    /// <p>The identifier of the transaction to end and commit.</p>
75    /// This field is required.
76    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    /// <p>The identifier of the transaction to end and commit.</p>
81    pub fn set_transaction_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
82        self.transaction_id = input;
83        self
84    }
85    /// <p>The identifier of the transaction to end and commit.</p>
86    pub fn get_transaction_id(&self) -> &::std::option::Option<::std::string::String> {
87        &self.transaction_id
88    }
89    /// Consumes the builder and constructs a [`CommitTransactionInput`](crate::operation::commit_transaction::CommitTransactionInput).
90    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}