aws-sdk-deadline 1.74.0

AWS SDK for AWSDeadlineCloud
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_queue_limit_association::_update_queue_limit_association_output::UpdateQueueLimitAssociationOutputBuilder;

pub use crate::operation::update_queue_limit_association::_update_queue_limit_association_input::UpdateQueueLimitAssociationInputBuilder;

impl crate::operation::update_queue_limit_association::builders::UpdateQueueLimitAssociationInputBuilder {
    /// 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_queue_limit_association::UpdateQueueLimitAssociationOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_queue_limit_association::UpdateQueueLimitAssociationError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_queue_limit_association();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateQueueLimitAssociation`.
///
/// <p>Updates the status of the queue. If you set the status to one of the <code>STOP_LIMIT_USAGE*</code> values, there will be a delay before the status transitions to the <code>STOPPED</code> state.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateQueueLimitAssociationFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_queue_limit_association::builders::UpdateQueueLimitAssociationInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_queue_limit_association::UpdateQueueLimitAssociationOutput,
        crate::operation::update_queue_limit_association::UpdateQueueLimitAssociationError,
    > for UpdateQueueLimitAssociationFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_queue_limit_association::UpdateQueueLimitAssociationOutput,
            crate::operation::update_queue_limit_association::UpdateQueueLimitAssociationError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateQueueLimitAssociationFluentBuilder {
    /// Creates a new `UpdateQueueLimitAssociationFluentBuilder`.
    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 UpdateQueueLimitAssociation as a reference.
    pub fn as_input(&self) -> &crate::operation::update_queue_limit_association::builders::UpdateQueueLimitAssociationInputBuilder {
        &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_queue_limit_association::UpdateQueueLimitAssociationOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_queue_limit_association::UpdateQueueLimitAssociationError,
            ::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_queue_limit_association::UpdateQueueLimitAssociation::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_queue_limit_association::UpdateQueueLimitAssociation::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_queue_limit_association::UpdateQueueLimitAssociationOutput,
        crate::operation::update_queue_limit_association::UpdateQueueLimitAssociationError,
        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 unique identifier of the farm that contains the associated queues and limits.</p>
    pub fn farm_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.farm_id(input.into());
        self
    }
    /// <p>The unique identifier of the farm that contains the associated queues and limits.</p>
    pub fn set_farm_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_farm_id(input);
        self
    }
    /// <p>The unique identifier of the farm that contains the associated queues and limits.</p>
    pub fn get_farm_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_farm_id()
    }
    /// <p>The unique identifier of the queue associated to the limit.</p>
    pub fn queue_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.queue_id(input.into());
        self
    }
    /// <p>The unique identifier of the queue associated to the limit.</p>
    pub fn set_queue_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_queue_id(input);
        self
    }
    /// <p>The unique identifier of the queue associated to the limit.</p>
    pub fn get_queue_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_queue_id()
    }
    /// <p>The unique identifier of the limit associated to the queue.</p>
    pub fn limit_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.limit_id(input.into());
        self
    }
    /// <p>The unique identifier of the limit associated to the queue.</p>
    pub fn set_limit_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_limit_id(input);
        self
    }
    /// <p>The unique identifier of the limit associated to the queue.</p>
    pub fn get_limit_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_limit_id()
    }
    /// <p>Sets the status of the limit. You can mark the limit active, or you can stop usage of the limit and either complete existing tasks or cancel any existing tasks immediately.</p>
    pub fn status(mut self, input: crate::types::UpdateQueueLimitAssociationStatus) -> Self {
        self.inner = self.inner.status(input);
        self
    }
    /// <p>Sets the status of the limit. You can mark the limit active, or you can stop usage of the limit and either complete existing tasks or cancel any existing tasks immediately.</p>
    pub fn set_status(mut self, input: ::std::option::Option<crate::types::UpdateQueueLimitAssociationStatus>) -> Self {
        self.inner = self.inner.set_status(input);
        self
    }
    /// <p>Sets the status of the limit. You can mark the limit active, or you can stop usage of the limit and either complete existing tasks or cancel any existing tasks immediately.</p>
    pub fn get_status(&self) -> &::std::option::Option<crate::types::UpdateQueueLimitAssociationStatus> {
        self.inner.get_status()
    }
}