aws-sdk-iotmanagedintegrations 1.42.0

AWS SDK for Managed integrations for AWS IoT Device Management
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)]
pub struct CreateNotificationConfigurationInput {
    /// <p>The type of event triggering a device notification to the customer-managed destination.</p>
    pub event_type: ::std::option::Option<crate::types::EventType>,
    /// <p>The name of the destination for the notification configuration.</p>
    pub destination_name: ::std::option::Option<::std::string::String>,
    /// <p>An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.</p>
    pub client_token: ::std::option::Option<::std::string::String>,
    /// <p>A set of key/value pairs that are used to manage the notification configuration.</p>
    #[deprecated(note = "Tags has been deprecated from this api", since = "06-25-2025")]
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateNotificationConfigurationInput {
    /// <p>The type of event triggering a device notification to the customer-managed destination.</p>
    pub fn event_type(&self) -> ::std::option::Option<&crate::types::EventType> {
        self.event_type.as_ref()
    }
    /// <p>The name of the destination for the notification configuration.</p>
    pub fn destination_name(&self) -> ::std::option::Option<&str> {
        self.destination_name.as_deref()
    }
    /// <p>An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.</p>
    pub fn client_token(&self) -> ::std::option::Option<&str> {
        self.client_token.as_deref()
    }
    /// <p>A set of key/value pairs that are used to manage the notification configuration.</p>
    #[deprecated(note = "Tags has been deprecated from this api", since = "06-25-2025")]
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl ::std::fmt::Debug for CreateNotificationConfigurationInput {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateNotificationConfigurationInput");
        formatter.field("event_type", &self.event_type);
        formatter.field("destination_name", &self.destination_name);
        formatter.field("client_token", &self.client_token);
        formatter.field("tags", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}
impl CreateNotificationConfigurationInput {
    /// Creates a new builder-style object to manufacture [`CreateNotificationConfigurationInput`](crate::operation::create_notification_configuration::CreateNotificationConfigurationInput).
    pub fn builder() -> crate::operation::create_notification_configuration::builders::CreateNotificationConfigurationInputBuilder {
        crate::operation::create_notification_configuration::builders::CreateNotificationConfigurationInputBuilder::default()
    }
}

/// A builder for [`CreateNotificationConfigurationInput`](crate::operation::create_notification_configuration::CreateNotificationConfigurationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default)]
#[non_exhaustive]
pub struct CreateNotificationConfigurationInputBuilder {
    pub(crate) event_type: ::std::option::Option<crate::types::EventType>,
    pub(crate) destination_name: ::std::option::Option<::std::string::String>,
    pub(crate) client_token: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
}
impl CreateNotificationConfigurationInputBuilder {
    /// <p>The type of event triggering a device notification to the customer-managed destination.</p>
    /// This field is required.
    pub fn event_type(mut self, input: crate::types::EventType) -> Self {
        self.event_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The type of event triggering a device notification to the customer-managed destination.</p>
    pub fn set_event_type(mut self, input: ::std::option::Option<crate::types::EventType>) -> Self {
        self.event_type = input;
        self
    }
    /// <p>The type of event triggering a device notification to the customer-managed destination.</p>
    pub fn get_event_type(&self) -> &::std::option::Option<crate::types::EventType> {
        &self.event_type
    }
    /// <p>The name of the destination for the notification configuration.</p>
    /// This field is required.
    pub fn destination_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.destination_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the destination for the notification configuration.</p>
    pub fn set_destination_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.destination_name = input;
        self
    }
    /// <p>The name of the destination for the notification configuration.</p>
    pub fn get_destination_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.destination_name
    }
    /// <p>An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.</p>
    pub fn client_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.client_token = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.</p>
    pub fn set_client_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.client_token = input;
        self
    }
    /// <p>An idempotency token. If you retry a request that completed successfully initially using the same client token and parameters, then the retry attempt will succeed without performing any further actions.</p>
    pub fn get_client_token(&self) -> &::std::option::Option<::std::string::String> {
        &self.client_token
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// <p>A set of key/value pairs that are used to manage the notification configuration.</p>
    #[deprecated(note = "Tags has been deprecated from this api", since = "06-25-2025")]
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// <p>A set of key/value pairs that are used to manage the notification configuration.</p>
    #[deprecated(note = "Tags has been deprecated from this api", since = "06-25-2025")]
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// <p>A set of key/value pairs that are used to manage the notification configuration.</p>
    #[deprecated(note = "Tags has been deprecated from this api", since = "06-25-2025")]
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    /// Consumes the builder and constructs a [`CreateNotificationConfigurationInput`](crate::operation::create_notification_configuration::CreateNotificationConfigurationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::create_notification_configuration::CreateNotificationConfigurationInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(
            crate::operation::create_notification_configuration::CreateNotificationConfigurationInput {
                event_type: self.event_type,
                destination_name: self.destination_name,
                client_token: self.client_token,
                tags: self.tags,
            },
        )
    }
}
impl ::std::fmt::Debug for CreateNotificationConfigurationInputBuilder {
    fn fmt(&self, f: &mut ::std::fmt::Formatter<'_>) -> ::std::fmt::Result {
        let mut formatter = f.debug_struct("CreateNotificationConfigurationInputBuilder");
        formatter.field("event_type", &self.event_type);
        formatter.field("destination_name", &self.destination_name);
        formatter.field("client_token", &self.client_token);
        formatter.field("tags", &"*** Sensitive Data Redacted ***");
        formatter.finish()
    }
}