aws-sdk-notifications 1.53.0

AWS SDK for AWS User Notifications
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 GetNotificationEventInput {
    /// <p>The Amazon Resource Name (ARN) of the <code>NotificationEvent</code> to return.</p>
    pub arn: ::std::option::Option<::std::string::String>,
    /// <p>The locale code of the language used for the retrieved <code>NotificationEvent</code>. The default locale is English <code>en_US</code>.</p>
    pub locale: ::std::option::Option<crate::types::LocaleCode>,
}
impl GetNotificationEventInput {
    /// <p>The Amazon Resource Name (ARN) of the <code>NotificationEvent</code> to return.</p>
    pub fn arn(&self) -> ::std::option::Option<&str> {
        self.arn.as_deref()
    }
    /// <p>The locale code of the language used for the retrieved <code>NotificationEvent</code>. The default locale is English <code>en_US</code>.</p>
    pub fn locale(&self) -> ::std::option::Option<&crate::types::LocaleCode> {
        self.locale.as_ref()
    }
}
impl GetNotificationEventInput {
    /// Creates a new builder-style object to manufacture [`GetNotificationEventInput`](crate::operation::get_notification_event::GetNotificationEventInput).
    pub fn builder() -> crate::operation::get_notification_event::builders::GetNotificationEventInputBuilder {
        crate::operation::get_notification_event::builders::GetNotificationEventInputBuilder::default()
    }
}

/// A builder for [`GetNotificationEventInput`](crate::operation::get_notification_event::GetNotificationEventInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetNotificationEventInputBuilder {
    pub(crate) arn: ::std::option::Option<::std::string::String>,
    pub(crate) locale: ::std::option::Option<crate::types::LocaleCode>,
}
impl GetNotificationEventInputBuilder {
    /// <p>The Amazon Resource Name (ARN) of the <code>NotificationEvent</code> to return.</p>
    /// This field is required.
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the <code>NotificationEvent</code> to return.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.arn = input;
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the <code>NotificationEvent</code> to return.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.arn
    }
    /// <p>The locale code of the language used for the retrieved <code>NotificationEvent</code>. The default locale is English <code>en_US</code>.</p>
    pub fn locale(mut self, input: crate::types::LocaleCode) -> Self {
        self.locale = ::std::option::Option::Some(input);
        self
    }
    /// <p>The locale code of the language used for the retrieved <code>NotificationEvent</code>. The default locale is English <code>en_US</code>.</p>
    pub fn set_locale(mut self, input: ::std::option::Option<crate::types::LocaleCode>) -> Self {
        self.locale = input;
        self
    }
    /// <p>The locale code of the language used for the retrieved <code>NotificationEvent</code>. The default locale is English <code>en_US</code>.</p>
    pub fn get_locale(&self) -> &::std::option::Option<crate::types::LocaleCode> {
        &self.locale
    }
    /// Consumes the builder and constructs a [`GetNotificationEventInput`](crate::operation::get_notification_event::GetNotificationEventInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_notification_event::GetNotificationEventInput, ::aws_smithy_types::error::operation::BuildError>
    {
        ::std::result::Result::Ok(crate::operation::get_notification_event::GetNotificationEventInput {
            arn: self.arn,
            locale: self.locale,
        })
    }
}