aws-sdk-budgets 1.16.0

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

pub use crate::operation::update_budget_action::_update_budget_action_input::UpdateBudgetActionInputBuilder;

impl UpdateBudgetActionInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::update_budget_action::UpdateBudgetActionOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_budget_action::UpdateBudgetActionError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_budget_action();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateBudgetAction`.
///
/// <p>Updates a budget action.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateBudgetActionFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_budget_action::builders::UpdateBudgetActionInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_budget_action::UpdateBudgetActionOutput,
        crate::operation::update_budget_action::UpdateBudgetActionError,
    > for UpdateBudgetActionFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_budget_action::UpdateBudgetActionOutput,
            crate::operation::update_budget_action::UpdateBudgetActionError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateBudgetActionFluentBuilder {
    /// Creates a new `UpdateBudgetAction`.
    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 UpdateBudgetAction as a reference.
    pub fn as_input(&self) -> &crate::operation::update_budget_action::builders::UpdateBudgetActionInputBuilder {
        &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::update_budget_action::UpdateBudgetActionOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_budget_action::UpdateBudgetActionError,
            ::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::update_budget_action::UpdateBudgetAction::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_budget_action::UpdateBudgetAction::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::update_budget_action::UpdateBudgetActionOutput,
        crate::operation::update_budget_action::UpdateBudgetActionError,
        Self,
    > {
        crate::client::customize::CustomizableOperation::new(self)
    }
    pub(crate) fn config_override(mut self, config_override: impl Into<crate::config::Builder>) -> Self {
        self.set_config_override(Some(config_override.into()));
        self
    }

    pub(crate) fn set_config_override(&mut self, config_override: Option<crate::config::Builder>) -> &mut Self {
        self.config_override = config_override;
        self
    }
    /// <p>The account ID of the user. It's a 12-digit number.</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 account ID of the user. It's a 12-digit number.</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 account ID of the user. It's a 12-digit number.</p>
    pub fn get_account_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_account_id()
    }
    /// <p>A string that represents the budget name. The ":" and "\" characters, and the "/action/" substring, aren't allowed.</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>A string that represents the budget name. The ":" and "\" characters, and the "/action/" substring, aren't allowed.</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>A string that represents the budget name. The ":" and "\" characters, and the "/action/" substring, aren't allowed.</p>
    pub fn get_budget_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_budget_name()
    }
    /// <p>A system-generated universally unique identifier (UUID) for the action.</p>
    pub fn action_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.action_id(input.into());
        self
    }
    /// <p>A system-generated universally unique identifier (UUID) for the action.</p>
    pub fn set_action_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_action_id(input);
        self
    }
    /// <p>A system-generated universally unique identifier (UUID) for the action.</p>
    pub fn get_action_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_action_id()
    }
    /// <p>The type of a notification. It must be ACTUAL or FORECASTED.</p>
    pub fn notification_type(mut self, input: crate::types::NotificationType) -> Self {
        self.inner = self.inner.notification_type(input);
        self
    }
    /// <p>The type of a notification. It must be ACTUAL or FORECASTED.</p>
    pub fn set_notification_type(mut self, input: ::std::option::Option<crate::types::NotificationType>) -> Self {
        self.inner = self.inner.set_notification_type(input);
        self
    }
    /// <p>The type of a notification. It must be ACTUAL or FORECASTED.</p>
    pub fn get_notification_type(&self) -> &::std::option::Option<crate::types::NotificationType> {
        self.inner.get_notification_type()
    }
    /// <p>The trigger threshold of the action.</p>
    pub fn action_threshold(mut self, input: crate::types::ActionThreshold) -> Self {
        self.inner = self.inner.action_threshold(input);
        self
    }
    /// <p>The trigger threshold of the action.</p>
    pub fn set_action_threshold(mut self, input: ::std::option::Option<crate::types::ActionThreshold>) -> Self {
        self.inner = self.inner.set_action_threshold(input);
        self
    }
    /// <p>The trigger threshold of the action.</p>
    pub fn get_action_threshold(&self) -> &::std::option::Option<crate::types::ActionThreshold> {
        self.inner.get_action_threshold()
    }
    /// <p>Specifies all of the type-specific parameters.</p>
    pub fn definition(mut self, input: crate::types::Definition) -> Self {
        self.inner = self.inner.definition(input);
        self
    }
    /// <p>Specifies all of the type-specific parameters.</p>
    pub fn set_definition(mut self, input: ::std::option::Option<crate::types::Definition>) -> Self {
        self.inner = self.inner.set_definition(input);
        self
    }
    /// <p>Specifies all of the type-specific parameters.</p>
    pub fn get_definition(&self) -> &::std::option::Option<crate::types::Definition> {
        self.inner.get_definition()
    }
    /// <p>The role passed for action execution and reversion. Roles and actions must be in the same account.</p>
    pub fn execution_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.execution_role_arn(input.into());
        self
    }
    /// <p>The role passed for action execution and reversion. Roles and actions must be in the same account.</p>
    pub fn set_execution_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_execution_role_arn(input);
        self
    }
    /// <p>The role passed for action execution and reversion. Roles and actions must be in the same account.</p>
    pub fn get_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_execution_role_arn()
    }
    /// <p>This specifies if the action needs manual or automatic approval.</p>
    pub fn approval_model(mut self, input: crate::types::ApprovalModel) -> Self {
        self.inner = self.inner.approval_model(input);
        self
    }
    /// <p>This specifies if the action needs manual or automatic approval.</p>
    pub fn set_approval_model(mut self, input: ::std::option::Option<crate::types::ApprovalModel>) -> Self {
        self.inner = self.inner.set_approval_model(input);
        self
    }
    /// <p>This specifies if the action needs manual or automatic approval.</p>
    pub fn get_approval_model(&self) -> &::std::option::Option<crate::types::ApprovalModel> {
        self.inner.get_approval_model()
    }
    /// Appends an item to `Subscribers`.
    ///
    /// To override the contents of this collection use [`set_subscribers`](Self::set_subscribers).
    ///
    /// <p>A list of subscribers.</p>
    pub fn subscribers(mut self, input: crate::types::Subscriber) -> Self {
        self.inner = self.inner.subscribers(input);
        self
    }
    /// <p>A list of subscribers.</p>
    pub fn set_subscribers(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Subscriber>>) -> Self {
        self.inner = self.inner.set_subscribers(input);
        self
    }
    /// <p>A list of subscribers.</p>
    pub fn get_subscribers(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Subscriber>> {
        self.inner.get_subscribers()
    }
}