aws_sdk_qldbsession/operation/send_command/
_send_command_output.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2#[allow(missing_docs)] // documentation missing in model
3#[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct SendCommandOutput {
6    /// <p>Contains the details of the started session that includes a session token. This <code>SessionToken</code> is required for every subsequent command that is issued during the current session.</p>
7    pub start_session: ::std::option::Option<crate::types::StartSessionResult>,
8    /// <p>Contains the details of the started transaction.</p>
9    pub start_transaction: ::std::option::Option<crate::types::StartTransactionResult>,
10    /// <p>Contains the details of the ended session.</p>
11    pub end_session: ::std::option::Option<crate::types::EndSessionResult>,
12    /// <p>Contains the details of the committed transaction.</p>
13    pub commit_transaction: ::std::option::Option<crate::types::CommitTransactionResult>,
14    /// <p>Contains the details of the aborted transaction.</p>
15    pub abort_transaction: ::std::option::Option<crate::types::AbortTransactionResult>,
16    /// <p>Contains the details of the executed statement.</p>
17    pub execute_statement: ::std::option::Option<crate::types::ExecuteStatementResult>,
18    /// <p>Contains the details of the fetched page.</p>
19    pub fetch_page: ::std::option::Option<crate::types::FetchPageResult>,
20    _request_id: Option<String>,
21}
22impl SendCommandOutput {
23    /// <p>Contains the details of the started session that includes a session token. This <code>SessionToken</code> is required for every subsequent command that is issued during the current session.</p>
24    pub fn start_session(&self) -> ::std::option::Option<&crate::types::StartSessionResult> {
25        self.start_session.as_ref()
26    }
27    /// <p>Contains the details of the started transaction.</p>
28    pub fn start_transaction(&self) -> ::std::option::Option<&crate::types::StartTransactionResult> {
29        self.start_transaction.as_ref()
30    }
31    /// <p>Contains the details of the ended session.</p>
32    pub fn end_session(&self) -> ::std::option::Option<&crate::types::EndSessionResult> {
33        self.end_session.as_ref()
34    }
35    /// <p>Contains the details of the committed transaction.</p>
36    pub fn commit_transaction(&self) -> ::std::option::Option<&crate::types::CommitTransactionResult> {
37        self.commit_transaction.as_ref()
38    }
39    /// <p>Contains the details of the aborted transaction.</p>
40    pub fn abort_transaction(&self) -> ::std::option::Option<&crate::types::AbortTransactionResult> {
41        self.abort_transaction.as_ref()
42    }
43    /// <p>Contains the details of the executed statement.</p>
44    pub fn execute_statement(&self) -> ::std::option::Option<&crate::types::ExecuteStatementResult> {
45        self.execute_statement.as_ref()
46    }
47    /// <p>Contains the details of the fetched page.</p>
48    pub fn fetch_page(&self) -> ::std::option::Option<&crate::types::FetchPageResult> {
49        self.fetch_page.as_ref()
50    }
51}
52impl ::aws_types::request_id::RequestId for SendCommandOutput {
53    fn request_id(&self) -> Option<&str> {
54        self._request_id.as_deref()
55    }
56}
57impl SendCommandOutput {
58    /// Creates a new builder-style object to manufacture [`SendCommandOutput`](crate::operation::send_command::SendCommandOutput).
59    pub fn builder() -> crate::operation::send_command::builders::SendCommandOutputBuilder {
60        crate::operation::send_command::builders::SendCommandOutputBuilder::default()
61    }
62}
63
64/// A builder for [`SendCommandOutput`](crate::operation::send_command::SendCommandOutput).
65#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
66#[non_exhaustive]
67pub struct SendCommandOutputBuilder {
68    pub(crate) start_session: ::std::option::Option<crate::types::StartSessionResult>,
69    pub(crate) start_transaction: ::std::option::Option<crate::types::StartTransactionResult>,
70    pub(crate) end_session: ::std::option::Option<crate::types::EndSessionResult>,
71    pub(crate) commit_transaction: ::std::option::Option<crate::types::CommitTransactionResult>,
72    pub(crate) abort_transaction: ::std::option::Option<crate::types::AbortTransactionResult>,
73    pub(crate) execute_statement: ::std::option::Option<crate::types::ExecuteStatementResult>,
74    pub(crate) fetch_page: ::std::option::Option<crate::types::FetchPageResult>,
75    _request_id: Option<String>,
76}
77impl SendCommandOutputBuilder {
78    /// <p>Contains the details of the started session that includes a session token. This <code>SessionToken</code> is required for every subsequent command that is issued during the current session.</p>
79    pub fn start_session(mut self, input: crate::types::StartSessionResult) -> Self {
80        self.start_session = ::std::option::Option::Some(input);
81        self
82    }
83    /// <p>Contains the details of the started session that includes a session token. This <code>SessionToken</code> is required for every subsequent command that is issued during the current session.</p>
84    pub fn set_start_session(mut self, input: ::std::option::Option<crate::types::StartSessionResult>) -> Self {
85        self.start_session = input;
86        self
87    }
88    /// <p>Contains the details of the started session that includes a session token. This <code>SessionToken</code> is required for every subsequent command that is issued during the current session.</p>
89    pub fn get_start_session(&self) -> &::std::option::Option<crate::types::StartSessionResult> {
90        &self.start_session
91    }
92    /// <p>Contains the details of the started transaction.</p>
93    pub fn start_transaction(mut self, input: crate::types::StartTransactionResult) -> Self {
94        self.start_transaction = ::std::option::Option::Some(input);
95        self
96    }
97    /// <p>Contains the details of the started transaction.</p>
98    pub fn set_start_transaction(mut self, input: ::std::option::Option<crate::types::StartTransactionResult>) -> Self {
99        self.start_transaction = input;
100        self
101    }
102    /// <p>Contains the details of the started transaction.</p>
103    pub fn get_start_transaction(&self) -> &::std::option::Option<crate::types::StartTransactionResult> {
104        &self.start_transaction
105    }
106    /// <p>Contains the details of the ended session.</p>
107    pub fn end_session(mut self, input: crate::types::EndSessionResult) -> Self {
108        self.end_session = ::std::option::Option::Some(input);
109        self
110    }
111    /// <p>Contains the details of the ended session.</p>
112    pub fn set_end_session(mut self, input: ::std::option::Option<crate::types::EndSessionResult>) -> Self {
113        self.end_session = input;
114        self
115    }
116    /// <p>Contains the details of the ended session.</p>
117    pub fn get_end_session(&self) -> &::std::option::Option<crate::types::EndSessionResult> {
118        &self.end_session
119    }
120    /// <p>Contains the details of the committed transaction.</p>
121    pub fn commit_transaction(mut self, input: crate::types::CommitTransactionResult) -> Self {
122        self.commit_transaction = ::std::option::Option::Some(input);
123        self
124    }
125    /// <p>Contains the details of the committed transaction.</p>
126    pub fn set_commit_transaction(mut self, input: ::std::option::Option<crate::types::CommitTransactionResult>) -> Self {
127        self.commit_transaction = input;
128        self
129    }
130    /// <p>Contains the details of the committed transaction.</p>
131    pub fn get_commit_transaction(&self) -> &::std::option::Option<crate::types::CommitTransactionResult> {
132        &self.commit_transaction
133    }
134    /// <p>Contains the details of the aborted transaction.</p>
135    pub fn abort_transaction(mut self, input: crate::types::AbortTransactionResult) -> Self {
136        self.abort_transaction = ::std::option::Option::Some(input);
137        self
138    }
139    /// <p>Contains the details of the aborted transaction.</p>
140    pub fn set_abort_transaction(mut self, input: ::std::option::Option<crate::types::AbortTransactionResult>) -> Self {
141        self.abort_transaction = input;
142        self
143    }
144    /// <p>Contains the details of the aborted transaction.</p>
145    pub fn get_abort_transaction(&self) -> &::std::option::Option<crate::types::AbortTransactionResult> {
146        &self.abort_transaction
147    }
148    /// <p>Contains the details of the executed statement.</p>
149    pub fn execute_statement(mut self, input: crate::types::ExecuteStatementResult) -> Self {
150        self.execute_statement = ::std::option::Option::Some(input);
151        self
152    }
153    /// <p>Contains the details of the executed statement.</p>
154    pub fn set_execute_statement(mut self, input: ::std::option::Option<crate::types::ExecuteStatementResult>) -> Self {
155        self.execute_statement = input;
156        self
157    }
158    /// <p>Contains the details of the executed statement.</p>
159    pub fn get_execute_statement(&self) -> &::std::option::Option<crate::types::ExecuteStatementResult> {
160        &self.execute_statement
161    }
162    /// <p>Contains the details of the fetched page.</p>
163    pub fn fetch_page(mut self, input: crate::types::FetchPageResult) -> Self {
164        self.fetch_page = ::std::option::Option::Some(input);
165        self
166    }
167    /// <p>Contains the details of the fetched page.</p>
168    pub fn set_fetch_page(mut self, input: ::std::option::Option<crate::types::FetchPageResult>) -> Self {
169        self.fetch_page = input;
170        self
171    }
172    /// <p>Contains the details of the fetched page.</p>
173    pub fn get_fetch_page(&self) -> &::std::option::Option<crate::types::FetchPageResult> {
174        &self.fetch_page
175    }
176    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
177        self._request_id = Some(request_id.into());
178        self
179    }
180
181    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
182        self._request_id = request_id;
183        self
184    }
185    /// Consumes the builder and constructs a [`SendCommandOutput`](crate::operation::send_command::SendCommandOutput).
186    pub fn build(self) -> crate::operation::send_command::SendCommandOutput {
187        crate::operation::send_command::SendCommandOutput {
188            start_session: self.start_session,
189            start_transaction: self.start_transaction,
190            end_session: self.end_session,
191            commit_transaction: self.commit_transaction,
192            abort_transaction: self.abort_transaction,
193            execute_statement: self.execute_statement,
194            fetch_page: self.fetch_page,
195            _request_id: self._request_id,
196        }
197    }
198}