aws-sdk-budgets 1.102.0

AWS SDK for AWS Budgets
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::describe_budget::_describe_budget_output::DescribeBudgetOutputBuilder;

pub use crate::operation::describe_budget::_describe_budget_input::DescribeBudgetInputBuilder;

impl crate::operation::describe_budget::builders::DescribeBudgetInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::describe_budget::DescribeBudgetOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::describe_budget::DescribeBudgetError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.describe_budget();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `DescribeBudget`.
///
/// <p>Describes a budget.</p><important>
/// <p>The Request Syntax section shows the <code>BudgetLimit</code> syntax. For <code>PlannedBudgetLimits</code>, see the <a href="https://docs.aws.amazon.com/aws-cost-management/latest/APIReference/API_budgets_DescribeBudget.html#API_DescribeBudget_Examples">Examples</a> section.</p>
/// </important>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct DescribeBudgetFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::describe_budget::builders::DescribeBudgetInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::describe_budget::DescribeBudgetOutput,
        crate::operation::describe_budget::DescribeBudgetError,
    > for DescribeBudgetFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::describe_budget::DescribeBudgetOutput,
            crate::operation::describe_budget::DescribeBudgetError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl DescribeBudgetFluentBuilder {
    /// Creates a new `DescribeBudgetFluentBuilder`.
    pub(crate) fn new(handle: ::std::sync::Arc<crate::client::Handle>) -> Self {
        Self {
            handle,
            inner: ::std::default::Default::default(),
            config_override: ::std::option::Option::None,
        }
    }
    /// Access the DescribeBudget as a reference.
    pub fn as_input(&self) -> &crate::operation::describe_budget::builders::DescribeBudgetInputBuilder {
        &self.inner
    }
    /// Sends the request and returns the response.
    ///
    /// If an error occurs, an `SdkError` will be returned with additional details that
    /// can be matched against.
    ///
    /// By default, any retryable failures will be retried twice. Retry behavior
    /// is configurable with the [RetryConfig](aws_smithy_types::retry::RetryConfig), which can be
    /// set when configuring the client.
    pub async fn send(
        self,
    ) -> ::std::result::Result<
        crate::operation::describe_budget::DescribeBudgetOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::describe_budget::DescribeBudgetError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let input = self
            .inner
            .build()
            .map_err(::aws_smithy_runtime_api::client::result::SdkError::construction_failure)?;
        let runtime_plugins = crate::operation::describe_budget::DescribeBudget::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::describe_budget::DescribeBudget::orchestrate(&runtime_plugins, input).await
    }

    /// Consumes this builder, creating a customizable operation that can be modified before being sent.
    pub fn customize(
        self,
    ) -> crate::client::customize::CustomizableOperation<
        crate::operation::describe_budget::DescribeBudgetOutput,
        crate::operation::describe_budget::DescribeBudgetError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl ::std::convert::Into<crate::config::Builder>) -> Self {
        self.set_config_override(::std::option::Option::Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: ::std::option::Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// <p>The <code>accountId</code> that is associated with the budget that you want a description of.</p>
    pub fn account_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.account_id(input.into());
        self
    }
    /// <p>The <code>accountId</code> that is associated with the budget that you want a description of.</p>
    pub fn set_account_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_account_id(input);
        self
    }
    /// <p>The <code>accountId</code> that is associated with the budget that you want a description of.</p>
    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_account_id()
    }
    /// <p>The name of the budget that you want a description of.</p>
    pub fn budget_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.budget_name(input.into());
        self
    }
    /// <p>The name of the budget that you want a description of.</p>
    pub fn set_budget_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_budget_name(input);
        self
    }
    /// <p>The name of the budget that you want a description of.</p>
    pub fn get_budget_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_budget_name()
    }
    /// <p>Specifies whether the response includes the filter expression associated with the budget. By showing the filter expression, you can see detailed filtering logic applied to the budget, such as Amazon Web Services services or tags that are being tracked.</p>
    pub fn show_filter_expression(mut self, input: bool) -> Self {
        self.inner = self.inner.show_filter_expression(input);
        self
    }
    /// <p>Specifies whether the response includes the filter expression associated with the budget. By showing the filter expression, you can see detailed filtering logic applied to the budget, such as Amazon Web Services services or tags that are being tracked.</p>
    pub fn set_show_filter_expression(mut self, input: ::std::option::Option<bool>) -> Self {
        self.inner = self.inner.set_show_filter_expression(input);
        self
    }
    /// <p>Specifies whether the response includes the filter expression associated with the budget. By showing the filter expression, you can see detailed filtering logic applied to the budget, such as Amazon Web Services services or tags that are being tracked.</p>
    pub fn get_show_filter_expression(&self) -> &::std::option::Option<bool> {
        self.inner.get_show_filter_expression()
    }
}