aws_sdk_iotsitewise/operation/invoke_assistant/_invoke_assistant_input.rs
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
// 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)]
pub struct InvokeAssistantInput {
/// <p>The ID assigned to a conversation. IoT SiteWise automatically generates a unique ID for you, and this parameter is never required. However, if you prefer to have your own ID, you must specify it here in UUID format. If you specify your own ID, it must be globally unique.</p>
pub conversation_id: ::std::option::Option<::std::string::String>,
/// <p>A text message sent to the SiteWise Assistant by the user.</p>
pub message: ::std::option::Option<::std::string::String>,
/// <p>Specifies if to turn trace on or not. It is used to track the SiteWise Assistant's reasoning, and data access process.</p>
pub enable_trace: ::std::option::Option<bool>,
}
impl InvokeAssistantInput {
/// <p>The ID assigned to a conversation. IoT SiteWise automatically generates a unique ID for you, and this parameter is never required. However, if you prefer to have your own ID, you must specify it here in UUID format. If you specify your own ID, it must be globally unique.</p>
pub fn conversation_id(&self) -> ::std::option::Option<&str> {
self.conversation_id.as_deref()
}
/// <p>A text message sent to the SiteWise Assistant by the user.</p>
pub fn message(&self) -> ::std::option::Option<&str> {
self.message.as_deref()
}
/// <p>Specifies if to turn trace on or not. It is used to track the SiteWise Assistant's reasoning, and data access process.</p>
pub fn enable_trace(&self) -> ::std::option::Option<bool> {
self.enable_trace
}
}
impl ::std::fmt::Debug for InvokeAssistantInput {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("InvokeAssistantInput");
formatter.field("conversation_id", &self.conversation_id);
formatter.field("message", &"*** Sensitive Data Redacted ***");
formatter.field("enable_trace", &self.enable_trace);
formatter.finish()
}
}
impl InvokeAssistantInput {
/// Creates a new builder-style object to manufacture [`InvokeAssistantInput`](crate::operation::invoke_assistant::InvokeAssistantInput).
pub fn builder() -> crate::operation::invoke_assistant::builders::InvokeAssistantInputBuilder {
crate::operation::invoke_assistant::builders::InvokeAssistantInputBuilder::default()
}
}
/// A builder for [`InvokeAssistantInput`](crate::operation::invoke_assistant::InvokeAssistantInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct InvokeAssistantInputBuilder {
pub(crate) conversation_id: ::std::option::Option<::std::string::String>,
pub(crate) message: ::std::option::Option<::std::string::String>,
pub(crate) enable_trace: ::std::option::Option<bool>,
}
impl InvokeAssistantInputBuilder {
/// <p>The ID assigned to a conversation. IoT SiteWise automatically generates a unique ID for you, and this parameter is never required. However, if you prefer to have your own ID, you must specify it here in UUID format. If you specify your own ID, it must be globally unique.</p>
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
}
/// <p>The ID assigned to a conversation. IoT SiteWise automatically generates a unique ID for you, and this parameter is never required. However, if you prefer to have your own ID, you must specify it here in UUID format. If you specify your own ID, it must be globally unique.</p>
pub fn set_conversation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.conversation_id = input;
self
}
/// <p>The ID assigned to a conversation. IoT SiteWise automatically generates a unique ID for you, and this parameter is never required. However, if you prefer to have your own ID, you must specify it here in UUID format. If you specify your own ID, it must be globally unique.</p>
pub fn get_conversation_id(&self) -> &::std::option::Option<::std::string::String> {
&self.conversation_id
}
/// <p>A text message sent to the SiteWise Assistant by the user.</p>
/// This field is required.
pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
self.message = ::std::option::Option::Some(input.into());
self
}
/// <p>A text message sent to the SiteWise Assistant by the user.</p>
pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
self.message = input;
self
}
/// <p>A text message sent to the SiteWise Assistant by the user.</p>
pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
&self.message
}
/// <p>Specifies if to turn trace on or not. It is used to track the SiteWise Assistant's reasoning, and data access process.</p>
pub fn enable_trace(mut self, input: bool) -> Self {
self.enable_trace = ::std::option::Option::Some(input);
self
}
/// <p>Specifies if to turn trace on or not. It is used to track the SiteWise Assistant's reasoning, and data access process.</p>
pub fn set_enable_trace(mut self, input: ::std::option::Option<bool>) -> Self {
self.enable_trace = input;
self
}
/// <p>Specifies if to turn trace on or not. It is used to track the SiteWise Assistant's reasoning, and data access process.</p>
pub fn get_enable_trace(&self) -> &::std::option::Option<bool> {
&self.enable_trace
}
/// Consumes the builder and constructs a [`InvokeAssistantInput`](crate::operation::invoke_assistant::InvokeAssistantInput).
pub fn build(
self,
) -> ::std::result::Result<crate::operation::invoke_assistant::InvokeAssistantInput, ::aws_smithy_types::error::operation::BuildError> {
::std::result::Result::Ok(crate::operation::invoke_assistant::InvokeAssistantInput {
conversation_id: self.conversation_id,
message: self.message,
enable_trace: self.enable_trace,
})
}
}
impl ::std::fmt::Debug for InvokeAssistantInputBuilder {
fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
let mut formatter = f.debug_struct("InvokeAssistantInputBuilder");
formatter.field("conversation_id", &self.conversation_id);
formatter.field("message", &"*** Sensitive Data Redacted ***");
formatter.field("enable_trace", &self.enable_trace);
formatter.finish()
}
}