aws-sdk-iot 1.112.0

AWS SDK for AWS IoT
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// <p>Configuration.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct Configuration {
    /// <p>True to enable the configuration.</p>
    pub enabled: bool,
}
impl Configuration {
    /// <p>True to enable the configuration.</p>
    pub fn enabled(&self) -> bool {
        self.enabled
    }
}
impl Configuration {
    /// Creates a new builder-style object to manufacture [`Configuration`](crate::types::Configuration).
    pub fn builder() -> crate::types::builders::ConfigurationBuilder {
        crate::types::builders::ConfigurationBuilder::default()
    }
}

/// A builder for [`Configuration`](crate::types::Configuration).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ConfigurationBuilder {
    pub(crate) enabled: ::std::option::Option<bool>,
}
impl ConfigurationBuilder {
    /// <p>True to enable the configuration.</p>
    pub fn enabled(mut self, input: bool) -> Self {
        self.enabled = ::std::option::Option::Some(input);
        self
    }
    /// <p>True to enable the configuration.</p>
    pub fn set_enabled(mut self, input: ::std::option::Option<bool>) -> Self {
        self.enabled = input;
        self
    }
    /// <p>True to enable the configuration.</p>
    pub fn get_enabled(&self) -> &::std::option::Option<bool> {
        &self.enabled
    }
    /// Consumes the builder and constructs a [`Configuration`](crate::types::Configuration).
    pub fn build(self) -> crate::types::Configuration {
        crate::types::Configuration {
            enabled: self.enabled.unwrap_or_default(),
        }
    }
}