aws_sdk_lexmodelsv2/operation/delete_utterances/_delete_utterances_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, ::std::fmt::Debug)]
5pub struct DeleteUtterancesInput {
6 /// <p>The unique identifier of the bot that contains the utterances.</p>
7 pub bot_id: ::std::option::Option<::std::string::String>,
8 /// <p>The identifier of the language and locale where the utterances were collected. The string must match one of the supported locales. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html">Supported languages</a>.</p>
9 pub locale_id: ::std::option::Option<::std::string::String>,
10 /// <p>The unique identifier of the session with the user. The ID is returned in the response from the <a href="https://docs.aws.amazon.com/lexv2/latest/APIReference/API_runtime_RecognizeText.html">RecognizeText</a> and <a href="https://docs.aws.amazon.com/lexv2/latest/APIReference/API_runtime_RecognizeUtterance.html">RecognizeUtterance</a> operations.</p>
11 pub session_id: ::std::option::Option<::std::string::String>,
12}
13impl DeleteUtterancesInput {
14 /// <p>The unique identifier of the bot that contains the utterances.</p>
15 pub fn bot_id(&self) -> ::std::option::Option<&str> {
16 self.bot_id.as_deref()
17 }
18 /// <p>The identifier of the language and locale where the utterances were collected. The string must match one of the supported locales. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html">Supported languages</a>.</p>
19 pub fn locale_id(&self) -> ::std::option::Option<&str> {
20 self.locale_id.as_deref()
21 }
22 /// <p>The unique identifier of the session with the user. The ID is returned in the response from the <a href="https://docs.aws.amazon.com/lexv2/latest/APIReference/API_runtime_RecognizeText.html">RecognizeText</a> and <a href="https://docs.aws.amazon.com/lexv2/latest/APIReference/API_runtime_RecognizeUtterance.html">RecognizeUtterance</a> operations.</p>
23 pub fn session_id(&self) -> ::std::option::Option<&str> {
24 self.session_id.as_deref()
25 }
26}
27impl DeleteUtterancesInput {
28 /// Creates a new builder-style object to manufacture [`DeleteUtterancesInput`](crate::operation::delete_utterances::DeleteUtterancesInput).
29 pub fn builder() -> crate::operation::delete_utterances::builders::DeleteUtterancesInputBuilder {
30 crate::operation::delete_utterances::builders::DeleteUtterancesInputBuilder::default()
31 }
32}
33
34/// A builder for [`DeleteUtterancesInput`](crate::operation::delete_utterances::DeleteUtterancesInput).
35#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
36#[non_exhaustive]
37pub struct DeleteUtterancesInputBuilder {
38 pub(crate) bot_id: ::std::option::Option<::std::string::String>,
39 pub(crate) locale_id: ::std::option::Option<::std::string::String>,
40 pub(crate) session_id: ::std::option::Option<::std::string::String>,
41}
42impl DeleteUtterancesInputBuilder {
43 /// <p>The unique identifier of the bot that contains the utterances.</p>
44 /// This field is required.
45 pub fn bot_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
46 self.bot_id = ::std::option::Option::Some(input.into());
47 self
48 }
49 /// <p>The unique identifier of the bot that contains the utterances.</p>
50 pub fn set_bot_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
51 self.bot_id = input;
52 self
53 }
54 /// <p>The unique identifier of the bot that contains the utterances.</p>
55 pub fn get_bot_id(&self) -> &::std::option::Option<::std::string::String> {
56 &self.bot_id
57 }
58 /// <p>The identifier of the language and locale where the utterances were collected. The string must match one of the supported locales. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html">Supported languages</a>.</p>
59 pub fn locale_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
60 self.locale_id = ::std::option::Option::Some(input.into());
61 self
62 }
63 /// <p>The identifier of the language and locale where the utterances were collected. The string must match one of the supported locales. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html">Supported languages</a>.</p>
64 pub fn set_locale_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
65 self.locale_id = input;
66 self
67 }
68 /// <p>The identifier of the language and locale where the utterances were collected. The string must match one of the supported locales. For more information, see <a href="https://docs.aws.amazon.com/lexv2/latest/dg/how-languages.html">Supported languages</a>.</p>
69 pub fn get_locale_id(&self) -> &::std::option::Option<::std::string::String> {
70 &self.locale_id
71 }
72 /// <p>The unique identifier of the session with the user. The ID is returned in the response from the <a href="https://docs.aws.amazon.com/lexv2/latest/APIReference/API_runtime_RecognizeText.html">RecognizeText</a> and <a href="https://docs.aws.amazon.com/lexv2/latest/APIReference/API_runtime_RecognizeUtterance.html">RecognizeUtterance</a> operations.</p>
73 pub fn session_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
74 self.session_id = ::std::option::Option::Some(input.into());
75 self
76 }
77 /// <p>The unique identifier of the session with the user. The ID is returned in the response from the <a href="https://docs.aws.amazon.com/lexv2/latest/APIReference/API_runtime_RecognizeText.html">RecognizeText</a> and <a href="https://docs.aws.amazon.com/lexv2/latest/APIReference/API_runtime_RecognizeUtterance.html">RecognizeUtterance</a> operations.</p>
78 pub fn set_session_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
79 self.session_id = input;
80 self
81 }
82 /// <p>The unique identifier of the session with the user. The ID is returned in the response from the <a href="https://docs.aws.amazon.com/lexv2/latest/APIReference/API_runtime_RecognizeText.html">RecognizeText</a> and <a href="https://docs.aws.amazon.com/lexv2/latest/APIReference/API_runtime_RecognizeUtterance.html">RecognizeUtterance</a> operations.</p>
83 pub fn get_session_id(&self) -> &::std::option::Option<::std::string::String> {
84 &self.session_id
85 }
86 /// Consumes the builder and constructs a [`DeleteUtterancesInput`](crate::operation::delete_utterances::DeleteUtterancesInput).
87 pub fn build(
88 self,
89 ) -> ::std::result::Result<crate::operation::delete_utterances::DeleteUtterancesInput, ::aws_smithy_types::error::operation::BuildError> {
90 ::std::result::Result::Ok(crate::operation::delete_utterances::DeleteUtterancesInput {
91 bot_id: self.bot_id,
92 locale_id: self.locale_id,
93 session_id: self.session_id,
94 })
95 }
96}