aws-sdk-budgets 1.85.0

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

/// <p>Request of UpdateBudget</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct UpdateBudgetInput {
    /// <p>The <code>accountId</code> that is associated with the budget that you want to update.</p>
    pub account_id: ::std::option::Option<::std::string::String>,
    /// <p>The budget that you want to update your budget to.</p>
    pub new_budget: ::std::option::Option<crate::types::Budget>,
}
impl UpdateBudgetInput {
    /// <p>The <code>accountId</code> that is associated with the budget that you want to update.</p>
    pub fn account_id(&self) -> ::std::option::Option<&str> {
        self.account_id.as_deref()
    }
    /// <p>The budget that you want to update your budget to.</p>
    pub fn new_budget(&self) -> ::std::option::Option<&crate::types::Budget> {
        self.new_budget.as_ref()
    }
}
impl UpdateBudgetInput {
    /// Creates a new builder-style object to manufacture [`UpdateBudgetInput`](crate::operation::update_budget::UpdateBudgetInput).
    pub fn builder() -> crate::operation::update_budget::builders::UpdateBudgetInputBuilder {
        crate::operation::update_budget::builders::UpdateBudgetInputBuilder::default()
    }
}

/// A builder for [`UpdateBudgetInput`](crate::operation::update_budget::UpdateBudgetInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct UpdateBudgetInputBuilder {
    pub(crate) account_id: ::std::option::Option<::std::string::String>,
    pub(crate) new_budget: ::std::option::Option<crate::types::Budget>,
}
impl UpdateBudgetInputBuilder {
    /// <p>The <code>accountId</code> that is associated with the budget that 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 that 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 that you want to update.</p>
    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.account_id
    }
    /// <p>The budget that you want to update your budget to.</p>
    /// This field is required.
    pub fn new_budget(mut self, input: crate::types::Budget) -> Self {
        self.new_budget = ::std::option::Option::Some(input);
        self
    }
    /// <p>The budget that you want to update your budget to.</p>
    pub fn set_new_budget(mut self, input: ::std::option::Option<crate::types::Budget>) -> Self {
        self.new_budget = input;
        self
    }
    /// <p>The budget that you want to update your budget to.</p>
    pub fn get_new_budget(&self) -> &::std::option::Option<crate::types::Budget> {
        &self.new_budget
    }
    /// Consumes the builder and constructs a [`UpdateBudgetInput`](crate::operation::update_budget::UpdateBudgetInput).
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::update_budget::UpdateBudgetInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::update_budget::UpdateBudgetInput {
            account_id: self.account_id,
            new_budget: self.new_budget,
        })
    }
}