aws_sdk_iotsitewise/operation/invoke_assistant/
_invoke_assistant_input.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)]
5pub struct InvokeAssistantInput {
6    /// <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>
7    pub conversation_id: ::std::option::Option<::std::string::String>,
8    /// <p>A text message sent to the SiteWise Assistant by the user.</p>
9    pub message: ::std::option::Option<::std::string::String>,
10    /// <p>Specifies if to turn trace on or not. It is used to track the SiteWise Assistant's reasoning, and data access process.</p>
11    pub enable_trace: ::std::option::Option<bool>,
12}
13impl InvokeAssistantInput {
14    /// <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>
15    pub fn conversation_id(&self) -> ::std::option::Option<&str> {
16        self.conversation_id.as_deref()
17    }
18    /// <p>A text message sent to the SiteWise Assistant by the user.</p>
19    pub fn message(&self) -> ::std::option::Option<&str> {
20        self.message.as_deref()
21    }
22    /// <p>Specifies if to turn trace on or not. It is used to track the SiteWise Assistant's reasoning, and data access process.</p>
23    pub fn enable_trace(&self) -> ::std::option::Option<bool> {
24        self.enable_trace
25    }
26}
27impl ::std::fmt::Debug for InvokeAssistantInput {
28    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
29        let mut formatter = f.debug_struct("InvokeAssistantInput");
30        formatter.field("conversation_id", &self.conversation_id);
31        formatter.field("message", &"*** Sensitive Data Redacted ***");
32        formatter.field("enable_trace", &self.enable_trace);
33        formatter.finish()
34    }
35}
36impl InvokeAssistantInput {
37    /// Creates a new builder-style object to manufacture [`InvokeAssistantInput`](crate::operation::invoke_assistant::InvokeAssistantInput).
38    pub fn builder() -> crate::operation::invoke_assistant::builders::InvokeAssistantInputBuilder {
39        crate::operation::invoke_assistant::builders::InvokeAssistantInputBuilder::default()
40    }
41}
42
43/// A builder for [`InvokeAssistantInput`](crate::operation::invoke_assistant::InvokeAssistantInput).
44#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
45#[non_exhaustive]
46pub struct InvokeAssistantInputBuilder {
47    pub(crate) conversation_id: ::std::option::Option<::std::string::String>,
48    pub(crate) message: ::std::option::Option<::std::string::String>,
49    pub(crate) enable_trace: ::std::option::Option<bool>,
50}
51impl InvokeAssistantInputBuilder {
52    /// <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>
53    pub fn conversation_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
54        self.conversation_id = ::std::option::Option::Some(input.into());
55        self
56    }
57    /// <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>
58    pub fn set_conversation_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
59        self.conversation_id = input;
60        self
61    }
62    /// <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>
63    pub fn get_conversation_id(&self) -> &::std::option::Option<::std::string::String> {
64        &self.conversation_id
65    }
66    /// <p>A text message sent to the SiteWise Assistant by the user.</p>
67    /// This field is required.
68    pub fn message(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
69        self.message = ::std::option::Option::Some(input.into());
70        self
71    }
72    /// <p>A text message sent to the SiteWise Assistant by the user.</p>
73    pub fn set_message(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
74        self.message = input;
75        self
76    }
77    /// <p>A text message sent to the SiteWise Assistant by the user.</p>
78    pub fn get_message(&self) -> &::std::option::Option<::std::string::String> {
79        &self.message
80    }
81    /// <p>Specifies if to turn trace on or not. It is used to track the SiteWise Assistant's reasoning, and data access process.</p>
82    pub fn enable_trace(mut self, input: bool) -> Self {
83        self.enable_trace = ::std::option::Option::Some(input);
84        self
85    }
86    /// <p>Specifies if to turn trace on or not. It is used to track the SiteWise Assistant's reasoning, and data access process.</p>
87    pub fn set_enable_trace(mut self, input: ::std::option::Option<bool>) -> Self {
88        self.enable_trace = input;
89        self
90    }
91    /// <p>Specifies if to turn trace on or not. It is used to track the SiteWise Assistant's reasoning, and data access process.</p>
92    pub fn get_enable_trace(&self) -> &::std::option::Option<bool> {
93        &self.enable_trace
94    }
95    /// Consumes the builder and constructs a [`InvokeAssistantInput`](crate::operation::invoke_assistant::InvokeAssistantInput).
96    pub fn build(
97        self,
98    ) -> ::std::result::Result<crate::operation::invoke_assistant::InvokeAssistantInput, ::aws_smithy_types::error::operation::BuildError> {
99        ::std::result::Result::Ok(crate::operation::invoke_assistant::InvokeAssistantInput {
100            conversation_id: self.conversation_id,
101            message: self.message,
102            enable_trace: self.enable_trace,
103        })
104    }
105}
106impl ::std::fmt::Debug for InvokeAssistantInputBuilder {
107    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
108        let mut formatter = f.debug_struct("InvokeAssistantInputBuilder");
109        formatter.field("conversation_id", &self.conversation_id);
110        formatter.field("message", &"*** Sensitive Data Redacted ***");
111        formatter.field("enable_trace", &self.enable_trace);
112        formatter.finish()
113    }
114}