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.

/// <p>Represents a request to the schedule run operation.</p>
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct ScheduleRunInput {
    /// <p>The ARN of the project for the run to be scheduled.</p>
    pub project_arn: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of an application package to run tests against, created with <code>CreateUpload</code>. See <code>ListUploads</code>.</p>
    pub app_arn: ::std::option::Option<::std::string::String>,
    /// <p>The ARN of the device pool for the run to be scheduled.</p>
    pub device_pool_arn: ::std::option::Option<::std::string::String>,
    /// <p>The filter criteria used to dynamically select a set of devices for a test run and the maximum number of devices to be included in the run.</p>
    /// <p>Either <b> <code>devicePoolArn</code> </b> or <b> <code>deviceSelectionConfiguration</code> </b> is required in a request.</p>
    pub device_selection_configuration: ::std::option::Option<crate::types::DeviceSelectionConfiguration>,
    /// <p>The name for the run to be scheduled.</p>
    pub name: ::std::option::Option<::std::string::String>,
    /// <p>Information about the test for the run to be scheduled.</p>
    pub test: ::std::option::Option<crate::types::ScheduleRunTest>,
    /// <p>Information about the settings for the run to be scheduled.</p>
    pub configuration: ::std::option::Option<crate::types::ScheduleRunConfiguration>,
    /// <p>Specifies configuration information about a test run, such as the execution timeout (in minutes).</p>
    pub execution_configuration: ::std::option::Option<crate::types::ExecutionConfiguration>,
}
impl ScheduleRunInput {
    /// <p>The ARN of the project for the run to be scheduled.</p>
    pub fn project_arn(&self) -> ::std::option::Option<&str> {
        self.project_arn.as_deref()
    }
    /// <p>The ARN of an application package to run tests against, created with <code>CreateUpload</code>. See <code>ListUploads</code>.</p>
    pub fn app_arn(&self) -> ::std::option::Option<&str> {
        self.app_arn.as_deref()
    }
    /// <p>The ARN of the device pool for the run to be scheduled.</p>
    pub fn device_pool_arn(&self) -> ::std::option::Option<&str> {
        self.device_pool_arn.as_deref()
    }
    /// <p>The filter criteria used to dynamically select a set of devices for a test run and the maximum number of devices to be included in the run.</p>
    /// <p>Either <b> <code>devicePoolArn</code> </b> or <b> <code>deviceSelectionConfiguration</code> </b> is required in a request.</p>
    pub fn device_selection_configuration(&self) -> ::std::option::Option<&crate::types::DeviceSelectionConfiguration> {
        self.device_selection_configuration.as_ref()
    }
    /// <p>The name for the run to be scheduled.</p>
    pub fn name(&self) -> ::std::option::Option<&str> {
        self.name.as_deref()
    }
    /// <p>Information about the test for the run to be scheduled.</p>
    pub fn test(&self) -> ::std::option::Option<&crate::types::ScheduleRunTest> {
        self.test.as_ref()
    }
    /// <p>Information about the settings for the run to be scheduled.</p>
    pub fn configuration(&self) -> ::std::option::Option<&crate::types::ScheduleRunConfiguration> {
        self.configuration.as_ref()
    }
    /// <p>Specifies configuration information about a test run, such as the execution timeout (in minutes).</p>
    pub fn execution_configuration(&self) -> ::std::option::Option<&crate::types::ExecutionConfiguration> {
        self.execution_configuration.as_ref()
    }
}
impl ScheduleRunInput {
    /// Creates a new builder-style object to manufacture [`ScheduleRunInput`](crate::operation::schedule_run::ScheduleRunInput).
    pub fn builder() -> crate::operation::schedule_run::builders::ScheduleRunInputBuilder {
        crate::operation::schedule_run::builders::ScheduleRunInputBuilder::default()
    }
}

