aws-sdk-deadline 1.42.0

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

pub use crate::operation::search_tasks::_search_tasks_input::SearchTasksInputBuilder;

impl crate::operation::search_tasks::builders::SearchTasksInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::search_tasks::SearchTasksOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::search_tasks::SearchTasksError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.search_tasks();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `SearchTasks`.
///
/// <p>Searches for tasks.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct SearchTasksFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::search_tasks::builders::SearchTasksInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::search_tasks::SearchTasksOutput,
        crate::operation::search_tasks::SearchTasksError,
    > for SearchTasksFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::search_tasks::SearchTasksOutput,
            crate::operation::search_tasks::SearchTasksError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl SearchTasksFluentBuilder {
    /// Creates a new `SearchTasksFluentBuilder`.
    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 SearchTasks as a reference.
    pub fn as_input(&self) -> &crate::operation::search_tasks::builders::SearchTasksInputBuilder {
        &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::search_tasks::SearchTasksOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::search_tasks::SearchTasksError,
            ::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::search_tasks::SearchTasks::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::search_tasks::SearchTasks::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::search_tasks::SearchTasksOutput,
        crate::operation::search_tasks::SearchTasksError,
        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 farm ID of the task.</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 farm ID of the task.</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 farm ID of the task.</p>
    pub fn get_farm_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_farm_id()
    }
    ///
    /// Appends an item to `queueIds`.
    ///
    /// To override the contents of this collection use [`set_queue_ids`](Self::set_queue_ids).
    ///
    /// <p>The queue IDs to include in the search.</p>
    pub fn queue_ids(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.queue_ids(input.into());
        self
    }
    /// <p>The queue IDs to include in the search.</p>
    pub fn set_queue_ids(mut self, input: ::std::option::Option<::std::vec::Vec<::std::string::String>>) -> Self {
        self.inner = self.inner.set_queue_ids(input);
        self
    }
    /// <p>The queue IDs to include in the search.</p>
    pub fn get_queue_ids(&self) -> &::std::option::Option<::std::vec::Vec<::std::string::String>> {
        self.inner.get_queue_ids()
    }
    /// <p>The job ID for the task search.</p>
    pub fn job_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.job_id(input.into());
        self
    }
    /// <p>The job ID for the task search.</p>
    pub fn set_job_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_job_id(input);
        self
    }
    /// <p>The job ID for the task search.</p>
    pub fn get_job_id(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_job_id()
    }
    /// <p>The filter expression, <code>AND</code> or <code>OR</code>, to use when searching among a group of search strings in a resource. You can use two groupings per search each within parenthesis <code>()</code>.</p>
    pub fn filter_expressions(mut self, input: crate::types::SearchGroupedFilterExpressions) -> Self {
        self.inner = self.inner.filter_expressions(input);
        self
    }
    /// <p>The filter expression, <code>AND</code> or <code>OR</code>, to use when searching among a group of search strings in a resource. You can use two groupings per search each within parenthesis <code>()</code>.</p>
    pub fn set_filter_expressions(mut self, input: ::std::option::Option<crate::types::SearchGroupedFilterExpressions>) -> Self {
        self.inner = self.inner.set_filter_expressions(input);
        self
    }
    /// <p>The filter expression, <code>AND</code> or <code>OR</code>, to use when searching among a group of search strings in a resource. You can use two groupings per search each within parenthesis <code>()</code>.</p>
    pub fn get_filter_expressions(&self) -> &::std::option::Option<crate::types::SearchGroupedFilterExpressions> {
        self.inner.get_filter_expressions()
    }
    ///
    /// Appends an item to `sortExpressions`.
    ///
    /// To override the contents of this collection use [`set_sort_expressions`](Self::set_sort_expressions).
    ///
    /// <p>The search terms for a resource.</p>
    pub fn sort_expressions(mut self, input: crate::types::SearchSortExpression) -> Self {
        self.inner = self.inner.sort_expressions(input);
        self
    }
    /// <p>The search terms for a resource.</p>
    pub fn set_sort_expressions(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::SearchSortExpression>>) -> Self {
        self.inner = self.inner.set_sort_expressions(input);
        self
    }
    /// <p>The search terms for a resource.</p>
    pub fn get_sort_expressions(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::SearchSortExpression>> {
        self.inner.get_sort_expressions()
    }
    /// <p>Defines how far into the scrollable list to start the return of results.</p>
    pub fn item_offset(mut self, input: i32) -> Self {
        self.inner = self.inner.item_offset(input);
        self
    }
    /// <p>Defines how far into the scrollable list to start the return of results.</p>
    pub fn set_item_offset(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_item_offset(input);
        self
    }
    /// <p>Defines how far into the scrollable list to start the return of results.</p>
    pub fn get_item_offset(&self) -> &::std::option::Option<i32> {
        self.inner.get_item_offset()
    }
    /// <p>Specifies the number of items per page for the resource.</p>
    pub fn page_size(mut self, input: i32) -> Self {
        self.inner = self.inner.page_size(input);
        self
    }
    /// <p>Specifies the number of items per page for the resource.</p>
    pub fn set_page_size(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_page_size(input);
        self
    }
    /// <p>Specifies the number of items per page for the resource.</p>
    pub fn get_page_size(&self) -> &::std::option::Option<i32> {
        self.inner.get_page_size()
    }
}