#[allow(missing_docs)] #[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ChatSyncOutput {
pub conversation_id: ::std::option::Option<::std::string::String>,
pub system_message: ::std::option::Option<::std::string::String>,
pub system_message_id: ::std::option::Option<::std::string::String>,
pub user_message_id: ::std::option::Option<::std::string::String>,
pub action_review: ::std::option::Option<crate::types::ActionReview>,
pub source_attributions: ::std::option::Option<::std::vec::Vec<::std::option::Option<crate::types::SourceAttribution>>>,
pub failed_attachments: ::std::option::Option<::std::vec::Vec<crate::types::AttachmentOutput>>,
_request_id: Option<String>,
}
impl ChatSyncOutput {
pub fn conversation_id(&self) -> ::std::option::Option<&str> {
self.conversation_id.as_deref()
}
pub fn system_message(&self) -> ::std::option::Option<&str> {
self.system_message.as_deref()
}
pub fn system_message_id(&self) -> ::std::option::Option<&str> {
self.system_message_id.as_deref()
}
pub fn user_message_id(&self) -> ::std::option::Option<&str> {
self.user_message_id.as_deref()
}
pub fn action_review(&self) -> ::std::option::Option<&crate::types::ActionReview> {
self.action_review.as_ref()
}
pub fn source_attributions(&self) -> &[::std::option::Option<crate::types::SourceAttribution>] {
self.source_attributions.as_deref().unwrap_or_default()
}
pub fn failed_attachments(&self) -> &[crate::types::AttachmentOutput] {
self.failed_attachments.as_deref().unwrap_or_default()
}
}
impl ::aws_types::request_id::RequestId for ChatSyncOutput {
fn request_id(&self) -> Option<&str> {
self._request_id.as_deref()
}
}
impl ChatSyncOutput {
pub fn builder() -> crate::operation::chat_sync::builders::ChatSyncOutputBuilder {
crate::operation::chat_sync::builders::ChatSyncOutputBuilder::default()
}
}
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
pub struct ChatSyncOutputBuilder {
pub(crate) conversation_id: ::std::option::Option<::std::string::String>,
pub(crate) system_message: ::std::option::Option<::std::string::String>,
pub(crate) system_message_id: ::std::option::Option<::std::string::String>,
pub(crate) user_message_id: ::std::option::Option<::std::string::String>,
pub(crate) action_review: ::std::option::Option<crate::types::ActionReview>,
pub(crate) source_attributions: ::std::option::Option<::std::vec::Vec<::std::option::Option<crate::types::SourceAttribution>>>,
pub(crate) failed_attachments: ::std::option::Option<::std::vec::Vec<crate::types::AttachmentOutput>>,
_request_id: Option<String>,
}
impl ChatSyncOutputBuilder {
pub fn conversation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.conversation_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_conversation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.conversation_id = input;
self
}
pub fn get_conversation_id(&self) -> &::std::option::Option<::std::string::String> {
&self.conversation_id
}
pub fn system_message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.system_message = ::std::option::Option::Some(input.into());
self
}
pub fn set_system_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.system_message = input;
self
}
pub fn get_system_message(&self) -> &::std::option::Option<::std::string::String> {
&self.system_message
}
pub fn system_message_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.system_message_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_system_message_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.system_message_id = input;
self
}
pub fn get_system_message_id(&self) -> &::std::option::Option<::std::string::String> {
&self.system_message_id
}
pub fn user_message_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.user_message_id = ::std::option::Option::Some(input.into());
self
}
pub fn set_user_message_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.user_message_id = input;
self
}
pub fn get_user_message_id(&self) -> &::std::option::Option<::std::string::String> {
&self.user_message_id
}
pub fn action_review(mut self, input: crate::types::ActionReview) -> Self {
self.action_review = ::std::option::Option::Some(input);
self
}
pub fn set_action_review(mut self, input: ::std::option::Option<crate::types::ActionReview>) -> Self {
self.action_review = input;
self
}
pub fn get_action_review(&self) -> &::std::option::Option<crate::types::ActionReview> {
&self.action_review
}
pub fn source_attributions(mut self, input: ::std::option::Option<crate::types::SourceAttribution>) -> Self {
let mut v = self.source_attributions.unwrap_or_default();
v.push(input);
self.source_attributions = ::std::option::Option::Some(v);
self
}
pub fn set_source_attributions(
mut self,
input: ::std::option::Option<::std::vec::Vec<::std::option::Option<crate::types::SourceAttribution>>>,
) -> Self {
self.source_attributions = input;
self
}
pub fn get_source_attributions(&self) -> &::std::option::Option<::std::vec::Vec<::std::option::Option<crate::types::SourceAttribution>>> {
&self.source_attributions
}
pub fn failed_attachments(mut self, input: crate::types::AttachmentOutput) -> Self {
let mut v = self.failed_attachments.unwrap_or_default();
v.push(input);
self.failed_attachments = ::std::option::Option::Some(v);
self
}
pub fn set_failed_attachments(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::AttachmentOutput>>) -> Self {
self.failed_attachments = input;
self
}
pub fn get_failed_attachments(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::AttachmentOutput>> {
&self.failed_attachments
}
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
}
pub fn build(self) -> crate::operation::chat_sync::ChatSyncOutput {
crate::operation::chat_sync::ChatSyncOutput {
conversation_id: self.conversation_id,
system_message: self.system_message,
system_message_id: self.system_message_id,
user_message_id: self.user_message_id,
action_review: self.action_review,
source_attributions: self.source_attributions,
failed_attachments: self.failed_attachments,
_request_id: self._request_id,
}
}
}