/// A builder for [`ScheduleRunInput`](crate::operation::schedule_run::ScheduleRunInput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct ScheduleRunInputBuilder {
    pub(crate) project_arn: ::std::option::Option<::std::string::String>,
    pub(crate) app_arn: ::std::option::Option<::std::string::String>,
    pub(crate) device_pool_arn: ::std::option::Option<::std::string::String>,
    pub(crate) device_selection_configuration: ::std::option::Option<crate::types::DeviceSelectionConfiguration>,
    pub(crate) name: ::std::option::Option<::std::string::String>,
    pub(crate) test: ::std::option::Option<crate::types::ScheduleRunTest>,
    pub(crate) configuration: ::std::option::Option<crate::types::ScheduleRunConfiguration>,
    pub(crate) execution_configuration: ::std::option::Option<crate::types::ExecutionConfiguration>,
}
impl ScheduleRunInputBuilder {
    /// <p>The ARN of the project for the run to be scheduled.</p>
    /// This field is required.
    pub fn project_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.project_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the project for the run to be scheduled.</p>
    pub fn set_project_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.project_arn = input;
        self
    }
    /// <p>The ARN of the project for the run to be scheduled.</p>
    pub fn get_project_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.project_arn
    }
    /// <p>The ARN of an application package to run tests against, created with <code>CreateUpload</code>. See <code>ListUploads</code>.</p>
    pub fn app_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.app_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of an application package to run tests against, created with <code>CreateUpload</code>. See <code>ListUploads</code>.</p>
    pub fn set_app_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.app_arn = input;
        self
    }
    /// <p>The ARN of an application package to run tests against, created with <code>CreateUpload</code>. See <code>ListUploads</code>.</p>
    pub fn get_app_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.app_arn
    }
    /// <p>The ARN of the device pool for the run to be scheduled.</p>
    pub fn device_pool_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.device_pool_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The ARN of the device pool for the run to be scheduled.</p>
    pub fn set_device_pool_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.device_pool_arn = input;
        self
    }
    /// <p>The ARN of the device pool for the run to be scheduled.</p>
    pub fn get_device_pool_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.device_pool_arn
    }
    /// <p>The filter criteria used to dynamically select a set of devices for a test run and the maximum number of devices to be included in the run.</p>
    /// <p>Either <b> <code>devicePoolArn</code> </b> or <b> <code>deviceSelectionConfiguration</code> </b> is required in a request.</p>
    pub fn device_selection_configuration(mut self, input: crate::types::DeviceSelectionConfiguration) -> Self {
        self.device_selection_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>The filter criteria used to dynamically select a set of devices for a test run and the maximum number of devices to be included in the run.</p>
    /// <p>Either <b> <code>devicePoolArn</code> </b> or <b> <code>deviceSelectionConfiguration</code> </b> is required in a request.</p>
    pub fn set_device_selection_configuration(mut self, input: ::std::option::Option<crate::types::DeviceSelectionConfiguration>) -> Self {
        self.device_selection_configuration = input;
        self
    }
    /// <p>The filter criteria used to dynamically select a set of devices for a test run and the maximum number of devices to be included in the run.</p>
    /// <p>Either <b> <code>devicePoolArn</code> </b> or <b> <code>deviceSelectionConfiguration</code> </b> is required in a request.</p>
    pub fn get_device_selection_configuration(&self) -> &::std::option::Option<crate::types::DeviceSelectionConfiguration> {
        &self.device_selection_configuration
    }
    /// <p>The name for the run to be scheduled.</p>
    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.name = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The name for the run to be scheduled.</p>
    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.name = input;
        self
    }
    /// <p>The name for the run to be scheduled.</p>
    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.name
    }
    /// <p>Information about the test for the run to be scheduled.</p>
    /// This field is required.
    pub fn test(mut self, input: crate::types::ScheduleRunTest) -> Self {
        self.test = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the test for the run to be scheduled.</p>
    pub fn set_test(mut self, input: ::std::option::Option<crate::types::ScheduleRunTest>) -> Self {
        self.test = input;
        self
    }
    /// <p>Information about the test for the run to be scheduled.</p>
    pub fn get_test(&self) -> &::std::option::Option<crate::types::ScheduleRunTest> {
        &self.test
    }
    /// <p>Information about the settings for the run to be scheduled.</p>
    pub fn configuration(mut self, input: crate::types::ScheduleRunConfiguration) -> Self {
        self.configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>Information about the settings for the run to be scheduled.</p>
    pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::ScheduleRunConfiguration>) -> Self {
        self.configuration = input;
        self
    }
    /// <p>Information about the settings for the run to be scheduled.</p>
    pub fn get_configuration(&self) -> &::std::option::Option<crate::types::ScheduleRunConfiguration> {
        &self.configuration
    }
    /// <p>Specifies configuration information about a test run, such as the execution timeout (in minutes).</p>
    pub fn execution_configuration(mut self, input: crate::types::ExecutionConfiguration) -> Self {
        self.execution_configuration = ::std::option::Option::Some(input);
        self
    }
    /// <p>Specifies configuration information about a test run, such as the execution timeout (in minutes).</p>
    pub fn set_execution_configuration(mut self, input: ::std::option::Option<crate::types::ExecutionConfiguration>) -> Self {
        self.execution_configuration = input;
        self
    }
    /// <p>Specifies configuration information about a test run, such as the execution timeout (in minutes).</p>
    pub fn get_execution_configuration(&self) -> &::std::option::Option<crate::types::ExecutionConfiguration> {
        &self.execution_configuration
    }
    /// Consumes the builder and constructs a [`ScheduleRunInput`](crate::operation::schedule_run::ScheduleRunInput).
    pub fn build(self) -> ::std::result::Result<crate::operation::schedule_run::ScheduleRunInput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::schedule_run::ScheduleRunInput {
            project_arn: self.project_arn,
            app_arn: self.app_arn,
            device_pool_arn: self.device_pool_arn,
            device_selection_configuration: self.device_selection_configuration,
            name: self.name,
            test: self.test,
            configuration: self.configuration,
            execution_configuration: self.execution_configuration,
        })
    }
}