aws-sdk-deadline 1.102.0

AWS SDK for AWSDeadlineCloud
Documentation
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
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.

/// Mixin that adds an optional ARN field to response structures. Apply to SummaryMixins (flows into Get, Summary, and BatchGet) and Create outputs.
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetVolumeOutput {
    /// <p>The volume ID.</p>
    pub volume_id: ::std::string::String,
    /// <p>The farm ID of the farm that contains the fleet.</p>
    pub farm_id: ::std::string::String,
    /// <p>The fleet ID of the fleet that contains the volume.</p>
    pub fleet_id: ::std::string::String,
    /// <p>The state of the volume.</p>
    pub state: crate::types::VolumeState,
    /// <p>The volume size in GiB.</p>
    pub size_gib: i32,
    /// <p>The Availability Zone ID of the volume.</p>
    pub availability_zone_id: ::std::string::String,
    /// <p>The worker ID of the worker the volume is attached to.</p>
    pub attached_worker_id: ::std::option::Option<::std::string::String>,
    /// <p>The EBS volume type.</p>
    pub volume_type: crate::types::EbsVolumeType,
    /// <p>The IOPS of the volume.</p>
    pub iops: ::std::option::Option<i32>,
    /// <p>The throughput of the volume in MiB.</p>
    pub throughput_mib: ::std::option::Option<i32>,
    /// <p>The date and time the resource was created.</p>
    pub created_at: ::aws_smithy_types::DateTime,
    /// <p>The date and time the volume was last assigned to a worker.</p>
    pub last_assigned_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The date and time the volume was last released from a worker.</p>
    pub last_released_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// <p>The date and time the volume expires and will be deleted.</p>
    pub expires_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl GetVolumeOutput {
    /// <p>The volume ID.</p>
    pub fn volume_id(&self) -> &str {
        use std::ops::Deref;
        self.volume_id.deref()
    }
    /// <p>The farm ID of the farm that contains the fleet.</p>
    pub fn farm_id(&self) -> &str {
        use std::ops::Deref;
        self.farm_id.deref()
    }
    /// <p>The fleet ID of the fleet that contains the volume.</p>
    pub fn fleet_id(&self) -> &str {
        use std::ops::Deref;
        self.fleet_id.deref()
    }
    /// <p>The state of the volume.</p>
    pub fn state(&self) -> &crate::types::VolumeState {
        &self.state
    }
    /// <p>The volume size in GiB.</p>
    pub fn size_gib(&self) -> i32 {
        self.size_gib
    }
    /// <p>The Availability Zone ID of the volume.</p>
    pub fn availability_zone_id(&self) -> &str {
        use std::ops::Deref;
        self.availability_zone_id.deref()
    }
    /// <p>The worker ID of the worker the volume is attached to.</p>
    pub fn attached_worker_id(&self) -> ::std::option::Option<&str> {
        self.attached_worker_id.as_deref()
    }
    /// <p>The EBS volume type.</p>
    pub fn volume_type(&self) -> &crate::types::EbsVolumeType {
        &self.volume_type
    }
    /// <p>The IOPS of the volume.</p>
    pub fn iops(&self) -> ::std::option::Option<i32> {
        self.iops
    }
    /// <p>The throughput of the volume in MiB.</p>
    pub fn throughput_mib(&self) -> ::std::option::Option<i32> {
        self.throughput_mib
    }
    /// <p>The date and time the resource was created.</p>
    pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
        &self.created_at
    }
    /// <p>The date and time the volume was last assigned to a worker.</p>
    pub fn last_assigned_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_assigned_at.as_ref()
    }
    /// <p>The date and time the volume was last released from a worker.</p>
    pub fn last_released_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.last_released_at.as_ref()
    }
    /// <p>The date and time the volume expires and will be deleted.</p>
    pub fn expires_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.expires_at.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetVolumeOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetVolumeOutput {
    /// Creates a new builder-style object to manufacture [`GetVolumeOutput`](crate::operation::get_volume::GetVolumeOutput).
    pub fn builder() -> crate::operation::get_volume::builders::GetVolumeOutputBuilder {
        crate::operation::get_volume::builders::GetVolumeOutputBuilder::default()
    }
}

