aws_sdk_devicefarm/operation/schedule_run/
_schedule_run_input.rs

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
// 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,
        })
    }
}