aws-sdk-devicefarm 1.105.0

AWS SDK for AWS Device Farm
Documentation
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
pub use crate::operation::update_project::_update_project_input::UpdateProjectInputBuilder;

pub use crate::operation::update_project::_update_project_output::UpdateProjectOutputBuilder;

impl crate::operation::update_project::builders::UpdateProjectInputBuilder {
    /// 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_project::UpdateProjectOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_project::UpdateProjectError,
            ::aws_smithy_runtime_api::client::orchestrator::HttpResponse,
        >,
    > {
        let mut fluent_builder = client.update_project();
        fluent_builder.inner = self;
        fluent_builder.send().await
    }
}
/// Fluent builder constructing a request to `UpdateProject`.
///
/// <p>Modifies the specified project name, given the project ARN and a new name.</p>
#[derive(::std::clone::Clone, ::std::fmt::Debug)]
pub struct UpdateProjectFluentBuilder {
    handle: ::std::sync::Arc<crate::client::Handle>,
    inner: crate::operation::update_project::builders::UpdateProjectInputBuilder,
    config_override: ::std::option::Option<crate::config::Builder>,
}
impl
    crate::client::customize::internal::CustomizableSend<
        crate::operation::update_project::UpdateProjectOutput,
        crate::operation::update_project::UpdateProjectError,
    > for UpdateProjectFluentBuilder
{
    fn send(
        self,
        config_override: crate::config::Builder,
    ) -> crate::client::customize::internal::BoxFuture<
        crate::client::customize::internal::SendResult<
            crate::operation::update_project::UpdateProjectOutput,
            crate::operation::update_project::UpdateProjectError,
        >,
    > {
        ::std::boxed::Box::pin(async move { self.config_override(config_override).send().await })
    }
}
impl UpdateProjectFluentBuilder {
    /// Creates a new `UpdateProjectFluentBuilder`.
    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 UpdateProject as a reference.
    pub fn as_input(&self) -> &crate::operation::update_project::builders::UpdateProjectInputBuilder {
        &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_project::UpdateProjectOutput,
        ::aws_smithy_runtime_api::client::result::SdkError<
            crate::operation::update_project::UpdateProjectError,
            ::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_project::UpdateProject::operation_runtime_plugins(
            self.handle.runtime_plugins.clone(),
            &self.handle.conf,
            self.config_override,
        );
        crate::operation::update_project::UpdateProject::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_project::UpdateProjectOutput,
        crate::operation::update_project::UpdateProjectError,
        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 Amazon Resource Name (ARN) of the project whose name to update.</p>
    pub fn arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.arn(input.into());
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the project whose name to update.</p>
    pub fn set_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_arn(input);
        self
    }
    /// <p>The Amazon Resource Name (ARN) of the project whose name to update.</p>
    pub fn get_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_arn()
    }
    /// <p>A string that represents the new name of the project that you are updating.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.inner = self.inner.name(input.into());
        self
    }
    /// <p>A string that represents the new name of the project that you are updating.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.inner = self.inner.set_name(input);
        self
    }
    /// <p>A string that represents the new name of the project that you are updating.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_name()
    }
    /// <p>The number of minutes a test run in the project executes before it times out.</p>
    pub fn default_job_timeout_minutes(mut self, input: i32) -> Self {
        self.inner = self.inner.default_job_timeout_minutes(input);
        self
    }
    /// <p>The number of minutes a test run in the project executes before it times out.</p>
    pub fn set_default_job_timeout_minutes(mut self, input: ::std::option::Option<i32>) -> Self {
        self.inner = self.inner.set_default_job_timeout_minutes(input);
        self
    }
    /// <p>The number of minutes a test run in the project executes before it times out.</p>
    pub fn get_default_job_timeout_minutes(&self) -> &::std::option::Option<i32> {
        self.inner.get_default_job_timeout_minutes()
    }
    /// <p>The VPC security groups and subnets that are attached to a project.</p>
    pub fn vpc_config(mut self, input: crate::types::VpcConfig) -> Self {
        self.inner = self.inner.vpc_config(input);
        self
    }
    /// <p>The VPC security groups and subnets that are attached to a project.</p>
    pub fn set_vpc_config(mut self, input: ::std::option::Option<crate::types::VpcConfig>) -> Self {
        self.inner = self.inner.set_vpc_config(input);
        self
    }
    /// <p>The VPC security groups and subnets that are attached to a project.</p>
    pub fn get_vpc_config(&self) -> &::std::option::Option<crate::types::VpcConfig> {
        self.inner.get_vpc_config()
    }
    ///
    /// Appends an item to `environmentVariables`.
    ///
    /// To override the contents of this collection use [`set_environment_variables`](Self::set_environment_variables).
    ///
    /// <p>A set of environment variables which are used by default for all runs in the project. These environment variables are applied to the test run during the execution of a test spec file.</p>
    /// <p>For more information about using test spec files, please see <a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/custom-test-environments.html">Custom test environments </a> in <i>AWS Device Farm.</i></p>
    pub fn environment_variables(mut self, input: crate::types::EnvironmentVariable) -> Self {
        self.inner = self.inner.environment_variables(input);
        self
    }
    /// <p>A set of environment variables which are used by default for all runs in the project. These environment variables are applied to the test run during the execution of a test spec file.</p>
    /// <p>For more information about using test spec files, please see <a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/custom-test-environments.html">Custom test environments </a> in <i>AWS Device Farm.</i></p>
    pub fn set_environment_variables(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::EnvironmentVariable>>) -> Self {
        self.inner = self.inner.set_environment_variables(input);
        self
    }
    /// <p>A set of environment variables which are used by default for all runs in the project. These environment variables are applied to the test run during the execution of a test spec file.</p>
    /// <p>For more information about using test spec files, please see <a href="https://docs.aws.amazon.com/devicefarm/latest/developerguide/custom-test-environments.html">Custom test environments </a> in <i>AWS Device Farm.</i></p>
    pub fn get_environment_variables(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::EnvironmentVariable>> {
        self.inner.get_environment_variables()
    }
    /// <p>An IAM role to be assumed by the test host for all runs in the project.</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>An IAM role to be assumed by the test host for all runs in the project.</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>An IAM role to be assumed by the test host for all runs in the project.</p>
    pub fn get_execution_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        self.inner.get_execution_role_arn()
    }
}