aws_sdk_lexmodelsv2/types/
_dialog_code_hook_settings.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Settings that determine the Lambda function that Amazon Lex uses for processing user responses.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct DialogCodeHookSettings {
7    /// <p>Enables the dialog code hook so that it processes user requests.</p>
8    pub enabled: bool,
9}
10impl DialogCodeHookSettings {
11    /// <p>Enables the dialog code hook so that it processes user requests.</p>
12    pub fn enabled(&self) -> bool {
13        self.enabled
14    }
15}
16impl DialogCodeHookSettings {
17    /// Creates a new builder-style object to manufacture [`DialogCodeHookSettings`](crate::types::DialogCodeHookSettings).
18    pub fn builder() -> crate::types::builders::DialogCodeHookSettingsBuilder {
19        crate::types::builders::DialogCodeHookSettingsBuilder::default()
20    }
21}
22
23/// A builder for [`DialogCodeHookSettings`](crate::types::DialogCodeHookSettings).
24#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
25#[non_exhaustive]
26pub struct DialogCodeHookSettingsBuilder {
27    pub(crate) enabled: ::std::option::Option<bool>,
28}
29impl DialogCodeHookSettingsBuilder {
30    /// <p>Enables the dialog code hook so that it processes user requests.</p>
31    /// This field is required.
32    pub fn enabled(mut self, input: bool) -> Self {
33        self.enabled = ::std::option::Option::Some(input);
34        self
35    }
36    /// <p>Enables the dialog code hook so that it processes user requests.</p>
37    pub fn set_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
38        self.enabled = input;
39        self
40    }
41    /// <p>Enables the dialog code hook so that it processes user requests.</p>
42    pub fn get_enabled(&self) -> &::std::option::Option<bool> {
43        &self.enabled
44    }
45    /// Consumes the builder and constructs a [`DialogCodeHookSettings`](crate::types::DialogCodeHookSettings).
46    pub fn build(self) -> crate::types::DialogCodeHookSettings {
47        crate::types::DialogCodeHookSettings {
48            enabled: self.enabled.unwrap_or_default(),
49        }
50    }
51}