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

/// A builder for [`SendCommandOutput`](crate::operation::send_command::SendCommandOutput).
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct SendCommandOutputBuilder {
    pub(crate) start_session: ::std::option::Option<crate::types::StartSessionResult>,
    pub(crate) start_transaction: ::std::option::Option<crate::types::StartTransactionResult>,
    pub(crate) end_session: ::std::option::Option<crate::types::EndSessionResult>,
    pub(crate) commit_transaction: ::std::option::Option<crate::types::CommitTransactionResult>,
    pub(crate) abort_transaction: ::std::option::Option<crate::types::AbortTransactionResult>,
    pub(crate) execute_statement: ::std::option::Option<crate::types::ExecuteStatementResult>,
    pub(crate) fetch_page: ::std::option::Option<crate::types::FetchPageResult>,
    _request_id: Option<String>,
}
impl SendCommandOutputBuilder {
    /// <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>
    pub fn start_session(mut self, input: crate::types::StartSessionResult) -> Self {
        self.start_session = ::std::option::Option::Some(input);
        self
    }
    /// <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>
    pub fn set_start_session(mut self, input: ::std::option::Option<crate::types::StartSessionResult>) -> Self {
        self.start_session = input;
        self
    }
    /// <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>
    pub fn get_start_session(&self) -> &::std::option::Option<crate::types::StartSessionResult> {
        &self.start_session
    }
    /// <p>Contains the details of the started transaction.</p>
    pub fn start_transaction(mut self, input: crate::types::StartTransactionResult) -> Self {
        self.start_transaction = ::std::option::Option::Some(input);
        self
    }
    /// <p>Contains the details of the started transaction.</p>
    pub fn set_start_transaction(mut self, input: ::std::option::Option<crate::types::StartTransactionResult>) -> Self {
        self.start_transaction = input;
        self
    }
    /// <p>Contains the details of the started transaction.</p>
    pub fn get_start_transaction(&self) -> &::std::option::Option<crate::types::StartTransactionResult> {
        &self.start_transaction
    }
    /// <p>Contains the details of the ended session.</p>
    pub fn end_session(mut self, input: crate::types::EndSessionResult) -> Self {
        self.end_session = ::std::option::Option::Some(input);
        self
    }
    /// <p>Contains the details of the ended session.</p>
    pub fn set_end_session(mut self, input: ::std::option::Option<crate::types::EndSessionResult>) -> Self {
        self.end_session = input;
        self
    }
    /// <p>Contains the details of the ended session.</p>
    pub fn get_end_session(&self) -> &::std::option::Option<crate::types::EndSessionResult> {
        &self.end_session
    }
    /// <p>Contains the details of the committed transaction.</p>
    pub fn commit_transaction(mut self, input: crate::types::CommitTransactionResult) -> Self {
        self.commit_transaction = ::std::option::Option::Some(input);
        self
    }
    /// <p>Contains the details of the committed transaction.</p>
    pub fn set_commit_transaction(mut self, input: ::std::option::Option<crate::types::CommitTransactionResult>) -> Self {
        self.commit_transaction = input;
        self
    }
    /// <p>Contains the details of the committed transaction.</p>
    pub fn get_commit_transaction(&self) -> &::std::option::Option<crate::types::CommitTransactionResult> {
        &self.commit_transaction
    }
    /// <p>Contains the details of the aborted transaction.</p>
    pub fn abort_transaction(mut self, input: crate::types::AbortTransactionResult) -> Self {
        self.abort_transaction = ::std::option::Option::Some(input);
        self
    }
    /// <p>Contains the details of the aborted transaction.</p>
    pub fn set_abort_transaction(mut self, input: ::std::option::Option<crate::types::AbortTransactionResult>) -> Self {
        self.abort_transaction = input;
        self
    }
    /// <p>Contains the details of the aborted transaction.</p>
    pub fn get_abort_transaction(&self) -> &::std::option::Option<crate::types::AbortTransactionResult> {
        &self.abort_transaction
    }
    /// <p>Contains the details of the executed statement.</p>
    pub fn execute_statement(mut self, input: crate::types::ExecuteStatementResult) -> Self {
        self.execute_statement = ::std::option::Option::Some(input);
        self
    }
    /// <p>Contains the details of the executed statement.</p>
    pub fn set_execute_statement(mut self, input: ::std::option::Option<crate::types::ExecuteStatementResult>) -> Self {
        self.execute_statement = input;
        self
    }
    /// <p>Contains the details of the executed statement.</p>
    pub fn get_execute_statement(&self) -> &::std::option::Option<crate::types::ExecuteStatementResult> {
        &self.execute_statement
    }
    /// <p>Contains the details of the fetched page.</p>
    pub fn fetch_page(mut self, input: crate::types::FetchPageResult) -> Self {
        self.fetch_page = ::std::option::Option::Some(input);
        self
    }
    /// <p>Contains the details of the fetched page.</p>
    pub fn set_fetch_page(mut self, input: ::std::option::Option<crate::types::FetchPageResult>) -> Self {
        self.fetch_page = input;
        self
    }
    /// <p>Contains the details of the fetched page.</p>
    pub fn get_fetch_page(&self) -> &::std::option::Option<crate::types::FetchPageResult> {
        &self.fetch_page
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`SendCommandOutput`](crate::operation::send_command::SendCommandOutput).
    pub fn build(self) -> crate::operation::send_command::SendCommandOutput {
        crate::operation::send_command::SendCommandOutput {
            start_session: self.start_session,
            start_transaction: self.start_transaction,
            end_session: self.end_session,
            commit_transaction: self.commit_transaction,
            abort_transaction: self.abort_transaction,
            execute_statement: self.execute_statement,
            fetch_page: self.fetch_page,
            _request_id: self._request_id,
        }
    }
}