aws-sdk-devopsguru 1.98.0

AWS SDK for Amazon DevOps Guru
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 AddNotificationChannelInput {
    /// <p>A <code>NotificationChannelConfig</code> object that specifies what type of notification channel to add. The one supported notification channel is Amazon Simple Notification Service (Amazon SNS).</p>
    pub config: ::std::option::Option<crate::types::NotificationChannelConfig>,
}
impl AddNotificationChannelInput {
    /// <p>A <code>NotificationChannelConfig</code> object that specifies what type of notification channel to add. The one supported notification channel is Amazon Simple Notification Service (Amazon SNS).</p>
    pub fn config(&self) -> ::std::option::Option<&crate::types::NotificationChannelConfig> {
        self.config.as_ref()
    }
}
impl AddNotificationChannelInput {
    /// Creates a new builder-style object to manufacture [`AddNotificationChannelInput`](crate::operation::add_notification_channel::AddNotificationChannelInput).
    pub fn builder() -> crate::operation::add_notification_channel::builders::AddNotificationChannelInputBuilder {
        crate::operation::add_notification_channel::builders::AddNotificationChannelInputBuilder::default()
    }
}

/// A builder for [`AddNotificationChannelInput`](crate::operation::add_notification_channel::AddNotificationChannelInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct AddNotificationChannelInputBuilder {
    pub(crate) config: ::std::option::Option<crate::types::NotificationChannelConfig>,
}
impl AddNotificationChannelInputBuilder {
    /// <p>A <code>NotificationChannelConfig</code> object that specifies what type of notification channel to add. The one supported notification channel is Amazon Simple Notification Service (Amazon SNS).</p>
    /// This field is required.
    pub fn config(mut self, input: crate::types::NotificationChannelConfig) -> Self {
        self.config = ::std::option::Option::Some(input);
        self
    }
    /// <p>A <code>NotificationChannelConfig</code> object that specifies what type of notification channel to add. The one supported notification channel is Amazon Simple Notification Service (Amazon SNS).</p>
    pub fn set_config(mut self, input: ::std::option::Option<crate::types::NotificationChannelConfig>) -> Self {
        self.config = input;
        self
    }
    /// <p>A <code>NotificationChannelConfig</code> object that specifies what type of notification channel to add. The one supported notification channel is Amazon Simple Notification Service (Amazon SNS).</p>
    pub fn get_config(&self) -> &::std::option::Option<crate::types::NotificationChannelConfig> {
        &self.config
    }
    /// Consumes the builder and constructs a [`AddNotificationChannelInput`](crate::operation::add_notification_channel::AddNotificationChannelInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<
        crate::operation::add_notification_channel::AddNotificationChannelInput,
        ::aws_smithy_types::error::operation::BuildError,
    > {
        ::std::result::Result::Ok(crate::operation::add_notification_channel::AddNotificationChannelInput { config: self.config })
    }
}