/// A builder for [`GetVolumeOutput`](crate::operation::get_volume::GetVolumeOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetVolumeOutputBuilder {
    pub(crate) volume_id: ::std::option::Option<::std::string::String>,
    pub(crate) farm_id: ::std::option::Option<::std::string::String>,
    pub(crate) fleet_id: ::std::option::Option<::std::string::String>,
    pub(crate) state: ::std::option::Option<crate::types::VolumeState>,
    pub(crate) size_gib: ::std::option::Option<i32>,
    pub(crate) availability_zone_id: ::std::option::Option<::std::string::String>,
    pub(crate) attached_worker_id: ::std::option::Option<::std::string::String>,
    pub(crate) volume_type: ::std::option::Option<crate::types::EbsVolumeType>,
    pub(crate) iops: ::std::option::Option<i32>,
    pub(crate) throughput_mib: ::std::option::Option<i32>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_assigned_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) last_released_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) expires_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    _request_id: Option<String>,
}
impl GetVolumeOutputBuilder {
    /// <p>The volume ID.</p>
    /// This field is required.
    pub fn volume_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.volume_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The volume ID.</p>
    pub fn set_volume_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.volume_id = input;
        self
    }
    /// <p>The volume ID.</p>
    pub fn get_volume_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.volume_id
    }
    /// <p>The farm ID of the farm that contains the fleet.</p>
    /// This field is required.
    pub fn farm_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.farm_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The farm ID of the farm that contains the fleet.</p>
    pub fn set_farm_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.farm_id = input;
        self
    }
    /// <p>The farm ID of the farm that contains the fleet.</p>
    pub fn get_farm_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.farm_id
    }
    /// <p>The fleet ID of the fleet that contains the volume.</p>
    /// This field is required.
    pub fn fleet_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.fleet_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The fleet ID of the fleet that contains the volume.</p>
    pub fn set_fleet_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.fleet_id = input;
        self
    }
    /// <p>The fleet ID of the fleet that contains the volume.</p>
    pub fn get_fleet_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.fleet_id
    }
    /// <p>The state of the volume.</p>
    /// This field is required.
    pub fn state(mut self, input: crate::types::VolumeState) -> Self {
        self.state = ::std::option::Option::Some(input);
        self
    }
    /// <p>The state of the volume.</p>
    pub fn set_state(mut self, input: ::std::option::Option<crate::types::VolumeState>) -> Self {
        self.state = input;
        self
    }
    /// <p>The state of the volume.</p>
    pub fn get_state(&self) -> &::std::option::Option<crate::types::VolumeState> {
        &self.state
    }
    /// <p>The volume size in GiB.</p>
    /// This field is required.
    pub fn size_gib(mut self, input: i32) -> Self {
        self.size_gib = ::std::option::Option::Some(input);
        self
    }
    /// <p>The volume size in GiB.</p>
    pub fn set_size_gib(mut self, input: ::std::option::Option<i32>) -> Self {
        self.size_gib = input;
        self
    }
    /// <p>The volume size in GiB.</p>
    pub fn get_size_gib(&self) -> &::std::option::Option<i32> {
        &self.size_gib
    }
    /// <p>The Availability Zone ID of the volume.</p>
    /// This field is required.
    pub fn availability_zone_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.availability_zone_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The Availability Zone ID of the volume.</p>
    pub fn set_availability_zone_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.availability_zone_id = input;
        self
    }
    /// <p>The Availability Zone ID of the volume.</p>
    pub fn get_availability_zone_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.availability_zone_id
    }
    /// <p>The worker ID of the worker the volume is attached to.</p>
    pub fn attached_worker_id(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.attached_worker_id = ::std::option::Option::Some(input.into());
        self
    }
    /// <p>The worker ID of the worker the volume is attached to.</p>
    pub fn set_attached_worker_id(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.attached_worker_id = input;
        self
    }
    /// <p>The worker ID of the worker the volume is attached to.</p>
    pub fn get_attached_worker_id(&self) -> &::std::option::Option<::std::string::String> {
        &self.attached_worker_id
    }
    /// <p>The EBS volume type.</p>
    /// This field is required.
    pub fn volume_type(mut self, input: crate::types::EbsVolumeType) -> Self {
        self.volume_type = ::std::option::Option::Some(input);
        self
    }
    /// <p>The EBS volume type.</p>
    pub fn set_volume_type(mut self, input: ::std::option::Option<crate::types::EbsVolumeType>) -> Self {
        self.volume_type = input;
        self
    }
    /// <p>The EBS volume type.</p>
    pub fn get_volume_type(&self) -> &::std::option::Option<crate::types::EbsVolumeType> {
        &self.volume_type
    }
    /// <p>The IOPS of the volume.</p>
    pub fn iops(mut self, input: i32) -> Self {
        self.iops = ::std::option::Option::Some(input);
        self
    }
    /// <p>The IOPS of the volume.</p>
    pub fn set_iops(mut self, input: ::std::option::Option<i32>) -> Self {
        self.iops = input;
        self
    }
    /// <p>The IOPS of the volume.</p>
    pub fn get_iops(&self) -> &::std::option::Option<i32> {
        &self.iops
    }
    /// <p>The throughput of the volume in MiB.</p>
    pub fn throughput_mib(mut self, input: i32) -> Self {
        self.throughput_mib = ::std::option::Option::Some(input);
        self
    }
    /// <p>The throughput of the volume in MiB.</p>
    pub fn set_throughput_mib(mut self, input: ::std::option::Option<i32>) -> Self {
        self.throughput_mib = input;
        self
    }
    /// <p>The throughput of the volume in MiB.</p>
    pub fn get_throughput_mib(&self) -> &::std::option::Option<i32> {
        &self.throughput_mib
    }
    /// <p>The date and time the resource was created.</p>
    /// This field is required.
    pub fn created_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.created_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time the resource was created.</p>
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// <p>The date and time the resource was created.</p>
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// <p>The date and time the volume was last assigned to a worker.</p>
    pub fn last_assigned_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_assigned_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time the volume was last assigned to a worker.</p>
    pub fn set_last_assigned_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_assigned_at = input;
        self
    }
    /// <p>The date and time the volume was last assigned to a worker.</p>
    pub fn get_last_assigned_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_assigned_at
    }
    /// <p>The date and time the volume was last released from a worker.</p>
    pub fn last_released_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.last_released_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time the volume was last released from a worker.</p>
    pub fn set_last_released_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.last_released_at = input;
        self
    }
    /// <p>The date and time the volume was last released from a worker.</p>
    pub fn get_last_released_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.last_released_at
    }
    /// <p>The date and time the volume expires and will be deleted.</p>
    pub fn expires_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.expires_at = ::std::option::Option::Some(input);
        self
    }
    /// <p>The date and time the volume expires and will be deleted.</p>
    pub fn set_expires_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.expires_at = input;
        self
    }
    /// <p>The date and time the volume expires and will be deleted.</p>
    pub fn get_expires_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.expires_at
    }
    pub(crate) fn _request_id(mut self, request_id: impl Into<String>) -> Self {
        self._request_id = Some(request_id.into());
        self
    }

    pub(crate) fn _set_request_id(&mut self, request_id: Option<String>) -> &mut Self {
        self._request_id = request_id;
        self
    }
    /// Consumes the builder and constructs a [`GetVolumeOutput`](crate::operation::get_volume::GetVolumeOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`volume_id`](crate::operation::get_volume::builders::GetVolumeOutputBuilder::volume_id)
    /// - [`farm_id`](crate::operation::get_volume::builders::GetVolumeOutputBuilder::farm_id)
    /// - [`fleet_id`](crate::operation::get_volume::builders::GetVolumeOutputBuilder::fleet_id)
    /// - [`state`](crate::operation::get_volume::builders::GetVolumeOutputBuilder::state)
    /// - [`size_gib`](crate::operation::get_volume::builders::GetVolumeOutputBuilder::size_gib)
    /// - [`availability_zone_id`](crate::operation::get_volume::builders::GetVolumeOutputBuilder::availability_zone_id)
    /// - [`volume_type`](crate::operation::get_volume::builders::GetVolumeOutputBuilder::volume_type)
    /// - [`created_at`](crate::operation::get_volume::builders::GetVolumeOutputBuilder::created_at)
    pub fn build(self) -> ::std::result::Result<crate::operation::get_volume::GetVolumeOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_volume::GetVolumeOutput {
            volume_id: self.volume_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "volume_id",
                    "volume_id was not specified but it is required when building GetVolumeOutput",
                )
            })?,
            farm_id: self.farm_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "farm_id",
                    "farm_id was not specified but it is required when building GetVolumeOutput",
                )
            })?,
            fleet_id: self.fleet_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "fleet_id",
                    "fleet_id was not specified but it is required when building GetVolumeOutput",
                )
            })?,
            state: self.state.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "state",
                    "state was not specified but it is required when building GetVolumeOutput",
                )
            })?,
            size_gib: self.size_gib.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "size_gib",
                    "size_gib was not specified but it is required when building GetVolumeOutput",
                )
            })?,
            availability_zone_id: self.availability_zone_id.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "availability_zone_id",
                    "availability_zone_id was not specified but it is required when building GetVolumeOutput",
                )
            })?,
            attached_worker_id: self.attached_worker_id,
            volume_type: self.volume_type.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "volume_type",
                    "volume_type was not specified but it is required when building GetVolumeOutput",
                )
            })?,
            iops: self.iops,
            throughput_mib: self.throughput_mib,
            created_at: self.created_at.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "created_at",
                    "created_at was not specified but it is required when building GetVolumeOutput",
                )
            })?,
            last_assigned_at: self.last_assigned_at,
            last_released_at: self.last_released_at,
            expires_at: self.expires_at,
            _request_id: self._request_id,
        })
    }
}