aws-sdk-budgets 1.47.0

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

/// <p>Request of UpdateNotification</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateNotificationInput {
    /// <p>The <code>accountId</code> that is associated with the budget whose notification you want to update.</p>
    pub account_id: ::std::option::Option<::std::string::String>,
    /// <p>The name of the budget whose notification you want to update.</p>
    pub budget_name: ::std::option::Option<::std::string::String>,
    /// <p>The previous notification that is associated with a budget.</p>
    pub old_notification: ::std::option::Option<crate::types::Notification>,
    /// <p>The updated notification to be associated with a budget.</p>
    pub new_notification: ::std::option::Option<crate::types::Notification>,
}
impl UpdateNotificationInput {
    /// <p>The <code>accountId</code> that is associated with the budget whose notification you want to update.</p>
    pub fn account_id(&self) -> ::std::option::Option<&str> {
        self.account_id.as_deref()
    }
    /// <p>The name of the budget whose notification you want to update.</p>
    pub fn budget_name(&self) -> ::std::option::Option<&str> {
        self.budget_name.as_deref()
    }
    /// <p>The previous notification that is associated with a budget.</p>
    pub fn old_notification(&self) -> ::std::option::Option<&crate::types::Notification> {
        self.old_notification.as_ref()
    }
    /// <p>The updated notification to be associated with a budget.</p>
    pub fn new_notification(&self) -> ::std::option::Option<&crate::types::Notification> {
        self.new_notification.as_ref()
    }
}
impl UpdateNotificationInput {
    /// Creates a new builder-style object to manufacture [`UpdateNotificationInput`](crate::operation::update_notification::UpdateNotificationInput).
    pub fn builder() -> crate::operation::update_notification::builders::UpdateNotificationInputBuilder {
        crate::operation::update_notification::builders::UpdateNotificationInputBuilder::default()
    }
}

/// A builder for [`UpdateNotificationInput`](crate::operation::update_notification::UpdateNotificationInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateNotificationInputBuilder {
    pub(crate) account_id: ::std::option::Option<::std::string::String>,
    pub(crate) budget_name: ::std::option::Option<::std::string::String>,
    pub(crate) old_notification: ::std::option::Option<crate::types::Notification>,
    pub(crate) new_notification: ::std::option::Option<crate::types::Notification>,
}
impl UpdateNotificationInputBuilder {
    /// <p>The <code>accountId</code> that is associated with the budget whose notification you want to update.</p>
    /// This field is required.
    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.account_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The <code>accountId</code> that is associated with the budget whose notification you want to update.</p>
    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.account_id = input;
        self
    }
    /// <p>The <code>accountId</code> that is associated with the budget whose notification you want to update.</p>
    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.account_id
    }
    /// <p>The name of the budget whose notification you want to update.</p>
    /// This field is required.
    pub fn budget_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.budget_name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name of the budget whose notification you want to update.</p>
    pub fn set_budget_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.budget_name = input;
        self
    }
    /// <p>The name of the budget whose notification you want to update.</p>
    pub fn get_budget_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.budget_name
    }
    /// <p>The previous notification that is associated with a budget.</p>
    /// This field is required.
    pub fn old_notification(mut self, input: crate::types::Notification) -> Self {
        self.old_notification = ::std::option::Option::Some(input);
        self
    }
    /// <p>The previous notification that is associated with a budget.</p>
    pub fn set_old_notification(mut self, input: ::std::option::Option<crate::types::Notification>) -> Self {
        self.old_notification = input;
        self
    }
    /// <p>The previous notification that is associated with a budget.</p>
    pub fn get_old_notification(&self) -> &::std::option::Option<crate::types::Notification> {
        &self.old_notification
    }
    /// <p>The updated notification to be associated with a budget.</p>
    /// This field is required.
    pub fn new_notification(mut self, input: crate::types::Notification) -> Self {
        self.new_notification = ::std::option::Option::Some(input);
        self
    }
    /// <p>The updated notification to be associated with a budget.</p>
    pub fn set_new_notification(mut self, input: ::std::option::Option<crate::types::Notification>) -> Self {
        self.new_notification = input;
        self
    }
    /// <p>The updated notification to be associated with a budget.</p>
    pub fn get_new_notification(&self) -> &::std::option::Option<crate::types::Notification> {
        &self.new_notification
    }
    /// Consumes the builder and constructs a [`UpdateNotificationInput`](crate::operation::update_notification::UpdateNotificationInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_notification::UpdateNotificationInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_notification::UpdateNotificationInput {
            account_id: self.account_id,
            budget_name: self.budget_name,
            old_notification: self.old_notification,
            new_notification: self.new_notification,
        })
    }
}