aws_sdk_qbusiness/operation/chat_sync/
_chat_sync_output.rs1#[allow(missing_docs)] #[non_exhaustive]
4#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
5pub struct ChatSyncOutput {
6 pub conversation_id: ::std::option::Option<::std::string::String>,
8 pub system_message: ::std::option::Option<::std::string::String>,
10 pub system_message_id: ::std::option::Option<::std::string::String>,
12 pub user_message_id: ::std::option::Option<::std::string::String>,
14 pub action_review: ::std::option::Option<crate::types::ActionReview>,
16 pub auth_challenge_request: ::std::option::Option<crate::types::AuthChallengeRequest>,
18 pub source_attributions: ::std::option::Option<::std::vec::Vec<::std::option::Option<crate::types::SourceAttribution>>>,
20 pub failed_attachments: ::std::option::Option<::std::vec::Vec<crate::types::AttachmentOutput>>,
22 _request_id: Option<String>,
23}
24impl ChatSyncOutput {
25 pub fn conversation_id(&self) -> ::std::option::Option<&str> {
27 self.conversation_id.as_deref()
28 }
29 pub fn system_message(&self) -> ::std::option::Option<&str> {
31 self.system_message.as_deref()
32 }
33 pub fn system_message_id(&self) -> ::std::option::Option<&str> {
35 self.system_message_id.as_deref()
36 }
37 pub fn user_message_id(&self) -> ::std::option::Option<&str> {
39 self.user_message_id.as_deref()
40 }
41 pub fn action_review(&self) -> ::std::option::Option<&crate::types::ActionReview> {
43 self.action_review.as_ref()
44 }
45 pub fn auth_challenge_request(&self) -> ::std::option::Option<&crate::types::AuthChallengeRequest> {
47 self.auth_challenge_request.as_ref()
48 }
49 pub fn source_attributions(&self) -> &[::std::option::Option<crate::types::SourceAttribution>] {
53 self.source_attributions.as_deref().unwrap_or_default()
54 }
55 pub fn failed_attachments(&self) -> &[crate::types::AttachmentOutput] {
59 self.failed_attachments.as_deref().unwrap_or_default()
60 }
61}
62impl ::aws_types::request_id::RequestId for ChatSyncOutput {
63 fn request_id(&self) -> Option<&str> {
64 self._request_id.as_deref()
65 }
66}
67impl ChatSyncOutput {
68 pub fn builder() -> crate::operation::chat_sync::builders::ChatSyncOutputBuilder {
70 crate::operation::chat_sync::builders::ChatSyncOutputBuilder::default()
71 }
72}
73
74#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
76#[non_exhaustive]
77pub struct ChatSyncOutputBuilder {
78 pub(crate) conversation_id: ::std::option::Option<::std::string::String>,
79 pub(crate) system_message: ::std::option::Option<::std::string::String>,
80 pub(crate) system_message_id: ::std::option::Option<::std::string::String>,
81 pub(crate) user_message_id: ::std::option::Option<::std::string::String>,
82 pub(crate) action_review: ::std::option::Option<crate::types::ActionReview>,
83 pub(crate) auth_challenge_request: ::std::option::Option<crate::types::AuthChallengeRequest>,
84 pub(crate) source_attributions: ::std::option::Option<::std::vec::Vec<::std::option::Option<crate::types::SourceAttribution>>>,
85 pub(crate) failed_attachments: ::std::option::Option<::std::vec::Vec<crate::types::AttachmentOutput>>,
86 _request_id: Option<String>,
87}
88impl ChatSyncOutputBuilder {
89 pub fn conversation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
91 self.conversation_id = ::std::option::Option::Some(input.into());
92 self
93 }
94 pub fn set_conversation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
96 self.conversation_id = input;
97 self
98 }
99 pub fn get_conversation_id(&self) -> &::std::option::Option<::std::string::String> {
101 &self.conversation_id
102 }
103 pub fn system_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
105 self.system_message = ::std::option::Option::Some(input.into());
106 self
107 }
108 pub fn set_system_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
110 self.system_message = input;
111 self
112 }
113 pub fn get_system_message(&self) -> &::std::option::Option<::std::string::String> {
115 &self.system_message
116 }
117 pub fn system_message_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
119 self.system_message_id = ::std::option::Option::Some(input.into());
120 self
121 }
122 pub fn set_system_message_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
124 self.system_message_id = input;
125 self
126 }
127 pub fn get_system_message_id(&self) -> &::std::option::Option<::std::string::String> {
129 &self.system_message_id
130 }
131 pub fn user_message_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
133 self.user_message_id = ::std::option::Option::Some(input.into());
134 self
135 }
136 pub fn set_user_message_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
138 self.user_message_id = input;
139 self
140 }
141 pub fn get_user_message_id(&self) -> &::std::option::Option<::std::string::String> {
143 &self.user_message_id
144 }
145 pub fn action_review(mut self, input: crate::types::ActionReview) -> Self {
147 self.action_review = ::std::option::Option::Some(input);
148 self
149 }
150 pub fn set_action_review(mut self, input: ::std::option::Option<crate::types::ActionReview>) -> Self {
152 self.action_review = input;
153 self
154 }
155 pub fn get_action_review(&self) -> &::std::option::Option<crate::types::ActionReview> {
157 &self.action_review
158 }
159 pub fn auth_challenge_request(mut self, input: crate::types::AuthChallengeRequest) -> Self {
161 self.auth_challenge_request = ::std::option::Option::Some(input);
162 self
163 }
164 pub fn set_auth_challenge_request(mut self, input: ::std::option::Option<crate::types::AuthChallengeRequest>) -> Self {
166 self.auth_challenge_request = input;
167 self
168 }
169 pub fn get_auth_challenge_request(&self) -> &::std::option::Option<crate::types::AuthChallengeRequest> {
171 &self.auth_challenge_request
172 }
173 pub fn source_attributions(mut self, input: ::std::option::Option<crate::types::SourceAttribution>) -> Self {
179 let mut v = self.source_attributions.unwrap_or_default();
180 v.push(input);
181 self.source_attributions = ::std::option::Option::Some(v);
182 self
183 }
184 pub fn set_source_attributions(
186 mut self,
187 input: ::std::option::Option<::std::vec::Vec<::std::option::Option<crate::types::SourceAttribution>>>,
188 ) -> Self {
189 self.source_attributions = input;
190 self
191 }
192 pub fn get_source_attributions(&self) -> &::std::option::Option<::std::vec::Vec<::std::option::Option<crate::types::SourceAttribution>>> {
194 &self.source_attributions
195 }
196 pub fn failed_attachments(mut self, input: crate::types::AttachmentOutput) -> Self {
202 let mut v = self.failed_attachments.unwrap_or_default();
203 v.push(input);
204 self.failed_attachments = ::std::option::Option::Some(v);
205 self
206 }
207 pub fn set_failed_attachments(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AttachmentOutput>>) -> Self {
209 self.failed_attachments = input;
210 self
211 }
212 pub fn get_failed_attachments(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AttachmentOutput>> {
214 &self.failed_attachments
215 }
216 pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
217 self._request_id = Some(request_id.into());
218 self
219 }
220
221 pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
222 self._request_id = request_id;
223 self
224 }
225 pub fn build(self) -> crate::operation::chat_sync::ChatSyncOutput {
227 crate::operation::chat_sync::ChatSyncOutput {
228 conversation_id: self.conversation_id,
229 system_message: self.system_message,
230 system_message_id: self.system_message_id,
231 user_message_id: self.user_message_id,
232 action_review: self.action_review,
233 auth_challenge_request: self.auth_challenge_request,
234 source_attributions: self.source_attributions,
235 failed_attachments: self.failed_attachments,
236 _request_id: self._request_id,
237 }
238 }
239}