aws_sdk_devicefarm/operation/schedule_run/
_schedule_run_input.rs

1// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
2
3/// <p>Represents a request to the schedule run operation.</p>
4#[non_exhaustive]
5#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
6pub struct ScheduleRunInput {
7    /// <p>The ARN of the project for the run to be scheduled.</p>
8    pub project_arn: ::std::option::Option<::std::string::String>,
9    /// <p>The ARN of an application package to run tests against, created with <code>CreateUpload</code>. See <code>ListUploads</code>.</p>
10    pub app_arn: ::std::option::Option<::std::string::String>,
11    /// <p>The ARN of the device pool for the run to be scheduled.</p>
12    pub device_pool_arn: ::std::option::Option<::std::string::String>,
13    /// <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>
14    /// <p>Either <b> <code>devicePoolArn</code> </b> or <b> <code>deviceSelectionConfiguration</code> </b> is required in a request.</p>
15    pub device_selection_configuration: ::std::option::Option<crate::types::DeviceSelectionConfiguration>,
16    /// <p>The name for the run to be scheduled.</p>
17    pub name: ::std::option::Option<::std::string::String>,
18    /// <p>Information about the test for the run to be scheduled.</p>
19    pub test: ::std::option::Option<crate::types::ScheduleRunTest>,
20    /// <p>Information about the settings for the run to be scheduled.</p>
21    pub configuration: ::std::option::Option<crate::types::ScheduleRunConfiguration>,
22    /// <p>Specifies configuration information about a test run, such as the execution timeout (in minutes).</p>
23    pub execution_configuration: ::std::option::Option<crate::types::ExecutionConfiguration>,
24}
25impl ScheduleRunInput {
26    /// <p>The ARN of the project for the run to be scheduled.</p>
27    pub fn project_arn(&self) -> ::std::option::Option<&str> {
28        self.project_arn.as_deref()
29    }
30    /// <p>The ARN of an application package to run tests against, created with <code>CreateUpload</code>. See <code>ListUploads</code>.</p>
31    pub fn app_arn(&self) -> ::std::option::Option<&str> {
32        self.app_arn.as_deref()
33    }
34    /// <p>The ARN of the device pool for the run to be scheduled.</p>
35    pub fn device_pool_arn(&self) -> ::std::option::Option<&str> {
36        self.device_pool_arn.as_deref()
37    }
38    /// <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>
39    /// <p>Either <b> <code>devicePoolArn</code> </b> or <b> <code>deviceSelectionConfiguration</code> </b> is required in a request.</p>
40    pub fn device_selection_configuration(&self) -> ::std::option::Option<&crate::types::DeviceSelectionConfiguration> {
41        self.device_selection_configuration.as_ref()
42    }
43    /// <p>The name for the run to be scheduled.</p>
44    pub fn name(&self) -> ::std::option::Option<&str> {
45        self.name.as_deref()
46    }
47    /// <p>Information about the test for the run to be scheduled.</p>
48    pub fn test(&self) -> ::std::option::Option<&crate::types::ScheduleRunTest> {
49        self.test.as_ref()
50    }
51    /// <p>Information about the settings for the run to be scheduled.</p>
52    pub fn configuration(&self) -> ::std::option::Option<&crate::types::ScheduleRunConfiguration> {
53        self.configuration.as_ref()
54    }
55    /// <p>Specifies configuration information about a test run, such as the execution timeout (in minutes).</p>
56    pub fn execution_configuration(&self) -> ::std::option::Option<&crate::types::ExecutionConfiguration> {
57        self.execution_configuration.as_ref()
58    }
59}
60impl ScheduleRunInput {
61    /// Creates a new builder-style object to manufacture [`ScheduleRunInput`](crate::operation::schedule_run::ScheduleRunInput).
62    pub fn builder() -> crate::operation::schedule_run::builders::ScheduleRunInputBuilder {
63        crate::operation::schedule_run::builders::ScheduleRunInputBuilder::default()
64    }
65}
66
67/// A builder for [`ScheduleRunInput`](crate::operation::schedule_run::ScheduleRunInput).
68#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
69#[non_exhaustive]
70pub struct ScheduleRunInputBuilder {
71    pub(crate) project_arn: ::std::option::Option<::std::string::String>,
72    pub(crate) app_arn: ::std::option::Option<::std::string::String>,
73    pub(crate) device_pool_arn: ::std::option::Option<::std::string::String>,
74    pub(crate) device_selection_configuration: ::std::option::Option<crate::types::DeviceSelectionConfiguration>,
75    pub(crate) name: ::std::option::Option<::std::string::String>,
76    pub(crate) test: ::std::option::Option<crate::types::ScheduleRunTest>,
77    pub(crate) configuration: ::std::option::Option<crate::types::ScheduleRunConfiguration>,
78    pub(crate) execution_configuration: ::std::option::Option<crate::types::ExecutionConfiguration>,
79}
80impl ScheduleRunInputBuilder {
81    /// <p>The ARN of the project for the run to be scheduled.</p>
82    /// This field is required.
83    pub fn project_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
84        self.project_arn = ::std::option::Option::Some(input.into());
85        self
86    }
87    /// <p>The ARN of the project for the run to be scheduled.</p>
88    pub fn set_project_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
89        self.project_arn = input;
90        self
91    }
92    /// <p>The ARN of the project for the run to be scheduled.</p>
93    pub fn get_project_arn(&self) -> &::std::option::Option<::std::string::String> {
94        &self.project_arn
95    }
96    /// <p>The ARN of an application package to run tests against, created with <code>CreateUpload</code>. See <code>ListUploads</code>.</p>
97    pub fn app_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
98        self.app_arn = ::std::option::Option::Some(input.into());
99        self
100    }
101    /// <p>The ARN of an application package to run tests against, created with <code>CreateUpload</code>. See <code>ListUploads</code>.</p>
102    pub fn set_app_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
103        self.app_arn = input;
104        self
105    }
106    /// <p>The ARN of an application package to run tests against, created with <code>CreateUpload</code>. See <code>ListUploads</code>.</p>
107    pub fn get_app_arn(&self) -> &::std::option::Option<::std::string::String> {
108        &self.app_arn
109    }
110    /// <p>The ARN of the device pool for the run to be scheduled.</p>
111    pub fn device_pool_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
112        self.device_pool_arn = ::std::option::Option::Some(input.into());
113        self
114    }
115    /// <p>The ARN of the device pool for the run to be scheduled.</p>
116    pub fn set_device_pool_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
117        self.device_pool_arn = input;
118        self
119    }
120    /// <p>The ARN of the device pool for the run to be scheduled.</p>
121    pub fn get_device_pool_arn(&self) -> &::std::option::Option<::std::string::String> {
122        &self.device_pool_arn
123    }
124    /// <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>
125    /// <p>Either <b> <code>devicePoolArn</code> </b> or <b> <code>deviceSelectionConfiguration</code> </b> is required in a request.</p>
126    pub fn device_selection_configuration(mut self, input: crate::types::DeviceSelectionConfiguration) -> Self {
127        self.device_selection_configuration = ::std::option::Option::Some(input);
128        self
129    }
130    /// <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>
131    /// <p>Either <b> <code>devicePoolArn</code> </b> or <b> <code>deviceSelectionConfiguration</code> </b> is required in a request.</p>
132    pub fn set_device_selection_configuration(mut self, input: ::std::option::Option<crate::types::DeviceSelectionConfiguration>) -> Self {
133        self.device_selection_configuration = input;
134        self
135    }
136    /// <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>
137    /// <p>Either <b> <code>devicePoolArn</code> </b> or <b> <code>deviceSelectionConfiguration</code> </b> is required in a request.</p>
138    pub fn get_device_selection_configuration(&self) -> &::std::option::Option<crate::types::DeviceSelectionConfiguration> {
139        &self.device_selection_configuration
140    }
141    /// <p>The name for the run to be scheduled.</p>
142    pub fn name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
143        self.name = ::std::option::Option::Some(input.into());
144        self
145    }
146    /// <p>The name for the run to be scheduled.</p>
147    pub fn set_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
148        self.name = input;
149        self
150    }
151    /// <p>The name for the run to be scheduled.</p>
152    pub fn get_name(&self) -> &::std::option::Option<::std::string::String> {
153        &self.name
154    }
155    /// <p>Information about the test for the run to be scheduled.</p>
156    /// This field is required.
157    pub fn test(mut self, input: crate::types::ScheduleRunTest) -> Self {
158        self.test = ::std::option::Option::Some(input);
159        self
160    }
161    /// <p>Information about the test for the run to be scheduled.</p>
162    pub fn set_test(mut self, input: ::std::option::Option<crate::types::ScheduleRunTest>) -> Self {
163        self.test = input;
164        self
165    }
166    /// <p>Information about the test for the run to be scheduled.</p>
167    pub fn get_test(&self) -> &::std::option::Option<crate::types::ScheduleRunTest> {
168        &self.test
169    }
170    /// <p>Information about the settings for the run to be scheduled.</p>
171    pub fn configuration(mut self, input: crate::types::ScheduleRunConfiguration) -> Self {
172        self.configuration = ::std::option::Option::Some(input);
173        self
174    }
175    /// <p>Information about the settings for the run to be scheduled.</p>
176    pub fn set_configuration(mut self, input: ::std::option::Option<crate::types::ScheduleRunConfiguration>) -> Self {
177        self.configuration = input;
178        self
179    }
180    /// <p>Information about the settings for the run to be scheduled.</p>
181    pub fn get_configuration(&self) -> &::std::option::Option<crate::types::ScheduleRunConfiguration> {
182        &self.configuration
183    }
184    /// <p>Specifies configuration information about a test run, such as the execution timeout (in minutes).</p>
185    pub fn execution_configuration(mut self, input: crate::types::ExecutionConfiguration) -> Self {
186        self.execution_configuration = ::std::option::Option::Some(input);
187        self
188    }
189    /// <p>Specifies configuration information about a test run, such as the execution timeout (in minutes).</p>
190    pub fn set_execution_configuration(mut self, input: ::std::option::Option<crate::types::ExecutionConfiguration>) -> Self {
191        self.execution_configuration = input;
192        self
193    }
194    /// <p>Specifies configuration information about a test run, such as the execution timeout (in minutes).</p>
195    pub fn get_execution_configuration(&self) -> &::std::option::Option<crate::types::ExecutionConfiguration> {
196        &self.execution_configuration
197    }
198    /// Consumes the builder and constructs a [`ScheduleRunInput`](crate::operation::schedule_run::ScheduleRunInput).
199    pub fn build(self) -> ::std::result::Result<crate::operation::schedule_run::ScheduleRunInput, ::aws_smithy_types::error::operation::BuildError> {
200        ::std::result::Result::Ok(crate::operation::schedule_run::ScheduleRunInput {
201            project_arn: self.project_arn,
202            app_arn: self.app_arn,
203            device_pool_arn: self.device_pool_arn,
204            device_selection_configuration: self.device_selection_configuration,
205            name: self.name,
206            test: self.test,
207            configuration: self.configuration,
208            execution_configuration: self.execution_configuration,
209        })
210    }
211}