Skip to main content

aws_sdk_lexmodelsv2/types/
_audio_log_setting.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Settings for logging audio of conversations between Amazon Lex and a user. You specify whether to log audio and the Amazon S3 bucket where the audio file is stored.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct AudioLogSetting {
7    /// <p>Determines whether audio logging in enabled for the bot.</p>
8    pub enabled: bool,
9    /// <p>The location of audio log files collected when conversation logging is enabled for a bot.</p>
10    pub destination: ::std::option::Option<crate::types::AudioLogDestination>,
11    /// <p>The option to enable selective conversation log capture for audio.</p>
12    pub selective_logging_enabled: ::std::option::Option<bool>,
13}
14impl AudioLogSetting {
15    /// <p>Determines whether audio logging in enabled for the bot.</p>
16    pub fn enabled(&self) -> bool {
17        self.enabled
18    }
19    /// <p>The location of audio log files collected when conversation logging is enabled for a bot.</p>
20    pub fn destination(&self) -> ::std::option::Option<&crate::types::AudioLogDestination> {
21        self.destination.as_ref()
22    }
23    /// <p>The option to enable selective conversation log capture for audio.</p>
24    pub fn selective_logging_enabled(&self) -> ::std::option::Option<bool> {
25        self.selective_logging_enabled
26    }
27}
28impl AudioLogSetting {
29    /// Creates a new builder-style object to manufacture [`AudioLogSetting`](crate::types::AudioLogSetting).
30    pub fn builder() -> crate::types::builders::AudioLogSettingBuilder {
31        crate::types::builders::AudioLogSettingBuilder::default()
32    }
33}
34
35/// A builder for [`AudioLogSetting`](crate::types::AudioLogSetting).
36#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
37#[non_exhaustive]
38pub struct AudioLogSettingBuilder {
39    pub(crate) enabled: ::std::option::Option<bool>,
40    pub(crate) destination: ::std::option::Option<crate::types::AudioLogDestination>,
41    pub(crate) selective_logging_enabled: ::std::option::Option<bool>,
42}
43impl AudioLogSettingBuilder {
44    /// <p>Determines whether audio logging in enabled for the bot.</p>
45    /// This field is required.
46    pub fn enabled(mut self, input: bool) -> Self {
47        self.enabled = ::std::option::Option::Some(input);
48        self
49    }
50    /// <p>Determines whether audio logging in enabled for the bot.</p>
51    pub fn set_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
52        self.enabled = input;
53        self
54    }
55    /// <p>Determines whether audio logging in enabled for the bot.</p>
56    pub fn get_enabled(&self) -> &::std::option::Option<bool> {
57        &self.enabled
58    }
59    /// <p>The location of audio log files collected when conversation logging is enabled for a bot.</p>
60    /// This field is required.
61    pub fn destination(mut self, input: crate::types::AudioLogDestination) -> Self {
62        self.destination = ::std::option::Option::Some(input);
63        self
64    }
65    /// <p>The location of audio log files collected when conversation logging is enabled for a bot.</p>
66    pub fn set_destination(mut self, input: ::std::option::Option<crate::types::AudioLogDestination>) -> Self {
67        self.destination = input;
68        self
69    }
70    /// <p>The location of audio log files collected when conversation logging is enabled for a bot.</p>
71    pub fn get_destination(&self) -> &::std::option::Option<crate::types::AudioLogDestination> {
72        &self.destination
73    }
74    /// <p>The option to enable selective conversation log capture for audio.</p>
75    pub fn selective_logging_enabled(mut self, input: bool) -> Self {
76        self.selective_logging_enabled = ::std::option::Option::Some(input);
77        self
78    }
79    /// <p>The option to enable selective conversation log capture for audio.</p>
80    pub fn set_selective_logging_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
81        self.selective_logging_enabled = input;
82        self
83    }
84    /// <p>The option to enable selective conversation log capture for audio.</p>
85    pub fn get_selective_logging_enabled(&self) -> &::std::option::Option<bool> {
86        &self.selective_logging_enabled
87    }
88    /// Consumes the builder and constructs a [`AudioLogSetting`](crate::types::AudioLogSetting).
89    pub fn build(self) -> crate::types::AudioLogSetting {
90        crate::types::AudioLogSetting {
91            enabled: self.enabled.unwrap_or_default(),
92            destination: self.destination,
93            selective_logging_enabled: self.selective_logging_enabled,
94        }
95    }
96}