aws-sdk-mediaconvert 1.128.0

AWS SDK for AWS Elemental MediaConvert
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::start_jobs_query::_start_jobs_query_input::StartJobsQueryInputBuilder;

pub use crate::operation::start_jobs_query::_start_jobs_query_output::StartJobsQueryOutputBuilder;

impl crate::operation::start_jobs_query::builders::StartJobsQueryInputBuilder {
    /// Sends a request with this input using the given client.
    pub async fn send_with(
        self,
        client: &crate::Client,
    ) -> ::std::result::Result<
        crate::operation::start_jobs_query::StartJobsQueryOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::start_jobs_query::StartJobsQueryError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.start_jobs_query();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `StartJobsQuery`.
///
/// Start an asynchronous jobs query using the provided filters. To receive the list of jobs that match your query, call the GetJobsQueryResults API using the query ID returned by this API.
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct StartJobsQueryFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::start_jobs_query::builders::StartJobsQueryInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::start_jobs_query::StartJobsQueryOutput,
        crate::operation::start_jobs_query::StartJobsQueryError,
    > for StartJobsQueryFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::start_jobs_query::StartJobsQueryOutput,
            crate::operation::start_jobs_query::StartJobsQueryError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl StartJobsQueryFluentBuilder {
    /// Creates a new `StartJobsQueryFluentBuilder`.
    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 StartJobsQuery as a reference.
    pub fn as_input(&self) -> &crate::operation::start_jobs_query::builders::StartJobsQueryInputBuilder {
        &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::start_jobs_query::StartJobsQueryOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::start_jobs_query::StartJobsQueryError,
            ::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::start_jobs_query::StartJobsQuery::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::start_jobs_query::StartJobsQuery::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::start_jobs_query::StartJobsQueryOutput,
        crate::operation::start_jobs_query::StartJobsQueryError,
        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
    }
    ///
    /// Appends an item to `FilterList`.
    ///
    /// To override the contents of this collection use [`set_filter_list`](Self::set_filter_list).
    ///
    /// Optional. Provide an array of JobsQueryFilters for your StartJobsQuery request.
    pub fn filter_list(mut self, input: crate::types::JobsQueryFilter) -> Self {
        self.inner = self.inner.filter_list(input);
        self
    }
    /// Optional. Provide an array of JobsQueryFilters for your StartJobsQuery request.
    pub fn set_filter_list(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::JobsQueryFilter>>) -> Self {
        self.inner = self.inner.set_filter_list(input);
        self
    }
    /// Optional. Provide an array of JobsQueryFilters for your StartJobsQuery request.
    pub fn get_filter_list(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::JobsQueryFilter>> {
        self.inner.get_filter_list()
    }
    /// Optional. Number of jobs, up to twenty, that will be included in the jobs query.
    pub fn max_results(mut self, input: i32) -> Self {
        self.inner = self.inner.max_results(input);
        self
    }
    /// Optional. Number of jobs, up to twenty, that will be included in the jobs query.
    pub fn set_max_results(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_max_results(input);
        self
    }
    /// Optional. Number of jobs, up to twenty, that will be included in the jobs query.
    pub fn get_max_results(&self) -> &::std::option::Option<i32> {
        self.inner.get_max_results()
    }
    /// Use this string to request the next batch of jobs matched by a jobs query.
    pub fn next_token(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.next_token(input.into());
        self
    }
    /// Use this string to request the next batch of jobs matched by a jobs query.
    pub fn set_next_token(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_next_token(input);
        self
    }
    /// Use this string to request the next batch of jobs matched by a jobs query.
    pub fn get_next_token(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_next_token()
    }
    /// Optional. When you request lists of resources, you can specify whether they are sorted in ASCENDING or DESCENDING order. Default varies by resource.
    pub fn order(mut self, input: crate::types::Order) -> Self {
        self.inner = self.inner.order(input);
        self
    }
    /// Optional. When you request lists of resources, you can specify whether they are sorted in ASCENDING or DESCENDING order. Default varies by resource.
    pub fn set_order(mut self, input: ::std::option::Option<crate::types::Order>) -> Self {
        self.inner = self.inner.set_order(input);
        self
    }
    /// Optional. When you request lists of resources, you can specify whether they are sorted in ASCENDING or DESCENDING order. Default varies by resource.
    pub fn get_order(&self) -> &::std::option::Option<crate::types::Order> {
        self.inner.get_order()
    }
}