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.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateEventConfigurationsInput {
    /// <p>The new event configuration values.</p>
    pub event_configurations: ::std::option::Option<::std::collections::HashMap<crate::types::EventType, crate::types::Configuration>>,
}
impl UpdateEventConfigurationsInput {
    /// <p>The new event configuration values.</p>
    pub fn event_configurations(&self) -> ::std::option::Option<&::std::collections::HashMap<crate::types::EventType, crate::types::Configuration>> {
        self.event_configurations.as_ref()
    }
}
impl UpdateEventConfigurationsInput {
    /// Creates a new builder-style object to manufacture [`UpdateEventConfigurationsInput`](crate::operation::update_event_configurations::UpdateEventConfigurationsInput).
    pub fn builder() -> crate::operation::update_event_configurations::builders::UpdateEventConfigurationsInputBuilder {
        crate::operation::update_event_configurations::builders::UpdateEventConfigurationsInputBuilder::default()
    }
}

/// A builder for [`UpdateEventConfigurationsInput`](crate::operation::update_event_configurations::UpdateEventConfigurationsInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateEventConfigurationsInputBuilder {
    pub(crate) event_configurations: ::std::option::Option<::std::collections::HashMap<crate::types::EventType, crate::types::Configuration>>,
}
impl UpdateEventConfigurationsInputBuilder {
    /// Adds a key-value pair to `event_configurations`.
    ///
    /// To override the contents of this collection use [`set_event_configurations`](Self::set_event_configurations).
    ///
    /// <p>The new event configuration values.</p>
    pub fn event_configurations(mut self, k: crate::types::EventType, v: crate::types::Configuration) -> Self {
        let mut hash_map = self.event_configurations.unwrap_or_default();
        hash_map.insert(k, v);
        self.event_configurations = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>The new event configuration values.</p>
    pub fn set_event_configurations(
        mut self,
        input: ::std::option::Option<::std::collections::HashMap<crate::types::EventType, crate::types::Configuration>>,
    ) -> Self {
        self.event_configurations = input;
        self
    }
    /// <p>The new event configuration values.</p>
    pub fn get_event_configurations(
        &self,
    ) -> &::std::option::Option<::std::collections::HashMap<crate::types::EventType, crate::types::Configuration>> {
        &self.event_configurations
    }
    /// Consumes the builder and constructs a [`UpdateEventConfigurationsInput`](crate::operation::update_event_configurations::UpdateEventConfigurationsInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::update_event_configurations::UpdateEventConfigurationsInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::update_event_configurations::UpdateEventConfigurationsInput {
            event_configurations: self.event_configurations,
        })
    }
}