1 + | // Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
|
2 + |
|
3 + | /// <p>Contains the details of the committed transaction.</p>
|
4 + | #[non_exhaustive]
|
5 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
|
6 + | pub struct CommitTransactionResult {
|
7 + | /// <p>The transaction ID of the committed transaction.</p>
|
8 + | pub transaction_id: ::std::option::Option<::std::string::String>,
|
9 + | /// <p>The commit digest of the committed transaction.</p>
|
10 + | pub commit_digest: ::std::option::Option<::aws_smithy_types::Blob>,
|
11 + | /// <p>Contains server-side performance information for the command.</p>
|
12 + | pub timing_information: ::std::option::Option<crate::types::TimingInformation>,
|
13 + | /// <p>Contains metrics about the number of I/O requests that were consumed.</p>
|
14 + | pub consumed_ios: ::std::option::Option<crate::types::IoUsage>,
|
15 + | }
|
16 + | impl CommitTransactionResult {
|
17 + | /// <p>The transaction ID of the committed transaction.</p>
|
18 + | pub fn transaction_id(&self) -> ::std::option::Option<&str> {
|
19 + | self.transaction_id.as_deref()
|
20 + | }
|
21 + | /// <p>The commit digest of the committed transaction.</p>
|
22 + | pub fn commit_digest(&self) -> ::std::option::Option<&::aws_smithy_types::Blob> {
|
23 + | self.commit_digest.as_ref()
|
24 + | }
|
25 + | /// <p>Contains server-side performance information for the command.</p>
|
26 + | pub fn timing_information(&self) -> ::std::option::Option<&crate::types::TimingInformation> {
|
27 + | self.timing_information.as_ref()
|
28 + | }
|
29 + | /// <p>Contains metrics about the number of I/O requests that were consumed.</p>
|
30 + | pub fn consumed_ios(&self) -> ::std::option::Option<&crate::types::IoUsage> {
|
31 + | self.consumed_ios.as_ref()
|
32 + | }
|
33 + | }
|
34 + | impl CommitTransactionResult {
|
35 + | /// Creates a new builder-style object to manufacture [`CommitTransactionResult`](crate::types::CommitTransactionResult).
|
36 + | pub fn builder() -> crate::types::builders::CommitTransactionResultBuilder {
|
37 + | crate::types::builders::CommitTransactionResultBuilder::default()
|
38 + | }
|
39 + | }
|
40 + |
|
41 + | /// A builder for [`CommitTransactionResult`](crate::types::CommitTransactionResult).
|
42 + | #[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
|
43 + | #[non_exhaustive]
|
44 + | pub struct CommitTransactionResultBuilder {
|
45 + | pub(crate) transaction_id: ::std::option::Option<::std::string::String>,
|
46 + | pub(crate) commit_digest: ::std::option::Option<::aws_smithy_types::Blob>,
|
47 + | pub(crate) timing_information: ::std::option::Option<crate::types::TimingInformation>,
|
48 + | pub(crate) consumed_ios: ::std::option::Option<crate::types::IoUsage>,
|
49 + | }
|
50 + | impl CommitTransactionResultBuilder {
|
51 + | /// <p>The transaction ID of the committed transaction.</p>
|
52 + | pub fn transaction_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
|
53 + | self.transaction_id = ::std::option::Option::Some(input.into());
|
54 + | self
|
55 + | }
|
56 + | /// <p>The transaction ID of the committed transaction.</p>
|
57 + | pub fn set_transaction_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
|
58 + | self.transaction_id = input;
|
59 + | self
|
60 + | }
|
61 + | /// <p>The transaction ID of the committed transaction.</p>
|
62 + | pub fn get_transaction_id(&self) -> &::std::option::Option<::std::string::String> {
|
63 + | &self.transaction_id
|
64 + | }
|
65 + | /// <p>The commit digest of the committed transaction.</p>
|
66 + | pub fn commit_digest(mut self, input: ::aws_smithy_types::Blob) -> Self {
|
67 + | self.commit_digest = ::std::option::Option::Some(input);
|
68 + | self
|
69 + | }
|
70 + | /// <p>The commit digest of the committed transaction.</p>
|
71 + | pub fn set_commit_digest(mut self, input: ::std::option::Option<::aws_smithy_types::Blob>) -> Self {
|
72 + | self.commit_digest = input;
|
73 + | self
|
74 + | }
|
75 + | /// <p>The commit digest of the committed transaction.</p>
|
76 + | pub fn get_commit_digest(&self) -> &::std::option::Option<::aws_smithy_types::Blob> {
|
77 + | &self.commit_digest
|
78 + | }
|
79 + | /// <p>Contains server-side performance information for the command.</p>
|
80 + | pub fn timing_information(mut self, input: crate::types::TimingInformation) -> Self {
|
81 + | self.timing_information = ::std::option::Option::Some(input);
|
82 + | self
|
83 + | }
|
84 + | /// <p>Contains server-side performance information for the command.</p>
|
85 + | pub fn set_timing_information(mut self, input: ::std::option::Option<crate::types::TimingInformation>) -> Self {
|
86 + | self.timing_information = input;
|
87 + | self
|
88 + | }
|
89 + | /// <p>Contains server-side performance information for the command.</p>
|
90 + | pub fn get_timing_information(&self) -> &::std::option::Option<crate::types::TimingInformation> {
|
91 + | &self.timing_information
|
92 + | }
|
93 + | /// <p>Contains metrics about the number of I/O requests that were consumed.</p>
|
94 + | pub fn consumed_ios(mut self, input: crate::types::IoUsage) -> Self {
|
95 + | self.consumed_ios = ::std::option::Option::Some(input);
|
96 + | self
|
97 + | }
|
98 + | /// <p>Contains metrics about the number of I/O requests that were consumed.</p>
|
99 + | pub fn set_consumed_ios(mut self, input: ::std::option::Option<crate::types::IoUsage>) -> Self {
|
100 + | self.consumed_ios = input;
|
101 + | self
|
102 + | }
|
103 + | /// <p>Contains metrics about the number of I/O requests that were consumed.</p>
|
104 + | pub fn get_consumed_ios(&self) -> &::std::option::Option<crate::types::IoUsage> {
|
105 + | &self.consumed_ios
|
106 + | }
|
107 + | /// Consumes the builder and constructs a [`CommitTransactionResult`](crate::types::CommitTransactionResult).
|
108 + | pub fn build(self) -> crate::types::CommitTransactionResult {
|
109 + | crate::types::CommitTransactionResult {
|
110 + | transaction_id: self.transaction_id,
|
111 + | commit_digest: self.commit_digest,
|
112 + | timing_information: self.timing_information,
|
113 + | consumed_ios: self.consumed_ios,
|
114 + | }
|
115 + | }
|
116 + | }
|