aws-sdk-backupexternal 1.0.0

AWS SDK for AWS Backup External
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
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.
#[allow(missing_docs)] // documentation missing in model
#[non_exhaustive]
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::fmt::Debug)]
pub struct GetApplianceOutput {
    /// The Amazon Resource Name (ARN) of the appliance.
    pub appliance_arn: ::std::string::String,
    /// The name of the appliance.
    pub appliance_name: ::std::string::String,
    /// The environment in which the appliance runs.
    pub environment_type: crate::types::ApplianceEnvironmentType,
    /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role used by the appliance.
    pub appliance_iam_role_arn: ::std::string::String,
    /// The number of node failures that the appliance can tolerate.
    pub node_fault_tolerance: i32,
    /// The network configuration of the appliance.
    pub network_configuration: ::std::option::Option<crate::types::ApplianceNetworkConfigurationForGetAppliance>,
    /// The management status of the appliance.
    pub appliance_management_status: crate::types::ApplianceManagementStatus,
    /// The operation mode of the appliance.
    pub appliance_operation_mode: crate::types::ApplianceOperationMode,
    /// The health status of the appliance.
    pub health_status: ::std::option::Option<crate::types::ApplianceHealthStatus>,
    /// The notifications for the appliance.
    pub notifications: ::std::option::Option<::std::vec::Vec<crate::types::Notification>>,
    /// The date and time that the appliance was created.
    pub created_at: ::aws_smithy_types::DateTime,
    /// The date and time that the appliance was deleted.
    pub deleted_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// The date and time that the appliance was last patched.
    pub patched_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    /// The software version of the appliance.
    pub software_version: ::std::option::Option<::std::string::String>,
    /// The tags associated with the resource.
    pub tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    _request_id: Option<String>,
}
impl GetApplianceOutput {
    /// The Amazon Resource Name (ARN) of the appliance.
    pub fn appliance_arn(&self) -> &str {
        use std::ops::Deref;
        self.appliance_arn.deref()
    }
    /// The name of the appliance.
    pub fn appliance_name(&self) -> &str {
        use std::ops::Deref;
        self.appliance_name.deref()
    }
    /// The environment in which the appliance runs.
    pub fn environment_type(&self) -> &crate::types::ApplianceEnvironmentType {
        &self.environment_type
    }
    /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role used by the appliance.
    pub fn appliance_iam_role_arn(&self) -> &str {
        use std::ops::Deref;
        self.appliance_iam_role_arn.deref()
    }
    /// The number of node failures that the appliance can tolerate.
    pub fn node_fault_tolerance(&self) -> i32 {
        self.node_fault_tolerance
    }
    /// The network configuration of the appliance.
    pub fn network_configuration(&self) -> ::std::option::Option<&crate::types::ApplianceNetworkConfigurationForGetAppliance> {
        self.network_configuration.as_ref()
    }
    /// The management status of the appliance.
    pub fn appliance_management_status(&self) -> &crate::types::ApplianceManagementStatus {
        &self.appliance_management_status
    }
    /// The operation mode of the appliance.
    pub fn appliance_operation_mode(&self) -> &crate::types::ApplianceOperationMode {
        &self.appliance_operation_mode
    }
    /// The health status of the appliance.
    pub fn health_status(&self) -> ::std::option::Option<&crate::types::ApplianceHealthStatus> {
        self.health_status.as_ref()
    }
    /// The notifications for the appliance.
    ///
    /// If no value was sent for this field, a default will be set. If you want to determine if no value was sent, use `.notifications.is_none()`.
    pub fn notifications(&self) -> &[crate::types::Notification] {
        self.notifications.as_deref().unwrap_or_default()
    }
    /// The date and time that the appliance was created.
    pub fn created_at(&self) -> &::aws_smithy_types::DateTime {
        &self.created_at
    }
    /// The date and time that the appliance was deleted.
    pub fn deleted_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.deleted_at.as_ref()
    }
    /// The date and time that the appliance was last patched.
    pub fn patched_at(&self) -> ::std::option::Option<&::aws_smithy_types::DateTime> {
        self.patched_at.as_ref()
    }
    /// The software version of the appliance.
    pub fn software_version(&self) -> ::std::option::Option<&str> {
        self.software_version.as_deref()
    }
    /// The tags associated with the resource.
    pub fn tags(&self) -> ::std::option::Option<&::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        self.tags.as_ref()
    }
}
impl ::aws_types::request_id::RequestId for GetApplianceOutput {
    fn request_id(&self) -> Option<&str> {
        self._request_id.as_deref()
    }
}
impl GetApplianceOutput {
    /// Creates a new builder-style object to manufacture [`GetApplianceOutput`](crate::operation::get_appliance::GetApplianceOutput).
    pub fn builder() -> crate::operation::get_appliance::builders::GetApplianceOutputBuilder {
        crate::operation::get_appliance::builders::GetApplianceOutputBuilder::default()
    }
}

/// A builder for [`GetApplianceOutput`](crate::operation::get_appliance::GetApplianceOutput).
#[derive(::std::clone::Clone, ::std::cmp::PartialEq, ::std::default::Default, ::std::fmt::Debug)]
#[non_exhaustive]
pub struct GetApplianceOutputBuilder {
    pub(crate) appliance_arn: ::std::option::Option<::std::string::String>,
    pub(crate) appliance_name: ::std::option::Option<::std::string::String>,
    pub(crate) environment_type: ::std::option::Option<crate::types::ApplianceEnvironmentType>,
    pub(crate) appliance_iam_role_arn: ::std::option::Option<::std::string::String>,
    pub(crate) node_fault_tolerance: ::std::option::Option<i32>,
    pub(crate) network_configuration: ::std::option::Option<crate::types::ApplianceNetworkConfigurationForGetAppliance>,
    pub(crate) appliance_management_status: ::std::option::Option<crate::types::ApplianceManagementStatus>,
    pub(crate) appliance_operation_mode: ::std::option::Option<crate::types::ApplianceOperationMode>,
    pub(crate) health_status: ::std::option::Option<crate::types::ApplianceHealthStatus>,
    pub(crate) notifications: ::std::option::Option<::std::vec::Vec<crate::types::Notification>>,
    pub(crate) created_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) deleted_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) patched_at: ::std::option::Option<::aws_smithy_types::DateTime>,
    pub(crate) software_version: ::std::option::Option<::std::string::String>,
    pub(crate) tags: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>,
    _request_id: Option<String>,
}
impl GetApplianceOutputBuilder {
    /// The Amazon Resource Name (ARN) of the appliance.
    /// This field is required.
    pub fn appliance_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.appliance_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The Amazon Resource Name (ARN) of the appliance.
    pub fn set_appliance_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.appliance_arn = input;
        self
    }
    /// The Amazon Resource Name (ARN) of the appliance.
    pub fn get_appliance_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.appliance_arn
    }
    /// The name of the appliance.
    /// This field is required.
    pub fn appliance_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.appliance_name = ::std::option::Option::Some(input.into());
        self
    }
    /// The name of the appliance.
    pub fn set_appliance_name(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.appliance_name = input;
        self
    }
    /// The name of the appliance.
    pub fn get_appliance_name(&self) -> &::std::option::Option<::std::string::String> {
        &self.appliance_name
    }
    /// The environment in which the appliance runs.
    /// This field is required.
    pub fn environment_type(mut self, input: crate::types::ApplianceEnvironmentType) -> Self {
        self.environment_type = ::std::option::Option::Some(input);
        self
    }
    /// The environment in which the appliance runs.
    pub fn set_environment_type(mut self, input: ::std::option::Option<crate::types::ApplianceEnvironmentType>) -> Self {
        self.environment_type = input;
        self
    }
    /// The environment in which the appliance runs.
    pub fn get_environment_type(&self) -> &::std::option::Option<crate::types::ApplianceEnvironmentType> {
        &self.environment_type
    }
    /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role used by the appliance.
    /// This field is required.
    pub fn appliance_iam_role_arn(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.appliance_iam_role_arn = ::std::option::Option::Some(input.into());
        self
    }
    /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role used by the appliance.
    pub fn set_appliance_iam_role_arn(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.appliance_iam_role_arn = input;
        self
    }
    /// The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role used by the appliance.
    pub fn get_appliance_iam_role_arn(&self) -> &::std::option::Option<::std::string::String> {
        &self.appliance_iam_role_arn
    }
    /// The number of node failures that the appliance can tolerate.
    /// This field is required.
    pub fn node_fault_tolerance(mut self, input: i32) -> Self {
        self.node_fault_tolerance = ::std::option::Option::Some(input);
        self
    }
    /// The number of node failures that the appliance can tolerate.
    pub fn set_node_fault_tolerance(mut self, input: ::std::option::Option<i32>) -> Self {
        self.node_fault_tolerance = input;
        self
    }
    /// The number of node failures that the appliance can tolerate.
    pub fn get_node_fault_tolerance(&self) -> &::std::option::Option<i32> {
        &self.node_fault_tolerance
    }
    /// The network configuration of the appliance.
    /// This field is required.
    pub fn network_configuration(mut self, input: crate::types::ApplianceNetworkConfigurationForGetAppliance) -> Self {
        self.network_configuration = ::std::option::Option::Some(input);
        self
    }
    /// The network configuration of the appliance.
    pub fn set_network_configuration(mut self, input: ::std::option::Option<crate::types::ApplianceNetworkConfigurationForGetAppliance>) -> Self {
        self.network_configuration = input;
        self
    }
    /// The network configuration of the appliance.
    pub fn get_network_configuration(&self) -> &::std::option::Option<crate::types::ApplianceNetworkConfigurationForGetAppliance> {
        &self.network_configuration
    }
    /// The management status of the appliance.
    /// This field is required.
    pub fn appliance_management_status(mut self, input: crate::types::ApplianceManagementStatus) -> Self {
        self.appliance_management_status = ::std::option::Option::Some(input);
        self
    }
    /// The management status of the appliance.
    pub fn set_appliance_management_status(mut self, input: ::std::option::Option<crate::types::ApplianceManagementStatus>) -> Self {
        self.appliance_management_status = input;
        self
    }
    /// The management status of the appliance.
    pub fn get_appliance_management_status(&self) -> &::std::option::Option<crate::types::ApplianceManagementStatus> {
        &self.appliance_management_status
    }
    /// The operation mode of the appliance.
    /// This field is required.
    pub fn appliance_operation_mode(mut self, input: crate::types::ApplianceOperationMode) -> Self {
        self.appliance_operation_mode = ::std::option::Option::Some(input);
        self
    }
    /// The operation mode of the appliance.
    pub fn set_appliance_operation_mode(mut self, input: ::std::option::Option<crate::types::ApplianceOperationMode>) -> Self {
        self.appliance_operation_mode = input;
        self
    }
    /// The operation mode of the appliance.
    pub fn get_appliance_operation_mode(&self) -> &::std::option::Option<crate::types::ApplianceOperationMode> {
        &self.appliance_operation_mode
    }
    /// The health status of the appliance.
    pub fn health_status(mut self, input: crate::types::ApplianceHealthStatus) -> Self {
        self.health_status = ::std::option::Option::Some(input);
        self
    }
    /// The health status of the appliance.
    pub fn set_health_status(mut self, input: ::std::option::Option<crate::types::ApplianceHealthStatus>) -> Self {
        self.health_status = input;
        self
    }
    /// The health status of the appliance.
    pub fn get_health_status(&self) -> &::std::option::Option<crate::types::ApplianceHealthStatus> {
        &self.health_status
    }
    /// Appends an item to `notifications`.
    ///
    /// To override the contents of this collection use [`set_notifications`](Self::set_notifications).
    ///
    /// The notifications for the appliance.
    pub fn notifications(mut self, input: crate::types::Notification) -> Self {
        let mut v = self.notifications.unwrap_or_default();
        v.push(input);
        self.notifications = ::std::option::Option::Some(v);
        self
    }
    /// The notifications for the appliance.
    pub fn set_notifications(mut self, input: ::std::option::Option<::std::vec::Vec<crate::types::Notification>>) -> Self {
        self.notifications = input;
        self
    }
    /// The notifications for the appliance.
    pub fn get_notifications(&self) -> &::std::option::Option<::std::vec::Vec<crate::types::Notification>> {
        &self.notifications
    }
    /// The date and time that the appliance was created.
    /// 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
    }
    /// The date and time that the appliance was created.
    pub fn set_created_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.created_at = input;
        self
    }
    /// The date and time that the appliance was created.
    pub fn get_created_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.created_at
    }
    /// The date and time that the appliance was deleted.
    pub fn deleted_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.deleted_at = ::std::option::Option::Some(input);
        self
    }
    /// The date and time that the appliance was deleted.
    pub fn set_deleted_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.deleted_at = input;
        self
    }
    /// The date and time that the appliance was deleted.
    pub fn get_deleted_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.deleted_at
    }
    /// The date and time that the appliance was last patched.
    pub fn patched_at(mut self, input: ::aws_smithy_types::DateTime) -> Self {
        self.patched_at = ::std::option::Option::Some(input);
        self
    }
    /// The date and time that the appliance was last patched.
    pub fn set_patched_at(mut self, input: ::std::option::Option<::aws_smithy_types::DateTime>) -> Self {
        self.patched_at = input;
        self
    }
    /// The date and time that the appliance was last patched.
    pub fn get_patched_at(&self) -> &::std::option::Option<::aws_smithy_types::DateTime> {
        &self.patched_at
    }
    /// The software version of the appliance.
    pub fn software_version(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {
        self.software_version = ::std::option::Option::Some(input.into());
        self
    }
    /// The software version of the appliance.
    pub fn set_software_version(mut self, input: ::std::option::Option<::std::string::String>) -> Self {
        self.software_version = input;
        self
    }
    /// The software version of the appliance.
    pub fn get_software_version(&self) -> &::std::option::Option<::std::string::String> {
        &self.software_version
    }
    /// Adds a key-value pair to `tags`.
    ///
    /// To override the contents of this collection use [`set_tags`](Self::set_tags).
    ///
    /// The tags associated with the resource.
    pub fn tags(mut self, k: impl ::std::convert::Into<::std::string::String>, v: impl ::std::convert::Into<::std::string::String>) -> Self {
        let mut hash_map = self.tags.unwrap_or_default();
        hash_map.insert(k.into(), v.into());
        self.tags = ::std::option::Option::Some(hash_map);
        self
    }
    /// The tags associated with the resource.
    pub fn set_tags(mut self, input: ::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>>) -> Self {
        self.tags = input;
        self
    }
    /// The tags associated with the resource.
    pub fn get_tags(&self) -> &::std::option::Option<::std::collections::HashMap<::std::string::String, ::std::string::String>> {
        &self.tags
    }
    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 [`GetApplianceOutput`](crate::operation::get_appliance::GetApplianceOutput).
    /// This method will fail if any of the following fields are not set:
    /// - [`appliance_arn`](crate::operation::get_appliance::builders::GetApplianceOutputBuilder::appliance_arn)
    /// - [`appliance_name`](crate::operation::get_appliance::builders::GetApplianceOutputBuilder::appliance_name)
    /// - [`environment_type`](crate::operation::get_appliance::builders::GetApplianceOutputBuilder::environment_type)
    /// - [`appliance_iam_role_arn`](crate::operation::get_appliance::builders::GetApplianceOutputBuilder::appliance_iam_role_arn)
    /// - [`node_fault_tolerance`](crate::operation::get_appliance::builders::GetApplianceOutputBuilder::node_fault_tolerance)
    /// - [`appliance_management_status`](crate::operation::get_appliance::builders::GetApplianceOutputBuilder::appliance_management_status)
    /// - [`appliance_operation_mode`](crate::operation::get_appliance::builders::GetApplianceOutputBuilder::appliance_operation_mode)
    /// - [`created_at`](crate::operation::get_appliance::builders::GetApplianceOutputBuilder::created_at)
    pub fn build(
        self,
    ) -> ::std::result::Result<crate::operation::get_appliance::GetApplianceOutput, ::aws_smithy_types::error::operation::BuildError> {
        ::std::result::Result::Ok(crate::operation::get_appliance::GetApplianceOutput {
            appliance_arn: self.appliance_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "appliance_arn",
                    "appliance_arn was not specified but it is required when building GetApplianceOutput",
                )
            })?,
            appliance_name: self.appliance_name.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "appliance_name",
                    "appliance_name was not specified but it is required when building GetApplianceOutput",
                )
            })?,
            environment_type: self.environment_type.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "environment_type",
                    "environment_type was not specified but it is required when building GetApplianceOutput",
                )
            })?,
            appliance_iam_role_arn: self.appliance_iam_role_arn.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "appliance_iam_role_arn",
                    "appliance_iam_role_arn was not specified but it is required when building GetApplianceOutput",
                )
            })?,
            node_fault_tolerance: self.node_fault_tolerance.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "node_fault_tolerance",
                    "node_fault_tolerance was not specified but it is required when building GetApplianceOutput",
                )
            })?,
            network_configuration: self.network_configuration,
            appliance_management_status: self.appliance_management_status.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "appliance_management_status",
                    "appliance_management_status was not specified but it is required when building GetApplianceOutput",
                )
            })?,
            appliance_operation_mode: self.appliance_operation_mode.ok_or_else(|| {
                ::aws_smithy_types::error::operation::BuildError::missing_field(
                    "appliance_operation_mode",
                    "appliance_operation_mode was not specified but it is required when building GetApplianceOutput",
                )
            })?,
            health_status: self.health_status,
            notifications: self.notifications,
            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 GetApplianceOutput",
                )
            })?,
            deleted_at: self.deleted_at,
            patched_at: self.patched_at,
            software_version: self.software_version,
            tags: self.tags,
            _request_id: self._request_id,
        })
    }
}