rusoto_backup/
generated.rs

1// =================================================================
2//
3//                           * WARNING *
4//
5//                    This file is generated!
6//
7//  Changes made to this file will be overwritten. If changes are
8//  required to the generated code, the service_crategen project
9//  must be updated to generate the changes.
10//
11// =================================================================
12
13use std::error::Error;
14use std::fmt;
15
16use async_trait::async_trait;
17use rusoto_core::credential::ProvideAwsCredentials;
18use rusoto_core::region;
19use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
20use rusoto_core::{Client, RusotoError};
21
22use rusoto_core::param::{Params, ServiceParams};
23use rusoto_core::proto;
24use rusoto_core::signature::SignedRequest;
25#[allow(unused_imports)]
26use serde::{Deserialize, Serialize};
27use serde_json;
28/// <p>Contains detailed information about a backup job.</p>
29#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
30#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
31pub struct BackupJob {
32    /// <p>The account ID that owns the backup job.</p>
33    #[serde(rename = "AccountId")]
34    #[serde(skip_serializing_if = "Option::is_none")]
35    pub account_id: Option<String>,
36    /// <p>Uniquely identifies a request to AWS Backup to back up a resource.</p>
37    #[serde(rename = "BackupJobId")]
38    #[serde(skip_serializing_if = "Option::is_none")]
39    pub backup_job_id: Option<String>,
40    /// <p>The size, in bytes, of a backup.</p>
41    #[serde(rename = "BackupSizeInBytes")]
42    #[serde(skip_serializing_if = "Option::is_none")]
43    pub backup_size_in_bytes: Option<i64>,
44    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for example, <code>arn:aws:backup:us-east-1:123456789012:vault:aBackupVault</code>.</p>
45    #[serde(rename = "BackupVaultArn")]
46    #[serde(skip_serializing_if = "Option::is_none")]
47    pub backup_vault_arn: Option<String>,
48    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
49    #[serde(rename = "BackupVaultName")]
50    #[serde(skip_serializing_if = "Option::is_none")]
51    pub backup_vault_name: Option<String>,
52    /// <p>The size in bytes transferred to a backup vault at the time that the job status was queried.</p>
53    #[serde(rename = "BytesTransferred")]
54    #[serde(skip_serializing_if = "Option::is_none")]
55    pub bytes_transferred: Option<i64>,
56    /// <p>The date and time a job to create a backup job is completed, in Unix format and Coordinated Universal Time (UTC). The value of <code>CompletionDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
57    #[serde(rename = "CompletionDate")]
58    #[serde(skip_serializing_if = "Option::is_none")]
59    pub completion_date: Option<f64>,
60    /// <p>Contains identifying information about the creation of a backup job, including the <code>BackupPlanArn</code>, <code>BackupPlanId</code>, <code>BackupPlanVersion</code>, and <code>BackupRuleId</code> of the backup plan used to create it.</p>
61    #[serde(rename = "CreatedBy")]
62    #[serde(skip_serializing_if = "Option::is_none")]
63    pub created_by: Option<RecoveryPointCreator>,
64    /// <p>The date and time a backup job is created, in Unix format and Coordinated Universal Time (UTC). The value of <code>CreationDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
65    #[serde(rename = "CreationDate")]
66    #[serde(skip_serializing_if = "Option::is_none")]
67    pub creation_date: Option<f64>,
68    /// <p>The date and time a job to back up resources is expected to be completed, in Unix format and Coordinated Universal Time (UTC). The value of <code>ExpectedCompletionDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
69    #[serde(rename = "ExpectedCompletionDate")]
70    #[serde(skip_serializing_if = "Option::is_none")]
71    pub expected_completion_date: Option<f64>,
72    /// <p>Specifies the IAM role ARN used to create the target recovery point; for example, <code>arn:aws:iam::123456789012:role/S3Access</code>.</p>
73    #[serde(rename = "IamRoleArn")]
74    #[serde(skip_serializing_if = "Option::is_none")]
75    pub iam_role_arn: Option<String>,
76    /// <p>Contains an estimated percentage complete of a job at the time the job status was queried.</p>
77    #[serde(rename = "PercentDone")]
78    #[serde(skip_serializing_if = "Option::is_none")]
79    pub percent_done: Option<String>,
80    /// <p>An ARN that uniquely identifies a recovery point; for example, <code>arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45</code>.</p>
81    #[serde(rename = "RecoveryPointArn")]
82    #[serde(skip_serializing_if = "Option::is_none")]
83    pub recovery_point_arn: Option<String>,
84    /// <p>An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type.</p>
85    #[serde(rename = "ResourceArn")]
86    #[serde(skip_serializing_if = "Option::is_none")]
87    pub resource_arn: Option<String>,
88    /// <p>The type of AWS resource to be backed up; for example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) database.</p>
89    #[serde(rename = "ResourceType")]
90    #[serde(skip_serializing_if = "Option::is_none")]
91    pub resource_type: Option<String>,
92    /// <p>Specifies the time in Unix format and Coordinated Universal Time (UTC) when a backup job must be started before it is canceled. The value is calculated by adding the start window to the scheduled time. So if the scheduled time were 6:00 PM and the start window is 2 hours, the <code>StartBy</code> time would be 8:00 PM on the date specified. The value of <code>StartBy</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
93    #[serde(rename = "StartBy")]
94    #[serde(skip_serializing_if = "Option::is_none")]
95    pub start_by: Option<f64>,
96    /// <p>The current state of a resource recovery point.</p>
97    #[serde(rename = "State")]
98    #[serde(skip_serializing_if = "Option::is_none")]
99    pub state: Option<String>,
100    /// <p>A detailed message explaining the status of the job to back up a resource.</p>
101    #[serde(rename = "StatusMessage")]
102    #[serde(skip_serializing_if = "Option::is_none")]
103    pub status_message: Option<String>,
104}
105
106/// <p>Contains an optional backup plan display name and an array of <code>BackupRule</code> objects, each of which specifies a backup rule. Each rule in a backup plan is a separate scheduled task and can back up a different selection of AWS resources.</p>
107#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
108#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
109pub struct BackupPlan {
110    /// <p>The display name of a backup plan.</p>
111    #[serde(rename = "BackupPlanName")]
112    pub backup_plan_name: String,
113    /// <p>An array of <code>BackupRule</code> objects, each of which specifies a scheduled task that is used to back up a selection of resources. </p>
114    #[serde(rename = "Rules")]
115    pub rules: Vec<BackupRule>,
116}
117
118/// <p>Contains an optional backup plan display name and an array of <code>BackupRule</code> objects, each of which specifies a backup rule. Each rule in a backup plan is a separate scheduled task and can back up a different selection of AWS resources. </p>
119#[derive(Clone, Debug, Default, PartialEq, Serialize)]
120#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
121pub struct BackupPlanInput {
122    /// <p>The optional display name of a backup plan.</p>
123    #[serde(rename = "BackupPlanName")]
124    pub backup_plan_name: String,
125    /// <p>An array of <code>BackupRule</code> objects, each of which specifies a scheduled task that is used to back up a selection of resources.</p>
126    #[serde(rename = "Rules")]
127    pub rules: Vec<BackupRuleInput>,
128}
129
130/// <p>An object specifying metadata associated with a backup plan template.</p>
131#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
132#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
133pub struct BackupPlanTemplatesListMember {
134    /// <p>Uniquely identifies a stored backup plan template.</p>
135    #[serde(rename = "BackupPlanTemplateId")]
136    #[serde(skip_serializing_if = "Option::is_none")]
137    pub backup_plan_template_id: Option<String>,
138    /// <p>The optional display name of a backup plan template.</p>
139    #[serde(rename = "BackupPlanTemplateName")]
140    #[serde(skip_serializing_if = "Option::is_none")]
141    pub backup_plan_template_name: Option<String>,
142}
143
144/// <p>Contains metadata about a backup plan.</p>
145#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
146#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
147pub struct BackupPlansListMember {
148    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for example, <code>arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50</code>.</p>
149    #[serde(rename = "BackupPlanArn")]
150    #[serde(skip_serializing_if = "Option::is_none")]
151    pub backup_plan_arn: Option<String>,
152    /// <p>Uniquely identifies a backup plan.</p>
153    #[serde(rename = "BackupPlanId")]
154    #[serde(skip_serializing_if = "Option::is_none")]
155    pub backup_plan_id: Option<String>,
156    /// <p>The display name of a saved backup plan.</p>
157    #[serde(rename = "BackupPlanName")]
158    #[serde(skip_serializing_if = "Option::is_none")]
159    pub backup_plan_name: Option<String>,
160    /// <p>The date and time a resource backup plan is created, in Unix format and Coordinated Universal Time (UTC). The value of <code>CreationDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
161    #[serde(rename = "CreationDate")]
162    #[serde(skip_serializing_if = "Option::is_none")]
163    pub creation_date: Option<f64>,
164    /// <p>A unique string that identifies the request and allows failed requests to be retried without the risk of executing the operation twice.</p>
165    #[serde(rename = "CreatorRequestId")]
166    #[serde(skip_serializing_if = "Option::is_none")]
167    pub creator_request_id: Option<String>,
168    /// <p>The date and time a backup plan is deleted, in Unix format and Coordinated Universal Time (UTC). The value of <code>DeletionDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
169    #[serde(rename = "DeletionDate")]
170    #[serde(skip_serializing_if = "Option::is_none")]
171    pub deletion_date: Option<f64>,
172    /// <p>The last time a job to back up resources was executed with this rule. A date and time, in Unix format and Coordinated Universal Time (UTC). The value of <code>LastExecutionDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
173    #[serde(rename = "LastExecutionDate")]
174    #[serde(skip_serializing_if = "Option::is_none")]
175    pub last_execution_date: Option<f64>,
176    /// <p>Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long. Version IDs cannot be edited.</p>
177    #[serde(rename = "VersionId")]
178    #[serde(skip_serializing_if = "Option::is_none")]
179    pub version_id: Option<String>,
180}
181
182/// <p>Specifies a scheduled task used to back up a selection of resources.</p>
183#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
184#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
185pub struct BackupRule {
186    /// <p>A value in minutes after a backup job is successfully started before it must be completed or it will be canceled by AWS Backup. This value is optional.</p>
187    #[serde(rename = "CompletionWindowMinutes")]
188    #[serde(skip_serializing_if = "Option::is_none")]
189    pub completion_window_minutes: Option<i64>,
190    /// <p>An array of <code>CopyAction</code> objects, which contains the details of the copy operation.</p>
191    #[serde(rename = "CopyActions")]
192    #[serde(skip_serializing_if = "Option::is_none")]
193    pub copy_actions: Option<Vec<CopyAction>>,
194    /// <p>The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. AWS Backup transitions and expires backups automatically according to the lifecycle that you define. </p> <p>Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold. </p>
195    #[serde(rename = "Lifecycle")]
196    #[serde(skip_serializing_if = "Option::is_none")]
197    pub lifecycle: Option<Lifecycle>,
198    /// <p>An array of key-value pair strings that are assigned to resources that are associated with this rule when restored from backup.</p>
199    #[serde(rename = "RecoveryPointTags")]
200    #[serde(skip_serializing_if = "Option::is_none")]
201    pub recovery_point_tags: Option<::std::collections::HashMap<String, String>>,
202    /// <p>Uniquely identifies a rule that is used to schedule the backup of a selection of resources.</p>
203    #[serde(rename = "RuleId")]
204    #[serde(skip_serializing_if = "Option::is_none")]
205    pub rule_id: Option<String>,
206    /// <p>An optional display name for a backup rule.</p>
207    #[serde(rename = "RuleName")]
208    pub rule_name: String,
209    /// <p>A CRON expression specifying when AWS Backup initiates a backup job.</p>
210    #[serde(rename = "ScheduleExpression")]
211    #[serde(skip_serializing_if = "Option::is_none")]
212    pub schedule_expression: Option<String>,
213    /// <p>A value in minutes after a backup is scheduled before a job will be canceled if it doesn't start successfully. This value is optional.</p>
214    #[serde(rename = "StartWindowMinutes")]
215    #[serde(skip_serializing_if = "Option::is_none")]
216    pub start_window_minutes: Option<i64>,
217    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
218    #[serde(rename = "TargetBackupVaultName")]
219    pub target_backup_vault_name: String,
220}
221
222/// <p>Specifies a scheduled task used to back up a selection of resources.</p>
223#[derive(Clone, Debug, Default, PartialEq, Serialize)]
224#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
225pub struct BackupRuleInput {
226    /// <p>A value in minutes after a backup job is successfully started before it must be completed or it will be canceled by AWS Backup. This value is optional.</p>
227    #[serde(rename = "CompletionWindowMinutes")]
228    #[serde(skip_serializing_if = "Option::is_none")]
229    pub completion_window_minutes: Option<i64>,
230    /// <p>An array of <code>CopyAction</code> objects, which contains the details of the copy operation.</p>
231    #[serde(rename = "CopyActions")]
232    #[serde(skip_serializing_if = "Option::is_none")]
233    pub copy_actions: Option<Vec<CopyAction>>,
234    /// <p>The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. AWS Backup will transition and expire backups automatically according to the lifecycle that you define. </p> <p>Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold. </p>
235    #[serde(rename = "Lifecycle")]
236    #[serde(skip_serializing_if = "Option::is_none")]
237    pub lifecycle: Option<Lifecycle>,
238    /// <p>To help organize your resources, you can assign your own metadata to the resources that you create. Each tag is a key-value pair.</p>
239    #[serde(rename = "RecoveryPointTags")]
240    #[serde(skip_serializing_if = "Option::is_none")]
241    pub recovery_point_tags: Option<::std::collections::HashMap<String, String>>,
242    /// <p>An optional display name for a backup rule.</p>
243    #[serde(rename = "RuleName")]
244    pub rule_name: String,
245    /// <p>A CRON expression specifying when AWS Backup initiates a backup job.</p>
246    #[serde(rename = "ScheduleExpression")]
247    #[serde(skip_serializing_if = "Option::is_none")]
248    pub schedule_expression: Option<String>,
249    /// <p>A value in minutes after a backup is scheduled before a job will be canceled if it doesn't start successfully. This value is optional.</p>
250    #[serde(rename = "StartWindowMinutes")]
251    #[serde(skip_serializing_if = "Option::is_none")]
252    pub start_window_minutes: Option<i64>,
253    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
254    #[serde(rename = "TargetBackupVaultName")]
255    pub target_backup_vault_name: String,
256}
257
258/// <p>Used to specify a set of resources to a backup plan.</p>
259#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
260pub struct BackupSelection {
261    /// <p>The ARN of the IAM role that AWS Backup uses to authenticate when restoring the target resource; for example, <code>arn:aws:iam::123456789012:role/S3Access</code>.</p>
262    #[serde(rename = "IamRoleArn")]
263    pub iam_role_arn: String,
264    /// <p>An array of conditions used to specify a set of resources to assign to a backup plan; for example, <code>"STRINGEQUALS": {"ec2:ResourceTag/Department": "accounting"</code>.</p>
265    #[serde(rename = "ListOfTags")]
266    #[serde(skip_serializing_if = "Option::is_none")]
267    pub list_of_tags: Option<Vec<Condition>>,
268    /// <p>An array of strings that contain Amazon Resource Names (ARNs) of resources to assign to a backup plan.</p>
269    #[serde(rename = "Resources")]
270    #[serde(skip_serializing_if = "Option::is_none")]
271    pub resources: Option<Vec<String>>,
272    /// <p>The display name of a resource selection document.</p>
273    #[serde(rename = "SelectionName")]
274    pub selection_name: String,
275}
276
277/// <p>Contains metadata about a <code>BackupSelection</code> object.</p>
278#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
279#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
280pub struct BackupSelectionsListMember {
281    /// <p>Uniquely identifies a backup plan.</p>
282    #[serde(rename = "BackupPlanId")]
283    #[serde(skip_serializing_if = "Option::is_none")]
284    pub backup_plan_id: Option<String>,
285    /// <p>The date and time a backup plan is created, in Unix format and Coordinated Universal Time (UTC). The value of <code>CreationDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
286    #[serde(rename = "CreationDate")]
287    #[serde(skip_serializing_if = "Option::is_none")]
288    pub creation_date: Option<f64>,
289    /// <p>A unique string that identifies the request and allows failed requests to be retried without the risk of executing the operation twice.</p>
290    #[serde(rename = "CreatorRequestId")]
291    #[serde(skip_serializing_if = "Option::is_none")]
292    pub creator_request_id: Option<String>,
293    /// <p>Specifies the IAM role Amazon Resource Name (ARN) to create the target recovery point; for example, <code>arn:aws:iam::123456789012:role/S3Access</code>.</p>
294    #[serde(rename = "IamRoleArn")]
295    #[serde(skip_serializing_if = "Option::is_none")]
296    pub iam_role_arn: Option<String>,
297    /// <p>Uniquely identifies a request to assign a set of resources to a backup plan.</p>
298    #[serde(rename = "SelectionId")]
299    #[serde(skip_serializing_if = "Option::is_none")]
300    pub selection_id: Option<String>,
301    /// <p>The display name of a resource selection document.</p>
302    #[serde(rename = "SelectionName")]
303    #[serde(skip_serializing_if = "Option::is_none")]
304    pub selection_name: Option<String>,
305}
306
307/// <p>Contains metadata about a backup vault.</p>
308#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
309#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
310pub struct BackupVaultListMember {
311    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for example, <code>arn:aws:backup:us-east-1:123456789012:vault:aBackupVault</code>.</p>
312    #[serde(rename = "BackupVaultArn")]
313    #[serde(skip_serializing_if = "Option::is_none")]
314    pub backup_vault_arn: Option<String>,
315    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
316    #[serde(rename = "BackupVaultName")]
317    #[serde(skip_serializing_if = "Option::is_none")]
318    pub backup_vault_name: Option<String>,
319    /// <p>The date and time a resource backup is created, in Unix format and Coordinated Universal Time (UTC). The value of <code>CreationDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
320    #[serde(rename = "CreationDate")]
321    #[serde(skip_serializing_if = "Option::is_none")]
322    pub creation_date: Option<f64>,
323    /// <p>A unique string that identifies the request and allows failed requests to be retried without the risk of executing the operation twice.</p>
324    #[serde(rename = "CreatorRequestId")]
325    #[serde(skip_serializing_if = "Option::is_none")]
326    pub creator_request_id: Option<String>,
327    /// <p>The server-side encryption key that is used to protect your backups; for example, <code>arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>.</p>
328    #[serde(rename = "EncryptionKeyArn")]
329    #[serde(skip_serializing_if = "Option::is_none")]
330    pub encryption_key_arn: Option<String>,
331    /// <p>The number of recovery points that are stored in a backup vault.</p>
332    #[serde(rename = "NumberOfRecoveryPoints")]
333    #[serde(skip_serializing_if = "Option::is_none")]
334    pub number_of_recovery_points: Option<i64>,
335}
336
337/// <p>Contains <code>DeleteAt</code> and <code>MoveToColdStorageAt</code> timestamps, which are used to specify a lifecycle for a recovery point.</p> <p>The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. AWS Backup transitions and expires backups automatically according to the lifecycle that you define.</p> <p>Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.</p>
338#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
339#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
340pub struct CalculatedLifecycle {
341    /// <p>A timestamp that specifies when to delete a recovery point.</p>
342    #[serde(rename = "DeleteAt")]
343    #[serde(skip_serializing_if = "Option::is_none")]
344    pub delete_at: Option<f64>,
345    /// <p>A timestamp that specifies when to transition a recovery point to cold storage.</p>
346    #[serde(rename = "MoveToColdStorageAt")]
347    #[serde(skip_serializing_if = "Option::is_none")]
348    pub move_to_cold_storage_at: Option<f64>,
349}
350
351/// <p>Contains an array of triplets made up of a condition type (such as <code>STRINGEQUALS</code>), a key, and a value. Conditions are used to filter resources in a selection that is assigned to a backup plan.</p>
352#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
353pub struct Condition {
354    /// <p>The key in a key-value pair. For example, in <code>"ec2:ResourceTag/Department": "accounting"</code>, <code>"ec2:ResourceTag/Department"</code> is the key.</p>
355    #[serde(rename = "ConditionKey")]
356    pub condition_key: String,
357    /// <p>An operation, such as <code>STRINGEQUALS</code>, that is applied to a key-value pair used to filter resources in a selection.</p>
358    #[serde(rename = "ConditionType")]
359    pub condition_type: String,
360    /// <p>The value in a key-value pair. For example, in <code>"ec2:ResourceTag/Department": "accounting"</code>, <code>"accounting"</code> is the value.</p>
361    #[serde(rename = "ConditionValue")]
362    pub condition_value: String,
363}
364
365/// <p>The details of the copy operation.</p>
366#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
367pub struct CopyAction {
368    /// <p>An Amazon Resource Name (ARN) that uniquely identifies the destination backup vault for the copied backup. For example, <code>arn:aws:backup:us-east-1:123456789012:vault:aBackupVault</code>.</p>
369    #[serde(rename = "DestinationBackupVaultArn")]
370    pub destination_backup_vault_arn: String,
371    #[serde(rename = "Lifecycle")]
372    #[serde(skip_serializing_if = "Option::is_none")]
373    pub lifecycle: Option<Lifecycle>,
374}
375
376/// <p>Contains detailed information about a copy job.</p>
377#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
378#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
379pub struct CopyJob {
380    /// <p>The account ID that owns the copy job.</p>
381    #[serde(rename = "AccountId")]
382    #[serde(skip_serializing_if = "Option::is_none")]
383    pub account_id: Option<String>,
384    /// <p>The size, in bytes, of a copy job.</p>
385    #[serde(rename = "BackupSizeInBytes")]
386    #[serde(skip_serializing_if = "Option::is_none")]
387    pub backup_size_in_bytes: Option<i64>,
388    /// <p>The date and time a copy job is completed, in Unix format and Coordinated Universal Time (UTC). The value of <code>CompletionDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
389    #[serde(rename = "CompletionDate")]
390    #[serde(skip_serializing_if = "Option::is_none")]
391    pub completion_date: Option<f64>,
392    /// <p>Uniquely identifies a copy job.</p>
393    #[serde(rename = "CopyJobId")]
394    #[serde(skip_serializing_if = "Option::is_none")]
395    pub copy_job_id: Option<String>,
396    #[serde(rename = "CreatedBy")]
397    #[serde(skip_serializing_if = "Option::is_none")]
398    pub created_by: Option<RecoveryPointCreator>,
399    /// <p>The date and time a copy job is created, in Unix format and Coordinated Universal Time (UTC). The value of <code>CreationDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
400    #[serde(rename = "CreationDate")]
401    #[serde(skip_serializing_if = "Option::is_none")]
402    pub creation_date: Option<f64>,
403    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a destination copy vault; for example, <code>arn:aws:backup:us-east-1:123456789012:vault:aBackupVault</code>.</p>
404    #[serde(rename = "DestinationBackupVaultArn")]
405    #[serde(skip_serializing_if = "Option::is_none")]
406    pub destination_backup_vault_arn: Option<String>,
407    /// <p>An ARN that uniquely identifies a destination recovery point; for example, <code>arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45</code>.</p>
408    #[serde(rename = "DestinationRecoveryPointArn")]
409    #[serde(skip_serializing_if = "Option::is_none")]
410    pub destination_recovery_point_arn: Option<String>,
411    /// <p>Specifies the IAM role ARN used to copy the target recovery point; for example, <code>arn:aws:iam::123456789012:role/S3Access</code>.</p>
412    #[serde(rename = "IamRoleArn")]
413    #[serde(skip_serializing_if = "Option::is_none")]
414    pub iam_role_arn: Option<String>,
415    /// <p>The AWS resource to be copied; for example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) database.</p>
416    #[serde(rename = "ResourceArn")]
417    #[serde(skip_serializing_if = "Option::is_none")]
418    pub resource_arn: Option<String>,
419    /// <p>The type of AWS resource to be copied; for example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) database.</p>
420    #[serde(rename = "ResourceType")]
421    #[serde(skip_serializing_if = "Option::is_none")]
422    pub resource_type: Option<String>,
423    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a source copy vault; for example, <code>arn:aws:backup:us-east-1:123456789012:vault:aBackupVault</code>. </p>
424    #[serde(rename = "SourceBackupVaultArn")]
425    #[serde(skip_serializing_if = "Option::is_none")]
426    pub source_backup_vault_arn: Option<String>,
427    /// <p>An ARN that uniquely identifies a source recovery point; for example, <code>arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45</code>.</p>
428    #[serde(rename = "SourceRecoveryPointArn")]
429    #[serde(skip_serializing_if = "Option::is_none")]
430    pub source_recovery_point_arn: Option<String>,
431    /// <p>The current state of a copy job.</p>
432    #[serde(rename = "State")]
433    #[serde(skip_serializing_if = "Option::is_none")]
434    pub state: Option<String>,
435    /// <p>A detailed message explaining the status of the job to copy a resource.</p>
436    #[serde(rename = "StatusMessage")]
437    #[serde(skip_serializing_if = "Option::is_none")]
438    pub status_message: Option<String>,
439}
440
441#[derive(Clone, Debug, Default, PartialEq, Serialize)]
442#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
443pub struct CreateBackupPlanInput {
444    /// <p>Specifies the body of a backup plan. Includes a <code>BackupPlanName</code> and one or more sets of <code>Rules</code>.</p>
445    #[serde(rename = "BackupPlan")]
446    pub backup_plan: BackupPlanInput,
447    /// <p>To help organize your resources, you can assign your own metadata to the resources that you create. Each tag is a key-value pair. The specified tags are assigned to all backups created with this plan.</p>
448    #[serde(rename = "BackupPlanTags")]
449    #[serde(skip_serializing_if = "Option::is_none")]
450    pub backup_plan_tags: Option<::std::collections::HashMap<String, String>>,
451    /// <p>Identifies the request and allows failed requests to be retried without the risk of executing the operation twice. If the request includes a <code>CreatorRequestId</code> that matches an existing backup plan, that plan is returned. This parameter is optional.</p>
452    #[serde(rename = "CreatorRequestId")]
453    #[serde(skip_serializing_if = "Option::is_none")]
454    pub creator_request_id: Option<String>,
455}
456
457#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
458#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
459pub struct CreateBackupPlanOutput {
460    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for example, <code>arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50</code>.</p>
461    #[serde(rename = "BackupPlanArn")]
462    #[serde(skip_serializing_if = "Option::is_none")]
463    pub backup_plan_arn: Option<String>,
464    /// <p>Uniquely identifies a backup plan.</p>
465    #[serde(rename = "BackupPlanId")]
466    #[serde(skip_serializing_if = "Option::is_none")]
467    pub backup_plan_id: Option<String>,
468    /// <p>The date and time that a backup plan is created, in Unix format and Coordinated Universal Time (UTC). The value of <code>CreationDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
469    #[serde(rename = "CreationDate")]
470    #[serde(skip_serializing_if = "Option::is_none")]
471    pub creation_date: Option<f64>,
472    /// <p>Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long. They cannot be edited.</p>
473    #[serde(rename = "VersionId")]
474    #[serde(skip_serializing_if = "Option::is_none")]
475    pub version_id: Option<String>,
476}
477
478#[derive(Clone, Debug, Default, PartialEq, Serialize)]
479#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
480pub struct CreateBackupSelectionInput {
481    /// <p>Uniquely identifies the backup plan to be associated with the selection of resources.</p>
482    #[serde(rename = "BackupPlanId")]
483    pub backup_plan_id: String,
484    /// <p>Specifies the body of a request to assign a set of resources to a backup plan.</p>
485    #[serde(rename = "BackupSelection")]
486    pub backup_selection: BackupSelection,
487    /// <p>A unique string that identifies the request and allows failed requests to be retried without the risk of executing the operation twice.</p>
488    #[serde(rename = "CreatorRequestId")]
489    #[serde(skip_serializing_if = "Option::is_none")]
490    pub creator_request_id: Option<String>,
491}
492
493#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
494#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
495pub struct CreateBackupSelectionOutput {
496    /// <p>Uniquely identifies a backup plan.</p>
497    #[serde(rename = "BackupPlanId")]
498    #[serde(skip_serializing_if = "Option::is_none")]
499    pub backup_plan_id: Option<String>,
500    /// <p>The date and time a backup selection is created, in Unix format and Coordinated Universal Time (UTC). The value of <code>CreationDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
501    #[serde(rename = "CreationDate")]
502    #[serde(skip_serializing_if = "Option::is_none")]
503    pub creation_date: Option<f64>,
504    /// <p>Uniquely identifies the body of a request to assign a set of resources to a backup plan.</p>
505    #[serde(rename = "SelectionId")]
506    #[serde(skip_serializing_if = "Option::is_none")]
507    pub selection_id: Option<String>,
508}
509
510#[derive(Clone, Debug, Default, PartialEq, Serialize)]
511#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
512pub struct CreateBackupVaultInput {
513    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
514    #[serde(rename = "BackupVaultName")]
515    pub backup_vault_name: String,
516    /// <p>Metadata that you can assign to help organize the resources that you create. Each tag is a key-value pair.</p>
517    #[serde(rename = "BackupVaultTags")]
518    #[serde(skip_serializing_if = "Option::is_none")]
519    pub backup_vault_tags: Option<::std::collections::HashMap<String, String>>,
520    /// <p>A unique string that identifies the request and allows failed requests to be retried without the risk of executing the operation twice.</p>
521    #[serde(rename = "CreatorRequestId")]
522    #[serde(skip_serializing_if = "Option::is_none")]
523    pub creator_request_id: Option<String>,
524    /// <p>The server-side encryption key that is used to protect your backups; for example, <code>arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>.</p>
525    #[serde(rename = "EncryptionKeyArn")]
526    #[serde(skip_serializing_if = "Option::is_none")]
527    pub encryption_key_arn: Option<String>,
528}
529
530#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
531#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
532pub struct CreateBackupVaultOutput {
533    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for example, <code>arn:aws:backup:us-east-1:123456789012:vault:aBackupVault</code>.</p>
534    #[serde(rename = "BackupVaultArn")]
535    #[serde(skip_serializing_if = "Option::is_none")]
536    pub backup_vault_arn: Option<String>,
537    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
538    #[serde(rename = "BackupVaultName")]
539    #[serde(skip_serializing_if = "Option::is_none")]
540    pub backup_vault_name: Option<String>,
541    /// <p>The date and time a backup vault is created, in Unix format and Coordinated Universal Time (UTC). The value of <code>CreationDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
542    #[serde(rename = "CreationDate")]
543    #[serde(skip_serializing_if = "Option::is_none")]
544    pub creation_date: Option<f64>,
545}
546
547#[derive(Clone, Debug, Default, PartialEq, Serialize)]
548#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
549pub struct DeleteBackupPlanInput {
550    /// <p>Uniquely identifies a backup plan.</p>
551    #[serde(rename = "BackupPlanId")]
552    pub backup_plan_id: String,
553}
554
555#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
556#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
557pub struct DeleteBackupPlanOutput {
558    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for example, <code>arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50</code>.</p>
559    #[serde(rename = "BackupPlanArn")]
560    #[serde(skip_serializing_if = "Option::is_none")]
561    pub backup_plan_arn: Option<String>,
562    /// <p>Uniquely identifies a backup plan.</p>
563    #[serde(rename = "BackupPlanId")]
564    #[serde(skip_serializing_if = "Option::is_none")]
565    pub backup_plan_id: Option<String>,
566    /// <p>The date and time a backup plan is deleted, in Unix format and Coordinated Universal Time (UTC). The value of <code>DeletionDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
567    #[serde(rename = "DeletionDate")]
568    #[serde(skip_serializing_if = "Option::is_none")]
569    pub deletion_date: Option<f64>,
570    /// <p>Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long. Version Ids cannot be edited.</p>
571    #[serde(rename = "VersionId")]
572    #[serde(skip_serializing_if = "Option::is_none")]
573    pub version_id: Option<String>,
574}
575
576#[derive(Clone, Debug, Default, PartialEq, Serialize)]
577#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
578pub struct DeleteBackupSelectionInput {
579    /// <p>Uniquely identifies a backup plan.</p>
580    #[serde(rename = "BackupPlanId")]
581    pub backup_plan_id: String,
582    /// <p>Uniquely identifies the body of a request to assign a set of resources to a backup plan.</p>
583    #[serde(rename = "SelectionId")]
584    pub selection_id: String,
585}
586
587#[derive(Clone, Debug, Default, PartialEq, Serialize)]
588#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
589pub struct DeleteBackupVaultAccessPolicyInput {
590    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
591    #[serde(rename = "BackupVaultName")]
592    pub backup_vault_name: String,
593}
594
595#[derive(Clone, Debug, Default, PartialEq, Serialize)]
596#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
597pub struct DeleteBackupVaultInput {
598    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
599    #[serde(rename = "BackupVaultName")]
600    pub backup_vault_name: String,
601}
602
603#[derive(Clone, Debug, Default, PartialEq, Serialize)]
604#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
605pub struct DeleteBackupVaultNotificationsInput {
606    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
607    #[serde(rename = "BackupVaultName")]
608    pub backup_vault_name: String,
609}
610
611#[derive(Clone, Debug, Default, PartialEq, Serialize)]
612#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
613pub struct DeleteRecoveryPointInput {
614    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
615    #[serde(rename = "BackupVaultName")]
616    pub backup_vault_name: String,
617    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example, <code>arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45</code>.</p>
618    #[serde(rename = "RecoveryPointArn")]
619    pub recovery_point_arn: String,
620}
621
622#[derive(Clone, Debug, Default, PartialEq, Serialize)]
623#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
624pub struct DescribeBackupJobInput {
625    /// <p>Uniquely identifies a request to AWS Backup to back up a resource.</p>
626    #[serde(rename = "BackupJobId")]
627    pub backup_job_id: String,
628}
629
630#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
631#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
632pub struct DescribeBackupJobOutput {
633    /// <p>Returns the account ID that owns the backup job.</p>
634    #[serde(rename = "AccountId")]
635    #[serde(skip_serializing_if = "Option::is_none")]
636    pub account_id: Option<String>,
637    /// <p>Uniquely identifies a request to AWS Backup to back up a resource.</p>
638    #[serde(rename = "BackupJobId")]
639    #[serde(skip_serializing_if = "Option::is_none")]
640    pub backup_job_id: Option<String>,
641    /// <p>The size, in bytes, of a backup.</p>
642    #[serde(rename = "BackupSizeInBytes")]
643    #[serde(skip_serializing_if = "Option::is_none")]
644    pub backup_size_in_bytes: Option<i64>,
645    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for example, <code>arn:aws:backup:us-east-1:123456789012:vault:aBackupVault</code>.</p>
646    #[serde(rename = "BackupVaultArn")]
647    #[serde(skip_serializing_if = "Option::is_none")]
648    pub backup_vault_arn: Option<String>,
649    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
650    #[serde(rename = "BackupVaultName")]
651    #[serde(skip_serializing_if = "Option::is_none")]
652    pub backup_vault_name: Option<String>,
653    /// <p>The size in bytes transferred to a backup vault at the time that the job status was queried.</p>
654    #[serde(rename = "BytesTransferred")]
655    #[serde(skip_serializing_if = "Option::is_none")]
656    pub bytes_transferred: Option<i64>,
657    /// <p>The date and time that a job to create a backup job is completed, in Unix format and Coordinated Universal Time (UTC). The value of <code>CompletionDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
658    #[serde(rename = "CompletionDate")]
659    #[serde(skip_serializing_if = "Option::is_none")]
660    pub completion_date: Option<f64>,
661    /// <p>Contains identifying information about the creation of a backup job, including the <code>BackupPlanArn</code>, <code>BackupPlanId</code>, <code>BackupPlanVersion</code>, and <code>BackupRuleId</code> of the backup plan that is used to create it.</p>
662    #[serde(rename = "CreatedBy")]
663    #[serde(skip_serializing_if = "Option::is_none")]
664    pub created_by: Option<RecoveryPointCreator>,
665    /// <p>The date and time that a backup job is created, in Unix format and Coordinated Universal Time (UTC). The value of <code>CreationDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
666    #[serde(rename = "CreationDate")]
667    #[serde(skip_serializing_if = "Option::is_none")]
668    pub creation_date: Option<f64>,
669    /// <p>The date and time that a job to back up resources is expected to be completed, in Unix format and Coordinated Universal Time (UTC). The value of <code>ExpectedCompletionDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
670    #[serde(rename = "ExpectedCompletionDate")]
671    #[serde(skip_serializing_if = "Option::is_none")]
672    pub expected_completion_date: Option<f64>,
673    /// <p>Specifies the IAM role ARN used to create the target recovery point; for example, <code>arn:aws:iam::123456789012:role/S3Access</code>.</p>
674    #[serde(rename = "IamRoleArn")]
675    #[serde(skip_serializing_if = "Option::is_none")]
676    pub iam_role_arn: Option<String>,
677    /// <p>Contains an estimated percentage that is complete of a job at the time the job status was queried.</p>
678    #[serde(rename = "PercentDone")]
679    #[serde(skip_serializing_if = "Option::is_none")]
680    pub percent_done: Option<String>,
681    /// <p>An ARN that uniquely identifies a recovery point; for example, <code>arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45</code>.</p>
682    #[serde(rename = "RecoveryPointArn")]
683    #[serde(skip_serializing_if = "Option::is_none")]
684    pub recovery_point_arn: Option<String>,
685    /// <p>An ARN that uniquely identifies a saved resource. The format of the ARN depends on the resource type.</p>
686    #[serde(rename = "ResourceArn")]
687    #[serde(skip_serializing_if = "Option::is_none")]
688    pub resource_arn: Option<String>,
689    /// <p>The type of AWS resource to be backed up; for example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) database.</p>
690    #[serde(rename = "ResourceType")]
691    #[serde(skip_serializing_if = "Option::is_none")]
692    pub resource_type: Option<String>,
693    /// <p>Specifies the time in Unix format and Coordinated Universal Time (UTC) when a backup job must be started before it is canceled. The value is calculated by adding the start window to the scheduled time. So if the scheduled time were 6:00 PM and the start window is 2 hours, the <code>StartBy</code> time would be 8:00 PM on the date specified. The value of <code>StartBy</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
694    #[serde(rename = "StartBy")]
695    #[serde(skip_serializing_if = "Option::is_none")]
696    pub start_by: Option<f64>,
697    /// <p>The current state of a resource recovery point.</p>
698    #[serde(rename = "State")]
699    #[serde(skip_serializing_if = "Option::is_none")]
700    pub state: Option<String>,
701    /// <p>A detailed message explaining the status of the job to back up a resource.</p>
702    #[serde(rename = "StatusMessage")]
703    #[serde(skip_serializing_if = "Option::is_none")]
704    pub status_message: Option<String>,
705}
706
707#[derive(Clone, Debug, Default, PartialEq, Serialize)]
708#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
709pub struct DescribeBackupVaultInput {
710    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
711    #[serde(rename = "BackupVaultName")]
712    pub backup_vault_name: String,
713}
714
715#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
716#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
717pub struct DescribeBackupVaultOutput {
718    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for example, <code>arn:aws:backup:us-east-1:123456789012:vault:aBackupVault</code>.</p>
719    #[serde(rename = "BackupVaultArn")]
720    #[serde(skip_serializing_if = "Option::is_none")]
721    pub backup_vault_arn: Option<String>,
722    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
723    #[serde(rename = "BackupVaultName")]
724    #[serde(skip_serializing_if = "Option::is_none")]
725    pub backup_vault_name: Option<String>,
726    /// <p>The date and time that a backup vault is created, in Unix format and Coordinated Universal Time (UTC). The value of <code>CreationDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
727    #[serde(rename = "CreationDate")]
728    #[serde(skip_serializing_if = "Option::is_none")]
729    pub creation_date: Option<f64>,
730    /// <p>A unique string that identifies the request and allows failed requests to be retried without the risk of executing the operation twice.</p>
731    #[serde(rename = "CreatorRequestId")]
732    #[serde(skip_serializing_if = "Option::is_none")]
733    pub creator_request_id: Option<String>,
734    /// <p>The server-side encryption key that is used to protect your backups; for example, <code>arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>.</p>
735    #[serde(rename = "EncryptionKeyArn")]
736    #[serde(skip_serializing_if = "Option::is_none")]
737    pub encryption_key_arn: Option<String>,
738    /// <p>The number of recovery points that are stored in a backup vault.</p>
739    #[serde(rename = "NumberOfRecoveryPoints")]
740    #[serde(skip_serializing_if = "Option::is_none")]
741    pub number_of_recovery_points: Option<i64>,
742}
743
744#[derive(Clone, Debug, Default, PartialEq, Serialize)]
745#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
746pub struct DescribeCopyJobInput {
747    /// <p>Uniquely identifies a copy job.</p>
748    #[serde(rename = "CopyJobId")]
749    pub copy_job_id: String,
750}
751
752#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
753#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
754pub struct DescribeCopyJobOutput {
755    /// <p>Contains detailed information about a copy job.</p>
756    #[serde(rename = "CopyJob")]
757    #[serde(skip_serializing_if = "Option::is_none")]
758    pub copy_job: Option<CopyJob>,
759}
760
761#[derive(Clone, Debug, Default, PartialEq, Serialize)]
762#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
763pub struct DescribeProtectedResourceInput {
764    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a resource. The format of the ARN depends on the resource type.</p>
765    #[serde(rename = "ResourceArn")]
766    pub resource_arn: String,
767}
768
769#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
770#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
771pub struct DescribeProtectedResourceOutput {
772    /// <p>The date and time that a resource was last backed up, in Unix format and Coordinated Universal Time (UTC). The value of <code>LastBackupTime</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
773    #[serde(rename = "LastBackupTime")]
774    #[serde(skip_serializing_if = "Option::is_none")]
775    pub last_backup_time: Option<f64>,
776    /// <p>An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type.</p>
777    #[serde(rename = "ResourceArn")]
778    #[serde(skip_serializing_if = "Option::is_none")]
779    pub resource_arn: Option<String>,
780    /// <p>The type of AWS resource saved as a recovery point; for example, an EBS volume or an Amazon RDS database.</p>
781    #[serde(rename = "ResourceType")]
782    #[serde(skip_serializing_if = "Option::is_none")]
783    pub resource_type: Option<String>,
784}
785
786#[derive(Clone, Debug, Default, PartialEq, Serialize)]
787#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
788pub struct DescribeRecoveryPointInput {
789    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
790    #[serde(rename = "BackupVaultName")]
791    pub backup_vault_name: String,
792    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example, <code>arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45</code>.</p>
793    #[serde(rename = "RecoveryPointArn")]
794    pub recovery_point_arn: String,
795}
796
797#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
798#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
799pub struct DescribeRecoveryPointOutput {
800    /// <p>The size, in bytes, of a backup.</p>
801    #[serde(rename = "BackupSizeInBytes")]
802    #[serde(skip_serializing_if = "Option::is_none")]
803    pub backup_size_in_bytes: Option<i64>,
804    /// <p>An ARN that uniquely identifies a backup vault; for example, <code>arn:aws:backup:us-east-1:123456789012:vault:aBackupVault</code>.</p>
805    #[serde(rename = "BackupVaultArn")]
806    #[serde(skip_serializing_if = "Option::is_none")]
807    pub backup_vault_arn: Option<String>,
808    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
809    #[serde(rename = "BackupVaultName")]
810    #[serde(skip_serializing_if = "Option::is_none")]
811    pub backup_vault_name: Option<String>,
812    /// <p>A <code>CalculatedLifecycle</code> object containing <code>DeleteAt</code> and <code>MoveToColdStorageAt</code> timestamps.</p>
813    #[serde(rename = "CalculatedLifecycle")]
814    #[serde(skip_serializing_if = "Option::is_none")]
815    pub calculated_lifecycle: Option<CalculatedLifecycle>,
816    /// <p>The date and time that a job to create a recovery point is completed, in Unix format and Coordinated Universal Time (UTC). The value of <code>CompletionDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
817    #[serde(rename = "CompletionDate")]
818    #[serde(skip_serializing_if = "Option::is_none")]
819    pub completion_date: Option<f64>,
820    /// <p>Contains identifying information about the creation of a recovery point, including the <code>BackupPlanArn</code>, <code>BackupPlanId</code>, <code>BackupPlanVersion</code>, and <code>BackupRuleId</code> of the backup plan used to create it.</p>
821    #[serde(rename = "CreatedBy")]
822    #[serde(skip_serializing_if = "Option::is_none")]
823    pub created_by: Option<RecoveryPointCreator>,
824    /// <p>The date and time that a recovery point is created, in Unix format and Coordinated Universal Time (UTC). The value of <code>CreationDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
825    #[serde(rename = "CreationDate")]
826    #[serde(skip_serializing_if = "Option::is_none")]
827    pub creation_date: Option<f64>,
828    /// <p>The server-side encryption key used to protect your backups; for example, <code>arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>.</p>
829    #[serde(rename = "EncryptionKeyArn")]
830    #[serde(skip_serializing_if = "Option::is_none")]
831    pub encryption_key_arn: Option<String>,
832    /// <p>Specifies the IAM role ARN used to create the target recovery point; for example, <code>arn:aws:iam::123456789012:role/S3Access</code>.</p>
833    #[serde(rename = "IamRoleArn")]
834    #[serde(skip_serializing_if = "Option::is_none")]
835    pub iam_role_arn: Option<String>,
836    /// <p>A Boolean value that is returned as <code>TRUE</code> if the specified recovery point is encrypted, or <code>FALSE</code> if the recovery point is not encrypted.</p>
837    #[serde(rename = "IsEncrypted")]
838    #[serde(skip_serializing_if = "Option::is_none")]
839    pub is_encrypted: Option<bool>,
840    /// <p>The date and time that a recovery point was last restored, in Unix format and Coordinated Universal Time (UTC). The value of <code>LastRestoreTime</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
841    #[serde(rename = "LastRestoreTime")]
842    #[serde(skip_serializing_if = "Option::is_none")]
843    pub last_restore_time: Option<f64>,
844    /// <p>The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. AWS Backup transitions and expires backups automatically according to the lifecycle that you define. </p> <p>Backups that are transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold. </p>
845    #[serde(rename = "Lifecycle")]
846    #[serde(skip_serializing_if = "Option::is_none")]
847    pub lifecycle: Option<Lifecycle>,
848    /// <p>An ARN that uniquely identifies a recovery point; for example, <code>arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45</code>.</p>
849    #[serde(rename = "RecoveryPointArn")]
850    #[serde(skip_serializing_if = "Option::is_none")]
851    pub recovery_point_arn: Option<String>,
852    /// <p>An ARN that uniquely identifies a saved resource. The format of the ARN depends on the resource type.</p>
853    #[serde(rename = "ResourceArn")]
854    #[serde(skip_serializing_if = "Option::is_none")]
855    pub resource_arn: Option<String>,
856    /// <p>The type of AWS resource to save as a recovery point; for example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) database.</p>
857    #[serde(rename = "ResourceType")]
858    #[serde(skip_serializing_if = "Option::is_none")]
859    pub resource_type: Option<String>,
860    /// <p><p>A status code specifying the state of the recovery point.</p> <note> <p>A partial status indicates that the recovery point was not successfully re-created and must be retried.</p> </note></p>
861    #[serde(rename = "Status")]
862    #[serde(skip_serializing_if = "Option::is_none")]
863    pub status: Option<String>,
864    /// <p>Specifies the storage class of the recovery point. Valid values are <code>WARM</code> or <code>COLD</code>.</p>
865    #[serde(rename = "StorageClass")]
866    #[serde(skip_serializing_if = "Option::is_none")]
867    pub storage_class: Option<String>,
868}
869
870#[derive(Clone, Debug, Default, PartialEq, Serialize)]
871#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
872pub struct DescribeRegionSettingsInput {}
873
874#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
875#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
876pub struct DescribeRegionSettingsOutput {
877    /// <p>Returns a list of all services along with the opt-in preferences in the region.</p>
878    #[serde(rename = "ResourceTypeOptInPreference")]
879    #[serde(skip_serializing_if = "Option::is_none")]
880    pub resource_type_opt_in_preference: Option<::std::collections::HashMap<String, bool>>,
881}
882
883#[derive(Clone, Debug, Default, PartialEq, Serialize)]
884#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
885pub struct DescribeRestoreJobInput {
886    /// <p>Uniquely identifies the job that restores a recovery point.</p>
887    #[serde(rename = "RestoreJobId")]
888    pub restore_job_id: String,
889}
890
891#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
892#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
893pub struct DescribeRestoreJobOutput {
894    /// <p>Returns the account ID that owns the restore job.</p>
895    #[serde(rename = "AccountId")]
896    #[serde(skip_serializing_if = "Option::is_none")]
897    pub account_id: Option<String>,
898    /// <p>The size, in bytes, of the restored resource.</p>
899    #[serde(rename = "BackupSizeInBytes")]
900    #[serde(skip_serializing_if = "Option::is_none")]
901    pub backup_size_in_bytes: Option<i64>,
902    /// <p>The date and time that a job to restore a recovery point is completed, in Unix format and Coordinated Universal Time (UTC). The value of <code>CompletionDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
903    #[serde(rename = "CompletionDate")]
904    #[serde(skip_serializing_if = "Option::is_none")]
905    pub completion_date: Option<f64>,
906    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a resource whose recovery point is being restored. The format of the ARN depends on the resource type of the backed-up resource.</p>
907    #[serde(rename = "CreatedResourceArn")]
908    #[serde(skip_serializing_if = "Option::is_none")]
909    pub created_resource_arn: Option<String>,
910    /// <p>The date and time that a restore job is created, in Unix format and Coordinated Universal Time (UTC). The value of <code>CreationDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
911    #[serde(rename = "CreationDate")]
912    #[serde(skip_serializing_if = "Option::is_none")]
913    pub creation_date: Option<f64>,
914    /// <p>The amount of time in minutes that a job restoring a recovery point is expected to take.</p>
915    #[serde(rename = "ExpectedCompletionTimeMinutes")]
916    #[serde(skip_serializing_if = "Option::is_none")]
917    pub expected_completion_time_minutes: Option<i64>,
918    /// <p>Specifies the IAM role ARN used to create the target recovery point; for example, <code>arn:aws:iam::123456789012:role/S3Access</code>.</p>
919    #[serde(rename = "IamRoleArn")]
920    #[serde(skip_serializing_if = "Option::is_none")]
921    pub iam_role_arn: Option<String>,
922    /// <p>Contains an estimated percentage that is complete of a job at the time the job status was queried.</p>
923    #[serde(rename = "PercentDone")]
924    #[serde(skip_serializing_if = "Option::is_none")]
925    pub percent_done: Option<String>,
926    /// <p>An ARN that uniquely identifies a recovery point; for example, <code>arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45</code>.</p>
927    #[serde(rename = "RecoveryPointArn")]
928    #[serde(skip_serializing_if = "Option::is_none")]
929    pub recovery_point_arn: Option<String>,
930    /// <p>Returns metadata associated with a restore job listed by resource type.</p>
931    #[serde(rename = "ResourceType")]
932    #[serde(skip_serializing_if = "Option::is_none")]
933    pub resource_type: Option<String>,
934    /// <p>Uniquely identifies the job that restores a recovery point.</p>
935    #[serde(rename = "RestoreJobId")]
936    #[serde(skip_serializing_if = "Option::is_none")]
937    pub restore_job_id: Option<String>,
938    /// <p>Status code specifying the state of the job that is initiated by AWS Backup to restore a recovery point.</p>
939    #[serde(rename = "Status")]
940    #[serde(skip_serializing_if = "Option::is_none")]
941    pub status: Option<String>,
942    /// <p>A message showing the status of a job to restore a recovery point.</p>
943    #[serde(rename = "StatusMessage")]
944    #[serde(skip_serializing_if = "Option::is_none")]
945    pub status_message: Option<String>,
946}
947
948#[derive(Clone, Debug, Default, PartialEq, Serialize)]
949#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
950pub struct ExportBackupPlanTemplateInput {
951    /// <p>Uniquely identifies a backup plan.</p>
952    #[serde(rename = "BackupPlanId")]
953    pub backup_plan_id: String,
954}
955
956#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
957#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
958pub struct ExportBackupPlanTemplateOutput {
959    /// <p><p>The body of a backup plan template in JSON format.</p> <note> <p>This is a signed JSON document that cannot be modified before being passed to <code>GetBackupPlanFromJSON.</code> </p> </note></p>
960    #[serde(rename = "BackupPlanTemplateJson")]
961    #[serde(skip_serializing_if = "Option::is_none")]
962    pub backup_plan_template_json: Option<String>,
963}
964
965#[derive(Clone, Debug, Default, PartialEq, Serialize)]
966#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
967pub struct GetBackupPlanFromJSONInput {
968    /// <p>A customer-supplied backup plan document in JSON format.</p>
969    #[serde(rename = "BackupPlanTemplateJson")]
970    pub backup_plan_template_json: String,
971}
972
973#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
974#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
975pub struct GetBackupPlanFromJSONOutput {
976    /// <p>Specifies the body of a backup plan. Includes a <code>BackupPlanName</code> and one or more sets of <code>Rules</code>.</p>
977    #[serde(rename = "BackupPlan")]
978    #[serde(skip_serializing_if = "Option::is_none")]
979    pub backup_plan: Option<BackupPlan>,
980}
981
982#[derive(Clone, Debug, Default, PartialEq, Serialize)]
983#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
984pub struct GetBackupPlanFromTemplateInput {
985    /// <p>Uniquely identifies a stored backup plan template.</p>
986    #[serde(rename = "BackupPlanTemplateId")]
987    pub backup_plan_template_id: String,
988}
989
990#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
991#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
992pub struct GetBackupPlanFromTemplateOutput {
993    /// <p>Returns the body of a backup plan based on the target template, including the name, rules, and backup vault of the plan.</p>
994    #[serde(rename = "BackupPlanDocument")]
995    #[serde(skip_serializing_if = "Option::is_none")]
996    pub backup_plan_document: Option<BackupPlan>,
997}
998
999#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1000#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1001pub struct GetBackupPlanInput {
1002    /// <p>Uniquely identifies a backup plan.</p>
1003    #[serde(rename = "BackupPlanId")]
1004    pub backup_plan_id: String,
1005    /// <p>Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long. Version IDs cannot be edited.</p>
1006    #[serde(rename = "VersionId")]
1007    #[serde(skip_serializing_if = "Option::is_none")]
1008    pub version_id: Option<String>,
1009}
1010
1011#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1012#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1013pub struct GetBackupPlanOutput {
1014    /// <p>Specifies the body of a backup plan. Includes a <code>BackupPlanName</code> and one or more sets of <code>Rules</code>.</p>
1015    #[serde(rename = "BackupPlan")]
1016    #[serde(skip_serializing_if = "Option::is_none")]
1017    pub backup_plan: Option<BackupPlan>,
1018    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for example, <code>arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50</code>.</p>
1019    #[serde(rename = "BackupPlanArn")]
1020    #[serde(skip_serializing_if = "Option::is_none")]
1021    pub backup_plan_arn: Option<String>,
1022    /// <p>Uniquely identifies a backup plan.</p>
1023    #[serde(rename = "BackupPlanId")]
1024    #[serde(skip_serializing_if = "Option::is_none")]
1025    pub backup_plan_id: Option<String>,
1026    /// <p>The date and time that a backup plan is created, in Unix format and Coordinated Universal Time (UTC). The value of <code>CreationDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
1027    #[serde(rename = "CreationDate")]
1028    #[serde(skip_serializing_if = "Option::is_none")]
1029    pub creation_date: Option<f64>,
1030    /// <p>A unique string that identifies the request and allows failed requests to be retried without the risk of executing the operation twice.</p>
1031    #[serde(rename = "CreatorRequestId")]
1032    #[serde(skip_serializing_if = "Option::is_none")]
1033    pub creator_request_id: Option<String>,
1034    /// <p>The date and time that a backup plan is deleted, in Unix format and Coordinated Universal Time (UTC). The value of <code>DeletionDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
1035    #[serde(rename = "DeletionDate")]
1036    #[serde(skip_serializing_if = "Option::is_none")]
1037    pub deletion_date: Option<f64>,
1038    /// <p>The last time a job to back up resources was executed with this backup plan. A date and time, in Unix format and Coordinated Universal Time (UTC). The value of <code>LastExecutionDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
1039    #[serde(rename = "LastExecutionDate")]
1040    #[serde(skip_serializing_if = "Option::is_none")]
1041    pub last_execution_date: Option<f64>,
1042    /// <p>Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long. Version IDs cannot be edited.</p>
1043    #[serde(rename = "VersionId")]
1044    #[serde(skip_serializing_if = "Option::is_none")]
1045    pub version_id: Option<String>,
1046}
1047
1048#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1049#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1050pub struct GetBackupSelectionInput {
1051    /// <p>Uniquely identifies a backup plan.</p>
1052    #[serde(rename = "BackupPlanId")]
1053    pub backup_plan_id: String,
1054    /// <p>Uniquely identifies the body of a request to assign a set of resources to a backup plan.</p>
1055    #[serde(rename = "SelectionId")]
1056    pub selection_id: String,
1057}
1058
1059#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1060#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1061pub struct GetBackupSelectionOutput {
1062    /// <p>Uniquely identifies a backup plan.</p>
1063    #[serde(rename = "BackupPlanId")]
1064    #[serde(skip_serializing_if = "Option::is_none")]
1065    pub backup_plan_id: Option<String>,
1066    /// <p>Specifies the body of a request to assign a set of resources to a backup plan.</p>
1067    #[serde(rename = "BackupSelection")]
1068    #[serde(skip_serializing_if = "Option::is_none")]
1069    pub backup_selection: Option<BackupSelection>,
1070    /// <p>The date and time a backup selection is created, in Unix format and Coordinated Universal Time (UTC). The value of <code>CreationDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
1071    #[serde(rename = "CreationDate")]
1072    #[serde(skip_serializing_if = "Option::is_none")]
1073    pub creation_date: Option<f64>,
1074    /// <p>A unique string that identifies the request and allows failed requests to be retried without the risk of executing the operation twice.</p>
1075    #[serde(rename = "CreatorRequestId")]
1076    #[serde(skip_serializing_if = "Option::is_none")]
1077    pub creator_request_id: Option<String>,
1078    /// <p>Uniquely identifies the body of a request to assign a set of resources to a backup plan.</p>
1079    #[serde(rename = "SelectionId")]
1080    #[serde(skip_serializing_if = "Option::is_none")]
1081    pub selection_id: Option<String>,
1082}
1083
1084#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1085#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1086pub struct GetBackupVaultAccessPolicyInput {
1087    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
1088    #[serde(rename = "BackupVaultName")]
1089    pub backup_vault_name: String,
1090}
1091
1092#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1093#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1094pub struct GetBackupVaultAccessPolicyOutput {
1095    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for example, <code>arn:aws:backup:us-east-1:123456789012:vault:aBackupVault</code>.</p>
1096    #[serde(rename = "BackupVaultArn")]
1097    #[serde(skip_serializing_if = "Option::is_none")]
1098    pub backup_vault_arn: Option<String>,
1099    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
1100    #[serde(rename = "BackupVaultName")]
1101    #[serde(skip_serializing_if = "Option::is_none")]
1102    pub backup_vault_name: Option<String>,
1103    /// <p>The backup vault access policy document in JSON format.</p>
1104    #[serde(rename = "Policy")]
1105    #[serde(skip_serializing_if = "Option::is_none")]
1106    pub policy: Option<String>,
1107}
1108
1109#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1110#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1111pub struct GetBackupVaultNotificationsInput {
1112    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
1113    #[serde(rename = "BackupVaultName")]
1114    pub backup_vault_name: String,
1115}
1116
1117#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1118#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1119pub struct GetBackupVaultNotificationsOutput {
1120    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a backup vault; for example, <code>arn:aws:backup:us-east-1:123456789012:vault:aBackupVault</code>.</p>
1121    #[serde(rename = "BackupVaultArn")]
1122    #[serde(skip_serializing_if = "Option::is_none")]
1123    pub backup_vault_arn: Option<String>,
1124    /// <p>An array of events that indicate the status of jobs to back up resources to the backup vault.</p>
1125    #[serde(rename = "BackupVaultEvents")]
1126    #[serde(skip_serializing_if = "Option::is_none")]
1127    pub backup_vault_events: Option<Vec<String>>,
1128    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
1129    #[serde(rename = "BackupVaultName")]
1130    #[serde(skip_serializing_if = "Option::is_none")]
1131    pub backup_vault_name: Option<String>,
1132    /// <p>An ARN that uniquely identifies an Amazon Simple Notification Service (Amazon SNS) topic; for example, <code>arn:aws:sns:us-west-2:111122223333:MyTopic</code>.</p>
1133    #[serde(rename = "SNSTopicArn")]
1134    #[serde(skip_serializing_if = "Option::is_none")]
1135    pub sns_topic_arn: Option<String>,
1136}
1137
1138#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1139#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1140pub struct GetRecoveryPointRestoreMetadataInput {
1141    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
1142    #[serde(rename = "BackupVaultName")]
1143    pub backup_vault_name: String,
1144    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example, <code>arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45</code>.</p>
1145    #[serde(rename = "RecoveryPointArn")]
1146    pub recovery_point_arn: String,
1147}
1148
1149#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1150#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1151pub struct GetRecoveryPointRestoreMetadataOutput {
1152    /// <p>An ARN that uniquely identifies a backup vault; for example, <code>arn:aws:backup:us-east-1:123456789012:vault:aBackupVault</code>.</p>
1153    #[serde(rename = "BackupVaultArn")]
1154    #[serde(skip_serializing_if = "Option::is_none")]
1155    pub backup_vault_arn: Option<String>,
1156    /// <p>An ARN that uniquely identifies a recovery point; for example, <code>arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45</code>.</p>
1157    #[serde(rename = "RecoveryPointArn")]
1158    #[serde(skip_serializing_if = "Option::is_none")]
1159    pub recovery_point_arn: Option<String>,
1160    /// <p>The set of metadata key-value pairs that describes the original configuration of the backed-up resource. These values vary depending on the service that is being restored.</p>
1161    #[serde(rename = "RestoreMetadata")]
1162    #[serde(skip_serializing_if = "Option::is_none")]
1163    pub restore_metadata: Option<::std::collections::HashMap<String, String>>,
1164}
1165
1166#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1167#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1168pub struct GetSupportedResourceTypesOutput {
1169    /// <p><p>Contains a string with the supported AWS resource types:</p> <ul> <li> <p> <code>DynamoDB</code> for Amazon DynamoDB</p> </li> <li> <p> <code>EBS</code> for Amazon Elastic Block Store</p> </li> <li> <p> <code>EC2</code> for Amazon Elastic Compute Cloud</p> </li> <li> <p> <code>EFS</code> for Amazon Elastic File System</p> </li> <li> <p> <code>RDS</code> for Amazon Relational Database Service</p> </li> <li> <p> <code>Storage Gateway</code> for AWS Storage Gateway</p> </li> </ul></p>
1170    #[serde(rename = "ResourceTypes")]
1171    #[serde(skip_serializing_if = "Option::is_none")]
1172    pub resource_types: Option<Vec<String>>,
1173}
1174
1175/// <p>Contains an array of <code>Transition</code> objects specifying how long in days before a recovery point transitions to cold storage or is deleted.</p> <p>Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, on the console, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold.</p>
1176#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1177pub struct Lifecycle {
1178    /// <p>Specifies the number of days after creation that a recovery point is deleted. Must be greater than 90 days plus <code>MoveToColdStorageAfterDays</code>.</p>
1179    #[serde(rename = "DeleteAfterDays")]
1180    #[serde(skip_serializing_if = "Option::is_none")]
1181    pub delete_after_days: Option<i64>,
1182    /// <p>Specifies the number of days after creation that a recovery point is moved to cold storage.</p>
1183    #[serde(rename = "MoveToColdStorageAfterDays")]
1184    #[serde(skip_serializing_if = "Option::is_none")]
1185    pub move_to_cold_storage_after_days: Option<i64>,
1186}
1187
1188#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1189#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1190pub struct ListBackupJobsInput {
1191    /// <p>The account ID to list the jobs from. Returns only backup jobs associated with the specified account ID.</p>
1192    #[serde(rename = "ByAccountId")]
1193    #[serde(skip_serializing_if = "Option::is_none")]
1194    pub by_account_id: Option<String>,
1195    /// <p>Returns only backup jobs that will be stored in the specified backup vault. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
1196    #[serde(rename = "ByBackupVaultName")]
1197    #[serde(skip_serializing_if = "Option::is_none")]
1198    pub by_backup_vault_name: Option<String>,
1199    /// <p>Returns only backup jobs that were created after the specified date.</p>
1200    #[serde(rename = "ByCreatedAfter")]
1201    #[serde(skip_serializing_if = "Option::is_none")]
1202    pub by_created_after: Option<f64>,
1203    /// <p>Returns only backup jobs that were created before the specified date.</p>
1204    #[serde(rename = "ByCreatedBefore")]
1205    #[serde(skip_serializing_if = "Option::is_none")]
1206    pub by_created_before: Option<f64>,
1207    /// <p>Returns only backup jobs that match the specified resource Amazon Resource Name (ARN).</p>
1208    #[serde(rename = "ByResourceArn")]
1209    #[serde(skip_serializing_if = "Option::is_none")]
1210    pub by_resource_arn: Option<String>,
1211    /// <p><p>Returns only backup jobs for the specified resources:</p> <ul> <li> <p> <code>DynamoDB</code> for Amazon DynamoDB</p> </li> <li> <p> <code>EBS</code> for Amazon Elastic Block Store</p> </li> <li> <p> <code>EC2</code> for Amazon Elastic Compute Cloud</p> </li> <li> <p> <code>EFS</code> for Amazon Elastic File System</p> </li> <li> <p> <code>RDS</code> for Amazon Relational Database Service</p> </li> <li> <p> <code>Storage Gateway</code> for AWS Storage Gateway</p> </li> </ul></p>
1212    #[serde(rename = "ByResourceType")]
1213    #[serde(skip_serializing_if = "Option::is_none")]
1214    pub by_resource_type: Option<String>,
1215    /// <p>Returns only backup jobs that are in the specified state.</p>
1216    #[serde(rename = "ByState")]
1217    #[serde(skip_serializing_if = "Option::is_none")]
1218    pub by_state: Option<String>,
1219    /// <p>The maximum number of items to be returned.</p>
1220    #[serde(rename = "MaxResults")]
1221    #[serde(skip_serializing_if = "Option::is_none")]
1222    pub max_results: Option<i64>,
1223    /// <p>The next item following a partial list of returned items. For example, if a request is made to return <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
1224    #[serde(rename = "NextToken")]
1225    #[serde(skip_serializing_if = "Option::is_none")]
1226    pub next_token: Option<String>,
1227}
1228
1229#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1230#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1231pub struct ListBackupJobsOutput {
1232    /// <p>An array of structures containing metadata about your backup jobs returned in JSON format.</p>
1233    #[serde(rename = "BackupJobs")]
1234    #[serde(skip_serializing_if = "Option::is_none")]
1235    pub backup_jobs: Option<Vec<BackupJob>>,
1236    /// <p>The next item following a partial list of returned items. For example, if a request is made to return <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
1237    #[serde(rename = "NextToken")]
1238    #[serde(skip_serializing_if = "Option::is_none")]
1239    pub next_token: Option<String>,
1240}
1241
1242#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1243#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1244pub struct ListBackupPlanTemplatesInput {
1245    /// <p>The maximum number of items to be returned.</p>
1246    #[serde(rename = "MaxResults")]
1247    #[serde(skip_serializing_if = "Option::is_none")]
1248    pub max_results: Option<i64>,
1249    /// <p>The next item following a partial list of returned items. For example, if a request is made to return <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
1250    #[serde(rename = "NextToken")]
1251    #[serde(skip_serializing_if = "Option::is_none")]
1252    pub next_token: Option<String>,
1253}
1254
1255#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1256#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1257pub struct ListBackupPlanTemplatesOutput {
1258    /// <p>An array of template list items containing metadata about your saved templates.</p>
1259    #[serde(rename = "BackupPlanTemplatesList")]
1260    #[serde(skip_serializing_if = "Option::is_none")]
1261    pub backup_plan_templates_list: Option<Vec<BackupPlanTemplatesListMember>>,
1262    /// <p>The next item following a partial list of returned items. For example, if a request is made to return <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
1263    #[serde(rename = "NextToken")]
1264    #[serde(skip_serializing_if = "Option::is_none")]
1265    pub next_token: Option<String>,
1266}
1267
1268#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1269#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1270pub struct ListBackupPlanVersionsInput {
1271    /// <p>Uniquely identifies a backup plan.</p>
1272    #[serde(rename = "BackupPlanId")]
1273    pub backup_plan_id: String,
1274    /// <p>The maximum number of items to be returned.</p>
1275    #[serde(rename = "MaxResults")]
1276    #[serde(skip_serializing_if = "Option::is_none")]
1277    pub max_results: Option<i64>,
1278    /// <p>The next item following a partial list of returned items. For example, if a request is made to return <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
1279    #[serde(rename = "NextToken")]
1280    #[serde(skip_serializing_if = "Option::is_none")]
1281    pub next_token: Option<String>,
1282}
1283
1284#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1285#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1286pub struct ListBackupPlanVersionsOutput {
1287    /// <p>An array of version list items containing metadata about your backup plans.</p>
1288    #[serde(rename = "BackupPlanVersionsList")]
1289    #[serde(skip_serializing_if = "Option::is_none")]
1290    pub backup_plan_versions_list: Option<Vec<BackupPlansListMember>>,
1291    /// <p>The next item following a partial list of returned items. For example, if a request is made to return <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
1292    #[serde(rename = "NextToken")]
1293    #[serde(skip_serializing_if = "Option::is_none")]
1294    pub next_token: Option<String>,
1295}
1296
1297#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1298#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1299pub struct ListBackupPlansInput {
1300    /// <p>A Boolean value with a default value of <code>FALSE</code> that returns deleted backup plans when set to <code>TRUE</code>.</p>
1301    #[serde(rename = "IncludeDeleted")]
1302    #[serde(skip_serializing_if = "Option::is_none")]
1303    pub include_deleted: Option<bool>,
1304    /// <p>The maximum number of items to be returned.</p>
1305    #[serde(rename = "MaxResults")]
1306    #[serde(skip_serializing_if = "Option::is_none")]
1307    pub max_results: Option<i64>,
1308    /// <p>The next item following a partial list of returned items. For example, if a request is made to return <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
1309    #[serde(rename = "NextToken")]
1310    #[serde(skip_serializing_if = "Option::is_none")]
1311    pub next_token: Option<String>,
1312}
1313
1314#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1315#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1316pub struct ListBackupPlansOutput {
1317    /// <p>An array of backup plan list items containing metadata about your saved backup plans.</p>
1318    #[serde(rename = "BackupPlansList")]
1319    #[serde(skip_serializing_if = "Option::is_none")]
1320    pub backup_plans_list: Option<Vec<BackupPlansListMember>>,
1321    /// <p>The next item following a partial list of returned items. For example, if a request is made to return <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
1322    #[serde(rename = "NextToken")]
1323    #[serde(skip_serializing_if = "Option::is_none")]
1324    pub next_token: Option<String>,
1325}
1326
1327#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1328#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1329pub struct ListBackupSelectionsInput {
1330    /// <p>Uniquely identifies a backup plan.</p>
1331    #[serde(rename = "BackupPlanId")]
1332    pub backup_plan_id: String,
1333    /// <p>The maximum number of items to be returned.</p>
1334    #[serde(rename = "MaxResults")]
1335    #[serde(skip_serializing_if = "Option::is_none")]
1336    pub max_results: Option<i64>,
1337    /// <p>The next item following a partial list of returned items. For example, if a request is made to return <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
1338    #[serde(rename = "NextToken")]
1339    #[serde(skip_serializing_if = "Option::is_none")]
1340    pub next_token: Option<String>,
1341}
1342
1343#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1344#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1345pub struct ListBackupSelectionsOutput {
1346    /// <p>An array of backup selection list items containing metadata about each resource in the list.</p>
1347    #[serde(rename = "BackupSelectionsList")]
1348    #[serde(skip_serializing_if = "Option::is_none")]
1349    pub backup_selections_list: Option<Vec<BackupSelectionsListMember>>,
1350    /// <p>The next item following a partial list of returned items. For example, if a request is made to return <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
1351    #[serde(rename = "NextToken")]
1352    #[serde(skip_serializing_if = "Option::is_none")]
1353    pub next_token: Option<String>,
1354}
1355
1356#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1357#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1358pub struct ListBackupVaultsInput {
1359    /// <p>The maximum number of items to be returned.</p>
1360    #[serde(rename = "MaxResults")]
1361    #[serde(skip_serializing_if = "Option::is_none")]
1362    pub max_results: Option<i64>,
1363    /// <p>The next item following a partial list of returned items. For example, if a request is made to return <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
1364    #[serde(rename = "NextToken")]
1365    #[serde(skip_serializing_if = "Option::is_none")]
1366    pub next_token: Option<String>,
1367}
1368
1369#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1370#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1371pub struct ListBackupVaultsOutput {
1372    /// <p>An array of backup vault list members containing vault metadata, including Amazon Resource Name (ARN), display name, creation date, number of saved recovery points, and encryption information if the resources saved in the backup vault are encrypted.</p>
1373    #[serde(rename = "BackupVaultList")]
1374    #[serde(skip_serializing_if = "Option::is_none")]
1375    pub backup_vault_list: Option<Vec<BackupVaultListMember>>,
1376    /// <p>The next item following a partial list of returned items. For example, if a request is made to return <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
1377    #[serde(rename = "NextToken")]
1378    #[serde(skip_serializing_if = "Option::is_none")]
1379    pub next_token: Option<String>,
1380}
1381
1382#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1383#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1384pub struct ListCopyJobsInput {
1385    /// <p>The account ID to list the jobs from. Returns only copy jobs associated with the specified account ID.</p>
1386    #[serde(rename = "ByAccountId")]
1387    #[serde(skip_serializing_if = "Option::is_none")]
1388    pub by_account_id: Option<String>,
1389    /// <p>Returns only copy jobs that were created after the specified date.</p>
1390    #[serde(rename = "ByCreatedAfter")]
1391    #[serde(skip_serializing_if = "Option::is_none")]
1392    pub by_created_after: Option<f64>,
1393    /// <p>Returns only copy jobs that were created before the specified date.</p>
1394    #[serde(rename = "ByCreatedBefore")]
1395    #[serde(skip_serializing_if = "Option::is_none")]
1396    pub by_created_before: Option<f64>,
1397    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a source backup vault to copy from; for example, <code>arn:aws:backup:us-east-1:123456789012:vault:aBackupVault</code>. </p>
1398    #[serde(rename = "ByDestinationVaultArn")]
1399    #[serde(skip_serializing_if = "Option::is_none")]
1400    pub by_destination_vault_arn: Option<String>,
1401    /// <p>Returns only copy jobs that match the specified resource Amazon Resource Name (ARN). </p>
1402    #[serde(rename = "ByResourceArn")]
1403    #[serde(skip_serializing_if = "Option::is_none")]
1404    pub by_resource_arn: Option<String>,
1405    /// <p><p>Returns only backup jobs for the specified resources:</p> <ul> <li> <p> <code>DynamoDB</code> for Amazon DynamoDB</p> </li> <li> <p> <code>EBS</code> for Amazon Elastic Block Store</p> </li> <li> <p> <code>EC2</code> for Amazon Elastic Compute Cloud</p> </li> <li> <p> <code>EFS</code> for Amazon Elastic File System</p> </li> <li> <p> <code>RDS</code> for Amazon Relational Database Service</p> </li> <li> <p> <code>Storage Gateway</code> for AWS Storage Gateway</p> </li> </ul></p>
1406    #[serde(rename = "ByResourceType")]
1407    #[serde(skip_serializing_if = "Option::is_none")]
1408    pub by_resource_type: Option<String>,
1409    /// <p>Returns only copy jobs that are in the specified state.</p>
1410    #[serde(rename = "ByState")]
1411    #[serde(skip_serializing_if = "Option::is_none")]
1412    pub by_state: Option<String>,
1413    /// <p>The maximum number of items to be returned.</p>
1414    #[serde(rename = "MaxResults")]
1415    #[serde(skip_serializing_if = "Option::is_none")]
1416    pub max_results: Option<i64>,
1417    /// <p>The next item following a partial list of returned items. For example, if a request is made to return maxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token. </p>
1418    #[serde(rename = "NextToken")]
1419    #[serde(skip_serializing_if = "Option::is_none")]
1420    pub next_token: Option<String>,
1421}
1422
1423#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1424#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1425pub struct ListCopyJobsOutput {
1426    /// <p>An array of structures containing metadata about your copy jobs returned in JSON format. </p>
1427    #[serde(rename = "CopyJobs")]
1428    #[serde(skip_serializing_if = "Option::is_none")]
1429    pub copy_jobs: Option<Vec<CopyJob>>,
1430    /// <p>The next item following a partial list of returned items. For example, if a request is made to return maxResults number of items, NextToken allows you to return more items in your list starting at the location pointed to by the next token. </p>
1431    #[serde(rename = "NextToken")]
1432    #[serde(skip_serializing_if = "Option::is_none")]
1433    pub next_token: Option<String>,
1434}
1435
1436#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1437#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1438pub struct ListProtectedResourcesInput {
1439    /// <p>The maximum number of items to be returned.</p>
1440    #[serde(rename = "MaxResults")]
1441    #[serde(skip_serializing_if = "Option::is_none")]
1442    pub max_results: Option<i64>,
1443    /// <p>The next item following a partial list of returned items. For example, if a request is made to return <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
1444    #[serde(rename = "NextToken")]
1445    #[serde(skip_serializing_if = "Option::is_none")]
1446    pub next_token: Option<String>,
1447}
1448
1449#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1450#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1451pub struct ListProtectedResourcesOutput {
1452    /// <p>The next item following a partial list of returned items. For example, if a request is made to return <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
1453    #[serde(rename = "NextToken")]
1454    #[serde(skip_serializing_if = "Option::is_none")]
1455    pub next_token: Option<String>,
1456    /// <p>An array of resources successfully backed up by AWS Backup including the time the resource was saved, an Amazon Resource Name (ARN) of the resource, and a resource type.</p>
1457    #[serde(rename = "Results")]
1458    #[serde(skip_serializing_if = "Option::is_none")]
1459    pub results: Option<Vec<ProtectedResource>>,
1460}
1461
1462#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1463#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1464pub struct ListRecoveryPointsByBackupVaultInput {
1465    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
1466    #[serde(rename = "BackupVaultName")]
1467    pub backup_vault_name: String,
1468    /// <p>Returns only recovery points that match the specified backup plan ID.</p>
1469    #[serde(rename = "ByBackupPlanId")]
1470    #[serde(skip_serializing_if = "Option::is_none")]
1471    pub by_backup_plan_id: Option<String>,
1472    /// <p>Returns only recovery points that were created after the specified timestamp.</p>
1473    #[serde(rename = "ByCreatedAfter")]
1474    #[serde(skip_serializing_if = "Option::is_none")]
1475    pub by_created_after: Option<f64>,
1476    /// <p>Returns only recovery points that were created before the specified timestamp.</p>
1477    #[serde(rename = "ByCreatedBefore")]
1478    #[serde(skip_serializing_if = "Option::is_none")]
1479    pub by_created_before: Option<f64>,
1480    /// <p>Returns only recovery points that match the specified resource Amazon Resource Name (ARN).</p>
1481    #[serde(rename = "ByResourceArn")]
1482    #[serde(skip_serializing_if = "Option::is_none")]
1483    pub by_resource_arn: Option<String>,
1484    /// <p>Returns only recovery points that match the specified resource type.</p>
1485    #[serde(rename = "ByResourceType")]
1486    #[serde(skip_serializing_if = "Option::is_none")]
1487    pub by_resource_type: Option<String>,
1488    /// <p>The maximum number of items to be returned.</p>
1489    #[serde(rename = "MaxResults")]
1490    #[serde(skip_serializing_if = "Option::is_none")]
1491    pub max_results: Option<i64>,
1492    /// <p>The next item following a partial list of returned items. For example, if a request is made to return <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
1493    #[serde(rename = "NextToken")]
1494    #[serde(skip_serializing_if = "Option::is_none")]
1495    pub next_token: Option<String>,
1496}
1497
1498#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1499#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1500pub struct ListRecoveryPointsByBackupVaultOutput {
1501    /// <p>The next item following a partial list of returned items. For example, if a request is made to return <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
1502    #[serde(rename = "NextToken")]
1503    #[serde(skip_serializing_if = "Option::is_none")]
1504    pub next_token: Option<String>,
1505    /// <p>An array of objects that contain detailed information about recovery points saved in a backup vault.</p>
1506    #[serde(rename = "RecoveryPoints")]
1507    #[serde(skip_serializing_if = "Option::is_none")]
1508    pub recovery_points: Option<Vec<RecoveryPointByBackupVault>>,
1509}
1510
1511#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1512#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1513pub struct ListRecoveryPointsByResourceInput {
1514    /// <p>The maximum number of items to be returned.</p>
1515    #[serde(rename = "MaxResults")]
1516    #[serde(skip_serializing_if = "Option::is_none")]
1517    pub max_results: Option<i64>,
1518    /// <p>The next item following a partial list of returned items. For example, if a request is made to return <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
1519    #[serde(rename = "NextToken")]
1520    #[serde(skip_serializing_if = "Option::is_none")]
1521    pub next_token: Option<String>,
1522    /// <p>An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type.</p>
1523    #[serde(rename = "ResourceArn")]
1524    pub resource_arn: String,
1525}
1526
1527#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1528#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1529pub struct ListRecoveryPointsByResourceOutput {
1530    /// <p>The next item following a partial list of returned items. For example, if a request is made to return <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
1531    #[serde(rename = "NextToken")]
1532    #[serde(skip_serializing_if = "Option::is_none")]
1533    pub next_token: Option<String>,
1534    /// <p>An array of objects that contain detailed information about recovery points of the specified resource type.</p>
1535    #[serde(rename = "RecoveryPoints")]
1536    #[serde(skip_serializing_if = "Option::is_none")]
1537    pub recovery_points: Option<Vec<RecoveryPointByResource>>,
1538}
1539
1540#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1541#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1542pub struct ListRestoreJobsInput {
1543    /// <p>The account ID to list the jobs from. Returns only restore jobs associated with the specified account ID.</p>
1544    #[serde(rename = "ByAccountId")]
1545    #[serde(skip_serializing_if = "Option::is_none")]
1546    pub by_account_id: Option<String>,
1547    /// <p>Returns only restore jobs that were created after the specified date.</p>
1548    #[serde(rename = "ByCreatedAfter")]
1549    #[serde(skip_serializing_if = "Option::is_none")]
1550    pub by_created_after: Option<f64>,
1551    /// <p>Returns only restore jobs that were created before the specified date.</p>
1552    #[serde(rename = "ByCreatedBefore")]
1553    #[serde(skip_serializing_if = "Option::is_none")]
1554    pub by_created_before: Option<f64>,
1555    /// <p>Returns only restore jobs associated with the specified job status.</p>
1556    #[serde(rename = "ByStatus")]
1557    #[serde(skip_serializing_if = "Option::is_none")]
1558    pub by_status: Option<String>,
1559    /// <p>The maximum number of items to be returned.</p>
1560    #[serde(rename = "MaxResults")]
1561    #[serde(skip_serializing_if = "Option::is_none")]
1562    pub max_results: Option<i64>,
1563    /// <p>The next item following a partial list of returned items. For example, if a request is made to return <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
1564    #[serde(rename = "NextToken")]
1565    #[serde(skip_serializing_if = "Option::is_none")]
1566    pub next_token: Option<String>,
1567}
1568
1569#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1570#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1571pub struct ListRestoreJobsOutput {
1572    /// <p>The next item following a partial list of returned items. For example, if a request is made to return <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
1573    #[serde(rename = "NextToken")]
1574    #[serde(skip_serializing_if = "Option::is_none")]
1575    pub next_token: Option<String>,
1576    /// <p>An array of objects that contain detailed information about jobs to restore saved resources.</p>
1577    #[serde(rename = "RestoreJobs")]
1578    #[serde(skip_serializing_if = "Option::is_none")]
1579    pub restore_jobs: Option<Vec<RestoreJobsListMember>>,
1580}
1581
1582#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1583#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1584pub struct ListTagsInput {
1585    /// <p>The maximum number of items to be returned.</p>
1586    #[serde(rename = "MaxResults")]
1587    #[serde(skip_serializing_if = "Option::is_none")]
1588    pub max_results: Option<i64>,
1589    /// <p>The next item following a partial list of returned items. For example, if a request is made to return <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
1590    #[serde(rename = "NextToken")]
1591    #[serde(skip_serializing_if = "Option::is_none")]
1592    pub next_token: Option<String>,
1593    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a resource. The format of the ARN depends on the type of resource. Valid targets for <code>ListTags</code> are recovery points, backup plans, and backup vaults.</p>
1594    #[serde(rename = "ResourceArn")]
1595    pub resource_arn: String,
1596}
1597
1598#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1599#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1600pub struct ListTagsOutput {
1601    /// <p>The next item following a partial list of returned items. For example, if a request is made to return <code>maxResults</code> number of items, <code>NextToken</code> allows you to return more items in your list starting at the location pointed to by the next token.</p>
1602    #[serde(rename = "NextToken")]
1603    #[serde(skip_serializing_if = "Option::is_none")]
1604    pub next_token: Option<String>,
1605    /// <p>To help organize your resources, you can assign your own metadata to the resources you create. Each tag is a key-value pair.</p>
1606    #[serde(rename = "Tags")]
1607    #[serde(skip_serializing_if = "Option::is_none")]
1608    pub tags: Option<::std::collections::HashMap<String, String>>,
1609}
1610
1611/// <p>A structure that contains information about a backed-up resource.</p>
1612#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1613#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1614pub struct ProtectedResource {
1615    /// <p>The date and time a resource was last backed up, in Unix format and Coordinated Universal Time (UTC). The value of <code>LastBackupTime</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
1616    #[serde(rename = "LastBackupTime")]
1617    #[serde(skip_serializing_if = "Option::is_none")]
1618    pub last_backup_time: Option<f64>,
1619    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a resource. The format of the ARN depends on the resource type.</p>
1620    #[serde(rename = "ResourceArn")]
1621    #[serde(skip_serializing_if = "Option::is_none")]
1622    pub resource_arn: Option<String>,
1623    /// <p>The type of AWS resource; for example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) database.</p>
1624    #[serde(rename = "ResourceType")]
1625    #[serde(skip_serializing_if = "Option::is_none")]
1626    pub resource_type: Option<String>,
1627}
1628
1629#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1630#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1631pub struct PutBackupVaultAccessPolicyInput {
1632    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
1633    #[serde(rename = "BackupVaultName")]
1634    pub backup_vault_name: String,
1635    /// <p>The backup vault access policy document in JSON format.</p>
1636    #[serde(rename = "Policy")]
1637    #[serde(skip_serializing_if = "Option::is_none")]
1638    pub policy: Option<String>,
1639}
1640
1641#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1642#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1643pub struct PutBackupVaultNotificationsInput {
1644    /// <p>An array of events that indicate the status of jobs to back up resources to the backup vault.</p>
1645    #[serde(rename = "BackupVaultEvents")]
1646    pub backup_vault_events: Vec<String>,
1647    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
1648    #[serde(rename = "BackupVaultName")]
1649    pub backup_vault_name: String,
1650    /// <p>The Amazon Resource Name (ARN) that specifies the topic for a backup vault’s events; for example, <code>arn:aws:sns:us-west-2:111122223333:MyVaultTopic</code>.</p>
1651    #[serde(rename = "SNSTopicArn")]
1652    pub sns_topic_arn: String,
1653}
1654
1655/// <p>Contains detailed information about the recovery points stored in a backup vault.</p>
1656#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1657#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1658pub struct RecoveryPointByBackupVault {
1659    /// <p>The size, in bytes, of a backup.</p>
1660    #[serde(rename = "BackupSizeInBytes")]
1661    #[serde(skip_serializing_if = "Option::is_none")]
1662    pub backup_size_in_bytes: Option<i64>,
1663    /// <p>An ARN that uniquely identifies a backup vault; for example, <code>arn:aws:backup:us-east-1:123456789012:vault:aBackupVault</code>.</p>
1664    #[serde(rename = "BackupVaultArn")]
1665    #[serde(skip_serializing_if = "Option::is_none")]
1666    pub backup_vault_arn: Option<String>,
1667    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
1668    #[serde(rename = "BackupVaultName")]
1669    #[serde(skip_serializing_if = "Option::is_none")]
1670    pub backup_vault_name: Option<String>,
1671    /// <p>A <code>CalculatedLifecycle</code> object containing <code>DeleteAt</code> and <code>MoveToColdStorageAt</code> timestamps.</p>
1672    #[serde(rename = "CalculatedLifecycle")]
1673    #[serde(skip_serializing_if = "Option::is_none")]
1674    pub calculated_lifecycle: Option<CalculatedLifecycle>,
1675    /// <p>The date and time a job to restore a recovery point is completed, in Unix format and Coordinated Universal Time (UTC). The value of <code>CompletionDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
1676    #[serde(rename = "CompletionDate")]
1677    #[serde(skip_serializing_if = "Option::is_none")]
1678    pub completion_date: Option<f64>,
1679    /// <p>Contains identifying information about the creation of a recovery point, including the <code>BackupPlanArn</code>, <code>BackupPlanId</code>, <code>BackupPlanVersion</code>, and <code>BackupRuleId</code> of the backup plan that is used to create it.</p>
1680    #[serde(rename = "CreatedBy")]
1681    #[serde(skip_serializing_if = "Option::is_none")]
1682    pub created_by: Option<RecoveryPointCreator>,
1683    /// <p>The date and time a recovery point is created, in Unix format and Coordinated Universal Time (UTC). The value of <code>CreationDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
1684    #[serde(rename = "CreationDate")]
1685    #[serde(skip_serializing_if = "Option::is_none")]
1686    pub creation_date: Option<f64>,
1687    /// <p>The server-side encryption key that is used to protect your backups; for example, <code>arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>.</p>
1688    #[serde(rename = "EncryptionKeyArn")]
1689    #[serde(skip_serializing_if = "Option::is_none")]
1690    pub encryption_key_arn: Option<String>,
1691    /// <p>Specifies the IAM role ARN used to create the target recovery point; for example, <code>arn:aws:iam::123456789012:role/S3Access</code>.</p>
1692    #[serde(rename = "IamRoleArn")]
1693    #[serde(skip_serializing_if = "Option::is_none")]
1694    pub iam_role_arn: Option<String>,
1695    /// <p>A Boolean value that is returned as <code>TRUE</code> if the specified recovery point is encrypted, or <code>FALSE</code> if the recovery point is not encrypted.</p>
1696    #[serde(rename = "IsEncrypted")]
1697    #[serde(skip_serializing_if = "Option::is_none")]
1698    pub is_encrypted: Option<bool>,
1699    /// <p>The date and time a recovery point was last restored, in Unix format and Coordinated Universal Time (UTC). The value of <code>LastRestoreTime</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
1700    #[serde(rename = "LastRestoreTime")]
1701    #[serde(skip_serializing_if = "Option::is_none")]
1702    pub last_restore_time: Option<f64>,
1703    /// <p>The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. AWS Backup transitions and expires backups automatically according to the lifecycle that you define. </p> <p>Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold. </p>
1704    #[serde(rename = "Lifecycle")]
1705    #[serde(skip_serializing_if = "Option::is_none")]
1706    pub lifecycle: Option<Lifecycle>,
1707    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example, <code>arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45</code>.</p>
1708    #[serde(rename = "RecoveryPointArn")]
1709    #[serde(skip_serializing_if = "Option::is_none")]
1710    pub recovery_point_arn: Option<String>,
1711    /// <p>An ARN that uniquely identifies a resource. The format of the ARN depends on the resource type.</p>
1712    #[serde(rename = "ResourceArn")]
1713    #[serde(skip_serializing_if = "Option::is_none")]
1714    pub resource_arn: Option<String>,
1715    /// <p>The type of AWS resource saved as a recovery point; for example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) database.</p>
1716    #[serde(rename = "ResourceType")]
1717    #[serde(skip_serializing_if = "Option::is_none")]
1718    pub resource_type: Option<String>,
1719    /// <p>A status code specifying the state of the recovery point.</p>
1720    #[serde(rename = "Status")]
1721    #[serde(skip_serializing_if = "Option::is_none")]
1722    pub status: Option<String>,
1723}
1724
1725/// <p>Contains detailed information about a saved recovery point.</p>
1726#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1727#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1728pub struct RecoveryPointByResource {
1729    /// <p>The size, in bytes, of a backup.</p>
1730    #[serde(rename = "BackupSizeBytes")]
1731    #[serde(skip_serializing_if = "Option::is_none")]
1732    pub backup_size_bytes: Option<i64>,
1733    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
1734    #[serde(rename = "BackupVaultName")]
1735    #[serde(skip_serializing_if = "Option::is_none")]
1736    pub backup_vault_name: Option<String>,
1737    /// <p>The date and time a recovery point is created, in Unix format and Coordinated Universal Time (UTC). The value of <code>CreationDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
1738    #[serde(rename = "CreationDate")]
1739    #[serde(skip_serializing_if = "Option::is_none")]
1740    pub creation_date: Option<f64>,
1741    /// <p>The server-side encryption key that is used to protect your backups; for example, <code>arn:aws:kms:us-west-2:111122223333:key/1234abcd-12ab-34cd-56ef-1234567890ab</code>.</p>
1742    #[serde(rename = "EncryptionKeyArn")]
1743    #[serde(skip_serializing_if = "Option::is_none")]
1744    pub encryption_key_arn: Option<String>,
1745    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example, <code>arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45</code>.</p>
1746    #[serde(rename = "RecoveryPointArn")]
1747    #[serde(skip_serializing_if = "Option::is_none")]
1748    pub recovery_point_arn: Option<String>,
1749    /// <p>A status code specifying the state of the recovery point.</p>
1750    #[serde(rename = "Status")]
1751    #[serde(skip_serializing_if = "Option::is_none")]
1752    pub status: Option<String>,
1753}
1754
1755/// <p>Contains information about the backup plan and rule that AWS Backup used to initiate the recovery point backup.</p>
1756#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1757#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1758pub struct RecoveryPointCreator {
1759    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for example, <code>arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50</code>.</p>
1760    #[serde(rename = "BackupPlanArn")]
1761    #[serde(skip_serializing_if = "Option::is_none")]
1762    pub backup_plan_arn: Option<String>,
1763    /// <p>Uniquely identifies a backup plan.</p>
1764    #[serde(rename = "BackupPlanId")]
1765    #[serde(skip_serializing_if = "Option::is_none")]
1766    pub backup_plan_id: Option<String>,
1767    /// <p>Version IDs are unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long. They cannot be edited.</p>
1768    #[serde(rename = "BackupPlanVersion")]
1769    #[serde(skip_serializing_if = "Option::is_none")]
1770    pub backup_plan_version: Option<String>,
1771    /// <p>Uniquely identifies a rule used to schedule the backup of a selection of resources.</p>
1772    #[serde(rename = "BackupRuleId")]
1773    #[serde(skip_serializing_if = "Option::is_none")]
1774    pub backup_rule_id: Option<String>,
1775}
1776
1777/// <p>Contains metadata about a restore job.</p>
1778#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1779#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1780pub struct RestoreJobsListMember {
1781    /// <p>The account ID that owns the restore job.</p>
1782    #[serde(rename = "AccountId")]
1783    #[serde(skip_serializing_if = "Option::is_none")]
1784    pub account_id: Option<String>,
1785    /// <p>The size, in bytes, of the restored resource.</p>
1786    #[serde(rename = "BackupSizeInBytes")]
1787    #[serde(skip_serializing_if = "Option::is_none")]
1788    pub backup_size_in_bytes: Option<i64>,
1789    /// <p>The date and time a job to restore a recovery point is completed, in Unix format and Coordinated Universal Time (UTC). The value of <code>CompletionDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
1790    #[serde(rename = "CompletionDate")]
1791    #[serde(skip_serializing_if = "Option::is_none")]
1792    pub completion_date: Option<f64>,
1793    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a resource. The format of the ARN depends on the resource type.</p>
1794    #[serde(rename = "CreatedResourceArn")]
1795    #[serde(skip_serializing_if = "Option::is_none")]
1796    pub created_resource_arn: Option<String>,
1797    /// <p>The date and time a restore job is created, in Unix format and Coordinated Universal Time (UTC). The value of <code>CreationDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
1798    #[serde(rename = "CreationDate")]
1799    #[serde(skip_serializing_if = "Option::is_none")]
1800    pub creation_date: Option<f64>,
1801    /// <p>The amount of time in minutes that a job restoring a recovery point is expected to take.</p>
1802    #[serde(rename = "ExpectedCompletionTimeMinutes")]
1803    #[serde(skip_serializing_if = "Option::is_none")]
1804    pub expected_completion_time_minutes: Option<i64>,
1805    /// <p>Specifies the IAM role ARN used to create the target recovery point; for example, <code>arn:aws:iam::123456789012:role/S3Access</code>.</p>
1806    #[serde(rename = "IamRoleArn")]
1807    #[serde(skip_serializing_if = "Option::is_none")]
1808    pub iam_role_arn: Option<String>,
1809    /// <p>Contains an estimated percentage complete of a job at the time the job status was queried.</p>
1810    #[serde(rename = "PercentDone")]
1811    #[serde(skip_serializing_if = "Option::is_none")]
1812    pub percent_done: Option<String>,
1813    /// <p>An ARN that uniquely identifies a recovery point; for example, <code>arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45</code>.</p>
1814    #[serde(rename = "RecoveryPointArn")]
1815    #[serde(skip_serializing_if = "Option::is_none")]
1816    pub recovery_point_arn: Option<String>,
1817    /// <p>The resource type of the listed restore jobs; for example, an Amazon Elastic Block Store (Amazon EBS) volume or an Amazon Relational Database Service (Amazon RDS) database.</p>
1818    #[serde(rename = "ResourceType")]
1819    #[serde(skip_serializing_if = "Option::is_none")]
1820    pub resource_type: Option<String>,
1821    /// <p>Uniquely identifies the job that restores a recovery point.</p>
1822    #[serde(rename = "RestoreJobId")]
1823    #[serde(skip_serializing_if = "Option::is_none")]
1824    pub restore_job_id: Option<String>,
1825    /// <p>A status code specifying the state of the job initiated by AWS Backup to restore a recovery point.</p>
1826    #[serde(rename = "Status")]
1827    #[serde(skip_serializing_if = "Option::is_none")]
1828    pub status: Option<String>,
1829    /// <p>A detailed message explaining the status of the job to restore a recovery point.</p>
1830    #[serde(rename = "StatusMessage")]
1831    #[serde(skip_serializing_if = "Option::is_none")]
1832    pub status_message: Option<String>,
1833}
1834
1835#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1836#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1837pub struct StartBackupJobInput {
1838    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
1839    #[serde(rename = "BackupVaultName")]
1840    pub backup_vault_name: String,
1841    /// <p>A value in minutes after a backup job is successfully started before it must be completed or it will be canceled by AWS Backup. This value is optional.</p>
1842    #[serde(rename = "CompleteWindowMinutes")]
1843    #[serde(skip_serializing_if = "Option::is_none")]
1844    pub complete_window_minutes: Option<i64>,
1845    /// <p>Specifies the IAM role ARN used to create the target recovery point; for example, <code>arn:aws:iam::123456789012:role/S3Access</code>.</p>
1846    #[serde(rename = "IamRoleArn")]
1847    pub iam_role_arn: String,
1848    /// <p>A customer chosen string that can be used to distinguish between calls to <code>StartBackupJob</code>.</p>
1849    #[serde(rename = "IdempotencyToken")]
1850    #[serde(skip_serializing_if = "Option::is_none")]
1851    pub idempotency_token: Option<String>,
1852    /// <p>The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. AWS Backup will transition and expire backups automatically according to the lifecycle that you define. </p> <p>Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold. </p>
1853    #[serde(rename = "Lifecycle")]
1854    #[serde(skip_serializing_if = "Option::is_none")]
1855    pub lifecycle: Option<Lifecycle>,
1856    /// <p>To help organize your resources, you can assign your own metadata to the resources that you create. Each tag is a key-value pair.</p>
1857    #[serde(rename = "RecoveryPointTags")]
1858    #[serde(skip_serializing_if = "Option::is_none")]
1859    pub recovery_point_tags: Option<::std::collections::HashMap<String, String>>,
1860    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a resource. The format of the ARN depends on the resource type.</p>
1861    #[serde(rename = "ResourceArn")]
1862    pub resource_arn: String,
1863    /// <p>A value in minutes after a backup is scheduled before a job will be canceled if it doesn't start successfully. This value is optional.</p>
1864    #[serde(rename = "StartWindowMinutes")]
1865    #[serde(skip_serializing_if = "Option::is_none")]
1866    pub start_window_minutes: Option<i64>,
1867}
1868
1869#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1870#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1871pub struct StartBackupJobOutput {
1872    /// <p>Uniquely identifies a request to AWS Backup to back up a resource.</p>
1873    #[serde(rename = "BackupJobId")]
1874    #[serde(skip_serializing_if = "Option::is_none")]
1875    pub backup_job_id: Option<String>,
1876    /// <p>The date and time that a backup job is started, in Unix format and Coordinated Universal Time (UTC). The value of <code>CreationDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
1877    #[serde(rename = "CreationDate")]
1878    #[serde(skip_serializing_if = "Option::is_none")]
1879    pub creation_date: Option<f64>,
1880    /// <p>An ARN that uniquely identifies a recovery point; for example, <code>arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45</code>.</p>
1881    #[serde(rename = "RecoveryPointArn")]
1882    #[serde(skip_serializing_if = "Option::is_none")]
1883    pub recovery_point_arn: Option<String>,
1884}
1885
1886#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1887#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1888pub struct StartCopyJobInput {
1889    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a destination backup vault to copy to; for example, <code>arn:aws:backup:us-east-1:123456789012:vault:aBackupVault</code>.</p>
1890    #[serde(rename = "DestinationBackupVaultArn")]
1891    pub destination_backup_vault_arn: String,
1892    /// <p>Specifies the IAM role ARN used to copy the target recovery point; for example, <code>arn:aws:iam::123456789012:role/S3Access</code>.</p>
1893    #[serde(rename = "IamRoleArn")]
1894    pub iam_role_arn: String,
1895    /// <p>A customer chosen string that can be used to distinguish between calls to <code>StartCopyJob</code>.</p>
1896    #[serde(rename = "IdempotencyToken")]
1897    #[serde(skip_serializing_if = "Option::is_none")]
1898    pub idempotency_token: Option<String>,
1899    #[serde(rename = "Lifecycle")]
1900    #[serde(skip_serializing_if = "Option::is_none")]
1901    pub lifecycle: Option<Lifecycle>,
1902    /// <p>An ARN that uniquely identifies a recovery point to use for the copy job; for example, arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45. </p>
1903    #[serde(rename = "RecoveryPointArn")]
1904    pub recovery_point_arn: String,
1905    /// <p>The name of a logical source container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
1906    #[serde(rename = "SourceBackupVaultName")]
1907    pub source_backup_vault_name: String,
1908}
1909
1910#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1911#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1912pub struct StartCopyJobOutput {
1913    /// <p>Uniquely identifies a copy job.</p>
1914    #[serde(rename = "CopyJobId")]
1915    #[serde(skip_serializing_if = "Option::is_none")]
1916    pub copy_job_id: Option<String>,
1917    /// <p>The date and time that a copy job is started, in Unix format and Coordinated Universal Time (UTC). The value of <code>CreationDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
1918    #[serde(rename = "CreationDate")]
1919    #[serde(skip_serializing_if = "Option::is_none")]
1920    pub creation_date: Option<f64>,
1921}
1922
1923#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1924#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1925pub struct StartRestoreJobInput {
1926    /// <p>The Amazon Resource Name (ARN) of the IAM role that AWS Backup uses to create the target recovery point; for example, <code>arn:aws:iam::123456789012:role/S3Access</code>.</p>
1927    #[serde(rename = "IamRoleArn")]
1928    pub iam_role_arn: String,
1929    /// <p>A customer chosen string that can be used to distinguish between calls to <code>StartRestoreJob</code>.</p>
1930    #[serde(rename = "IdempotencyToken")]
1931    #[serde(skip_serializing_if = "Option::is_none")]
1932    pub idempotency_token: Option<String>,
1933    /// <p><p>A set of metadata key-value pairs. Contains information, such as a resource name, required to restore a recovery point.</p> <p> You can get configuration metadata about a resource at the time it was backed up by calling <code>GetRecoveryPointRestoreMetadata</code>. However, values in addition to those provided by <code>GetRecoveryPointRestoreMetadata</code> might be required to restore a resource. For example, you might need to provide a new resource name if the original already exists.</p> <p>You need to specify specific metadata to restore an Amazon Elastic File System (Amazon EFS) instance:</p> <ul> <li> <p> <code>file-system-id</code>: ID of the Amazon EFS file system that is backed up by AWS Backup. Returned in <code>GetRecoveryPointRestoreMetadata</code>.</p> </li> <li> <p> <code>Encrypted</code>: A Boolean value that, if true, specifies that the file system is encrypted. If <code>KmsKeyId</code> is specified, <code>Encrypted</code> must be set to <code>true</code>.</p> </li> <li> <p> <code>KmsKeyId</code>: Specifies the AWS KMS key that is used to encrypt the restored file system.</p> </li> <li> <p> <code>PerformanceMode</code>: Specifies the throughput mode of the file system.</p> </li> <li> <p> <code>CreationToken</code>: A user-supplied value that ensures the uniqueness (idempotency) of the request.</p> </li> <li> <p> <code>newFileSystem</code>: A Boolean value that, if true, specifies that the recovery point is restored to a new Amazon EFS file system.</p> </li> </ul></p>
1934    #[serde(rename = "Metadata")]
1935    pub metadata: ::std::collections::HashMap<String, String>,
1936    /// <p>An ARN that uniquely identifies a recovery point; for example, <code>arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45</code>.</p>
1937    #[serde(rename = "RecoveryPointArn")]
1938    pub recovery_point_arn: String,
1939    /// <p><p>Starts a job to restore a recovery point for one of the following resources:</p> <ul> <li> <p> <code>DynamoDB</code> for Amazon DynamoDB</p> </li> <li> <p> <code>EBS</code> for Amazon Elastic Block Store</p> </li> <li> <p> <code>EC2</code> for Amazon Elastic Compute Cloud</p> </li> <li> <p> <code>EFS</code> for Amazon Elastic File System</p> </li> <li> <p> <code>RDS</code> for Amazon Relational Database Service</p> </li> <li> <p> <code>Storage Gateway</code> for AWS Storage Gateway</p> </li> </ul></p>
1940    #[serde(rename = "ResourceType")]
1941    #[serde(skip_serializing_if = "Option::is_none")]
1942    pub resource_type: Option<String>,
1943}
1944
1945#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1946#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1947pub struct StartRestoreJobOutput {
1948    /// <p>Uniquely identifies the job that restores a recovery point.</p>
1949    #[serde(rename = "RestoreJobId")]
1950    #[serde(skip_serializing_if = "Option::is_none")]
1951    pub restore_job_id: Option<String>,
1952}
1953
1954#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1955#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1956pub struct StopBackupJobInput {
1957    /// <p>Uniquely identifies a request to AWS Backup to back up a resource.</p>
1958    #[serde(rename = "BackupJobId")]
1959    pub backup_job_id: String,
1960}
1961
1962#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1963#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1964pub struct TagResourceInput {
1965    /// <p>An ARN that uniquely identifies a resource. The format of the ARN depends on the type of the tagged resource.</p>
1966    #[serde(rename = "ResourceArn")]
1967    pub resource_arn: String,
1968    /// <p>Key-value pairs that are used to help organize your resources. You can assign your own metadata to the resources you create. </p>
1969    #[serde(rename = "Tags")]
1970    pub tags: ::std::collections::HashMap<String, String>,
1971}
1972
1973#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1974#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1975pub struct UntagResourceInput {
1976    /// <p>An ARN that uniquely identifies a resource. The format of the ARN depends on the type of the tagged resource.</p>
1977    #[serde(rename = "ResourceArn")]
1978    pub resource_arn: String,
1979    /// <p>A list of keys to identify which key-value tags to remove from a resource.</p>
1980    #[serde(rename = "TagKeyList")]
1981    pub tag_key_list: Vec<String>,
1982}
1983
1984#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1985#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1986pub struct UpdateBackupPlanInput {
1987    /// <p>Specifies the body of a backup plan. Includes a <code>BackupPlanName</code> and one or more sets of <code>Rules</code>.</p>
1988    #[serde(rename = "BackupPlan")]
1989    pub backup_plan: BackupPlanInput,
1990    /// <p>Uniquely identifies a backup plan.</p>
1991    #[serde(rename = "BackupPlanId")]
1992    pub backup_plan_id: String,
1993}
1994
1995#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1996#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1997pub struct UpdateBackupPlanOutput {
1998    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a backup plan; for example, <code>arn:aws:backup:us-east-1:123456789012:plan:8F81F553-3A74-4A3F-B93D-B3360DC80C50</code>.</p>
1999    #[serde(rename = "BackupPlanArn")]
2000    #[serde(skip_serializing_if = "Option::is_none")]
2001    pub backup_plan_arn: Option<String>,
2002    /// <p>Uniquely identifies a backup plan.</p>
2003    #[serde(rename = "BackupPlanId")]
2004    #[serde(skip_serializing_if = "Option::is_none")]
2005    pub backup_plan_id: Option<String>,
2006    /// <p>The date and time a backup plan is updated, in Unix format and Coordinated Universal Time (UTC). The value of <code>CreationDate</code> is accurate to milliseconds. For example, the value 1516925490.087 represents Friday, January 26, 2018 12:11:30.087 AM.</p>
2007    #[serde(rename = "CreationDate")]
2008    #[serde(skip_serializing_if = "Option::is_none")]
2009    pub creation_date: Option<f64>,
2010    /// <p>Unique, randomly generated, Unicode, UTF-8 encoded strings that are at most 1,024 bytes long. Version Ids cannot be edited.</p>
2011    #[serde(rename = "VersionId")]
2012    #[serde(skip_serializing_if = "Option::is_none")]
2013    pub version_id: Option<String>,
2014}
2015
2016#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2017#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2018pub struct UpdateRecoveryPointLifecycleInput {
2019    /// <p>The name of a logical container where backups are stored. Backup vaults are identified by names that are unique to the account used to create them and the AWS Region where they are created. They consist of lowercase letters, numbers, and hyphens.</p>
2020    #[serde(rename = "BackupVaultName")]
2021    pub backup_vault_name: String,
2022    /// <p>The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. AWS Backup transitions and expires backups automatically according to the lifecycle that you define. </p> <p>Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold. </p>
2023    #[serde(rename = "Lifecycle")]
2024    #[serde(skip_serializing_if = "Option::is_none")]
2025    pub lifecycle: Option<Lifecycle>,
2026    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example, <code>arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45</code>.</p>
2027    #[serde(rename = "RecoveryPointArn")]
2028    pub recovery_point_arn: String,
2029}
2030
2031#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
2032#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
2033pub struct UpdateRecoveryPointLifecycleOutput {
2034    /// <p>An ARN that uniquely identifies a backup vault; for example, <code>arn:aws:backup:us-east-1:123456789012:vault:aBackupVault</code>.</p>
2035    #[serde(rename = "BackupVaultArn")]
2036    #[serde(skip_serializing_if = "Option::is_none")]
2037    pub backup_vault_arn: Option<String>,
2038    /// <p>A <code>CalculatedLifecycle</code> object containing <code>DeleteAt</code> and <code>MoveToColdStorageAt</code> timestamps.</p>
2039    #[serde(rename = "CalculatedLifecycle")]
2040    #[serde(skip_serializing_if = "Option::is_none")]
2041    pub calculated_lifecycle: Option<CalculatedLifecycle>,
2042    /// <p>The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. AWS Backup transitions and expires backups automatically according to the lifecycle that you define. </p> <p>Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold. </p>
2043    #[serde(rename = "Lifecycle")]
2044    #[serde(skip_serializing_if = "Option::is_none")]
2045    pub lifecycle: Option<Lifecycle>,
2046    /// <p>An Amazon Resource Name (ARN) that uniquely identifies a recovery point; for example, <code>arn:aws:backup:us-east-1:123456789012:recovery-point:1EB3B5E7-9EB0-435A-A80B-108B488B0D45</code>.</p>
2047    #[serde(rename = "RecoveryPointArn")]
2048    #[serde(skip_serializing_if = "Option::is_none")]
2049    pub recovery_point_arn: Option<String>,
2050}
2051
2052#[derive(Clone, Debug, Default, PartialEq, Serialize)]
2053#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
2054pub struct UpdateRegionSettingsInput {
2055    /// <p>Updates the list of services along with the opt-in preferences for the region.</p>
2056    #[serde(rename = "ResourceTypeOptInPreference")]
2057    #[serde(skip_serializing_if = "Option::is_none")]
2058    pub resource_type_opt_in_preference: Option<::std::collections::HashMap<String, bool>>,
2059}
2060
2061/// Errors returned by CreateBackupPlan
2062#[derive(Debug, PartialEq)]
2063pub enum CreateBackupPlanError {
2064    /// <p>The required resource already exists.</p>
2065    AlreadyExists(String),
2066    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
2067    InvalidParameterValue(String),
2068    /// <p>A limit in the request has been exceeded; for example, a maximum number of items allowed in a request.</p>
2069    LimitExceeded(String),
2070    /// <p>Indicates that a required parameter is missing.</p>
2071    MissingParameterValue(String),
2072    /// <p>The request failed due to a temporary failure of the server.</p>
2073    ServiceUnavailable(String),
2074}
2075
2076impl CreateBackupPlanError {
2077    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateBackupPlanError> {
2078        if let Some(err) = proto::json::Error::parse_rest(&res) {
2079            match err.typ.as_str() {
2080                "AlreadyExistsException" => {
2081                    return RusotoError::Service(CreateBackupPlanError::AlreadyExists(err.msg))
2082                }
2083                "InvalidParameterValueException" => {
2084                    return RusotoError::Service(CreateBackupPlanError::InvalidParameterValue(
2085                        err.msg,
2086                    ))
2087                }
2088                "LimitExceededException" => {
2089                    return RusotoError::Service(CreateBackupPlanError::LimitExceeded(err.msg))
2090                }
2091                "MissingParameterValueException" => {
2092                    return RusotoError::Service(CreateBackupPlanError::MissingParameterValue(
2093                        err.msg,
2094                    ))
2095                }
2096                "ServiceUnavailableException" => {
2097                    return RusotoError::Service(CreateBackupPlanError::ServiceUnavailable(err.msg))
2098                }
2099                "ValidationException" => return RusotoError::Validation(err.msg),
2100                _ => {}
2101            }
2102        }
2103        RusotoError::Unknown(res)
2104    }
2105}
2106impl fmt::Display for CreateBackupPlanError {
2107    #[allow(unused_variables)]
2108    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2109        match *self {
2110            CreateBackupPlanError::AlreadyExists(ref cause) => write!(f, "{}", cause),
2111            CreateBackupPlanError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
2112            CreateBackupPlanError::LimitExceeded(ref cause) => write!(f, "{}", cause),
2113            CreateBackupPlanError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
2114            CreateBackupPlanError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2115        }
2116    }
2117}
2118impl Error for CreateBackupPlanError {}
2119/// Errors returned by CreateBackupSelection
2120#[derive(Debug, PartialEq)]
2121pub enum CreateBackupSelectionError {
2122    /// <p>The required resource already exists.</p>
2123    AlreadyExists(String),
2124    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
2125    InvalidParameterValue(String),
2126    /// <p>A limit in the request has been exceeded; for example, a maximum number of items allowed in a request.</p>
2127    LimitExceeded(String),
2128    /// <p>Indicates that a required parameter is missing.</p>
2129    MissingParameterValue(String),
2130    /// <p>The request failed due to a temporary failure of the server.</p>
2131    ServiceUnavailable(String),
2132}
2133
2134impl CreateBackupSelectionError {
2135    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateBackupSelectionError> {
2136        if let Some(err) = proto::json::Error::parse_rest(&res) {
2137            match err.typ.as_str() {
2138                "AlreadyExistsException" => {
2139                    return RusotoError::Service(CreateBackupSelectionError::AlreadyExists(err.msg))
2140                }
2141                "InvalidParameterValueException" => {
2142                    return RusotoError::Service(CreateBackupSelectionError::InvalidParameterValue(
2143                        err.msg,
2144                    ))
2145                }
2146                "LimitExceededException" => {
2147                    return RusotoError::Service(CreateBackupSelectionError::LimitExceeded(err.msg))
2148                }
2149                "MissingParameterValueException" => {
2150                    return RusotoError::Service(CreateBackupSelectionError::MissingParameterValue(
2151                        err.msg,
2152                    ))
2153                }
2154                "ServiceUnavailableException" => {
2155                    return RusotoError::Service(CreateBackupSelectionError::ServiceUnavailable(
2156                        err.msg,
2157                    ))
2158                }
2159                "ValidationException" => return RusotoError::Validation(err.msg),
2160                _ => {}
2161            }
2162        }
2163        RusotoError::Unknown(res)
2164    }
2165}
2166impl fmt::Display for CreateBackupSelectionError {
2167    #[allow(unused_variables)]
2168    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2169        match *self {
2170            CreateBackupSelectionError::AlreadyExists(ref cause) => write!(f, "{}", cause),
2171            CreateBackupSelectionError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
2172            CreateBackupSelectionError::LimitExceeded(ref cause) => write!(f, "{}", cause),
2173            CreateBackupSelectionError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
2174            CreateBackupSelectionError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2175        }
2176    }
2177}
2178impl Error for CreateBackupSelectionError {}
2179/// Errors returned by CreateBackupVault
2180#[derive(Debug, PartialEq)]
2181pub enum CreateBackupVaultError {
2182    /// <p>The required resource already exists.</p>
2183    AlreadyExists(String),
2184    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
2185    InvalidParameterValue(String),
2186    /// <p>A limit in the request has been exceeded; for example, a maximum number of items allowed in a request.</p>
2187    LimitExceeded(String),
2188    /// <p>Indicates that a required parameter is missing.</p>
2189    MissingParameterValue(String),
2190    /// <p>The request failed due to a temporary failure of the server.</p>
2191    ServiceUnavailable(String),
2192}
2193
2194impl CreateBackupVaultError {
2195    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateBackupVaultError> {
2196        if let Some(err) = proto::json::Error::parse_rest(&res) {
2197            match err.typ.as_str() {
2198                "AlreadyExistsException" => {
2199                    return RusotoError::Service(CreateBackupVaultError::AlreadyExists(err.msg))
2200                }
2201                "InvalidParameterValueException" => {
2202                    return RusotoError::Service(CreateBackupVaultError::InvalidParameterValue(
2203                        err.msg,
2204                    ))
2205                }
2206                "LimitExceededException" => {
2207                    return RusotoError::Service(CreateBackupVaultError::LimitExceeded(err.msg))
2208                }
2209                "MissingParameterValueException" => {
2210                    return RusotoError::Service(CreateBackupVaultError::MissingParameterValue(
2211                        err.msg,
2212                    ))
2213                }
2214                "ServiceUnavailableException" => {
2215                    return RusotoError::Service(CreateBackupVaultError::ServiceUnavailable(
2216                        err.msg,
2217                    ))
2218                }
2219                "ValidationException" => return RusotoError::Validation(err.msg),
2220                _ => {}
2221            }
2222        }
2223        RusotoError::Unknown(res)
2224    }
2225}
2226impl fmt::Display for CreateBackupVaultError {
2227    #[allow(unused_variables)]
2228    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2229        match *self {
2230            CreateBackupVaultError::AlreadyExists(ref cause) => write!(f, "{}", cause),
2231            CreateBackupVaultError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
2232            CreateBackupVaultError::LimitExceeded(ref cause) => write!(f, "{}", cause),
2233            CreateBackupVaultError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
2234            CreateBackupVaultError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2235        }
2236    }
2237}
2238impl Error for CreateBackupVaultError {}
2239/// Errors returned by DeleteBackupPlan
2240#[derive(Debug, PartialEq)]
2241pub enum DeleteBackupPlanError {
2242    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
2243    InvalidParameterValue(String),
2244    /// <p>Indicates that something is wrong with the input to the request. For example, a parameter is of the wrong type.</p>
2245    InvalidRequest(String),
2246    /// <p>Indicates that a required parameter is missing.</p>
2247    MissingParameterValue(String),
2248    /// <p>A resource that is required for the action doesn't exist.</p>
2249    ResourceNotFound(String),
2250    /// <p>The request failed due to a temporary failure of the server.</p>
2251    ServiceUnavailable(String),
2252}
2253
2254impl DeleteBackupPlanError {
2255    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBackupPlanError> {
2256        if let Some(err) = proto::json::Error::parse_rest(&res) {
2257            match err.typ.as_str() {
2258                "InvalidParameterValueException" => {
2259                    return RusotoError::Service(DeleteBackupPlanError::InvalidParameterValue(
2260                        err.msg,
2261                    ))
2262                }
2263                "InvalidRequestException" => {
2264                    return RusotoError::Service(DeleteBackupPlanError::InvalidRequest(err.msg))
2265                }
2266                "MissingParameterValueException" => {
2267                    return RusotoError::Service(DeleteBackupPlanError::MissingParameterValue(
2268                        err.msg,
2269                    ))
2270                }
2271                "ResourceNotFoundException" => {
2272                    return RusotoError::Service(DeleteBackupPlanError::ResourceNotFound(err.msg))
2273                }
2274                "ServiceUnavailableException" => {
2275                    return RusotoError::Service(DeleteBackupPlanError::ServiceUnavailable(err.msg))
2276                }
2277                "ValidationException" => return RusotoError::Validation(err.msg),
2278                _ => {}
2279            }
2280        }
2281        RusotoError::Unknown(res)
2282    }
2283}
2284impl fmt::Display for DeleteBackupPlanError {
2285    #[allow(unused_variables)]
2286    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2287        match *self {
2288            DeleteBackupPlanError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
2289            DeleteBackupPlanError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2290            DeleteBackupPlanError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
2291            DeleteBackupPlanError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2292            DeleteBackupPlanError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2293        }
2294    }
2295}
2296impl Error for DeleteBackupPlanError {}
2297/// Errors returned by DeleteBackupSelection
2298#[derive(Debug, PartialEq)]
2299pub enum DeleteBackupSelectionError {
2300    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
2301    InvalidParameterValue(String),
2302    /// <p>Indicates that a required parameter is missing.</p>
2303    MissingParameterValue(String),
2304    /// <p>A resource that is required for the action doesn't exist.</p>
2305    ResourceNotFound(String),
2306    /// <p>The request failed due to a temporary failure of the server.</p>
2307    ServiceUnavailable(String),
2308}
2309
2310impl DeleteBackupSelectionError {
2311    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBackupSelectionError> {
2312        if let Some(err) = proto::json::Error::parse_rest(&res) {
2313            match err.typ.as_str() {
2314                "InvalidParameterValueException" => {
2315                    return RusotoError::Service(DeleteBackupSelectionError::InvalidParameterValue(
2316                        err.msg,
2317                    ))
2318                }
2319                "MissingParameterValueException" => {
2320                    return RusotoError::Service(DeleteBackupSelectionError::MissingParameterValue(
2321                        err.msg,
2322                    ))
2323                }
2324                "ResourceNotFoundException" => {
2325                    return RusotoError::Service(DeleteBackupSelectionError::ResourceNotFound(
2326                        err.msg,
2327                    ))
2328                }
2329                "ServiceUnavailableException" => {
2330                    return RusotoError::Service(DeleteBackupSelectionError::ServiceUnavailable(
2331                        err.msg,
2332                    ))
2333                }
2334                "ValidationException" => return RusotoError::Validation(err.msg),
2335                _ => {}
2336            }
2337        }
2338        RusotoError::Unknown(res)
2339    }
2340}
2341impl fmt::Display for DeleteBackupSelectionError {
2342    #[allow(unused_variables)]
2343    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2344        match *self {
2345            DeleteBackupSelectionError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
2346            DeleteBackupSelectionError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
2347            DeleteBackupSelectionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2348            DeleteBackupSelectionError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2349        }
2350    }
2351}
2352impl Error for DeleteBackupSelectionError {}
2353/// Errors returned by DeleteBackupVault
2354#[derive(Debug, PartialEq)]
2355pub enum DeleteBackupVaultError {
2356    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
2357    InvalidParameterValue(String),
2358    /// <p>Indicates that something is wrong with the input to the request. For example, a parameter is of the wrong type.</p>
2359    InvalidRequest(String),
2360    /// <p>Indicates that a required parameter is missing.</p>
2361    MissingParameterValue(String),
2362    /// <p>A resource that is required for the action doesn't exist.</p>
2363    ResourceNotFound(String),
2364    /// <p>The request failed due to a temporary failure of the server.</p>
2365    ServiceUnavailable(String),
2366}
2367
2368impl DeleteBackupVaultError {
2369    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteBackupVaultError> {
2370        if let Some(err) = proto::json::Error::parse_rest(&res) {
2371            match err.typ.as_str() {
2372                "InvalidParameterValueException" => {
2373                    return RusotoError::Service(DeleteBackupVaultError::InvalidParameterValue(
2374                        err.msg,
2375                    ))
2376                }
2377                "InvalidRequestException" => {
2378                    return RusotoError::Service(DeleteBackupVaultError::InvalidRequest(err.msg))
2379                }
2380                "MissingParameterValueException" => {
2381                    return RusotoError::Service(DeleteBackupVaultError::MissingParameterValue(
2382                        err.msg,
2383                    ))
2384                }
2385                "ResourceNotFoundException" => {
2386                    return RusotoError::Service(DeleteBackupVaultError::ResourceNotFound(err.msg))
2387                }
2388                "ServiceUnavailableException" => {
2389                    return RusotoError::Service(DeleteBackupVaultError::ServiceUnavailable(
2390                        err.msg,
2391                    ))
2392                }
2393                "ValidationException" => return RusotoError::Validation(err.msg),
2394                _ => {}
2395            }
2396        }
2397        RusotoError::Unknown(res)
2398    }
2399}
2400impl fmt::Display for DeleteBackupVaultError {
2401    #[allow(unused_variables)]
2402    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2403        match *self {
2404            DeleteBackupVaultError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
2405            DeleteBackupVaultError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2406            DeleteBackupVaultError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
2407            DeleteBackupVaultError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2408            DeleteBackupVaultError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2409        }
2410    }
2411}
2412impl Error for DeleteBackupVaultError {}
2413/// Errors returned by DeleteBackupVaultAccessPolicy
2414#[derive(Debug, PartialEq)]
2415pub enum DeleteBackupVaultAccessPolicyError {
2416    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
2417    InvalidParameterValue(String),
2418    /// <p>Indicates that a required parameter is missing.</p>
2419    MissingParameterValue(String),
2420    /// <p>A resource that is required for the action doesn't exist.</p>
2421    ResourceNotFound(String),
2422    /// <p>The request failed due to a temporary failure of the server.</p>
2423    ServiceUnavailable(String),
2424}
2425
2426impl DeleteBackupVaultAccessPolicyError {
2427    pub fn from_response(
2428        res: BufferedHttpResponse,
2429    ) -> RusotoError<DeleteBackupVaultAccessPolicyError> {
2430        if let Some(err) = proto::json::Error::parse_rest(&res) {
2431            match err.typ.as_str() {
2432                "InvalidParameterValueException" => {
2433                    return RusotoError::Service(
2434                        DeleteBackupVaultAccessPolicyError::InvalidParameterValue(err.msg),
2435                    )
2436                }
2437                "MissingParameterValueException" => {
2438                    return RusotoError::Service(
2439                        DeleteBackupVaultAccessPolicyError::MissingParameterValue(err.msg),
2440                    )
2441                }
2442                "ResourceNotFoundException" => {
2443                    return RusotoError::Service(
2444                        DeleteBackupVaultAccessPolicyError::ResourceNotFound(err.msg),
2445                    )
2446                }
2447                "ServiceUnavailableException" => {
2448                    return RusotoError::Service(
2449                        DeleteBackupVaultAccessPolicyError::ServiceUnavailable(err.msg),
2450                    )
2451                }
2452                "ValidationException" => return RusotoError::Validation(err.msg),
2453                _ => {}
2454            }
2455        }
2456        RusotoError::Unknown(res)
2457    }
2458}
2459impl fmt::Display for DeleteBackupVaultAccessPolicyError {
2460    #[allow(unused_variables)]
2461    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2462        match *self {
2463            DeleteBackupVaultAccessPolicyError::InvalidParameterValue(ref cause) => {
2464                write!(f, "{}", cause)
2465            }
2466            DeleteBackupVaultAccessPolicyError::MissingParameterValue(ref cause) => {
2467                write!(f, "{}", cause)
2468            }
2469            DeleteBackupVaultAccessPolicyError::ResourceNotFound(ref cause) => {
2470                write!(f, "{}", cause)
2471            }
2472            DeleteBackupVaultAccessPolicyError::ServiceUnavailable(ref cause) => {
2473                write!(f, "{}", cause)
2474            }
2475        }
2476    }
2477}
2478impl Error for DeleteBackupVaultAccessPolicyError {}
2479/// Errors returned by DeleteBackupVaultNotifications
2480#[derive(Debug, PartialEq)]
2481pub enum DeleteBackupVaultNotificationsError {
2482    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
2483    InvalidParameterValue(String),
2484    /// <p>Indicates that a required parameter is missing.</p>
2485    MissingParameterValue(String),
2486    /// <p>A resource that is required for the action doesn't exist.</p>
2487    ResourceNotFound(String),
2488    /// <p>The request failed due to a temporary failure of the server.</p>
2489    ServiceUnavailable(String),
2490}
2491
2492impl DeleteBackupVaultNotificationsError {
2493    pub fn from_response(
2494        res: BufferedHttpResponse,
2495    ) -> RusotoError<DeleteBackupVaultNotificationsError> {
2496        if let Some(err) = proto::json::Error::parse_rest(&res) {
2497            match err.typ.as_str() {
2498                "InvalidParameterValueException" => {
2499                    return RusotoError::Service(
2500                        DeleteBackupVaultNotificationsError::InvalidParameterValue(err.msg),
2501                    )
2502                }
2503                "MissingParameterValueException" => {
2504                    return RusotoError::Service(
2505                        DeleteBackupVaultNotificationsError::MissingParameterValue(err.msg),
2506                    )
2507                }
2508                "ResourceNotFoundException" => {
2509                    return RusotoError::Service(
2510                        DeleteBackupVaultNotificationsError::ResourceNotFound(err.msg),
2511                    )
2512                }
2513                "ServiceUnavailableException" => {
2514                    return RusotoError::Service(
2515                        DeleteBackupVaultNotificationsError::ServiceUnavailable(err.msg),
2516                    )
2517                }
2518                "ValidationException" => return RusotoError::Validation(err.msg),
2519                _ => {}
2520            }
2521        }
2522        RusotoError::Unknown(res)
2523    }
2524}
2525impl fmt::Display for DeleteBackupVaultNotificationsError {
2526    #[allow(unused_variables)]
2527    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2528        match *self {
2529            DeleteBackupVaultNotificationsError::InvalidParameterValue(ref cause) => {
2530                write!(f, "{}", cause)
2531            }
2532            DeleteBackupVaultNotificationsError::MissingParameterValue(ref cause) => {
2533                write!(f, "{}", cause)
2534            }
2535            DeleteBackupVaultNotificationsError::ResourceNotFound(ref cause) => {
2536                write!(f, "{}", cause)
2537            }
2538            DeleteBackupVaultNotificationsError::ServiceUnavailable(ref cause) => {
2539                write!(f, "{}", cause)
2540            }
2541        }
2542    }
2543}
2544impl Error for DeleteBackupVaultNotificationsError {}
2545/// Errors returned by DeleteRecoveryPoint
2546#[derive(Debug, PartialEq)]
2547pub enum DeleteRecoveryPointError {
2548    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
2549    InvalidParameterValue(String),
2550    /// <p>Indicates that something is wrong with the input to the request. For example, a parameter is of the wrong type.</p>
2551    InvalidRequest(String),
2552    /// <p>Indicates that a required parameter is missing.</p>
2553    MissingParameterValue(String),
2554    /// <p>A resource that is required for the action doesn't exist.</p>
2555    ResourceNotFound(String),
2556    /// <p>The request failed due to a temporary failure of the server.</p>
2557    ServiceUnavailable(String),
2558}
2559
2560impl DeleteRecoveryPointError {
2561    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteRecoveryPointError> {
2562        if let Some(err) = proto::json::Error::parse_rest(&res) {
2563            match err.typ.as_str() {
2564                "InvalidParameterValueException" => {
2565                    return RusotoError::Service(DeleteRecoveryPointError::InvalidParameterValue(
2566                        err.msg,
2567                    ))
2568                }
2569                "InvalidRequestException" => {
2570                    return RusotoError::Service(DeleteRecoveryPointError::InvalidRequest(err.msg))
2571                }
2572                "MissingParameterValueException" => {
2573                    return RusotoError::Service(DeleteRecoveryPointError::MissingParameterValue(
2574                        err.msg,
2575                    ))
2576                }
2577                "ResourceNotFoundException" => {
2578                    return RusotoError::Service(DeleteRecoveryPointError::ResourceNotFound(
2579                        err.msg,
2580                    ))
2581                }
2582                "ServiceUnavailableException" => {
2583                    return RusotoError::Service(DeleteRecoveryPointError::ServiceUnavailable(
2584                        err.msg,
2585                    ))
2586                }
2587                "ValidationException" => return RusotoError::Validation(err.msg),
2588                _ => {}
2589            }
2590        }
2591        RusotoError::Unknown(res)
2592    }
2593}
2594impl fmt::Display for DeleteRecoveryPointError {
2595    #[allow(unused_variables)]
2596    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2597        match *self {
2598            DeleteRecoveryPointError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
2599            DeleteRecoveryPointError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2600            DeleteRecoveryPointError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
2601            DeleteRecoveryPointError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2602            DeleteRecoveryPointError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2603        }
2604    }
2605}
2606impl Error for DeleteRecoveryPointError {}
2607/// Errors returned by DescribeBackupJob
2608#[derive(Debug, PartialEq)]
2609pub enum DescribeBackupJobError {
2610    /// <p>A dependent AWS service or resource returned an error to the AWS Backup service, and the action cannot be completed.</p>
2611    DependencyFailure(String),
2612    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
2613    InvalidParameterValue(String),
2614    /// <p>Indicates that a required parameter is missing.</p>
2615    MissingParameterValue(String),
2616    /// <p>A resource that is required for the action doesn't exist.</p>
2617    ResourceNotFound(String),
2618    /// <p>The request failed due to a temporary failure of the server.</p>
2619    ServiceUnavailable(String),
2620}
2621
2622impl DescribeBackupJobError {
2623    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeBackupJobError> {
2624        if let Some(err) = proto::json::Error::parse_rest(&res) {
2625            match err.typ.as_str() {
2626                "DependencyFailureException" => {
2627                    return RusotoError::Service(DescribeBackupJobError::DependencyFailure(err.msg))
2628                }
2629                "InvalidParameterValueException" => {
2630                    return RusotoError::Service(DescribeBackupJobError::InvalidParameterValue(
2631                        err.msg,
2632                    ))
2633                }
2634                "MissingParameterValueException" => {
2635                    return RusotoError::Service(DescribeBackupJobError::MissingParameterValue(
2636                        err.msg,
2637                    ))
2638                }
2639                "ResourceNotFoundException" => {
2640                    return RusotoError::Service(DescribeBackupJobError::ResourceNotFound(err.msg))
2641                }
2642                "ServiceUnavailableException" => {
2643                    return RusotoError::Service(DescribeBackupJobError::ServiceUnavailable(
2644                        err.msg,
2645                    ))
2646                }
2647                "ValidationException" => return RusotoError::Validation(err.msg),
2648                _ => {}
2649            }
2650        }
2651        RusotoError::Unknown(res)
2652    }
2653}
2654impl fmt::Display for DescribeBackupJobError {
2655    #[allow(unused_variables)]
2656    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2657        match *self {
2658            DescribeBackupJobError::DependencyFailure(ref cause) => write!(f, "{}", cause),
2659            DescribeBackupJobError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
2660            DescribeBackupJobError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
2661            DescribeBackupJobError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2662            DescribeBackupJobError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2663        }
2664    }
2665}
2666impl Error for DescribeBackupJobError {}
2667/// Errors returned by DescribeBackupVault
2668#[derive(Debug, PartialEq)]
2669pub enum DescribeBackupVaultError {
2670    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
2671    InvalidParameterValue(String),
2672    /// <p>Indicates that a required parameter is missing.</p>
2673    MissingParameterValue(String),
2674    /// <p>A resource that is required for the action doesn't exist.</p>
2675    ResourceNotFound(String),
2676    /// <p>The request failed due to a temporary failure of the server.</p>
2677    ServiceUnavailable(String),
2678}
2679
2680impl DescribeBackupVaultError {
2681    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeBackupVaultError> {
2682        if let Some(err) = proto::json::Error::parse_rest(&res) {
2683            match err.typ.as_str() {
2684                "InvalidParameterValueException" => {
2685                    return RusotoError::Service(DescribeBackupVaultError::InvalidParameterValue(
2686                        err.msg,
2687                    ))
2688                }
2689                "MissingParameterValueException" => {
2690                    return RusotoError::Service(DescribeBackupVaultError::MissingParameterValue(
2691                        err.msg,
2692                    ))
2693                }
2694                "ResourceNotFoundException" => {
2695                    return RusotoError::Service(DescribeBackupVaultError::ResourceNotFound(
2696                        err.msg,
2697                    ))
2698                }
2699                "ServiceUnavailableException" => {
2700                    return RusotoError::Service(DescribeBackupVaultError::ServiceUnavailable(
2701                        err.msg,
2702                    ))
2703                }
2704                "ValidationException" => return RusotoError::Validation(err.msg),
2705                _ => {}
2706            }
2707        }
2708        RusotoError::Unknown(res)
2709    }
2710}
2711impl fmt::Display for DescribeBackupVaultError {
2712    #[allow(unused_variables)]
2713    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2714        match *self {
2715            DescribeBackupVaultError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
2716            DescribeBackupVaultError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
2717            DescribeBackupVaultError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2718            DescribeBackupVaultError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2719        }
2720    }
2721}
2722impl Error for DescribeBackupVaultError {}
2723/// Errors returned by DescribeCopyJob
2724#[derive(Debug, PartialEq)]
2725pub enum DescribeCopyJobError {
2726    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
2727    InvalidParameterValue(String),
2728    /// <p>Indicates that a required parameter is missing.</p>
2729    MissingParameterValue(String),
2730    /// <p>A resource that is required for the action doesn't exist.</p>
2731    ResourceNotFound(String),
2732    /// <p>The request failed due to a temporary failure of the server.</p>
2733    ServiceUnavailable(String),
2734}
2735
2736impl DescribeCopyJobError {
2737    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeCopyJobError> {
2738        if let Some(err) = proto::json::Error::parse_rest(&res) {
2739            match err.typ.as_str() {
2740                "InvalidParameterValueException" => {
2741                    return RusotoError::Service(DescribeCopyJobError::InvalidParameterValue(
2742                        err.msg,
2743                    ))
2744                }
2745                "MissingParameterValueException" => {
2746                    return RusotoError::Service(DescribeCopyJobError::MissingParameterValue(
2747                        err.msg,
2748                    ))
2749                }
2750                "ResourceNotFoundException" => {
2751                    return RusotoError::Service(DescribeCopyJobError::ResourceNotFound(err.msg))
2752                }
2753                "ServiceUnavailableException" => {
2754                    return RusotoError::Service(DescribeCopyJobError::ServiceUnavailable(err.msg))
2755                }
2756                "ValidationException" => return RusotoError::Validation(err.msg),
2757                _ => {}
2758            }
2759        }
2760        RusotoError::Unknown(res)
2761    }
2762}
2763impl fmt::Display for DescribeCopyJobError {
2764    #[allow(unused_variables)]
2765    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2766        match *self {
2767            DescribeCopyJobError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
2768            DescribeCopyJobError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
2769            DescribeCopyJobError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2770            DescribeCopyJobError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2771        }
2772    }
2773}
2774impl Error for DescribeCopyJobError {}
2775/// Errors returned by DescribeProtectedResource
2776#[derive(Debug, PartialEq)]
2777pub enum DescribeProtectedResourceError {
2778    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
2779    InvalidParameterValue(String),
2780    /// <p>Indicates that a required parameter is missing.</p>
2781    MissingParameterValue(String),
2782    /// <p>A resource that is required for the action doesn't exist.</p>
2783    ResourceNotFound(String),
2784    /// <p>The request failed due to a temporary failure of the server.</p>
2785    ServiceUnavailable(String),
2786}
2787
2788impl DescribeProtectedResourceError {
2789    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeProtectedResourceError> {
2790        if let Some(err) = proto::json::Error::parse_rest(&res) {
2791            match err.typ.as_str() {
2792                "InvalidParameterValueException" => {
2793                    return RusotoError::Service(
2794                        DescribeProtectedResourceError::InvalidParameterValue(err.msg),
2795                    )
2796                }
2797                "MissingParameterValueException" => {
2798                    return RusotoError::Service(
2799                        DescribeProtectedResourceError::MissingParameterValue(err.msg),
2800                    )
2801                }
2802                "ResourceNotFoundException" => {
2803                    return RusotoError::Service(DescribeProtectedResourceError::ResourceNotFound(
2804                        err.msg,
2805                    ))
2806                }
2807                "ServiceUnavailableException" => {
2808                    return RusotoError::Service(
2809                        DescribeProtectedResourceError::ServiceUnavailable(err.msg),
2810                    )
2811                }
2812                "ValidationException" => return RusotoError::Validation(err.msg),
2813                _ => {}
2814            }
2815        }
2816        RusotoError::Unknown(res)
2817    }
2818}
2819impl fmt::Display for DescribeProtectedResourceError {
2820    #[allow(unused_variables)]
2821    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2822        match *self {
2823            DescribeProtectedResourceError::InvalidParameterValue(ref cause) => {
2824                write!(f, "{}", cause)
2825            }
2826            DescribeProtectedResourceError::MissingParameterValue(ref cause) => {
2827                write!(f, "{}", cause)
2828            }
2829            DescribeProtectedResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2830            DescribeProtectedResourceError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2831        }
2832    }
2833}
2834impl Error for DescribeProtectedResourceError {}
2835/// Errors returned by DescribeRecoveryPoint
2836#[derive(Debug, PartialEq)]
2837pub enum DescribeRecoveryPointError {
2838    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
2839    InvalidParameterValue(String),
2840    /// <p>Indicates that a required parameter is missing.</p>
2841    MissingParameterValue(String),
2842    /// <p>A resource that is required for the action doesn't exist.</p>
2843    ResourceNotFound(String),
2844    /// <p>The request failed due to a temporary failure of the server.</p>
2845    ServiceUnavailable(String),
2846}
2847
2848impl DescribeRecoveryPointError {
2849    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeRecoveryPointError> {
2850        if let Some(err) = proto::json::Error::parse_rest(&res) {
2851            match err.typ.as_str() {
2852                "InvalidParameterValueException" => {
2853                    return RusotoError::Service(DescribeRecoveryPointError::InvalidParameterValue(
2854                        err.msg,
2855                    ))
2856                }
2857                "MissingParameterValueException" => {
2858                    return RusotoError::Service(DescribeRecoveryPointError::MissingParameterValue(
2859                        err.msg,
2860                    ))
2861                }
2862                "ResourceNotFoundException" => {
2863                    return RusotoError::Service(DescribeRecoveryPointError::ResourceNotFound(
2864                        err.msg,
2865                    ))
2866                }
2867                "ServiceUnavailableException" => {
2868                    return RusotoError::Service(DescribeRecoveryPointError::ServiceUnavailable(
2869                        err.msg,
2870                    ))
2871                }
2872                "ValidationException" => return RusotoError::Validation(err.msg),
2873                _ => {}
2874            }
2875        }
2876        RusotoError::Unknown(res)
2877    }
2878}
2879impl fmt::Display for DescribeRecoveryPointError {
2880    #[allow(unused_variables)]
2881    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2882        match *self {
2883            DescribeRecoveryPointError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
2884            DescribeRecoveryPointError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
2885            DescribeRecoveryPointError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2886            DescribeRecoveryPointError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2887        }
2888    }
2889}
2890impl Error for DescribeRecoveryPointError {}
2891/// Errors returned by DescribeRegionSettings
2892#[derive(Debug, PartialEq)]
2893pub enum DescribeRegionSettingsError {
2894    /// <p>The request failed due to a temporary failure of the server.</p>
2895    ServiceUnavailable(String),
2896}
2897
2898impl DescribeRegionSettingsError {
2899    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeRegionSettingsError> {
2900        if let Some(err) = proto::json::Error::parse_rest(&res) {
2901            match err.typ.as_str() {
2902                "ServiceUnavailableException" => {
2903                    return RusotoError::Service(DescribeRegionSettingsError::ServiceUnavailable(
2904                        err.msg,
2905                    ))
2906                }
2907                "ValidationException" => return RusotoError::Validation(err.msg),
2908                _ => {}
2909            }
2910        }
2911        RusotoError::Unknown(res)
2912    }
2913}
2914impl fmt::Display for DescribeRegionSettingsError {
2915    #[allow(unused_variables)]
2916    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2917        match *self {
2918            DescribeRegionSettingsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2919        }
2920    }
2921}
2922impl Error for DescribeRegionSettingsError {}
2923/// Errors returned by DescribeRestoreJob
2924#[derive(Debug, PartialEq)]
2925pub enum DescribeRestoreJobError {
2926    /// <p>A dependent AWS service or resource returned an error to the AWS Backup service, and the action cannot be completed.</p>
2927    DependencyFailure(String),
2928    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
2929    InvalidParameterValue(String),
2930    /// <p>Indicates that a required parameter is missing.</p>
2931    MissingParameterValue(String),
2932    /// <p>A resource that is required for the action doesn't exist.</p>
2933    ResourceNotFound(String),
2934    /// <p>The request failed due to a temporary failure of the server.</p>
2935    ServiceUnavailable(String),
2936}
2937
2938impl DescribeRestoreJobError {
2939    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeRestoreJobError> {
2940        if let Some(err) = proto::json::Error::parse_rest(&res) {
2941            match err.typ.as_str() {
2942                "DependencyFailureException" => {
2943                    return RusotoError::Service(DescribeRestoreJobError::DependencyFailure(
2944                        err.msg,
2945                    ))
2946                }
2947                "InvalidParameterValueException" => {
2948                    return RusotoError::Service(DescribeRestoreJobError::InvalidParameterValue(
2949                        err.msg,
2950                    ))
2951                }
2952                "MissingParameterValueException" => {
2953                    return RusotoError::Service(DescribeRestoreJobError::MissingParameterValue(
2954                        err.msg,
2955                    ))
2956                }
2957                "ResourceNotFoundException" => {
2958                    return RusotoError::Service(DescribeRestoreJobError::ResourceNotFound(err.msg))
2959                }
2960                "ServiceUnavailableException" => {
2961                    return RusotoError::Service(DescribeRestoreJobError::ServiceUnavailable(
2962                        err.msg,
2963                    ))
2964                }
2965                "ValidationException" => return RusotoError::Validation(err.msg),
2966                _ => {}
2967            }
2968        }
2969        RusotoError::Unknown(res)
2970    }
2971}
2972impl fmt::Display for DescribeRestoreJobError {
2973    #[allow(unused_variables)]
2974    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2975        match *self {
2976            DescribeRestoreJobError::DependencyFailure(ref cause) => write!(f, "{}", cause),
2977            DescribeRestoreJobError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
2978            DescribeRestoreJobError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
2979            DescribeRestoreJobError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
2980            DescribeRestoreJobError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2981        }
2982    }
2983}
2984impl Error for DescribeRestoreJobError {}
2985/// Errors returned by ExportBackupPlanTemplate
2986#[derive(Debug, PartialEq)]
2987pub enum ExportBackupPlanTemplateError {
2988    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
2989    InvalidParameterValue(String),
2990    /// <p>Indicates that a required parameter is missing.</p>
2991    MissingParameterValue(String),
2992    /// <p>A resource that is required for the action doesn't exist.</p>
2993    ResourceNotFound(String),
2994    /// <p>The request failed due to a temporary failure of the server.</p>
2995    ServiceUnavailable(String),
2996}
2997
2998impl ExportBackupPlanTemplateError {
2999    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ExportBackupPlanTemplateError> {
3000        if let Some(err) = proto::json::Error::parse_rest(&res) {
3001            match err.typ.as_str() {
3002                "InvalidParameterValueException" => {
3003                    return RusotoError::Service(
3004                        ExportBackupPlanTemplateError::InvalidParameterValue(err.msg),
3005                    )
3006                }
3007                "MissingParameterValueException" => {
3008                    return RusotoError::Service(
3009                        ExportBackupPlanTemplateError::MissingParameterValue(err.msg),
3010                    )
3011                }
3012                "ResourceNotFoundException" => {
3013                    return RusotoError::Service(ExportBackupPlanTemplateError::ResourceNotFound(
3014                        err.msg,
3015                    ))
3016                }
3017                "ServiceUnavailableException" => {
3018                    return RusotoError::Service(ExportBackupPlanTemplateError::ServiceUnavailable(
3019                        err.msg,
3020                    ))
3021                }
3022                "ValidationException" => return RusotoError::Validation(err.msg),
3023                _ => {}
3024            }
3025        }
3026        RusotoError::Unknown(res)
3027    }
3028}
3029impl fmt::Display for ExportBackupPlanTemplateError {
3030    #[allow(unused_variables)]
3031    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3032        match *self {
3033            ExportBackupPlanTemplateError::InvalidParameterValue(ref cause) => {
3034                write!(f, "{}", cause)
3035            }
3036            ExportBackupPlanTemplateError::MissingParameterValue(ref cause) => {
3037                write!(f, "{}", cause)
3038            }
3039            ExportBackupPlanTemplateError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3040            ExportBackupPlanTemplateError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3041        }
3042    }
3043}
3044impl Error for ExportBackupPlanTemplateError {}
3045/// Errors returned by GetBackupPlan
3046#[derive(Debug, PartialEq)]
3047pub enum GetBackupPlanError {
3048    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
3049    InvalidParameterValue(String),
3050    /// <p>Indicates that a required parameter is missing.</p>
3051    MissingParameterValue(String),
3052    /// <p>A resource that is required for the action doesn't exist.</p>
3053    ResourceNotFound(String),
3054    /// <p>The request failed due to a temporary failure of the server.</p>
3055    ServiceUnavailable(String),
3056}
3057
3058impl GetBackupPlanError {
3059    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBackupPlanError> {
3060        if let Some(err) = proto::json::Error::parse_rest(&res) {
3061            match err.typ.as_str() {
3062                "InvalidParameterValueException" => {
3063                    return RusotoError::Service(GetBackupPlanError::InvalidParameterValue(err.msg))
3064                }
3065                "MissingParameterValueException" => {
3066                    return RusotoError::Service(GetBackupPlanError::MissingParameterValue(err.msg))
3067                }
3068                "ResourceNotFoundException" => {
3069                    return RusotoError::Service(GetBackupPlanError::ResourceNotFound(err.msg))
3070                }
3071                "ServiceUnavailableException" => {
3072                    return RusotoError::Service(GetBackupPlanError::ServiceUnavailable(err.msg))
3073                }
3074                "ValidationException" => return RusotoError::Validation(err.msg),
3075                _ => {}
3076            }
3077        }
3078        RusotoError::Unknown(res)
3079    }
3080}
3081impl fmt::Display for GetBackupPlanError {
3082    #[allow(unused_variables)]
3083    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3084        match *self {
3085            GetBackupPlanError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
3086            GetBackupPlanError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
3087            GetBackupPlanError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3088            GetBackupPlanError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3089        }
3090    }
3091}
3092impl Error for GetBackupPlanError {}
3093/// Errors returned by GetBackupPlanFromJSON
3094#[derive(Debug, PartialEq)]
3095pub enum GetBackupPlanFromJSONError {
3096    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
3097    InvalidParameterValue(String),
3098    /// <p>Indicates that something is wrong with the input to the request. For example, a parameter is of the wrong type.</p>
3099    InvalidRequest(String),
3100    /// <p>A limit in the request has been exceeded; for example, a maximum number of items allowed in a request.</p>
3101    LimitExceeded(String),
3102    /// <p>Indicates that a required parameter is missing.</p>
3103    MissingParameterValue(String),
3104    /// <p>The request failed due to a temporary failure of the server.</p>
3105    ServiceUnavailable(String),
3106}
3107
3108impl GetBackupPlanFromJSONError {
3109    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBackupPlanFromJSONError> {
3110        if let Some(err) = proto::json::Error::parse_rest(&res) {
3111            match err.typ.as_str() {
3112                "InvalidParameterValueException" => {
3113                    return RusotoError::Service(GetBackupPlanFromJSONError::InvalidParameterValue(
3114                        err.msg,
3115                    ))
3116                }
3117                "InvalidRequestException" => {
3118                    return RusotoError::Service(GetBackupPlanFromJSONError::InvalidRequest(
3119                        err.msg,
3120                    ))
3121                }
3122                "LimitExceededException" => {
3123                    return RusotoError::Service(GetBackupPlanFromJSONError::LimitExceeded(err.msg))
3124                }
3125                "MissingParameterValueException" => {
3126                    return RusotoError::Service(GetBackupPlanFromJSONError::MissingParameterValue(
3127                        err.msg,
3128                    ))
3129                }
3130                "ServiceUnavailableException" => {
3131                    return RusotoError::Service(GetBackupPlanFromJSONError::ServiceUnavailable(
3132                        err.msg,
3133                    ))
3134                }
3135                "ValidationException" => return RusotoError::Validation(err.msg),
3136                _ => {}
3137            }
3138        }
3139        RusotoError::Unknown(res)
3140    }
3141}
3142impl fmt::Display for GetBackupPlanFromJSONError {
3143    #[allow(unused_variables)]
3144    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3145        match *self {
3146            GetBackupPlanFromJSONError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
3147            GetBackupPlanFromJSONError::InvalidRequest(ref cause) => write!(f, "{}", cause),
3148            GetBackupPlanFromJSONError::LimitExceeded(ref cause) => write!(f, "{}", cause),
3149            GetBackupPlanFromJSONError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
3150            GetBackupPlanFromJSONError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3151        }
3152    }
3153}
3154impl Error for GetBackupPlanFromJSONError {}
3155/// Errors returned by GetBackupPlanFromTemplate
3156#[derive(Debug, PartialEq)]
3157pub enum GetBackupPlanFromTemplateError {
3158    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
3159    InvalidParameterValue(String),
3160    /// <p>Indicates that a required parameter is missing.</p>
3161    MissingParameterValue(String),
3162    /// <p>A resource that is required for the action doesn't exist.</p>
3163    ResourceNotFound(String),
3164    /// <p>The request failed due to a temporary failure of the server.</p>
3165    ServiceUnavailable(String),
3166}
3167
3168impl GetBackupPlanFromTemplateError {
3169    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBackupPlanFromTemplateError> {
3170        if let Some(err) = proto::json::Error::parse_rest(&res) {
3171            match err.typ.as_str() {
3172                "InvalidParameterValueException" => {
3173                    return RusotoError::Service(
3174                        GetBackupPlanFromTemplateError::InvalidParameterValue(err.msg),
3175                    )
3176                }
3177                "MissingParameterValueException" => {
3178                    return RusotoError::Service(
3179                        GetBackupPlanFromTemplateError::MissingParameterValue(err.msg),
3180                    )
3181                }
3182                "ResourceNotFoundException" => {
3183                    return RusotoError::Service(GetBackupPlanFromTemplateError::ResourceNotFound(
3184                        err.msg,
3185                    ))
3186                }
3187                "ServiceUnavailableException" => {
3188                    return RusotoError::Service(
3189                        GetBackupPlanFromTemplateError::ServiceUnavailable(err.msg),
3190                    )
3191                }
3192                "ValidationException" => return RusotoError::Validation(err.msg),
3193                _ => {}
3194            }
3195        }
3196        RusotoError::Unknown(res)
3197    }
3198}
3199impl fmt::Display for GetBackupPlanFromTemplateError {
3200    #[allow(unused_variables)]
3201    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3202        match *self {
3203            GetBackupPlanFromTemplateError::InvalidParameterValue(ref cause) => {
3204                write!(f, "{}", cause)
3205            }
3206            GetBackupPlanFromTemplateError::MissingParameterValue(ref cause) => {
3207                write!(f, "{}", cause)
3208            }
3209            GetBackupPlanFromTemplateError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3210            GetBackupPlanFromTemplateError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3211        }
3212    }
3213}
3214impl Error for GetBackupPlanFromTemplateError {}
3215/// Errors returned by GetBackupSelection
3216#[derive(Debug, PartialEq)]
3217pub enum GetBackupSelectionError {
3218    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
3219    InvalidParameterValue(String),
3220    /// <p>Indicates that a required parameter is missing.</p>
3221    MissingParameterValue(String),
3222    /// <p>A resource that is required for the action doesn't exist.</p>
3223    ResourceNotFound(String),
3224    /// <p>The request failed due to a temporary failure of the server.</p>
3225    ServiceUnavailable(String),
3226}
3227
3228impl GetBackupSelectionError {
3229    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetBackupSelectionError> {
3230        if let Some(err) = proto::json::Error::parse_rest(&res) {
3231            match err.typ.as_str() {
3232                "InvalidParameterValueException" => {
3233                    return RusotoError::Service(GetBackupSelectionError::InvalidParameterValue(
3234                        err.msg,
3235                    ))
3236                }
3237                "MissingParameterValueException" => {
3238                    return RusotoError::Service(GetBackupSelectionError::MissingParameterValue(
3239                        err.msg,
3240                    ))
3241                }
3242                "ResourceNotFoundException" => {
3243                    return RusotoError::Service(GetBackupSelectionError::ResourceNotFound(err.msg))
3244                }
3245                "ServiceUnavailableException" => {
3246                    return RusotoError::Service(GetBackupSelectionError::ServiceUnavailable(
3247                        err.msg,
3248                    ))
3249                }
3250                "ValidationException" => return RusotoError::Validation(err.msg),
3251                _ => {}
3252            }
3253        }
3254        RusotoError::Unknown(res)
3255    }
3256}
3257impl fmt::Display for GetBackupSelectionError {
3258    #[allow(unused_variables)]
3259    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3260        match *self {
3261            GetBackupSelectionError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
3262            GetBackupSelectionError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
3263            GetBackupSelectionError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3264            GetBackupSelectionError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3265        }
3266    }
3267}
3268impl Error for GetBackupSelectionError {}
3269/// Errors returned by GetBackupVaultAccessPolicy
3270#[derive(Debug, PartialEq)]
3271pub enum GetBackupVaultAccessPolicyError {
3272    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
3273    InvalidParameterValue(String),
3274    /// <p>Indicates that a required parameter is missing.</p>
3275    MissingParameterValue(String),
3276    /// <p>A resource that is required for the action doesn't exist.</p>
3277    ResourceNotFound(String),
3278    /// <p>The request failed due to a temporary failure of the server.</p>
3279    ServiceUnavailable(String),
3280}
3281
3282impl GetBackupVaultAccessPolicyError {
3283    pub fn from_response(
3284        res: BufferedHttpResponse,
3285    ) -> RusotoError<GetBackupVaultAccessPolicyError> {
3286        if let Some(err) = proto::json::Error::parse_rest(&res) {
3287            match err.typ.as_str() {
3288                "InvalidParameterValueException" => {
3289                    return RusotoError::Service(
3290                        GetBackupVaultAccessPolicyError::InvalidParameterValue(err.msg),
3291                    )
3292                }
3293                "MissingParameterValueException" => {
3294                    return RusotoError::Service(
3295                        GetBackupVaultAccessPolicyError::MissingParameterValue(err.msg),
3296                    )
3297                }
3298                "ResourceNotFoundException" => {
3299                    return RusotoError::Service(GetBackupVaultAccessPolicyError::ResourceNotFound(
3300                        err.msg,
3301                    ))
3302                }
3303                "ServiceUnavailableException" => {
3304                    return RusotoError::Service(
3305                        GetBackupVaultAccessPolicyError::ServiceUnavailable(err.msg),
3306                    )
3307                }
3308                "ValidationException" => return RusotoError::Validation(err.msg),
3309                _ => {}
3310            }
3311        }
3312        RusotoError::Unknown(res)
3313    }
3314}
3315impl fmt::Display for GetBackupVaultAccessPolicyError {
3316    #[allow(unused_variables)]
3317    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3318        match *self {
3319            GetBackupVaultAccessPolicyError::InvalidParameterValue(ref cause) => {
3320                write!(f, "{}", cause)
3321            }
3322            GetBackupVaultAccessPolicyError::MissingParameterValue(ref cause) => {
3323                write!(f, "{}", cause)
3324            }
3325            GetBackupVaultAccessPolicyError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3326            GetBackupVaultAccessPolicyError::ServiceUnavailable(ref cause) => {
3327                write!(f, "{}", cause)
3328            }
3329        }
3330    }
3331}
3332impl Error for GetBackupVaultAccessPolicyError {}
3333/// Errors returned by GetBackupVaultNotifications
3334#[derive(Debug, PartialEq)]
3335pub enum GetBackupVaultNotificationsError {
3336    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
3337    InvalidParameterValue(String),
3338    /// <p>Indicates that a required parameter is missing.</p>
3339    MissingParameterValue(String),
3340    /// <p>A resource that is required for the action doesn't exist.</p>
3341    ResourceNotFound(String),
3342    /// <p>The request failed due to a temporary failure of the server.</p>
3343    ServiceUnavailable(String),
3344}
3345
3346impl GetBackupVaultNotificationsError {
3347    pub fn from_response(
3348        res: BufferedHttpResponse,
3349    ) -> RusotoError<GetBackupVaultNotificationsError> {
3350        if let Some(err) = proto::json::Error::parse_rest(&res) {
3351            match err.typ.as_str() {
3352                "InvalidParameterValueException" => {
3353                    return RusotoError::Service(
3354                        GetBackupVaultNotificationsError::InvalidParameterValue(err.msg),
3355                    )
3356                }
3357                "MissingParameterValueException" => {
3358                    return RusotoError::Service(
3359                        GetBackupVaultNotificationsError::MissingParameterValue(err.msg),
3360                    )
3361                }
3362                "ResourceNotFoundException" => {
3363                    return RusotoError::Service(
3364                        GetBackupVaultNotificationsError::ResourceNotFound(err.msg),
3365                    )
3366                }
3367                "ServiceUnavailableException" => {
3368                    return RusotoError::Service(
3369                        GetBackupVaultNotificationsError::ServiceUnavailable(err.msg),
3370                    )
3371                }
3372                "ValidationException" => return RusotoError::Validation(err.msg),
3373                _ => {}
3374            }
3375        }
3376        RusotoError::Unknown(res)
3377    }
3378}
3379impl fmt::Display for GetBackupVaultNotificationsError {
3380    #[allow(unused_variables)]
3381    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3382        match *self {
3383            GetBackupVaultNotificationsError::InvalidParameterValue(ref cause) => {
3384                write!(f, "{}", cause)
3385            }
3386            GetBackupVaultNotificationsError::MissingParameterValue(ref cause) => {
3387                write!(f, "{}", cause)
3388            }
3389            GetBackupVaultNotificationsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3390            GetBackupVaultNotificationsError::ServiceUnavailable(ref cause) => {
3391                write!(f, "{}", cause)
3392            }
3393        }
3394    }
3395}
3396impl Error for GetBackupVaultNotificationsError {}
3397/// Errors returned by GetRecoveryPointRestoreMetadata
3398#[derive(Debug, PartialEq)]
3399pub enum GetRecoveryPointRestoreMetadataError {
3400    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
3401    InvalidParameterValue(String),
3402    /// <p>Indicates that a required parameter is missing.</p>
3403    MissingParameterValue(String),
3404    /// <p>A resource that is required for the action doesn't exist.</p>
3405    ResourceNotFound(String),
3406    /// <p>The request failed due to a temporary failure of the server.</p>
3407    ServiceUnavailable(String),
3408}
3409
3410impl GetRecoveryPointRestoreMetadataError {
3411    pub fn from_response(
3412        res: BufferedHttpResponse,
3413    ) -> RusotoError<GetRecoveryPointRestoreMetadataError> {
3414        if let Some(err) = proto::json::Error::parse_rest(&res) {
3415            match err.typ.as_str() {
3416                "InvalidParameterValueException" => {
3417                    return RusotoError::Service(
3418                        GetRecoveryPointRestoreMetadataError::InvalidParameterValue(err.msg),
3419                    )
3420                }
3421                "MissingParameterValueException" => {
3422                    return RusotoError::Service(
3423                        GetRecoveryPointRestoreMetadataError::MissingParameterValue(err.msg),
3424                    )
3425                }
3426                "ResourceNotFoundException" => {
3427                    return RusotoError::Service(
3428                        GetRecoveryPointRestoreMetadataError::ResourceNotFound(err.msg),
3429                    )
3430                }
3431                "ServiceUnavailableException" => {
3432                    return RusotoError::Service(
3433                        GetRecoveryPointRestoreMetadataError::ServiceUnavailable(err.msg),
3434                    )
3435                }
3436                "ValidationException" => return RusotoError::Validation(err.msg),
3437                _ => {}
3438            }
3439        }
3440        RusotoError::Unknown(res)
3441    }
3442}
3443impl fmt::Display for GetRecoveryPointRestoreMetadataError {
3444    #[allow(unused_variables)]
3445    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3446        match *self {
3447            GetRecoveryPointRestoreMetadataError::InvalidParameterValue(ref cause) => {
3448                write!(f, "{}", cause)
3449            }
3450            GetRecoveryPointRestoreMetadataError::MissingParameterValue(ref cause) => {
3451                write!(f, "{}", cause)
3452            }
3453            GetRecoveryPointRestoreMetadataError::ResourceNotFound(ref cause) => {
3454                write!(f, "{}", cause)
3455            }
3456            GetRecoveryPointRestoreMetadataError::ServiceUnavailable(ref cause) => {
3457                write!(f, "{}", cause)
3458            }
3459        }
3460    }
3461}
3462impl Error for GetRecoveryPointRestoreMetadataError {}
3463/// Errors returned by GetSupportedResourceTypes
3464#[derive(Debug, PartialEq)]
3465pub enum GetSupportedResourceTypesError {
3466    /// <p>The request failed due to a temporary failure of the server.</p>
3467    ServiceUnavailable(String),
3468}
3469
3470impl GetSupportedResourceTypesError {
3471    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetSupportedResourceTypesError> {
3472        if let Some(err) = proto::json::Error::parse_rest(&res) {
3473            match err.typ.as_str() {
3474                "ServiceUnavailableException" => {
3475                    return RusotoError::Service(
3476                        GetSupportedResourceTypesError::ServiceUnavailable(err.msg),
3477                    )
3478                }
3479                "ValidationException" => return RusotoError::Validation(err.msg),
3480                _ => {}
3481            }
3482        }
3483        RusotoError::Unknown(res)
3484    }
3485}
3486impl fmt::Display for GetSupportedResourceTypesError {
3487    #[allow(unused_variables)]
3488    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3489        match *self {
3490            GetSupportedResourceTypesError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3491        }
3492    }
3493}
3494impl Error for GetSupportedResourceTypesError {}
3495/// Errors returned by ListBackupJobs
3496#[derive(Debug, PartialEq)]
3497pub enum ListBackupJobsError {
3498    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
3499    InvalidParameterValue(String),
3500    /// <p>The request failed due to a temporary failure of the server.</p>
3501    ServiceUnavailable(String),
3502}
3503
3504impl ListBackupJobsError {
3505    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListBackupJobsError> {
3506        if let Some(err) = proto::json::Error::parse_rest(&res) {
3507            match err.typ.as_str() {
3508                "InvalidParameterValueException" => {
3509                    return RusotoError::Service(ListBackupJobsError::InvalidParameterValue(
3510                        err.msg,
3511                    ))
3512                }
3513                "ServiceUnavailableException" => {
3514                    return RusotoError::Service(ListBackupJobsError::ServiceUnavailable(err.msg))
3515                }
3516                "ValidationException" => return RusotoError::Validation(err.msg),
3517                _ => {}
3518            }
3519        }
3520        RusotoError::Unknown(res)
3521    }
3522}
3523impl fmt::Display for ListBackupJobsError {
3524    #[allow(unused_variables)]
3525    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3526        match *self {
3527            ListBackupJobsError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
3528            ListBackupJobsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3529        }
3530    }
3531}
3532impl Error for ListBackupJobsError {}
3533/// Errors returned by ListBackupPlanTemplates
3534#[derive(Debug, PartialEq)]
3535pub enum ListBackupPlanTemplatesError {
3536    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
3537    InvalidParameterValue(String),
3538    /// <p>Indicates that a required parameter is missing.</p>
3539    MissingParameterValue(String),
3540    /// <p>A resource that is required for the action doesn't exist.</p>
3541    ResourceNotFound(String),
3542    /// <p>The request failed due to a temporary failure of the server.</p>
3543    ServiceUnavailable(String),
3544}
3545
3546impl ListBackupPlanTemplatesError {
3547    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListBackupPlanTemplatesError> {
3548        if let Some(err) = proto::json::Error::parse_rest(&res) {
3549            match err.typ.as_str() {
3550                "InvalidParameterValueException" => {
3551                    return RusotoError::Service(
3552                        ListBackupPlanTemplatesError::InvalidParameterValue(err.msg),
3553                    )
3554                }
3555                "MissingParameterValueException" => {
3556                    return RusotoError::Service(
3557                        ListBackupPlanTemplatesError::MissingParameterValue(err.msg),
3558                    )
3559                }
3560                "ResourceNotFoundException" => {
3561                    return RusotoError::Service(ListBackupPlanTemplatesError::ResourceNotFound(
3562                        err.msg,
3563                    ))
3564                }
3565                "ServiceUnavailableException" => {
3566                    return RusotoError::Service(ListBackupPlanTemplatesError::ServiceUnavailable(
3567                        err.msg,
3568                    ))
3569                }
3570                "ValidationException" => return RusotoError::Validation(err.msg),
3571                _ => {}
3572            }
3573        }
3574        RusotoError::Unknown(res)
3575    }
3576}
3577impl fmt::Display for ListBackupPlanTemplatesError {
3578    #[allow(unused_variables)]
3579    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3580        match *self {
3581            ListBackupPlanTemplatesError::InvalidParameterValue(ref cause) => {
3582                write!(f, "{}", cause)
3583            }
3584            ListBackupPlanTemplatesError::MissingParameterValue(ref cause) => {
3585                write!(f, "{}", cause)
3586            }
3587            ListBackupPlanTemplatesError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3588            ListBackupPlanTemplatesError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3589        }
3590    }
3591}
3592impl Error for ListBackupPlanTemplatesError {}
3593/// Errors returned by ListBackupPlanVersions
3594#[derive(Debug, PartialEq)]
3595pub enum ListBackupPlanVersionsError {
3596    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
3597    InvalidParameterValue(String),
3598    /// <p>Indicates that a required parameter is missing.</p>
3599    MissingParameterValue(String),
3600    /// <p>A resource that is required for the action doesn't exist.</p>
3601    ResourceNotFound(String),
3602    /// <p>The request failed due to a temporary failure of the server.</p>
3603    ServiceUnavailable(String),
3604}
3605
3606impl ListBackupPlanVersionsError {
3607    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListBackupPlanVersionsError> {
3608        if let Some(err) = proto::json::Error::parse_rest(&res) {
3609            match err.typ.as_str() {
3610                "InvalidParameterValueException" => {
3611                    return RusotoError::Service(
3612                        ListBackupPlanVersionsError::InvalidParameterValue(err.msg),
3613                    )
3614                }
3615                "MissingParameterValueException" => {
3616                    return RusotoError::Service(
3617                        ListBackupPlanVersionsError::MissingParameterValue(err.msg),
3618                    )
3619                }
3620                "ResourceNotFoundException" => {
3621                    return RusotoError::Service(ListBackupPlanVersionsError::ResourceNotFound(
3622                        err.msg,
3623                    ))
3624                }
3625                "ServiceUnavailableException" => {
3626                    return RusotoError::Service(ListBackupPlanVersionsError::ServiceUnavailable(
3627                        err.msg,
3628                    ))
3629                }
3630                "ValidationException" => return RusotoError::Validation(err.msg),
3631                _ => {}
3632            }
3633        }
3634        RusotoError::Unknown(res)
3635    }
3636}
3637impl fmt::Display for ListBackupPlanVersionsError {
3638    #[allow(unused_variables)]
3639    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3640        match *self {
3641            ListBackupPlanVersionsError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
3642            ListBackupPlanVersionsError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
3643            ListBackupPlanVersionsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3644            ListBackupPlanVersionsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3645        }
3646    }
3647}
3648impl Error for ListBackupPlanVersionsError {}
3649/// Errors returned by ListBackupPlans
3650#[derive(Debug, PartialEq)]
3651pub enum ListBackupPlansError {
3652    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
3653    InvalidParameterValue(String),
3654    /// <p>Indicates that a required parameter is missing.</p>
3655    MissingParameterValue(String),
3656    /// <p>A resource that is required for the action doesn't exist.</p>
3657    ResourceNotFound(String),
3658    /// <p>The request failed due to a temporary failure of the server.</p>
3659    ServiceUnavailable(String),
3660}
3661
3662impl ListBackupPlansError {
3663    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListBackupPlansError> {
3664        if let Some(err) = proto::json::Error::parse_rest(&res) {
3665            match err.typ.as_str() {
3666                "InvalidParameterValueException" => {
3667                    return RusotoError::Service(ListBackupPlansError::InvalidParameterValue(
3668                        err.msg,
3669                    ))
3670                }
3671                "MissingParameterValueException" => {
3672                    return RusotoError::Service(ListBackupPlansError::MissingParameterValue(
3673                        err.msg,
3674                    ))
3675                }
3676                "ResourceNotFoundException" => {
3677                    return RusotoError::Service(ListBackupPlansError::ResourceNotFound(err.msg))
3678                }
3679                "ServiceUnavailableException" => {
3680                    return RusotoError::Service(ListBackupPlansError::ServiceUnavailable(err.msg))
3681                }
3682                "ValidationException" => return RusotoError::Validation(err.msg),
3683                _ => {}
3684            }
3685        }
3686        RusotoError::Unknown(res)
3687    }
3688}
3689impl fmt::Display for ListBackupPlansError {
3690    #[allow(unused_variables)]
3691    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3692        match *self {
3693            ListBackupPlansError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
3694            ListBackupPlansError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
3695            ListBackupPlansError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3696            ListBackupPlansError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3697        }
3698    }
3699}
3700impl Error for ListBackupPlansError {}
3701/// Errors returned by ListBackupSelections
3702#[derive(Debug, PartialEq)]
3703pub enum ListBackupSelectionsError {
3704    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
3705    InvalidParameterValue(String),
3706    /// <p>Indicates that a required parameter is missing.</p>
3707    MissingParameterValue(String),
3708    /// <p>A resource that is required for the action doesn't exist.</p>
3709    ResourceNotFound(String),
3710    /// <p>The request failed due to a temporary failure of the server.</p>
3711    ServiceUnavailable(String),
3712}
3713
3714impl ListBackupSelectionsError {
3715    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListBackupSelectionsError> {
3716        if let Some(err) = proto::json::Error::parse_rest(&res) {
3717            match err.typ.as_str() {
3718                "InvalidParameterValueException" => {
3719                    return RusotoError::Service(ListBackupSelectionsError::InvalidParameterValue(
3720                        err.msg,
3721                    ))
3722                }
3723                "MissingParameterValueException" => {
3724                    return RusotoError::Service(ListBackupSelectionsError::MissingParameterValue(
3725                        err.msg,
3726                    ))
3727                }
3728                "ResourceNotFoundException" => {
3729                    return RusotoError::Service(ListBackupSelectionsError::ResourceNotFound(
3730                        err.msg,
3731                    ))
3732                }
3733                "ServiceUnavailableException" => {
3734                    return RusotoError::Service(ListBackupSelectionsError::ServiceUnavailable(
3735                        err.msg,
3736                    ))
3737                }
3738                "ValidationException" => return RusotoError::Validation(err.msg),
3739                _ => {}
3740            }
3741        }
3742        RusotoError::Unknown(res)
3743    }
3744}
3745impl fmt::Display for ListBackupSelectionsError {
3746    #[allow(unused_variables)]
3747    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3748        match *self {
3749            ListBackupSelectionsError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
3750            ListBackupSelectionsError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
3751            ListBackupSelectionsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3752            ListBackupSelectionsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3753        }
3754    }
3755}
3756impl Error for ListBackupSelectionsError {}
3757/// Errors returned by ListBackupVaults
3758#[derive(Debug, PartialEq)]
3759pub enum ListBackupVaultsError {
3760    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
3761    InvalidParameterValue(String),
3762    /// <p>Indicates that a required parameter is missing.</p>
3763    MissingParameterValue(String),
3764    /// <p>A resource that is required for the action doesn't exist.</p>
3765    ResourceNotFound(String),
3766    /// <p>The request failed due to a temporary failure of the server.</p>
3767    ServiceUnavailable(String),
3768}
3769
3770impl ListBackupVaultsError {
3771    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListBackupVaultsError> {
3772        if let Some(err) = proto::json::Error::parse_rest(&res) {
3773            match err.typ.as_str() {
3774                "InvalidParameterValueException" => {
3775                    return RusotoError::Service(ListBackupVaultsError::InvalidParameterValue(
3776                        err.msg,
3777                    ))
3778                }
3779                "MissingParameterValueException" => {
3780                    return RusotoError::Service(ListBackupVaultsError::MissingParameterValue(
3781                        err.msg,
3782                    ))
3783                }
3784                "ResourceNotFoundException" => {
3785                    return RusotoError::Service(ListBackupVaultsError::ResourceNotFound(err.msg))
3786                }
3787                "ServiceUnavailableException" => {
3788                    return RusotoError::Service(ListBackupVaultsError::ServiceUnavailable(err.msg))
3789                }
3790                "ValidationException" => return RusotoError::Validation(err.msg),
3791                _ => {}
3792            }
3793        }
3794        RusotoError::Unknown(res)
3795    }
3796}
3797impl fmt::Display for ListBackupVaultsError {
3798    #[allow(unused_variables)]
3799    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3800        match *self {
3801            ListBackupVaultsError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
3802            ListBackupVaultsError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
3803            ListBackupVaultsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
3804            ListBackupVaultsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3805        }
3806    }
3807}
3808impl Error for ListBackupVaultsError {}
3809/// Errors returned by ListCopyJobs
3810#[derive(Debug, PartialEq)]
3811pub enum ListCopyJobsError {
3812    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
3813    InvalidParameterValue(String),
3814    /// <p>The request failed due to a temporary failure of the server.</p>
3815    ServiceUnavailable(String),
3816}
3817
3818impl ListCopyJobsError {
3819    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListCopyJobsError> {
3820        if let Some(err) = proto::json::Error::parse_rest(&res) {
3821            match err.typ.as_str() {
3822                "InvalidParameterValueException" => {
3823                    return RusotoError::Service(ListCopyJobsError::InvalidParameterValue(err.msg))
3824                }
3825                "ServiceUnavailableException" => {
3826                    return RusotoError::Service(ListCopyJobsError::ServiceUnavailable(err.msg))
3827                }
3828                "ValidationException" => return RusotoError::Validation(err.msg),
3829                _ => {}
3830            }
3831        }
3832        RusotoError::Unknown(res)
3833    }
3834}
3835impl fmt::Display for ListCopyJobsError {
3836    #[allow(unused_variables)]
3837    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3838        match *self {
3839            ListCopyJobsError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
3840            ListCopyJobsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3841        }
3842    }
3843}
3844impl Error for ListCopyJobsError {}
3845/// Errors returned by ListProtectedResources
3846#[derive(Debug, PartialEq)]
3847pub enum ListProtectedResourcesError {
3848    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
3849    InvalidParameterValue(String),
3850    /// <p>The request failed due to a temporary failure of the server.</p>
3851    ServiceUnavailable(String),
3852}
3853
3854impl ListProtectedResourcesError {
3855    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListProtectedResourcesError> {
3856        if let Some(err) = proto::json::Error::parse_rest(&res) {
3857            match err.typ.as_str() {
3858                "InvalidParameterValueException" => {
3859                    return RusotoError::Service(
3860                        ListProtectedResourcesError::InvalidParameterValue(err.msg),
3861                    )
3862                }
3863                "ServiceUnavailableException" => {
3864                    return RusotoError::Service(ListProtectedResourcesError::ServiceUnavailable(
3865                        err.msg,
3866                    ))
3867                }
3868                "ValidationException" => return RusotoError::Validation(err.msg),
3869                _ => {}
3870            }
3871        }
3872        RusotoError::Unknown(res)
3873    }
3874}
3875impl fmt::Display for ListProtectedResourcesError {
3876    #[allow(unused_variables)]
3877    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3878        match *self {
3879            ListProtectedResourcesError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
3880            ListProtectedResourcesError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3881        }
3882    }
3883}
3884impl Error for ListProtectedResourcesError {}
3885/// Errors returned by ListRecoveryPointsByBackupVault
3886#[derive(Debug, PartialEq)]
3887pub enum ListRecoveryPointsByBackupVaultError {
3888    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
3889    InvalidParameterValue(String),
3890    /// <p>Indicates that a required parameter is missing.</p>
3891    MissingParameterValue(String),
3892    /// <p>A resource that is required for the action doesn't exist.</p>
3893    ResourceNotFound(String),
3894    /// <p>The request failed due to a temporary failure of the server.</p>
3895    ServiceUnavailable(String),
3896}
3897
3898impl ListRecoveryPointsByBackupVaultError {
3899    pub fn from_response(
3900        res: BufferedHttpResponse,
3901    ) -> RusotoError<ListRecoveryPointsByBackupVaultError> {
3902        if let Some(err) = proto::json::Error::parse_rest(&res) {
3903            match err.typ.as_str() {
3904                "InvalidParameterValueException" => {
3905                    return RusotoError::Service(
3906                        ListRecoveryPointsByBackupVaultError::InvalidParameterValue(err.msg),
3907                    )
3908                }
3909                "MissingParameterValueException" => {
3910                    return RusotoError::Service(
3911                        ListRecoveryPointsByBackupVaultError::MissingParameterValue(err.msg),
3912                    )
3913                }
3914                "ResourceNotFoundException" => {
3915                    return RusotoError::Service(
3916                        ListRecoveryPointsByBackupVaultError::ResourceNotFound(err.msg),
3917                    )
3918                }
3919                "ServiceUnavailableException" => {
3920                    return RusotoError::Service(
3921                        ListRecoveryPointsByBackupVaultError::ServiceUnavailable(err.msg),
3922                    )
3923                }
3924                "ValidationException" => return RusotoError::Validation(err.msg),
3925                _ => {}
3926            }
3927        }
3928        RusotoError::Unknown(res)
3929    }
3930}
3931impl fmt::Display for ListRecoveryPointsByBackupVaultError {
3932    #[allow(unused_variables)]
3933    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3934        match *self {
3935            ListRecoveryPointsByBackupVaultError::InvalidParameterValue(ref cause) => {
3936                write!(f, "{}", cause)
3937            }
3938            ListRecoveryPointsByBackupVaultError::MissingParameterValue(ref cause) => {
3939                write!(f, "{}", cause)
3940            }
3941            ListRecoveryPointsByBackupVaultError::ResourceNotFound(ref cause) => {
3942                write!(f, "{}", cause)
3943            }
3944            ListRecoveryPointsByBackupVaultError::ServiceUnavailable(ref cause) => {
3945                write!(f, "{}", cause)
3946            }
3947        }
3948    }
3949}
3950impl Error for ListRecoveryPointsByBackupVaultError {}
3951/// Errors returned by ListRecoveryPointsByResource
3952#[derive(Debug, PartialEq)]
3953pub enum ListRecoveryPointsByResourceError {
3954    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
3955    InvalidParameterValue(String),
3956    /// <p>Indicates that a required parameter is missing.</p>
3957    MissingParameterValue(String),
3958    /// <p>A resource that is required for the action doesn't exist.</p>
3959    ResourceNotFound(String),
3960    /// <p>The request failed due to a temporary failure of the server.</p>
3961    ServiceUnavailable(String),
3962}
3963
3964impl ListRecoveryPointsByResourceError {
3965    pub fn from_response(
3966        res: BufferedHttpResponse,
3967    ) -> RusotoError<ListRecoveryPointsByResourceError> {
3968        if let Some(err) = proto::json::Error::parse_rest(&res) {
3969            match err.typ.as_str() {
3970                "InvalidParameterValueException" => {
3971                    return RusotoError::Service(
3972                        ListRecoveryPointsByResourceError::InvalidParameterValue(err.msg),
3973                    )
3974                }
3975                "MissingParameterValueException" => {
3976                    return RusotoError::Service(
3977                        ListRecoveryPointsByResourceError::MissingParameterValue(err.msg),
3978                    )
3979                }
3980                "ResourceNotFoundException" => {
3981                    return RusotoError::Service(
3982                        ListRecoveryPointsByResourceError::ResourceNotFound(err.msg),
3983                    )
3984                }
3985                "ServiceUnavailableException" => {
3986                    return RusotoError::Service(
3987                        ListRecoveryPointsByResourceError::ServiceUnavailable(err.msg),
3988                    )
3989                }
3990                "ValidationException" => return RusotoError::Validation(err.msg),
3991                _ => {}
3992            }
3993        }
3994        RusotoError::Unknown(res)
3995    }
3996}
3997impl fmt::Display for ListRecoveryPointsByResourceError {
3998    #[allow(unused_variables)]
3999    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4000        match *self {
4001            ListRecoveryPointsByResourceError::InvalidParameterValue(ref cause) => {
4002                write!(f, "{}", cause)
4003            }
4004            ListRecoveryPointsByResourceError::MissingParameterValue(ref cause) => {
4005                write!(f, "{}", cause)
4006            }
4007            ListRecoveryPointsByResourceError::ResourceNotFound(ref cause) => {
4008                write!(f, "{}", cause)
4009            }
4010            ListRecoveryPointsByResourceError::ServiceUnavailable(ref cause) => {
4011                write!(f, "{}", cause)
4012            }
4013        }
4014    }
4015}
4016impl Error for ListRecoveryPointsByResourceError {}
4017/// Errors returned by ListRestoreJobs
4018#[derive(Debug, PartialEq)]
4019pub enum ListRestoreJobsError {
4020    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
4021    InvalidParameterValue(String),
4022    /// <p>Indicates that a required parameter is missing.</p>
4023    MissingParameterValue(String),
4024    /// <p>A resource that is required for the action doesn't exist.</p>
4025    ResourceNotFound(String),
4026    /// <p>The request failed due to a temporary failure of the server.</p>
4027    ServiceUnavailable(String),
4028}
4029
4030impl ListRestoreJobsError {
4031    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListRestoreJobsError> {
4032        if let Some(err) = proto::json::Error::parse_rest(&res) {
4033            match err.typ.as_str() {
4034                "InvalidParameterValueException" => {
4035                    return RusotoError::Service(ListRestoreJobsError::InvalidParameterValue(
4036                        err.msg,
4037                    ))
4038                }
4039                "MissingParameterValueException" => {
4040                    return RusotoError::Service(ListRestoreJobsError::MissingParameterValue(
4041                        err.msg,
4042                    ))
4043                }
4044                "ResourceNotFoundException" => {
4045                    return RusotoError::Service(ListRestoreJobsError::ResourceNotFound(err.msg))
4046                }
4047                "ServiceUnavailableException" => {
4048                    return RusotoError::Service(ListRestoreJobsError::ServiceUnavailable(err.msg))
4049                }
4050                "ValidationException" => return RusotoError::Validation(err.msg),
4051                _ => {}
4052            }
4053        }
4054        RusotoError::Unknown(res)
4055    }
4056}
4057impl fmt::Display for ListRestoreJobsError {
4058    #[allow(unused_variables)]
4059    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4060        match *self {
4061            ListRestoreJobsError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
4062            ListRestoreJobsError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
4063            ListRestoreJobsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4064            ListRestoreJobsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
4065        }
4066    }
4067}
4068impl Error for ListRestoreJobsError {}
4069/// Errors returned by ListTags
4070#[derive(Debug, PartialEq)]
4071pub enum ListTagsError {
4072    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
4073    InvalidParameterValue(String),
4074    /// <p>Indicates that a required parameter is missing.</p>
4075    MissingParameterValue(String),
4076    /// <p>A resource that is required for the action doesn't exist.</p>
4077    ResourceNotFound(String),
4078    /// <p>The request failed due to a temporary failure of the server.</p>
4079    ServiceUnavailable(String),
4080}
4081
4082impl ListTagsError {
4083    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsError> {
4084        if let Some(err) = proto::json::Error::parse_rest(&res) {
4085            match err.typ.as_str() {
4086                "InvalidParameterValueException" => {
4087                    return RusotoError::Service(ListTagsError::InvalidParameterValue(err.msg))
4088                }
4089                "MissingParameterValueException" => {
4090                    return RusotoError::Service(ListTagsError::MissingParameterValue(err.msg))
4091                }
4092                "ResourceNotFoundException" => {
4093                    return RusotoError::Service(ListTagsError::ResourceNotFound(err.msg))
4094                }
4095                "ServiceUnavailableException" => {
4096                    return RusotoError::Service(ListTagsError::ServiceUnavailable(err.msg))
4097                }
4098                "ValidationException" => return RusotoError::Validation(err.msg),
4099                _ => {}
4100            }
4101        }
4102        RusotoError::Unknown(res)
4103    }
4104}
4105impl fmt::Display for ListTagsError {
4106    #[allow(unused_variables)]
4107    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4108        match *self {
4109            ListTagsError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
4110            ListTagsError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
4111            ListTagsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4112            ListTagsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
4113        }
4114    }
4115}
4116impl Error for ListTagsError {}
4117/// Errors returned by PutBackupVaultAccessPolicy
4118#[derive(Debug, PartialEq)]
4119pub enum PutBackupVaultAccessPolicyError {
4120    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
4121    InvalidParameterValue(String),
4122    /// <p>Indicates that a required parameter is missing.</p>
4123    MissingParameterValue(String),
4124    /// <p>A resource that is required for the action doesn't exist.</p>
4125    ResourceNotFound(String),
4126    /// <p>The request failed due to a temporary failure of the server.</p>
4127    ServiceUnavailable(String),
4128}
4129
4130impl PutBackupVaultAccessPolicyError {
4131    pub fn from_response(
4132        res: BufferedHttpResponse,
4133    ) -> RusotoError<PutBackupVaultAccessPolicyError> {
4134        if let Some(err) = proto::json::Error::parse_rest(&res) {
4135            match err.typ.as_str() {
4136                "InvalidParameterValueException" => {
4137                    return RusotoError::Service(
4138                        PutBackupVaultAccessPolicyError::InvalidParameterValue(err.msg),
4139                    )
4140                }
4141                "MissingParameterValueException" => {
4142                    return RusotoError::Service(
4143                        PutBackupVaultAccessPolicyError::MissingParameterValue(err.msg),
4144                    )
4145                }
4146                "ResourceNotFoundException" => {
4147                    return RusotoError::Service(PutBackupVaultAccessPolicyError::ResourceNotFound(
4148                        err.msg,
4149                    ))
4150                }
4151                "ServiceUnavailableException" => {
4152                    return RusotoError::Service(
4153                        PutBackupVaultAccessPolicyError::ServiceUnavailable(err.msg),
4154                    )
4155                }
4156                "ValidationException" => return RusotoError::Validation(err.msg),
4157                _ => {}
4158            }
4159        }
4160        RusotoError::Unknown(res)
4161    }
4162}
4163impl fmt::Display for PutBackupVaultAccessPolicyError {
4164    #[allow(unused_variables)]
4165    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4166        match *self {
4167            PutBackupVaultAccessPolicyError::InvalidParameterValue(ref cause) => {
4168                write!(f, "{}", cause)
4169            }
4170            PutBackupVaultAccessPolicyError::MissingParameterValue(ref cause) => {
4171                write!(f, "{}", cause)
4172            }
4173            PutBackupVaultAccessPolicyError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4174            PutBackupVaultAccessPolicyError::ServiceUnavailable(ref cause) => {
4175                write!(f, "{}", cause)
4176            }
4177        }
4178    }
4179}
4180impl Error for PutBackupVaultAccessPolicyError {}
4181/// Errors returned by PutBackupVaultNotifications
4182#[derive(Debug, PartialEq)]
4183pub enum PutBackupVaultNotificationsError {
4184    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
4185    InvalidParameterValue(String),
4186    /// <p>Indicates that a required parameter is missing.</p>
4187    MissingParameterValue(String),
4188    /// <p>A resource that is required for the action doesn't exist.</p>
4189    ResourceNotFound(String),
4190    /// <p>The request failed due to a temporary failure of the server.</p>
4191    ServiceUnavailable(String),
4192}
4193
4194impl PutBackupVaultNotificationsError {
4195    pub fn from_response(
4196        res: BufferedHttpResponse,
4197    ) -> RusotoError<PutBackupVaultNotificationsError> {
4198        if let Some(err) = proto::json::Error::parse_rest(&res) {
4199            match err.typ.as_str() {
4200                "InvalidParameterValueException" => {
4201                    return RusotoError::Service(
4202                        PutBackupVaultNotificationsError::InvalidParameterValue(err.msg),
4203                    )
4204                }
4205                "MissingParameterValueException" => {
4206                    return RusotoError::Service(
4207                        PutBackupVaultNotificationsError::MissingParameterValue(err.msg),
4208                    )
4209                }
4210                "ResourceNotFoundException" => {
4211                    return RusotoError::Service(
4212                        PutBackupVaultNotificationsError::ResourceNotFound(err.msg),
4213                    )
4214                }
4215                "ServiceUnavailableException" => {
4216                    return RusotoError::Service(
4217                        PutBackupVaultNotificationsError::ServiceUnavailable(err.msg),
4218                    )
4219                }
4220                "ValidationException" => return RusotoError::Validation(err.msg),
4221                _ => {}
4222            }
4223        }
4224        RusotoError::Unknown(res)
4225    }
4226}
4227impl fmt::Display for PutBackupVaultNotificationsError {
4228    #[allow(unused_variables)]
4229    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4230        match *self {
4231            PutBackupVaultNotificationsError::InvalidParameterValue(ref cause) => {
4232                write!(f, "{}", cause)
4233            }
4234            PutBackupVaultNotificationsError::MissingParameterValue(ref cause) => {
4235                write!(f, "{}", cause)
4236            }
4237            PutBackupVaultNotificationsError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4238            PutBackupVaultNotificationsError::ServiceUnavailable(ref cause) => {
4239                write!(f, "{}", cause)
4240            }
4241        }
4242    }
4243}
4244impl Error for PutBackupVaultNotificationsError {}
4245/// Errors returned by StartBackupJob
4246#[derive(Debug, PartialEq)]
4247pub enum StartBackupJobError {
4248    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
4249    InvalidParameterValue(String),
4250    /// <p>A limit in the request has been exceeded; for example, a maximum number of items allowed in a request.</p>
4251    LimitExceeded(String),
4252    /// <p>Indicates that a required parameter is missing.</p>
4253    MissingParameterValue(String),
4254    /// <p>A resource that is required for the action doesn't exist.</p>
4255    ResourceNotFound(String),
4256    /// <p>The request failed due to a temporary failure of the server.</p>
4257    ServiceUnavailable(String),
4258}
4259
4260impl StartBackupJobError {
4261    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartBackupJobError> {
4262        if let Some(err) = proto::json::Error::parse_rest(&res) {
4263            match err.typ.as_str() {
4264                "InvalidParameterValueException" => {
4265                    return RusotoError::Service(StartBackupJobError::InvalidParameterValue(
4266                        err.msg,
4267                    ))
4268                }
4269                "LimitExceededException" => {
4270                    return RusotoError::Service(StartBackupJobError::LimitExceeded(err.msg))
4271                }
4272                "MissingParameterValueException" => {
4273                    return RusotoError::Service(StartBackupJobError::MissingParameterValue(
4274                        err.msg,
4275                    ))
4276                }
4277                "ResourceNotFoundException" => {
4278                    return RusotoError::Service(StartBackupJobError::ResourceNotFound(err.msg))
4279                }
4280                "ServiceUnavailableException" => {
4281                    return RusotoError::Service(StartBackupJobError::ServiceUnavailable(err.msg))
4282                }
4283                "ValidationException" => return RusotoError::Validation(err.msg),
4284                _ => {}
4285            }
4286        }
4287        RusotoError::Unknown(res)
4288    }
4289}
4290impl fmt::Display for StartBackupJobError {
4291    #[allow(unused_variables)]
4292    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4293        match *self {
4294            StartBackupJobError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
4295            StartBackupJobError::LimitExceeded(ref cause) => write!(f, "{}", cause),
4296            StartBackupJobError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
4297            StartBackupJobError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4298            StartBackupJobError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
4299        }
4300    }
4301}
4302impl Error for StartBackupJobError {}
4303/// Errors returned by StartCopyJob
4304#[derive(Debug, PartialEq)]
4305pub enum StartCopyJobError {
4306    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
4307    InvalidParameterValue(String),
4308    /// <p>A limit in the request has been exceeded; for example, a maximum number of items allowed in a request.</p>
4309    LimitExceeded(String),
4310    /// <p>Indicates that a required parameter is missing.</p>
4311    MissingParameterValue(String),
4312    /// <p>A resource that is required for the action doesn't exist.</p>
4313    ResourceNotFound(String),
4314    /// <p>The request failed due to a temporary failure of the server.</p>
4315    ServiceUnavailable(String),
4316}
4317
4318impl StartCopyJobError {
4319    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartCopyJobError> {
4320        if let Some(err) = proto::json::Error::parse_rest(&res) {
4321            match err.typ.as_str() {
4322                "InvalidParameterValueException" => {
4323                    return RusotoError::Service(StartCopyJobError::InvalidParameterValue(err.msg))
4324                }
4325                "LimitExceededException" => {
4326                    return RusotoError::Service(StartCopyJobError::LimitExceeded(err.msg))
4327                }
4328                "MissingParameterValueException" => {
4329                    return RusotoError::Service(StartCopyJobError::MissingParameterValue(err.msg))
4330                }
4331                "ResourceNotFoundException" => {
4332                    return RusotoError::Service(StartCopyJobError::ResourceNotFound(err.msg))
4333                }
4334                "ServiceUnavailableException" => {
4335                    return RusotoError::Service(StartCopyJobError::ServiceUnavailable(err.msg))
4336                }
4337                "ValidationException" => return RusotoError::Validation(err.msg),
4338                _ => {}
4339            }
4340        }
4341        RusotoError::Unknown(res)
4342    }
4343}
4344impl fmt::Display for StartCopyJobError {
4345    #[allow(unused_variables)]
4346    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4347        match *self {
4348            StartCopyJobError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
4349            StartCopyJobError::LimitExceeded(ref cause) => write!(f, "{}", cause),
4350            StartCopyJobError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
4351            StartCopyJobError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4352            StartCopyJobError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
4353        }
4354    }
4355}
4356impl Error for StartCopyJobError {}
4357/// Errors returned by StartRestoreJob
4358#[derive(Debug, PartialEq)]
4359pub enum StartRestoreJobError {
4360    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
4361    InvalidParameterValue(String),
4362    /// <p>Indicates that a required parameter is missing.</p>
4363    MissingParameterValue(String),
4364    /// <p>A resource that is required for the action doesn't exist.</p>
4365    ResourceNotFound(String),
4366    /// <p>The request failed due to a temporary failure of the server.</p>
4367    ServiceUnavailable(String),
4368}
4369
4370impl StartRestoreJobError {
4371    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartRestoreJobError> {
4372        if let Some(err) = proto::json::Error::parse_rest(&res) {
4373            match err.typ.as_str() {
4374                "InvalidParameterValueException" => {
4375                    return RusotoError::Service(StartRestoreJobError::InvalidParameterValue(
4376                        err.msg,
4377                    ))
4378                }
4379                "MissingParameterValueException" => {
4380                    return RusotoError::Service(StartRestoreJobError::MissingParameterValue(
4381                        err.msg,
4382                    ))
4383                }
4384                "ResourceNotFoundException" => {
4385                    return RusotoError::Service(StartRestoreJobError::ResourceNotFound(err.msg))
4386                }
4387                "ServiceUnavailableException" => {
4388                    return RusotoError::Service(StartRestoreJobError::ServiceUnavailable(err.msg))
4389                }
4390                "ValidationException" => return RusotoError::Validation(err.msg),
4391                _ => {}
4392            }
4393        }
4394        RusotoError::Unknown(res)
4395    }
4396}
4397impl fmt::Display for StartRestoreJobError {
4398    #[allow(unused_variables)]
4399    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4400        match *self {
4401            StartRestoreJobError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
4402            StartRestoreJobError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
4403            StartRestoreJobError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4404            StartRestoreJobError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
4405        }
4406    }
4407}
4408impl Error for StartRestoreJobError {}
4409/// Errors returned by StopBackupJob
4410#[derive(Debug, PartialEq)]
4411pub enum StopBackupJobError {
4412    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
4413    InvalidParameterValue(String),
4414    /// <p>Indicates that something is wrong with the input to the request. For example, a parameter is of the wrong type.</p>
4415    InvalidRequest(String),
4416    /// <p>Indicates that a required parameter is missing.</p>
4417    MissingParameterValue(String),
4418    /// <p>A resource that is required for the action doesn't exist.</p>
4419    ResourceNotFound(String),
4420    /// <p>The request failed due to a temporary failure of the server.</p>
4421    ServiceUnavailable(String),
4422}
4423
4424impl StopBackupJobError {
4425    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StopBackupJobError> {
4426        if let Some(err) = proto::json::Error::parse_rest(&res) {
4427            match err.typ.as_str() {
4428                "InvalidParameterValueException" => {
4429                    return RusotoError::Service(StopBackupJobError::InvalidParameterValue(err.msg))
4430                }
4431                "InvalidRequestException" => {
4432                    return RusotoError::Service(StopBackupJobError::InvalidRequest(err.msg))
4433                }
4434                "MissingParameterValueException" => {
4435                    return RusotoError::Service(StopBackupJobError::MissingParameterValue(err.msg))
4436                }
4437                "ResourceNotFoundException" => {
4438                    return RusotoError::Service(StopBackupJobError::ResourceNotFound(err.msg))
4439                }
4440                "ServiceUnavailableException" => {
4441                    return RusotoError::Service(StopBackupJobError::ServiceUnavailable(err.msg))
4442                }
4443                "ValidationException" => return RusotoError::Validation(err.msg),
4444                _ => {}
4445            }
4446        }
4447        RusotoError::Unknown(res)
4448    }
4449}
4450impl fmt::Display for StopBackupJobError {
4451    #[allow(unused_variables)]
4452    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4453        match *self {
4454            StopBackupJobError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
4455            StopBackupJobError::InvalidRequest(ref cause) => write!(f, "{}", cause),
4456            StopBackupJobError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
4457            StopBackupJobError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4458            StopBackupJobError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
4459        }
4460    }
4461}
4462impl Error for StopBackupJobError {}
4463/// Errors returned by TagResource
4464#[derive(Debug, PartialEq)]
4465pub enum TagResourceError {
4466    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
4467    InvalidParameterValue(String),
4468    /// <p>A limit in the request has been exceeded; for example, a maximum number of items allowed in a request.</p>
4469    LimitExceeded(String),
4470    /// <p>Indicates that a required parameter is missing.</p>
4471    MissingParameterValue(String),
4472    /// <p>A resource that is required for the action doesn't exist.</p>
4473    ResourceNotFound(String),
4474    /// <p>The request failed due to a temporary failure of the server.</p>
4475    ServiceUnavailable(String),
4476}
4477
4478impl TagResourceError {
4479    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
4480        if let Some(err) = proto::json::Error::parse_rest(&res) {
4481            match err.typ.as_str() {
4482                "InvalidParameterValueException" => {
4483                    return RusotoError::Service(TagResourceError::InvalidParameterValue(err.msg))
4484                }
4485                "LimitExceededException" => {
4486                    return RusotoError::Service(TagResourceError::LimitExceeded(err.msg))
4487                }
4488                "MissingParameterValueException" => {
4489                    return RusotoError::Service(TagResourceError::MissingParameterValue(err.msg))
4490                }
4491                "ResourceNotFoundException" => {
4492                    return RusotoError::Service(TagResourceError::ResourceNotFound(err.msg))
4493                }
4494                "ServiceUnavailableException" => {
4495                    return RusotoError::Service(TagResourceError::ServiceUnavailable(err.msg))
4496                }
4497                "ValidationException" => return RusotoError::Validation(err.msg),
4498                _ => {}
4499            }
4500        }
4501        RusotoError::Unknown(res)
4502    }
4503}
4504impl fmt::Display for TagResourceError {
4505    #[allow(unused_variables)]
4506    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4507        match *self {
4508            TagResourceError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
4509            TagResourceError::LimitExceeded(ref cause) => write!(f, "{}", cause),
4510            TagResourceError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
4511            TagResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4512            TagResourceError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
4513        }
4514    }
4515}
4516impl Error for TagResourceError {}
4517/// Errors returned by UntagResource
4518#[derive(Debug, PartialEq)]
4519pub enum UntagResourceError {
4520    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
4521    InvalidParameterValue(String),
4522    /// <p>Indicates that a required parameter is missing.</p>
4523    MissingParameterValue(String),
4524    /// <p>A resource that is required for the action doesn't exist.</p>
4525    ResourceNotFound(String),
4526    /// <p>The request failed due to a temporary failure of the server.</p>
4527    ServiceUnavailable(String),
4528}
4529
4530impl UntagResourceError {
4531    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
4532        if let Some(err) = proto::json::Error::parse_rest(&res) {
4533            match err.typ.as_str() {
4534                "InvalidParameterValueException" => {
4535                    return RusotoError::Service(UntagResourceError::InvalidParameterValue(err.msg))
4536                }
4537                "MissingParameterValueException" => {
4538                    return RusotoError::Service(UntagResourceError::MissingParameterValue(err.msg))
4539                }
4540                "ResourceNotFoundException" => {
4541                    return RusotoError::Service(UntagResourceError::ResourceNotFound(err.msg))
4542                }
4543                "ServiceUnavailableException" => {
4544                    return RusotoError::Service(UntagResourceError::ServiceUnavailable(err.msg))
4545                }
4546                "ValidationException" => return RusotoError::Validation(err.msg),
4547                _ => {}
4548            }
4549        }
4550        RusotoError::Unknown(res)
4551    }
4552}
4553impl fmt::Display for UntagResourceError {
4554    #[allow(unused_variables)]
4555    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4556        match *self {
4557            UntagResourceError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
4558            UntagResourceError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
4559            UntagResourceError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4560            UntagResourceError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
4561        }
4562    }
4563}
4564impl Error for UntagResourceError {}
4565/// Errors returned by UpdateBackupPlan
4566#[derive(Debug, PartialEq)]
4567pub enum UpdateBackupPlanError {
4568    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
4569    InvalidParameterValue(String),
4570    /// <p>Indicates that a required parameter is missing.</p>
4571    MissingParameterValue(String),
4572    /// <p>A resource that is required for the action doesn't exist.</p>
4573    ResourceNotFound(String),
4574    /// <p>The request failed due to a temporary failure of the server.</p>
4575    ServiceUnavailable(String),
4576}
4577
4578impl UpdateBackupPlanError {
4579    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateBackupPlanError> {
4580        if let Some(err) = proto::json::Error::parse_rest(&res) {
4581            match err.typ.as_str() {
4582                "InvalidParameterValueException" => {
4583                    return RusotoError::Service(UpdateBackupPlanError::InvalidParameterValue(
4584                        err.msg,
4585                    ))
4586                }
4587                "MissingParameterValueException" => {
4588                    return RusotoError::Service(UpdateBackupPlanError::MissingParameterValue(
4589                        err.msg,
4590                    ))
4591                }
4592                "ResourceNotFoundException" => {
4593                    return RusotoError::Service(UpdateBackupPlanError::ResourceNotFound(err.msg))
4594                }
4595                "ServiceUnavailableException" => {
4596                    return RusotoError::Service(UpdateBackupPlanError::ServiceUnavailable(err.msg))
4597                }
4598                "ValidationException" => return RusotoError::Validation(err.msg),
4599                _ => {}
4600            }
4601        }
4602        RusotoError::Unknown(res)
4603    }
4604}
4605impl fmt::Display for UpdateBackupPlanError {
4606    #[allow(unused_variables)]
4607    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4608        match *self {
4609            UpdateBackupPlanError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
4610            UpdateBackupPlanError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
4611            UpdateBackupPlanError::ResourceNotFound(ref cause) => write!(f, "{}", cause),
4612            UpdateBackupPlanError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
4613        }
4614    }
4615}
4616impl Error for UpdateBackupPlanError {}
4617/// Errors returned by UpdateRecoveryPointLifecycle
4618#[derive(Debug, PartialEq)]
4619pub enum UpdateRecoveryPointLifecycleError {
4620    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
4621    InvalidParameterValue(String),
4622    /// <p>Indicates that a required parameter is missing.</p>
4623    MissingParameterValue(String),
4624    /// <p>A resource that is required for the action doesn't exist.</p>
4625    ResourceNotFound(String),
4626    /// <p>The request failed due to a temporary failure of the server.</p>
4627    ServiceUnavailable(String),
4628}
4629
4630impl UpdateRecoveryPointLifecycleError {
4631    pub fn from_response(
4632        res: BufferedHttpResponse,
4633    ) -> RusotoError<UpdateRecoveryPointLifecycleError> {
4634        if let Some(err) = proto::json::Error::parse_rest(&res) {
4635            match err.typ.as_str() {
4636                "InvalidParameterValueException" => {
4637                    return RusotoError::Service(
4638                        UpdateRecoveryPointLifecycleError::InvalidParameterValue(err.msg),
4639                    )
4640                }
4641                "MissingParameterValueException" => {
4642                    return RusotoError::Service(
4643                        UpdateRecoveryPointLifecycleError::MissingParameterValue(err.msg),
4644                    )
4645                }
4646                "ResourceNotFoundException" => {
4647                    return RusotoError::Service(
4648                        UpdateRecoveryPointLifecycleError::ResourceNotFound(err.msg),
4649                    )
4650                }
4651                "ServiceUnavailableException" => {
4652                    return RusotoError::Service(
4653                        UpdateRecoveryPointLifecycleError::ServiceUnavailable(err.msg),
4654                    )
4655                }
4656                "ValidationException" => return RusotoError::Validation(err.msg),
4657                _ => {}
4658            }
4659        }
4660        RusotoError::Unknown(res)
4661    }
4662}
4663impl fmt::Display for UpdateRecoveryPointLifecycleError {
4664    #[allow(unused_variables)]
4665    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4666        match *self {
4667            UpdateRecoveryPointLifecycleError::InvalidParameterValue(ref cause) => {
4668                write!(f, "{}", cause)
4669            }
4670            UpdateRecoveryPointLifecycleError::MissingParameterValue(ref cause) => {
4671                write!(f, "{}", cause)
4672            }
4673            UpdateRecoveryPointLifecycleError::ResourceNotFound(ref cause) => {
4674                write!(f, "{}", cause)
4675            }
4676            UpdateRecoveryPointLifecycleError::ServiceUnavailable(ref cause) => {
4677                write!(f, "{}", cause)
4678            }
4679        }
4680    }
4681}
4682impl Error for UpdateRecoveryPointLifecycleError {}
4683/// Errors returned by UpdateRegionSettings
4684#[derive(Debug, PartialEq)]
4685pub enum UpdateRegionSettingsError {
4686    /// <p>Indicates that something is wrong with a parameter's value. For example, the value is out of range.</p>
4687    InvalidParameterValue(String),
4688    /// <p>Indicates that a required parameter is missing.</p>
4689    MissingParameterValue(String),
4690    /// <p>The request failed due to a temporary failure of the server.</p>
4691    ServiceUnavailable(String),
4692}
4693
4694impl UpdateRegionSettingsError {
4695    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateRegionSettingsError> {
4696        if let Some(err) = proto::json::Error::parse_rest(&res) {
4697            match err.typ.as_str() {
4698                "InvalidParameterValueException" => {
4699                    return RusotoError::Service(UpdateRegionSettingsError::InvalidParameterValue(
4700                        err.msg,
4701                    ))
4702                }
4703                "MissingParameterValueException" => {
4704                    return RusotoError::Service(UpdateRegionSettingsError::MissingParameterValue(
4705                        err.msg,
4706                    ))
4707                }
4708                "ServiceUnavailableException" => {
4709                    return RusotoError::Service(UpdateRegionSettingsError::ServiceUnavailable(
4710                        err.msg,
4711                    ))
4712                }
4713                "ValidationException" => return RusotoError::Validation(err.msg),
4714                _ => {}
4715            }
4716        }
4717        RusotoError::Unknown(res)
4718    }
4719}
4720impl fmt::Display for UpdateRegionSettingsError {
4721    #[allow(unused_variables)]
4722    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4723        match *self {
4724            UpdateRegionSettingsError::InvalidParameterValue(ref cause) => write!(f, "{}", cause),
4725            UpdateRegionSettingsError::MissingParameterValue(ref cause) => write!(f, "{}", cause),
4726            UpdateRegionSettingsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
4727        }
4728    }
4729}
4730impl Error for UpdateRegionSettingsError {}
4731/// Trait representing the capabilities of the AWS Backup API. AWS Backup clients implement this trait.
4732#[async_trait]
4733pub trait Backup {
4734    /// <p>Backup plans are documents that contain information that AWS Backup uses to schedule tasks that create recovery points of resources.</p> <p>If you call <code>CreateBackupPlan</code> with a plan that already exists, an <code>AlreadyExistsException</code> is returned.</p>
4735    async fn create_backup_plan(
4736        &self,
4737        input: CreateBackupPlanInput,
4738    ) -> Result<CreateBackupPlanOutput, RusotoError<CreateBackupPlanError>>;
4739
4740    /// <p>Creates a JSON document that specifies a set of resources to assign to a backup plan. Resources can be included by specifying patterns for a <code>ListOfTags</code> and selected <code>Resources</code>. </p> <p>For example, consider the following patterns:</p> <ul> <li> <p> <code>Resources: "arn:aws:ec2:region:account-id:volume/volume-id"</code> </p> </li> <li> <p> <code>ConditionKey:"department"</code> </p> <p> <code>ConditionValue:"finance"</code> </p> <p> <code>ConditionType:"STRINGEQUALS"</code> </p> </li> <li> <p> <code>ConditionKey:"importance"</code> </p> <p> <code>ConditionValue:"critical"</code> </p> <p> <code>ConditionType:"STRINGEQUALS"</code> </p> </li> </ul> <p>Using these patterns would back up all Amazon Elastic Block Store (Amazon EBS) volumes that are tagged as <code>"department=finance"</code>, <code>"importance=critical"</code>, in addition to an EBS volume with the specified volume Id.</p> <p>Resources and conditions are additive in that all resources that match the pattern are selected. This shouldn't be confused with a logical AND, where all conditions must match. The matching patterns are logically 'put together using the OR operator. In other words, all patterns that match are selected for backup.</p>
4741    async fn create_backup_selection(
4742        &self,
4743        input: CreateBackupSelectionInput,
4744    ) -> Result<CreateBackupSelectionOutput, RusotoError<CreateBackupSelectionError>>;
4745
4746    /// <p><p>Creates a logical container where backups are stored. A <code>CreateBackupVault</code> request includes a name, optionally one or more resource tags, an encryption key, and a request ID.</p> <note> <p>Sensitive data, such as passport numbers, should not be included the name of a backup vault.</p> </note></p>
4747    async fn create_backup_vault(
4748        &self,
4749        input: CreateBackupVaultInput,
4750    ) -> Result<CreateBackupVaultOutput, RusotoError<CreateBackupVaultError>>;
4751
4752    /// <p>Deletes a backup plan. A backup plan can only be deleted after all associated selections of resources have been deleted. Deleting a backup plan deletes the current version of a backup plan. Previous versions, if any, will still exist.</p>
4753    async fn delete_backup_plan(
4754        &self,
4755        input: DeleteBackupPlanInput,
4756    ) -> Result<DeleteBackupPlanOutput, RusotoError<DeleteBackupPlanError>>;
4757
4758    /// <p>Deletes the resource selection associated with a backup plan that is specified by the <code>SelectionId</code>.</p>
4759    async fn delete_backup_selection(
4760        &self,
4761        input: DeleteBackupSelectionInput,
4762    ) -> Result<(), RusotoError<DeleteBackupSelectionError>>;
4763
4764    /// <p>Deletes the backup vault identified by its name. A vault can be deleted only if it is empty.</p>
4765    async fn delete_backup_vault(
4766        &self,
4767        input: DeleteBackupVaultInput,
4768    ) -> Result<(), RusotoError<DeleteBackupVaultError>>;
4769
4770    /// <p>Deletes the policy document that manages permissions on a backup vault.</p>
4771    async fn delete_backup_vault_access_policy(
4772        &self,
4773        input: DeleteBackupVaultAccessPolicyInput,
4774    ) -> Result<(), RusotoError<DeleteBackupVaultAccessPolicyError>>;
4775
4776    /// <p>Deletes event notifications for the specified backup vault.</p>
4777    async fn delete_backup_vault_notifications(
4778        &self,
4779        input: DeleteBackupVaultNotificationsInput,
4780    ) -> Result<(), RusotoError<DeleteBackupVaultNotificationsError>>;
4781
4782    /// <p>Deletes the recovery point specified by a recovery point ID.</p>
4783    async fn delete_recovery_point(
4784        &self,
4785        input: DeleteRecoveryPointInput,
4786    ) -> Result<(), RusotoError<DeleteRecoveryPointError>>;
4787
4788    /// <p>Returns metadata associated with creating a backup of a resource.</p>
4789    async fn describe_backup_job(
4790        &self,
4791        input: DescribeBackupJobInput,
4792    ) -> Result<DescribeBackupJobOutput, RusotoError<DescribeBackupJobError>>;
4793
4794    /// <p>Returns metadata about a backup vault specified by its name.</p>
4795    async fn describe_backup_vault(
4796        &self,
4797        input: DescribeBackupVaultInput,
4798    ) -> Result<DescribeBackupVaultOutput, RusotoError<DescribeBackupVaultError>>;
4799
4800    /// <p>Returns metadata associated with creating a copy of a resource.</p>
4801    async fn describe_copy_job(
4802        &self,
4803        input: DescribeCopyJobInput,
4804    ) -> Result<DescribeCopyJobOutput, RusotoError<DescribeCopyJobError>>;
4805
4806    /// <p>Returns information about a saved resource, including the last time it was backed up, its Amazon Resource Name (ARN), and the AWS service type of the saved resource.</p>
4807    async fn describe_protected_resource(
4808        &self,
4809        input: DescribeProtectedResourceInput,
4810    ) -> Result<DescribeProtectedResourceOutput, RusotoError<DescribeProtectedResourceError>>;
4811
4812    /// <p>Returns metadata associated with a recovery point, including ID, status, encryption, and lifecycle.</p>
4813    async fn describe_recovery_point(
4814        &self,
4815        input: DescribeRecoveryPointInput,
4816    ) -> Result<DescribeRecoveryPointOutput, RusotoError<DescribeRecoveryPointError>>;
4817
4818    /// <p>Returns the current service opt-in settings for the Region. If the service has a value set to <code>true</code>, AWS Backup attempts to protect that service's resources in this Region, when included in an on-demand backup or scheduled backup plan. If the value is set to <code>false</code> for a service, AWS Backup does not attempt to protect that service's resources in this Region.</p>
4819    async fn describe_region_settings(
4820        &self,
4821    ) -> Result<DescribeRegionSettingsOutput, RusotoError<DescribeRegionSettingsError>>;
4822
4823    /// <p>Returns metadata associated with a restore job that is specified by a job ID.</p>
4824    async fn describe_restore_job(
4825        &self,
4826        input: DescribeRestoreJobInput,
4827    ) -> Result<DescribeRestoreJobOutput, RusotoError<DescribeRestoreJobError>>;
4828
4829    /// <p>Returns the backup plan that is specified by the plan ID as a backup template.</p>
4830    async fn export_backup_plan_template(
4831        &self,
4832        input: ExportBackupPlanTemplateInput,
4833    ) -> Result<ExportBackupPlanTemplateOutput, RusotoError<ExportBackupPlanTemplateError>>;
4834
4835    /// <p>Returns the body of a backup plan in JSON format, in addition to plan metadata.</p>
4836    async fn get_backup_plan(
4837        &self,
4838        input: GetBackupPlanInput,
4839    ) -> Result<GetBackupPlanOutput, RusotoError<GetBackupPlanError>>;
4840
4841    /// <p>Returns a valid JSON document specifying a backup plan or an error.</p>
4842    async fn get_backup_plan_from_json(
4843        &self,
4844        input: GetBackupPlanFromJSONInput,
4845    ) -> Result<GetBackupPlanFromJSONOutput, RusotoError<GetBackupPlanFromJSONError>>;
4846
4847    /// <p>Returns the template specified by its <code>templateId</code> as a backup plan.</p>
4848    async fn get_backup_plan_from_template(
4849        &self,
4850        input: GetBackupPlanFromTemplateInput,
4851    ) -> Result<GetBackupPlanFromTemplateOutput, RusotoError<GetBackupPlanFromTemplateError>>;
4852
4853    /// <p>Returns selection metadata and a document in JSON format that specifies a list of resources that are associated with a backup plan.</p>
4854    async fn get_backup_selection(
4855        &self,
4856        input: GetBackupSelectionInput,
4857    ) -> Result<GetBackupSelectionOutput, RusotoError<GetBackupSelectionError>>;
4858
4859    /// <p>Returns the access policy document that is associated with the named backup vault.</p>
4860    async fn get_backup_vault_access_policy(
4861        &self,
4862        input: GetBackupVaultAccessPolicyInput,
4863    ) -> Result<GetBackupVaultAccessPolicyOutput, RusotoError<GetBackupVaultAccessPolicyError>>;
4864
4865    /// <p>Returns event notifications for the specified backup vault.</p>
4866    async fn get_backup_vault_notifications(
4867        &self,
4868        input: GetBackupVaultNotificationsInput,
4869    ) -> Result<GetBackupVaultNotificationsOutput, RusotoError<GetBackupVaultNotificationsError>>;
4870
4871    /// <p>Returns a set of metadata key-value pairs that were used to create the backup.</p>
4872    async fn get_recovery_point_restore_metadata(
4873        &self,
4874        input: GetRecoveryPointRestoreMetadataInput,
4875    ) -> Result<
4876        GetRecoveryPointRestoreMetadataOutput,
4877        RusotoError<GetRecoveryPointRestoreMetadataError>,
4878    >;
4879
4880    /// <p>Returns the AWS resource types supported by AWS Backup.</p>
4881    async fn get_supported_resource_types(
4882        &self,
4883    ) -> Result<GetSupportedResourceTypesOutput, RusotoError<GetSupportedResourceTypesError>>;
4884
4885    /// <p>Returns metadata about your backup jobs.</p>
4886    async fn list_backup_jobs(
4887        &self,
4888        input: ListBackupJobsInput,
4889    ) -> Result<ListBackupJobsOutput, RusotoError<ListBackupJobsError>>;
4890
4891    /// <p>Returns metadata of your saved backup plan templates, including the template ID, name, and the creation and deletion dates.</p>
4892    async fn list_backup_plan_templates(
4893        &self,
4894        input: ListBackupPlanTemplatesInput,
4895    ) -> Result<ListBackupPlanTemplatesOutput, RusotoError<ListBackupPlanTemplatesError>>;
4896
4897    /// <p>Returns version metadata of your backup plans, including Amazon Resource Names (ARNs), backup plan IDs, creation and deletion dates, plan names, and version IDs.</p>
4898    async fn list_backup_plan_versions(
4899        &self,
4900        input: ListBackupPlanVersionsInput,
4901    ) -> Result<ListBackupPlanVersionsOutput, RusotoError<ListBackupPlanVersionsError>>;
4902
4903    /// <p>Returns metadata of your saved backup plans, including Amazon Resource Names (ARNs), plan IDs, creation and deletion dates, version IDs, plan names, and creator request IDs.</p>
4904    async fn list_backup_plans(
4905        &self,
4906        input: ListBackupPlansInput,
4907    ) -> Result<ListBackupPlansOutput, RusotoError<ListBackupPlansError>>;
4908
4909    /// <p>Returns an array containing metadata of the resources associated with the target backup plan.</p>
4910    async fn list_backup_selections(
4911        &self,
4912        input: ListBackupSelectionsInput,
4913    ) -> Result<ListBackupSelectionsOutput, RusotoError<ListBackupSelectionsError>>;
4914
4915    /// <p>Returns a list of recovery point storage containers along with information about them.</p>
4916    async fn list_backup_vaults(
4917        &self,
4918        input: ListBackupVaultsInput,
4919    ) -> Result<ListBackupVaultsOutput, RusotoError<ListBackupVaultsError>>;
4920
4921    /// <p>Returns metadata about your copy jobs.</p>
4922    async fn list_copy_jobs(
4923        &self,
4924        input: ListCopyJobsInput,
4925    ) -> Result<ListCopyJobsOutput, RusotoError<ListCopyJobsError>>;
4926
4927    /// <p>Returns an array of resources successfully backed up by AWS Backup, including the time the resource was saved, an Amazon Resource Name (ARN) of the resource, and a resource type.</p>
4928    async fn list_protected_resources(
4929        &self,
4930        input: ListProtectedResourcesInput,
4931    ) -> Result<ListProtectedResourcesOutput, RusotoError<ListProtectedResourcesError>>;
4932
4933    /// <p>Returns detailed information about the recovery points stored in a backup vault.</p>
4934    async fn list_recovery_points_by_backup_vault(
4935        &self,
4936        input: ListRecoveryPointsByBackupVaultInput,
4937    ) -> Result<
4938        ListRecoveryPointsByBackupVaultOutput,
4939        RusotoError<ListRecoveryPointsByBackupVaultError>,
4940    >;
4941
4942    /// <p>Returns detailed information about recovery points of the type specified by a resource Amazon Resource Name (ARN).</p>
4943    async fn list_recovery_points_by_resource(
4944        &self,
4945        input: ListRecoveryPointsByResourceInput,
4946    ) -> Result<ListRecoveryPointsByResourceOutput, RusotoError<ListRecoveryPointsByResourceError>>;
4947
4948    /// <p>Returns a list of jobs that AWS Backup initiated to restore a saved resource, including metadata about the recovery process.</p>
4949    async fn list_restore_jobs(
4950        &self,
4951        input: ListRestoreJobsInput,
4952    ) -> Result<ListRestoreJobsOutput, RusotoError<ListRestoreJobsError>>;
4953
4954    /// <p><p>Returns a list of key-value pairs assigned to a target recovery point, backup plan, or backup vault.</p> <note> <p> <code>ListTags</code> are currently only supported with Amazon EFS backups.</p> </note></p>
4955    async fn list_tags(
4956        &self,
4957        input: ListTagsInput,
4958    ) -> Result<ListTagsOutput, RusotoError<ListTagsError>>;
4959
4960    /// <p>Sets a resource-based policy that is used to manage access permissions on the target backup vault. Requires a backup vault name and an access policy document in JSON format.</p>
4961    async fn put_backup_vault_access_policy(
4962        &self,
4963        input: PutBackupVaultAccessPolicyInput,
4964    ) -> Result<(), RusotoError<PutBackupVaultAccessPolicyError>>;
4965
4966    /// <p>Turns on notifications on a backup vault for the specified topic and events.</p>
4967    async fn put_backup_vault_notifications(
4968        &self,
4969        input: PutBackupVaultNotificationsInput,
4970    ) -> Result<(), RusotoError<PutBackupVaultNotificationsError>>;
4971
4972    /// <p>Starts a job to create a one-time backup of the specified resource.</p>
4973    async fn start_backup_job(
4974        &self,
4975        input: StartBackupJobInput,
4976    ) -> Result<StartBackupJobOutput, RusotoError<StartBackupJobError>>;
4977
4978    /// <p>Starts a job to create a one-time copy of the specified resource.</p>
4979    async fn start_copy_job(
4980        &self,
4981        input: StartCopyJobInput,
4982    ) -> Result<StartCopyJobOutput, RusotoError<StartCopyJobError>>;
4983
4984    /// <p>Recovers the saved resource identified by an Amazon Resource Name (ARN). </p> <p>If the resource ARN is included in the request, then the last complete backup of that resource is recovered. If the ARN of a recovery point is supplied, then that recovery point is restored.</p>
4985    async fn start_restore_job(
4986        &self,
4987        input: StartRestoreJobInput,
4988    ) -> Result<StartRestoreJobOutput, RusotoError<StartRestoreJobError>>;
4989
4990    /// <p>Attempts to cancel a job to create a one-time backup of a resource.</p>
4991    async fn stop_backup_job(
4992        &self,
4993        input: StopBackupJobInput,
4994    ) -> Result<(), RusotoError<StopBackupJobError>>;
4995
4996    /// <p>Assigns a set of key-value pairs to a recovery point, backup plan, or backup vault identified by an Amazon Resource Name (ARN).</p>
4997    async fn tag_resource(
4998        &self,
4999        input: TagResourceInput,
5000    ) -> Result<(), RusotoError<TagResourceError>>;
5001
5002    /// <p>Removes a set of key-value pairs from a recovery point, backup plan, or backup vault identified by an Amazon Resource Name (ARN)</p>
5003    async fn untag_resource(
5004        &self,
5005        input: UntagResourceInput,
5006    ) -> Result<(), RusotoError<UntagResourceError>>;
5007
5008    /// <p>Replaces the body of a saved backup plan identified by its <code>backupPlanId</code> with the input document in JSON format. The new version is uniquely identified by a <code>VersionId</code>.</p>
5009    async fn update_backup_plan(
5010        &self,
5011        input: UpdateBackupPlanInput,
5012    ) -> Result<UpdateBackupPlanOutput, RusotoError<UpdateBackupPlanError>>;
5013
5014    /// <p>Sets the transition lifecycle of a recovery point.</p> <p>The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. AWS Backup transitions and expires backups automatically according to the lifecycle that you define. </p> <p>Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold. </p>
5015    async fn update_recovery_point_lifecycle(
5016        &self,
5017        input: UpdateRecoveryPointLifecycleInput,
5018    ) -> Result<UpdateRecoveryPointLifecycleOutput, RusotoError<UpdateRecoveryPointLifecycleError>>;
5019
5020    /// <p>Updates the current service opt-in settings for the Region. If the service has a value set to <code>true</code>, AWS Backup attempts to protect that service's resources in this Region, when included in an on-demand backup or scheduled backup plan. If the value is set to <code>false</code> for a service, AWS Backup does not attempt to protect that service's resources in this Region.</p>
5021    async fn update_region_settings(
5022        &self,
5023        input: UpdateRegionSettingsInput,
5024    ) -> Result<(), RusotoError<UpdateRegionSettingsError>>;
5025}
5026/// A client for the AWS Backup API.
5027#[derive(Clone)]
5028pub struct BackupClient {
5029    client: Client,
5030    region: region::Region,
5031}
5032
5033impl BackupClient {
5034    /// Creates a client backed by the default tokio event loop.
5035    ///
5036    /// The client will use the default credentials provider and tls client.
5037    pub fn new(region: region::Region) -> BackupClient {
5038        BackupClient {
5039            client: Client::shared(),
5040            region,
5041        }
5042    }
5043
5044    pub fn new_with<P, D>(
5045        request_dispatcher: D,
5046        credentials_provider: P,
5047        region: region::Region,
5048    ) -> BackupClient
5049    where
5050        P: ProvideAwsCredentials + Send + Sync + 'static,
5051        D: DispatchSignedRequest + Send + Sync + 'static,
5052    {
5053        BackupClient {
5054            client: Client::new_with(credentials_provider, request_dispatcher),
5055            region,
5056        }
5057    }
5058
5059    pub fn new_with_client(client: Client, region: region::Region) -> BackupClient {
5060        BackupClient { client, region }
5061    }
5062}
5063
5064#[async_trait]
5065impl Backup for BackupClient {
5066    /// <p>Backup plans are documents that contain information that AWS Backup uses to schedule tasks that create recovery points of resources.</p> <p>If you call <code>CreateBackupPlan</code> with a plan that already exists, an <code>AlreadyExistsException</code> is returned.</p>
5067    #[allow(unused_mut)]
5068    async fn create_backup_plan(
5069        &self,
5070        input: CreateBackupPlanInput,
5071    ) -> Result<CreateBackupPlanOutput, RusotoError<CreateBackupPlanError>> {
5072        let request_uri = "/backup/plans/";
5073
5074        let mut request = SignedRequest::new("PUT", "backup", &self.region, &request_uri);
5075        request.set_content_type("application/x-amz-json-1.1".to_owned());
5076
5077        let encoded = Some(serde_json::to_vec(&input).unwrap());
5078        request.set_payload(encoded);
5079
5080        let mut response = self
5081            .client
5082            .sign_and_dispatch(request)
5083            .await
5084            .map_err(RusotoError::from)?;
5085        if response.status.is_success() {
5086            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5087            let result = proto::json::ResponsePayload::new(&response)
5088                .deserialize::<CreateBackupPlanOutput, _>()?;
5089
5090            Ok(result)
5091        } else {
5092            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5093            Err(CreateBackupPlanError::from_response(response))
5094        }
5095    }
5096
5097    /// <p>Creates a JSON document that specifies a set of resources to assign to a backup plan. Resources can be included by specifying patterns for a <code>ListOfTags</code> and selected <code>Resources</code>. </p> <p>For example, consider the following patterns:</p> <ul> <li> <p> <code>Resources: "arn:aws:ec2:region:account-id:volume/volume-id"</code> </p> </li> <li> <p> <code>ConditionKey:"department"</code> </p> <p> <code>ConditionValue:"finance"</code> </p> <p> <code>ConditionType:"STRINGEQUALS"</code> </p> </li> <li> <p> <code>ConditionKey:"importance"</code> </p> <p> <code>ConditionValue:"critical"</code> </p> <p> <code>ConditionType:"STRINGEQUALS"</code> </p> </li> </ul> <p>Using these patterns would back up all Amazon Elastic Block Store (Amazon EBS) volumes that are tagged as <code>"department=finance"</code>, <code>"importance=critical"</code>, in addition to an EBS volume with the specified volume Id.</p> <p>Resources and conditions are additive in that all resources that match the pattern are selected. This shouldn't be confused with a logical AND, where all conditions must match. The matching patterns are logically 'put together using the OR operator. In other words, all patterns that match are selected for backup.</p>
5098    #[allow(unused_mut)]
5099    async fn create_backup_selection(
5100        &self,
5101        input: CreateBackupSelectionInput,
5102    ) -> Result<CreateBackupSelectionOutput, RusotoError<CreateBackupSelectionError>> {
5103        let request_uri = format!(
5104            "/backup/plans/{backup_plan_id}/selections/",
5105            backup_plan_id = input.backup_plan_id
5106        );
5107
5108        let mut request = SignedRequest::new("PUT", "backup", &self.region, &request_uri);
5109        request.set_content_type("application/x-amz-json-1.1".to_owned());
5110
5111        let encoded = Some(serde_json::to_vec(&input).unwrap());
5112        request.set_payload(encoded);
5113
5114        let mut response = self
5115            .client
5116            .sign_and_dispatch(request)
5117            .await
5118            .map_err(RusotoError::from)?;
5119        if response.status.is_success() {
5120            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5121            let result = proto::json::ResponsePayload::new(&response)
5122                .deserialize::<CreateBackupSelectionOutput, _>()?;
5123
5124            Ok(result)
5125        } else {
5126            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5127            Err(CreateBackupSelectionError::from_response(response))
5128        }
5129    }
5130
5131    /// <p><p>Creates a logical container where backups are stored. A <code>CreateBackupVault</code> request includes a name, optionally one or more resource tags, an encryption key, and a request ID.</p> <note> <p>Sensitive data, such as passport numbers, should not be included the name of a backup vault.</p> </note></p>
5132    #[allow(unused_mut)]
5133    async fn create_backup_vault(
5134        &self,
5135        input: CreateBackupVaultInput,
5136    ) -> Result<CreateBackupVaultOutput, RusotoError<CreateBackupVaultError>> {
5137        let request_uri = format!(
5138            "/backup-vaults/{backup_vault_name}",
5139            backup_vault_name = input.backup_vault_name
5140        );
5141
5142        let mut request = SignedRequest::new("PUT", "backup", &self.region, &request_uri);
5143        request.set_content_type("application/x-amz-json-1.1".to_owned());
5144
5145        let encoded = Some(serde_json::to_vec(&input).unwrap());
5146        request.set_payload(encoded);
5147
5148        let mut response = self
5149            .client
5150            .sign_and_dispatch(request)
5151            .await
5152            .map_err(RusotoError::from)?;
5153        if response.status.is_success() {
5154            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5155            let result = proto::json::ResponsePayload::new(&response)
5156                .deserialize::<CreateBackupVaultOutput, _>()?;
5157
5158            Ok(result)
5159        } else {
5160            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5161            Err(CreateBackupVaultError::from_response(response))
5162        }
5163    }
5164
5165    /// <p>Deletes a backup plan. A backup plan can only be deleted after all associated selections of resources have been deleted. Deleting a backup plan deletes the current version of a backup plan. Previous versions, if any, will still exist.</p>
5166    #[allow(unused_mut)]
5167    async fn delete_backup_plan(
5168        &self,
5169        input: DeleteBackupPlanInput,
5170    ) -> Result<DeleteBackupPlanOutput, RusotoError<DeleteBackupPlanError>> {
5171        let request_uri = format!(
5172            "/backup/plans/{backup_plan_id}",
5173            backup_plan_id = input.backup_plan_id
5174        );
5175
5176        let mut request = SignedRequest::new("DELETE", "backup", &self.region, &request_uri);
5177        request.set_content_type("application/x-amz-json-1.1".to_owned());
5178
5179        let mut response = self
5180            .client
5181            .sign_and_dispatch(request)
5182            .await
5183            .map_err(RusotoError::from)?;
5184        if response.status.is_success() {
5185            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5186            let result = proto::json::ResponsePayload::new(&response)
5187                .deserialize::<DeleteBackupPlanOutput, _>()?;
5188
5189            Ok(result)
5190        } else {
5191            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5192            Err(DeleteBackupPlanError::from_response(response))
5193        }
5194    }
5195
5196    /// <p>Deletes the resource selection associated with a backup plan that is specified by the <code>SelectionId</code>.</p>
5197    #[allow(unused_mut)]
5198    async fn delete_backup_selection(
5199        &self,
5200        input: DeleteBackupSelectionInput,
5201    ) -> Result<(), RusotoError<DeleteBackupSelectionError>> {
5202        let request_uri = format!(
5203            "/backup/plans/{backup_plan_id}/selections/{selection_id}",
5204            backup_plan_id = input.backup_plan_id,
5205            selection_id = input.selection_id
5206        );
5207
5208        let mut request = SignedRequest::new("DELETE", "backup", &self.region, &request_uri);
5209        request.set_content_type("application/x-amz-json-1.1".to_owned());
5210
5211        let mut response = self
5212            .client
5213            .sign_and_dispatch(request)
5214            .await
5215            .map_err(RusotoError::from)?;
5216        if response.status.is_success() {
5217            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5218            let result = ::std::mem::drop(response);
5219
5220            Ok(result)
5221        } else {
5222            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5223            Err(DeleteBackupSelectionError::from_response(response))
5224        }
5225    }
5226
5227    /// <p>Deletes the backup vault identified by its name. A vault can be deleted only if it is empty.</p>
5228    #[allow(unused_mut)]
5229    async fn delete_backup_vault(
5230        &self,
5231        input: DeleteBackupVaultInput,
5232    ) -> Result<(), RusotoError<DeleteBackupVaultError>> {
5233        let request_uri = format!(
5234            "/backup-vaults/{backup_vault_name}",
5235            backup_vault_name = input.backup_vault_name
5236        );
5237
5238        let mut request = SignedRequest::new("DELETE", "backup", &self.region, &request_uri);
5239        request.set_content_type("application/x-amz-json-1.1".to_owned());
5240
5241        let mut response = self
5242            .client
5243            .sign_and_dispatch(request)
5244            .await
5245            .map_err(RusotoError::from)?;
5246        if response.status.is_success() {
5247            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5248            let result = ::std::mem::drop(response);
5249
5250            Ok(result)
5251        } else {
5252            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5253            Err(DeleteBackupVaultError::from_response(response))
5254        }
5255    }
5256
5257    /// <p>Deletes the policy document that manages permissions on a backup vault.</p>
5258    #[allow(unused_mut)]
5259    async fn delete_backup_vault_access_policy(
5260        &self,
5261        input: DeleteBackupVaultAccessPolicyInput,
5262    ) -> Result<(), RusotoError<DeleteBackupVaultAccessPolicyError>> {
5263        let request_uri = format!(
5264            "/backup-vaults/{backup_vault_name}/access-policy",
5265            backup_vault_name = input.backup_vault_name
5266        );
5267
5268        let mut request = SignedRequest::new("DELETE", "backup", &self.region, &request_uri);
5269        request.set_content_type("application/x-amz-json-1.1".to_owned());
5270
5271        let mut response = self
5272            .client
5273            .sign_and_dispatch(request)
5274            .await
5275            .map_err(RusotoError::from)?;
5276        if response.status.is_success() {
5277            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5278            let result = ::std::mem::drop(response);
5279
5280            Ok(result)
5281        } else {
5282            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5283            Err(DeleteBackupVaultAccessPolicyError::from_response(response))
5284        }
5285    }
5286
5287    /// <p>Deletes event notifications for the specified backup vault.</p>
5288    #[allow(unused_mut)]
5289    async fn delete_backup_vault_notifications(
5290        &self,
5291        input: DeleteBackupVaultNotificationsInput,
5292    ) -> Result<(), RusotoError<DeleteBackupVaultNotificationsError>> {
5293        let request_uri = format!(
5294            "/backup-vaults/{backup_vault_name}/notification-configuration",
5295            backup_vault_name = input.backup_vault_name
5296        );
5297
5298        let mut request = SignedRequest::new("DELETE", "backup", &self.region, &request_uri);
5299        request.set_content_type("application/x-amz-json-1.1".to_owned());
5300
5301        let mut response = self
5302            .client
5303            .sign_and_dispatch(request)
5304            .await
5305            .map_err(RusotoError::from)?;
5306        if response.status.is_success() {
5307            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5308            let result = ::std::mem::drop(response);
5309
5310            Ok(result)
5311        } else {
5312            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5313            Err(DeleteBackupVaultNotificationsError::from_response(response))
5314        }
5315    }
5316
5317    /// <p>Deletes the recovery point specified by a recovery point ID.</p>
5318    #[allow(unused_mut)]
5319    async fn delete_recovery_point(
5320        &self,
5321        input: DeleteRecoveryPointInput,
5322    ) -> Result<(), RusotoError<DeleteRecoveryPointError>> {
5323        let request_uri = format!(
5324            "/backup-vaults/{backup_vault_name}/recovery-points/{recovery_point_arn}",
5325            backup_vault_name = input.backup_vault_name,
5326            recovery_point_arn = input.recovery_point_arn
5327        );
5328
5329        let mut request = SignedRequest::new("DELETE", "backup", &self.region, &request_uri);
5330        request.set_content_type("application/x-amz-json-1.1".to_owned());
5331
5332        let mut response = self
5333            .client
5334            .sign_and_dispatch(request)
5335            .await
5336            .map_err(RusotoError::from)?;
5337        if response.status.is_success() {
5338            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5339            let result = ::std::mem::drop(response);
5340
5341            Ok(result)
5342        } else {
5343            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5344            Err(DeleteRecoveryPointError::from_response(response))
5345        }
5346    }
5347
5348    /// <p>Returns metadata associated with creating a backup of a resource.</p>
5349    #[allow(unused_mut)]
5350    async fn describe_backup_job(
5351        &self,
5352        input: DescribeBackupJobInput,
5353    ) -> Result<DescribeBackupJobOutput, RusotoError<DescribeBackupJobError>> {
5354        let request_uri = format!(
5355            "/backup-jobs/{backup_job_id}",
5356            backup_job_id = input.backup_job_id
5357        );
5358
5359        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
5360        request.set_content_type("application/x-amz-json-1.1".to_owned());
5361
5362        let mut response = self
5363            .client
5364            .sign_and_dispatch(request)
5365            .await
5366            .map_err(RusotoError::from)?;
5367        if response.status.is_success() {
5368            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5369            let result = proto::json::ResponsePayload::new(&response)
5370                .deserialize::<DescribeBackupJobOutput, _>()?;
5371
5372            Ok(result)
5373        } else {
5374            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5375            Err(DescribeBackupJobError::from_response(response))
5376        }
5377    }
5378
5379    /// <p>Returns metadata about a backup vault specified by its name.</p>
5380    #[allow(unused_mut)]
5381    async fn describe_backup_vault(
5382        &self,
5383        input: DescribeBackupVaultInput,
5384    ) -> Result<DescribeBackupVaultOutput, RusotoError<DescribeBackupVaultError>> {
5385        let request_uri = format!(
5386            "/backup-vaults/{backup_vault_name}",
5387            backup_vault_name = input.backup_vault_name
5388        );
5389
5390        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
5391        request.set_content_type("application/x-amz-json-1.1".to_owned());
5392
5393        let mut response = self
5394            .client
5395            .sign_and_dispatch(request)
5396            .await
5397            .map_err(RusotoError::from)?;
5398        if response.status.is_success() {
5399            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5400            let result = proto::json::ResponsePayload::new(&response)
5401                .deserialize::<DescribeBackupVaultOutput, _>()?;
5402
5403            Ok(result)
5404        } else {
5405            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5406            Err(DescribeBackupVaultError::from_response(response))
5407        }
5408    }
5409
5410    /// <p>Returns metadata associated with creating a copy of a resource.</p>
5411    #[allow(unused_mut)]
5412    async fn describe_copy_job(
5413        &self,
5414        input: DescribeCopyJobInput,
5415    ) -> Result<DescribeCopyJobOutput, RusotoError<DescribeCopyJobError>> {
5416        let request_uri = format!("/copy-jobs/{copy_job_id}", copy_job_id = input.copy_job_id);
5417
5418        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
5419        request.set_content_type("application/x-amz-json-1.1".to_owned());
5420
5421        let mut response = self
5422            .client
5423            .sign_and_dispatch(request)
5424            .await
5425            .map_err(RusotoError::from)?;
5426        if response.status.is_success() {
5427            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5428            let result = proto::json::ResponsePayload::new(&response)
5429                .deserialize::<DescribeCopyJobOutput, _>()?;
5430
5431            Ok(result)
5432        } else {
5433            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5434            Err(DescribeCopyJobError::from_response(response))
5435        }
5436    }
5437
5438    /// <p>Returns information about a saved resource, including the last time it was backed up, its Amazon Resource Name (ARN), and the AWS service type of the saved resource.</p>
5439    #[allow(unused_mut)]
5440    async fn describe_protected_resource(
5441        &self,
5442        input: DescribeProtectedResourceInput,
5443    ) -> Result<DescribeProtectedResourceOutput, RusotoError<DescribeProtectedResourceError>> {
5444        let request_uri = format!(
5445            "/resources/{resource_arn}",
5446            resource_arn = input.resource_arn
5447        );
5448
5449        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
5450        request.set_content_type("application/x-amz-json-1.1".to_owned());
5451
5452        let mut response = self
5453            .client
5454            .sign_and_dispatch(request)
5455            .await
5456            .map_err(RusotoError::from)?;
5457        if response.status.is_success() {
5458            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5459            let result = proto::json::ResponsePayload::new(&response)
5460                .deserialize::<DescribeProtectedResourceOutput, _>()?;
5461
5462            Ok(result)
5463        } else {
5464            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5465            Err(DescribeProtectedResourceError::from_response(response))
5466        }
5467    }
5468
5469    /// <p>Returns metadata associated with a recovery point, including ID, status, encryption, and lifecycle.</p>
5470    #[allow(unused_mut)]
5471    async fn describe_recovery_point(
5472        &self,
5473        input: DescribeRecoveryPointInput,
5474    ) -> Result<DescribeRecoveryPointOutput, RusotoError<DescribeRecoveryPointError>> {
5475        let request_uri = format!(
5476            "/backup-vaults/{backup_vault_name}/recovery-points/{recovery_point_arn}",
5477            backup_vault_name = input.backup_vault_name,
5478            recovery_point_arn = input.recovery_point_arn
5479        );
5480
5481        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
5482        request.set_content_type("application/x-amz-json-1.1".to_owned());
5483
5484        let mut response = self
5485            .client
5486            .sign_and_dispatch(request)
5487            .await
5488            .map_err(RusotoError::from)?;
5489        if response.status.is_success() {
5490            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5491            let result = proto::json::ResponsePayload::new(&response)
5492                .deserialize::<DescribeRecoveryPointOutput, _>()?;
5493
5494            Ok(result)
5495        } else {
5496            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5497            Err(DescribeRecoveryPointError::from_response(response))
5498        }
5499    }
5500
5501    /// <p>Returns the current service opt-in settings for the Region. If the service has a value set to <code>true</code>, AWS Backup attempts to protect that service's resources in this Region, when included in an on-demand backup or scheduled backup plan. If the value is set to <code>false</code> for a service, AWS Backup does not attempt to protect that service's resources in this Region.</p>
5502    #[allow(unused_mut)]
5503    async fn describe_region_settings(
5504        &self,
5505    ) -> Result<DescribeRegionSettingsOutput, RusotoError<DescribeRegionSettingsError>> {
5506        let request_uri = "/account-settings";
5507
5508        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
5509        request.set_content_type("application/x-amz-json-1.1".to_owned());
5510
5511        let mut response = self
5512            .client
5513            .sign_and_dispatch(request)
5514            .await
5515            .map_err(RusotoError::from)?;
5516        if response.status.is_success() {
5517            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5518            let result = proto::json::ResponsePayload::new(&response)
5519                .deserialize::<DescribeRegionSettingsOutput, _>()?;
5520
5521            Ok(result)
5522        } else {
5523            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5524            Err(DescribeRegionSettingsError::from_response(response))
5525        }
5526    }
5527
5528    /// <p>Returns metadata associated with a restore job that is specified by a job ID.</p>
5529    #[allow(unused_mut)]
5530    async fn describe_restore_job(
5531        &self,
5532        input: DescribeRestoreJobInput,
5533    ) -> Result<DescribeRestoreJobOutput, RusotoError<DescribeRestoreJobError>> {
5534        let request_uri = format!(
5535            "/restore-jobs/{restore_job_id}",
5536            restore_job_id = input.restore_job_id
5537        );
5538
5539        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
5540        request.set_content_type("application/x-amz-json-1.1".to_owned());
5541
5542        let mut response = self
5543            .client
5544            .sign_and_dispatch(request)
5545            .await
5546            .map_err(RusotoError::from)?;
5547        if response.status.is_success() {
5548            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5549            let result = proto::json::ResponsePayload::new(&response)
5550                .deserialize::<DescribeRestoreJobOutput, _>()?;
5551
5552            Ok(result)
5553        } else {
5554            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5555            Err(DescribeRestoreJobError::from_response(response))
5556        }
5557    }
5558
5559    /// <p>Returns the backup plan that is specified by the plan ID as a backup template.</p>
5560    #[allow(unused_mut)]
5561    async fn export_backup_plan_template(
5562        &self,
5563        input: ExportBackupPlanTemplateInput,
5564    ) -> Result<ExportBackupPlanTemplateOutput, RusotoError<ExportBackupPlanTemplateError>> {
5565        let request_uri = format!(
5566            "/backup/plans/{backup_plan_id}/toTemplate/",
5567            backup_plan_id = input.backup_plan_id
5568        );
5569
5570        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
5571        request.set_content_type("application/x-amz-json-1.1".to_owned());
5572
5573        let mut response = self
5574            .client
5575            .sign_and_dispatch(request)
5576            .await
5577            .map_err(RusotoError::from)?;
5578        if response.status.is_success() {
5579            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5580            let result = proto::json::ResponsePayload::new(&response)
5581                .deserialize::<ExportBackupPlanTemplateOutput, _>()?;
5582
5583            Ok(result)
5584        } else {
5585            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5586            Err(ExportBackupPlanTemplateError::from_response(response))
5587        }
5588    }
5589
5590    /// <p>Returns the body of a backup plan in JSON format, in addition to plan metadata.</p>
5591    #[allow(unused_mut)]
5592    async fn get_backup_plan(
5593        &self,
5594        input: GetBackupPlanInput,
5595    ) -> Result<GetBackupPlanOutput, RusotoError<GetBackupPlanError>> {
5596        let request_uri = format!(
5597            "/backup/plans/{backup_plan_id}/",
5598            backup_plan_id = input.backup_plan_id
5599        );
5600
5601        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
5602        request.set_content_type("application/x-amz-json-1.1".to_owned());
5603
5604        let mut params = Params::new();
5605        if let Some(ref x) = input.version_id {
5606            params.put("versionId", x);
5607        }
5608        request.set_params(params);
5609
5610        let mut response = self
5611            .client
5612            .sign_and_dispatch(request)
5613            .await
5614            .map_err(RusotoError::from)?;
5615        if response.status.is_success() {
5616            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5617            let result = proto::json::ResponsePayload::new(&response)
5618                .deserialize::<GetBackupPlanOutput, _>()?;
5619
5620            Ok(result)
5621        } else {
5622            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5623            Err(GetBackupPlanError::from_response(response))
5624        }
5625    }
5626
5627    /// <p>Returns a valid JSON document specifying a backup plan or an error.</p>
5628    #[allow(unused_mut)]
5629    async fn get_backup_plan_from_json(
5630        &self,
5631        input: GetBackupPlanFromJSONInput,
5632    ) -> Result<GetBackupPlanFromJSONOutput, RusotoError<GetBackupPlanFromJSONError>> {
5633        let request_uri = "/backup/template/json/toPlan";
5634
5635        let mut request = SignedRequest::new("POST", "backup", &self.region, &request_uri);
5636        request.set_content_type("application/x-amz-json-1.1".to_owned());
5637
5638        let encoded = Some(serde_json::to_vec(&input).unwrap());
5639        request.set_payload(encoded);
5640
5641        let mut response = self
5642            .client
5643            .sign_and_dispatch(request)
5644            .await
5645            .map_err(RusotoError::from)?;
5646        if response.status.is_success() {
5647            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5648            let result = proto::json::ResponsePayload::new(&response)
5649                .deserialize::<GetBackupPlanFromJSONOutput, _>()?;
5650
5651            Ok(result)
5652        } else {
5653            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5654            Err(GetBackupPlanFromJSONError::from_response(response))
5655        }
5656    }
5657
5658    /// <p>Returns the template specified by its <code>templateId</code> as a backup plan.</p>
5659    #[allow(unused_mut)]
5660    async fn get_backup_plan_from_template(
5661        &self,
5662        input: GetBackupPlanFromTemplateInput,
5663    ) -> Result<GetBackupPlanFromTemplateOutput, RusotoError<GetBackupPlanFromTemplateError>> {
5664        let request_uri = format!(
5665            "/backup/template/plans/{template_id}/toPlan",
5666            template_id = input.backup_plan_template_id
5667        );
5668
5669        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
5670        request.set_content_type("application/x-amz-json-1.1".to_owned());
5671
5672        let mut response = self
5673            .client
5674            .sign_and_dispatch(request)
5675            .await
5676            .map_err(RusotoError::from)?;
5677        if response.status.is_success() {
5678            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5679            let result = proto::json::ResponsePayload::new(&response)
5680                .deserialize::<GetBackupPlanFromTemplateOutput, _>()?;
5681
5682            Ok(result)
5683        } else {
5684            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5685            Err(GetBackupPlanFromTemplateError::from_response(response))
5686        }
5687    }
5688
5689    /// <p>Returns selection metadata and a document in JSON format that specifies a list of resources that are associated with a backup plan.</p>
5690    #[allow(unused_mut)]
5691    async fn get_backup_selection(
5692        &self,
5693        input: GetBackupSelectionInput,
5694    ) -> Result<GetBackupSelectionOutput, RusotoError<GetBackupSelectionError>> {
5695        let request_uri = format!(
5696            "/backup/plans/{backup_plan_id}/selections/{selection_id}",
5697            backup_plan_id = input.backup_plan_id,
5698            selection_id = input.selection_id
5699        );
5700
5701        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
5702        request.set_content_type("application/x-amz-json-1.1".to_owned());
5703
5704        let mut response = self
5705            .client
5706            .sign_and_dispatch(request)
5707            .await
5708            .map_err(RusotoError::from)?;
5709        if response.status.is_success() {
5710            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5711            let result = proto::json::ResponsePayload::new(&response)
5712                .deserialize::<GetBackupSelectionOutput, _>()?;
5713
5714            Ok(result)
5715        } else {
5716            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5717            Err(GetBackupSelectionError::from_response(response))
5718        }
5719    }
5720
5721    /// <p>Returns the access policy document that is associated with the named backup vault.</p>
5722    #[allow(unused_mut)]
5723    async fn get_backup_vault_access_policy(
5724        &self,
5725        input: GetBackupVaultAccessPolicyInput,
5726    ) -> Result<GetBackupVaultAccessPolicyOutput, RusotoError<GetBackupVaultAccessPolicyError>>
5727    {
5728        let request_uri = format!(
5729            "/backup-vaults/{backup_vault_name}/access-policy",
5730            backup_vault_name = input.backup_vault_name
5731        );
5732
5733        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
5734        request.set_content_type("application/x-amz-json-1.1".to_owned());
5735
5736        let mut response = self
5737            .client
5738            .sign_and_dispatch(request)
5739            .await
5740            .map_err(RusotoError::from)?;
5741        if response.status.is_success() {
5742            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5743            let result = proto::json::ResponsePayload::new(&response)
5744                .deserialize::<GetBackupVaultAccessPolicyOutput, _>()?;
5745
5746            Ok(result)
5747        } else {
5748            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5749            Err(GetBackupVaultAccessPolicyError::from_response(response))
5750        }
5751    }
5752
5753    /// <p>Returns event notifications for the specified backup vault.</p>
5754    #[allow(unused_mut)]
5755    async fn get_backup_vault_notifications(
5756        &self,
5757        input: GetBackupVaultNotificationsInput,
5758    ) -> Result<GetBackupVaultNotificationsOutput, RusotoError<GetBackupVaultNotificationsError>>
5759    {
5760        let request_uri = format!(
5761            "/backup-vaults/{backup_vault_name}/notification-configuration",
5762            backup_vault_name = input.backup_vault_name
5763        );
5764
5765        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
5766        request.set_content_type("application/x-amz-json-1.1".to_owned());
5767
5768        let mut response = self
5769            .client
5770            .sign_and_dispatch(request)
5771            .await
5772            .map_err(RusotoError::from)?;
5773        if response.status.is_success() {
5774            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5775            let result = proto::json::ResponsePayload::new(&response)
5776                .deserialize::<GetBackupVaultNotificationsOutput, _>()?;
5777
5778            Ok(result)
5779        } else {
5780            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5781            Err(GetBackupVaultNotificationsError::from_response(response))
5782        }
5783    }
5784
5785    /// <p>Returns a set of metadata key-value pairs that were used to create the backup.</p>
5786    #[allow(unused_mut)]
5787    async fn get_recovery_point_restore_metadata(
5788        &self,
5789        input: GetRecoveryPointRestoreMetadataInput,
5790    ) -> Result<
5791        GetRecoveryPointRestoreMetadataOutput,
5792        RusotoError<GetRecoveryPointRestoreMetadataError>,
5793    > {
5794        let request_uri = format!("/backup-vaults/{backup_vault_name}/recovery-points/{recovery_point_arn}/restore-metadata", backup_vault_name = input.backup_vault_name, recovery_point_arn = input.recovery_point_arn);
5795
5796        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
5797        request.set_content_type("application/x-amz-json-1.1".to_owned());
5798
5799        let mut response = self
5800            .client
5801            .sign_and_dispatch(request)
5802            .await
5803            .map_err(RusotoError::from)?;
5804        if response.status.is_success() {
5805            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5806            let result = proto::json::ResponsePayload::new(&response)
5807                .deserialize::<GetRecoveryPointRestoreMetadataOutput, _>()?;
5808
5809            Ok(result)
5810        } else {
5811            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5812            Err(GetRecoveryPointRestoreMetadataError::from_response(
5813                response,
5814            ))
5815        }
5816    }
5817
5818    /// <p>Returns the AWS resource types supported by AWS Backup.</p>
5819    #[allow(unused_mut)]
5820    async fn get_supported_resource_types(
5821        &self,
5822    ) -> Result<GetSupportedResourceTypesOutput, RusotoError<GetSupportedResourceTypesError>> {
5823        let request_uri = "/supported-resource-types";
5824
5825        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
5826        request.set_content_type("application/x-amz-json-1.1".to_owned());
5827
5828        let mut response = self
5829            .client
5830            .sign_and_dispatch(request)
5831            .await
5832            .map_err(RusotoError::from)?;
5833        if response.status.is_success() {
5834            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5835            let result = proto::json::ResponsePayload::new(&response)
5836                .deserialize::<GetSupportedResourceTypesOutput, _>()?;
5837
5838            Ok(result)
5839        } else {
5840            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5841            Err(GetSupportedResourceTypesError::from_response(response))
5842        }
5843    }
5844
5845    /// <p>Returns metadata about your backup jobs.</p>
5846    #[allow(unused_mut)]
5847    async fn list_backup_jobs(
5848        &self,
5849        input: ListBackupJobsInput,
5850    ) -> Result<ListBackupJobsOutput, RusotoError<ListBackupJobsError>> {
5851        let request_uri = "/backup-jobs/";
5852
5853        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
5854        request.set_content_type("application/x-amz-json-1.1".to_owned());
5855
5856        let mut params = Params::new();
5857        if let Some(ref x) = input.by_account_id {
5858            params.put("accountId", x);
5859        }
5860        if let Some(ref x) = input.by_backup_vault_name {
5861            params.put("backupVaultName", x);
5862        }
5863        if let Some(ref x) = input.by_created_after {
5864            params.put("createdAfter", x);
5865        }
5866        if let Some(ref x) = input.by_created_before {
5867            params.put("createdBefore", x);
5868        }
5869        if let Some(ref x) = input.by_resource_arn {
5870            params.put("resourceArn", x);
5871        }
5872        if let Some(ref x) = input.by_resource_type {
5873            params.put("resourceType", x);
5874        }
5875        if let Some(ref x) = input.by_state {
5876            params.put("state", x);
5877        }
5878        if let Some(ref x) = input.max_results {
5879            params.put("maxResults", x);
5880        }
5881        if let Some(ref x) = input.next_token {
5882            params.put("nextToken", x);
5883        }
5884        request.set_params(params);
5885
5886        let mut response = self
5887            .client
5888            .sign_and_dispatch(request)
5889            .await
5890            .map_err(RusotoError::from)?;
5891        if response.status.is_success() {
5892            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5893            let result = proto::json::ResponsePayload::new(&response)
5894                .deserialize::<ListBackupJobsOutput, _>()?;
5895
5896            Ok(result)
5897        } else {
5898            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5899            Err(ListBackupJobsError::from_response(response))
5900        }
5901    }
5902
5903    /// <p>Returns metadata of your saved backup plan templates, including the template ID, name, and the creation and deletion dates.</p>
5904    #[allow(unused_mut)]
5905    async fn list_backup_plan_templates(
5906        &self,
5907        input: ListBackupPlanTemplatesInput,
5908    ) -> Result<ListBackupPlanTemplatesOutput, RusotoError<ListBackupPlanTemplatesError>> {
5909        let request_uri = "/backup/template/plans";
5910
5911        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
5912        request.set_content_type("application/x-amz-json-1.1".to_owned());
5913
5914        let mut params = Params::new();
5915        if let Some(ref x) = input.max_results {
5916            params.put("maxResults", x);
5917        }
5918        if let Some(ref x) = input.next_token {
5919            params.put("nextToken", x);
5920        }
5921        request.set_params(params);
5922
5923        let mut response = self
5924            .client
5925            .sign_and_dispatch(request)
5926            .await
5927            .map_err(RusotoError::from)?;
5928        if response.status.is_success() {
5929            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5930            let result = proto::json::ResponsePayload::new(&response)
5931                .deserialize::<ListBackupPlanTemplatesOutput, _>()?;
5932
5933            Ok(result)
5934        } else {
5935            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5936            Err(ListBackupPlanTemplatesError::from_response(response))
5937        }
5938    }
5939
5940    /// <p>Returns version metadata of your backup plans, including Amazon Resource Names (ARNs), backup plan IDs, creation and deletion dates, plan names, and version IDs.</p>
5941    #[allow(unused_mut)]
5942    async fn list_backup_plan_versions(
5943        &self,
5944        input: ListBackupPlanVersionsInput,
5945    ) -> Result<ListBackupPlanVersionsOutput, RusotoError<ListBackupPlanVersionsError>> {
5946        let request_uri = format!(
5947            "/backup/plans/{backup_plan_id}/versions/",
5948            backup_plan_id = input.backup_plan_id
5949        );
5950
5951        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
5952        request.set_content_type("application/x-amz-json-1.1".to_owned());
5953
5954        let mut params = Params::new();
5955        if let Some(ref x) = input.max_results {
5956            params.put("maxResults", x);
5957        }
5958        if let Some(ref x) = input.next_token {
5959            params.put("nextToken", x);
5960        }
5961        request.set_params(params);
5962
5963        let mut response = self
5964            .client
5965            .sign_and_dispatch(request)
5966            .await
5967            .map_err(RusotoError::from)?;
5968        if response.status.is_success() {
5969            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5970            let result = proto::json::ResponsePayload::new(&response)
5971                .deserialize::<ListBackupPlanVersionsOutput, _>()?;
5972
5973            Ok(result)
5974        } else {
5975            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5976            Err(ListBackupPlanVersionsError::from_response(response))
5977        }
5978    }
5979
5980    /// <p>Returns metadata of your saved backup plans, including Amazon Resource Names (ARNs), plan IDs, creation and deletion dates, version IDs, plan names, and creator request IDs.</p>
5981    #[allow(unused_mut)]
5982    async fn list_backup_plans(
5983        &self,
5984        input: ListBackupPlansInput,
5985    ) -> Result<ListBackupPlansOutput, RusotoError<ListBackupPlansError>> {
5986        let request_uri = "/backup/plans/";
5987
5988        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
5989        request.set_content_type("application/x-amz-json-1.1".to_owned());
5990
5991        let mut params = Params::new();
5992        if let Some(ref x) = input.include_deleted {
5993            params.put("includeDeleted", x);
5994        }
5995        if let Some(ref x) = input.max_results {
5996            params.put("maxResults", x);
5997        }
5998        if let Some(ref x) = input.next_token {
5999            params.put("nextToken", x);
6000        }
6001        request.set_params(params);
6002
6003        let mut response = self
6004            .client
6005            .sign_and_dispatch(request)
6006            .await
6007            .map_err(RusotoError::from)?;
6008        if response.status.is_success() {
6009            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6010            let result = proto::json::ResponsePayload::new(&response)
6011                .deserialize::<ListBackupPlansOutput, _>()?;
6012
6013            Ok(result)
6014        } else {
6015            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6016            Err(ListBackupPlansError::from_response(response))
6017        }
6018    }
6019
6020    /// <p>Returns an array containing metadata of the resources associated with the target backup plan.</p>
6021    #[allow(unused_mut)]
6022    async fn list_backup_selections(
6023        &self,
6024        input: ListBackupSelectionsInput,
6025    ) -> Result<ListBackupSelectionsOutput, RusotoError<ListBackupSelectionsError>> {
6026        let request_uri = format!(
6027            "/backup/plans/{backup_plan_id}/selections/",
6028            backup_plan_id = input.backup_plan_id
6029        );
6030
6031        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
6032        request.set_content_type("application/x-amz-json-1.1".to_owned());
6033
6034        let mut params = Params::new();
6035        if let Some(ref x) = input.max_results {
6036            params.put("maxResults", x);
6037        }
6038        if let Some(ref x) = input.next_token {
6039            params.put("nextToken", x);
6040        }
6041        request.set_params(params);
6042
6043        let mut response = self
6044            .client
6045            .sign_and_dispatch(request)
6046            .await
6047            .map_err(RusotoError::from)?;
6048        if response.status.is_success() {
6049            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6050            let result = proto::json::ResponsePayload::new(&response)
6051                .deserialize::<ListBackupSelectionsOutput, _>()?;
6052
6053            Ok(result)
6054        } else {
6055            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6056            Err(ListBackupSelectionsError::from_response(response))
6057        }
6058    }
6059
6060    /// <p>Returns a list of recovery point storage containers along with information about them.</p>
6061    #[allow(unused_mut)]
6062    async fn list_backup_vaults(
6063        &self,
6064        input: ListBackupVaultsInput,
6065    ) -> Result<ListBackupVaultsOutput, RusotoError<ListBackupVaultsError>> {
6066        let request_uri = "/backup-vaults/";
6067
6068        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
6069        request.set_content_type("application/x-amz-json-1.1".to_owned());
6070
6071        let mut params = Params::new();
6072        if let Some(ref x) = input.max_results {
6073            params.put("maxResults", x);
6074        }
6075        if let Some(ref x) = input.next_token {
6076            params.put("nextToken", x);
6077        }
6078        request.set_params(params);
6079
6080        let mut response = self
6081            .client
6082            .sign_and_dispatch(request)
6083            .await
6084            .map_err(RusotoError::from)?;
6085        if response.status.is_success() {
6086            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6087            let result = proto::json::ResponsePayload::new(&response)
6088                .deserialize::<ListBackupVaultsOutput, _>()?;
6089
6090            Ok(result)
6091        } else {
6092            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6093            Err(ListBackupVaultsError::from_response(response))
6094        }
6095    }
6096
6097    /// <p>Returns metadata about your copy jobs.</p>
6098    #[allow(unused_mut)]
6099    async fn list_copy_jobs(
6100        &self,
6101        input: ListCopyJobsInput,
6102    ) -> Result<ListCopyJobsOutput, RusotoError<ListCopyJobsError>> {
6103        let request_uri = "/copy-jobs/";
6104
6105        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
6106        request.set_content_type("application/x-amz-json-1.1".to_owned());
6107
6108        let mut params = Params::new();
6109        if let Some(ref x) = input.by_account_id {
6110            params.put("accountId", x);
6111        }
6112        if let Some(ref x) = input.by_created_after {
6113            params.put("createdAfter", x);
6114        }
6115        if let Some(ref x) = input.by_created_before {
6116            params.put("createdBefore", x);
6117        }
6118        if let Some(ref x) = input.by_destination_vault_arn {
6119            params.put("destinationVaultArn", x);
6120        }
6121        if let Some(ref x) = input.by_resource_arn {
6122            params.put("resourceArn", x);
6123        }
6124        if let Some(ref x) = input.by_resource_type {
6125            params.put("resourceType", x);
6126        }
6127        if let Some(ref x) = input.by_state {
6128            params.put("state", x);
6129        }
6130        if let Some(ref x) = input.max_results {
6131            params.put("maxResults", x);
6132        }
6133        if let Some(ref x) = input.next_token {
6134            params.put("nextToken", x);
6135        }
6136        request.set_params(params);
6137
6138        let mut response = self
6139            .client
6140            .sign_and_dispatch(request)
6141            .await
6142            .map_err(RusotoError::from)?;
6143        if response.status.is_success() {
6144            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6145            let result = proto::json::ResponsePayload::new(&response)
6146                .deserialize::<ListCopyJobsOutput, _>()?;
6147
6148            Ok(result)
6149        } else {
6150            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6151            Err(ListCopyJobsError::from_response(response))
6152        }
6153    }
6154
6155    /// <p>Returns an array of resources successfully backed up by AWS Backup, including the time the resource was saved, an Amazon Resource Name (ARN) of the resource, and a resource type.</p>
6156    #[allow(unused_mut)]
6157    async fn list_protected_resources(
6158        &self,
6159        input: ListProtectedResourcesInput,
6160    ) -> Result<ListProtectedResourcesOutput, RusotoError<ListProtectedResourcesError>> {
6161        let request_uri = "/resources/";
6162
6163        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
6164        request.set_content_type("application/x-amz-json-1.1".to_owned());
6165
6166        let mut params = Params::new();
6167        if let Some(ref x) = input.max_results {
6168            params.put("maxResults", x);
6169        }
6170        if let Some(ref x) = input.next_token {
6171            params.put("nextToken", x);
6172        }
6173        request.set_params(params);
6174
6175        let mut response = self
6176            .client
6177            .sign_and_dispatch(request)
6178            .await
6179            .map_err(RusotoError::from)?;
6180        if response.status.is_success() {
6181            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6182            let result = proto::json::ResponsePayload::new(&response)
6183                .deserialize::<ListProtectedResourcesOutput, _>()?;
6184
6185            Ok(result)
6186        } else {
6187            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6188            Err(ListProtectedResourcesError::from_response(response))
6189        }
6190    }
6191
6192    /// <p>Returns detailed information about the recovery points stored in a backup vault.</p>
6193    #[allow(unused_mut)]
6194    async fn list_recovery_points_by_backup_vault(
6195        &self,
6196        input: ListRecoveryPointsByBackupVaultInput,
6197    ) -> Result<
6198        ListRecoveryPointsByBackupVaultOutput,
6199        RusotoError<ListRecoveryPointsByBackupVaultError>,
6200    > {
6201        let request_uri = format!(
6202            "/backup-vaults/{backup_vault_name}/recovery-points/",
6203            backup_vault_name = input.backup_vault_name
6204        );
6205
6206        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
6207        request.set_content_type("application/x-amz-json-1.1".to_owned());
6208
6209        let mut params = Params::new();
6210        if let Some(ref x) = input.by_backup_plan_id {
6211            params.put("backupPlanId", x);
6212        }
6213        if let Some(ref x) = input.by_created_after {
6214            params.put("createdAfter", x);
6215        }
6216        if let Some(ref x) = input.by_created_before {
6217            params.put("createdBefore", x);
6218        }
6219        if let Some(ref x) = input.by_resource_arn {
6220            params.put("resourceArn", x);
6221        }
6222        if let Some(ref x) = input.by_resource_type {
6223            params.put("resourceType", x);
6224        }
6225        if let Some(ref x) = input.max_results {
6226            params.put("maxResults", x);
6227        }
6228        if let Some(ref x) = input.next_token {
6229            params.put("nextToken", x);
6230        }
6231        request.set_params(params);
6232
6233        let mut response = self
6234            .client
6235            .sign_and_dispatch(request)
6236            .await
6237            .map_err(RusotoError::from)?;
6238        if response.status.is_success() {
6239            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6240            let result = proto::json::ResponsePayload::new(&response)
6241                .deserialize::<ListRecoveryPointsByBackupVaultOutput, _>()?;
6242
6243            Ok(result)
6244        } else {
6245            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6246            Err(ListRecoveryPointsByBackupVaultError::from_response(
6247                response,
6248            ))
6249        }
6250    }
6251
6252    /// <p>Returns detailed information about recovery points of the type specified by a resource Amazon Resource Name (ARN).</p>
6253    #[allow(unused_mut)]
6254    async fn list_recovery_points_by_resource(
6255        &self,
6256        input: ListRecoveryPointsByResourceInput,
6257    ) -> Result<ListRecoveryPointsByResourceOutput, RusotoError<ListRecoveryPointsByResourceError>>
6258    {
6259        let request_uri = format!(
6260            "/resources/{resource_arn}/recovery-points/",
6261            resource_arn = input.resource_arn
6262        );
6263
6264        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
6265        request.set_content_type("application/x-amz-json-1.1".to_owned());
6266
6267        let mut params = Params::new();
6268        if let Some(ref x) = input.max_results {
6269            params.put("maxResults", x);
6270        }
6271        if let Some(ref x) = input.next_token {
6272            params.put("nextToken", x);
6273        }
6274        request.set_params(params);
6275
6276        let mut response = self
6277            .client
6278            .sign_and_dispatch(request)
6279            .await
6280            .map_err(RusotoError::from)?;
6281        if response.status.is_success() {
6282            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6283            let result = proto::json::ResponsePayload::new(&response)
6284                .deserialize::<ListRecoveryPointsByResourceOutput, _>()?;
6285
6286            Ok(result)
6287        } else {
6288            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6289            Err(ListRecoveryPointsByResourceError::from_response(response))
6290        }
6291    }
6292
6293    /// <p>Returns a list of jobs that AWS Backup initiated to restore a saved resource, including metadata about the recovery process.</p>
6294    #[allow(unused_mut)]
6295    async fn list_restore_jobs(
6296        &self,
6297        input: ListRestoreJobsInput,
6298    ) -> Result<ListRestoreJobsOutput, RusotoError<ListRestoreJobsError>> {
6299        let request_uri = "/restore-jobs/";
6300
6301        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
6302        request.set_content_type("application/x-amz-json-1.1".to_owned());
6303
6304        let mut params = Params::new();
6305        if let Some(ref x) = input.by_account_id {
6306            params.put("accountId", x);
6307        }
6308        if let Some(ref x) = input.by_created_after {
6309            params.put("createdAfter", x);
6310        }
6311        if let Some(ref x) = input.by_created_before {
6312            params.put("createdBefore", x);
6313        }
6314        if let Some(ref x) = input.by_status {
6315            params.put("status", x);
6316        }
6317        if let Some(ref x) = input.max_results {
6318            params.put("maxResults", x);
6319        }
6320        if let Some(ref x) = input.next_token {
6321            params.put("nextToken", x);
6322        }
6323        request.set_params(params);
6324
6325        let mut response = self
6326            .client
6327            .sign_and_dispatch(request)
6328            .await
6329            .map_err(RusotoError::from)?;
6330        if response.status.is_success() {
6331            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6332            let result = proto::json::ResponsePayload::new(&response)
6333                .deserialize::<ListRestoreJobsOutput, _>()?;
6334
6335            Ok(result)
6336        } else {
6337            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6338            Err(ListRestoreJobsError::from_response(response))
6339        }
6340    }
6341
6342    /// <p><p>Returns a list of key-value pairs assigned to a target recovery point, backup plan, or backup vault.</p> <note> <p> <code>ListTags</code> are currently only supported with Amazon EFS backups.</p> </note></p>
6343    #[allow(unused_mut)]
6344    async fn list_tags(
6345        &self,
6346        input: ListTagsInput,
6347    ) -> Result<ListTagsOutput, RusotoError<ListTagsError>> {
6348        let request_uri = format!("/tags/{resource_arn}/", resource_arn = input.resource_arn);
6349
6350        let mut request = SignedRequest::new("GET", "backup", &self.region, &request_uri);
6351        request.set_content_type("application/x-amz-json-1.1".to_owned());
6352
6353        let mut params = Params::new();
6354        if let Some(ref x) = input.max_results {
6355            params.put("maxResults", x);
6356        }
6357        if let Some(ref x) = input.next_token {
6358            params.put("nextToken", x);
6359        }
6360        request.set_params(params);
6361
6362        let mut response = self
6363            .client
6364            .sign_and_dispatch(request)
6365            .await
6366            .map_err(RusotoError::from)?;
6367        if response.status.is_success() {
6368            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6369            let result =
6370                proto::json::ResponsePayload::new(&response).deserialize::<ListTagsOutput, _>()?;
6371
6372            Ok(result)
6373        } else {
6374            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6375            Err(ListTagsError::from_response(response))
6376        }
6377    }
6378
6379    /// <p>Sets a resource-based policy that is used to manage access permissions on the target backup vault. Requires a backup vault name and an access policy document in JSON format.</p>
6380    #[allow(unused_mut)]
6381    async fn put_backup_vault_access_policy(
6382        &self,
6383        input: PutBackupVaultAccessPolicyInput,
6384    ) -> Result<(), RusotoError<PutBackupVaultAccessPolicyError>> {
6385        let request_uri = format!(
6386            "/backup-vaults/{backup_vault_name}/access-policy",
6387            backup_vault_name = input.backup_vault_name
6388        );
6389
6390        let mut request = SignedRequest::new("PUT", "backup", &self.region, &request_uri);
6391        request.set_content_type("application/x-amz-json-1.1".to_owned());
6392
6393        let encoded = Some(serde_json::to_vec(&input).unwrap());
6394        request.set_payload(encoded);
6395
6396        let mut response = self
6397            .client
6398            .sign_and_dispatch(request)
6399            .await
6400            .map_err(RusotoError::from)?;
6401        if response.status.is_success() {
6402            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6403            let result = ::std::mem::drop(response);
6404
6405            Ok(result)
6406        } else {
6407            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6408            Err(PutBackupVaultAccessPolicyError::from_response(response))
6409        }
6410    }
6411
6412    /// <p>Turns on notifications on a backup vault for the specified topic and events.</p>
6413    #[allow(unused_mut)]
6414    async fn put_backup_vault_notifications(
6415        &self,
6416        input: PutBackupVaultNotificationsInput,
6417    ) -> Result<(), RusotoError<PutBackupVaultNotificationsError>> {
6418        let request_uri = format!(
6419            "/backup-vaults/{backup_vault_name}/notification-configuration",
6420            backup_vault_name = input.backup_vault_name
6421        );
6422
6423        let mut request = SignedRequest::new("PUT", "backup", &self.region, &request_uri);
6424        request.set_content_type("application/x-amz-json-1.1".to_owned());
6425
6426        let encoded = Some(serde_json::to_vec(&input).unwrap());
6427        request.set_payload(encoded);
6428
6429        let mut response = self
6430            .client
6431            .sign_and_dispatch(request)
6432            .await
6433            .map_err(RusotoError::from)?;
6434        if response.status.is_success() {
6435            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6436            let result = ::std::mem::drop(response);
6437
6438            Ok(result)
6439        } else {
6440            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6441            Err(PutBackupVaultNotificationsError::from_response(response))
6442        }
6443    }
6444
6445    /// <p>Starts a job to create a one-time backup of the specified resource.</p>
6446    #[allow(unused_mut)]
6447    async fn start_backup_job(
6448        &self,
6449        input: StartBackupJobInput,
6450    ) -> Result<StartBackupJobOutput, RusotoError<StartBackupJobError>> {
6451        let request_uri = "/backup-jobs";
6452
6453        let mut request = SignedRequest::new("PUT", "backup", &self.region, &request_uri);
6454        request.set_content_type("application/x-amz-json-1.1".to_owned());
6455
6456        let encoded = Some(serde_json::to_vec(&input).unwrap());
6457        request.set_payload(encoded);
6458
6459        let mut response = self
6460            .client
6461            .sign_and_dispatch(request)
6462            .await
6463            .map_err(RusotoError::from)?;
6464        if response.status.is_success() {
6465            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6466            let result = proto::json::ResponsePayload::new(&response)
6467                .deserialize::<StartBackupJobOutput, _>()?;
6468
6469            Ok(result)
6470        } else {
6471            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6472            Err(StartBackupJobError::from_response(response))
6473        }
6474    }
6475
6476    /// <p>Starts a job to create a one-time copy of the specified resource.</p>
6477    #[allow(unused_mut)]
6478    async fn start_copy_job(
6479        &self,
6480        input: StartCopyJobInput,
6481    ) -> Result<StartCopyJobOutput, RusotoError<StartCopyJobError>> {
6482        let request_uri = "/copy-jobs";
6483
6484        let mut request = SignedRequest::new("PUT", "backup", &self.region, &request_uri);
6485        request.set_content_type("application/x-amz-json-1.1".to_owned());
6486
6487        let encoded = Some(serde_json::to_vec(&input).unwrap());
6488        request.set_payload(encoded);
6489
6490        let mut response = self
6491            .client
6492            .sign_and_dispatch(request)
6493            .await
6494            .map_err(RusotoError::from)?;
6495        if response.status.is_success() {
6496            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6497            let result = proto::json::ResponsePayload::new(&response)
6498                .deserialize::<StartCopyJobOutput, _>()?;
6499
6500            Ok(result)
6501        } else {
6502            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6503            Err(StartCopyJobError::from_response(response))
6504        }
6505    }
6506
6507    /// <p>Recovers the saved resource identified by an Amazon Resource Name (ARN). </p> <p>If the resource ARN is included in the request, then the last complete backup of that resource is recovered. If the ARN of a recovery point is supplied, then that recovery point is restored.</p>
6508    #[allow(unused_mut)]
6509    async fn start_restore_job(
6510        &self,
6511        input: StartRestoreJobInput,
6512    ) -> Result<StartRestoreJobOutput, RusotoError<StartRestoreJobError>> {
6513        let request_uri = "/restore-jobs";
6514
6515        let mut request = SignedRequest::new("PUT", "backup", &self.region, &request_uri);
6516        request.set_content_type("application/x-amz-json-1.1".to_owned());
6517
6518        let encoded = Some(serde_json::to_vec(&input).unwrap());
6519        request.set_payload(encoded);
6520
6521        let mut response = self
6522            .client
6523            .sign_and_dispatch(request)
6524            .await
6525            .map_err(RusotoError::from)?;
6526        if response.status.is_success() {
6527            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6528            let result = proto::json::ResponsePayload::new(&response)
6529                .deserialize::<StartRestoreJobOutput, _>()?;
6530
6531            Ok(result)
6532        } else {
6533            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6534            Err(StartRestoreJobError::from_response(response))
6535        }
6536    }
6537
6538    /// <p>Attempts to cancel a job to create a one-time backup of a resource.</p>
6539    #[allow(unused_mut)]
6540    async fn stop_backup_job(
6541        &self,
6542        input: StopBackupJobInput,
6543    ) -> Result<(), RusotoError<StopBackupJobError>> {
6544        let request_uri = format!(
6545            "/backup-jobs/{backup_job_id}",
6546            backup_job_id = input.backup_job_id
6547        );
6548
6549        let mut request = SignedRequest::new("POST", "backup", &self.region, &request_uri);
6550        request.set_content_type("application/x-amz-json-1.1".to_owned());
6551
6552        let mut response = self
6553            .client
6554            .sign_and_dispatch(request)
6555            .await
6556            .map_err(RusotoError::from)?;
6557        if response.status.is_success() {
6558            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6559            let result = ::std::mem::drop(response);
6560
6561            Ok(result)
6562        } else {
6563            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6564            Err(StopBackupJobError::from_response(response))
6565        }
6566    }
6567
6568    /// <p>Assigns a set of key-value pairs to a recovery point, backup plan, or backup vault identified by an Amazon Resource Name (ARN).</p>
6569    #[allow(unused_mut)]
6570    async fn tag_resource(
6571        &self,
6572        input: TagResourceInput,
6573    ) -> Result<(), RusotoError<TagResourceError>> {
6574        let request_uri = format!("/tags/{resource_arn}", resource_arn = input.resource_arn);
6575
6576        let mut request = SignedRequest::new("POST", "backup", &self.region, &request_uri);
6577        request.set_content_type("application/x-amz-json-1.1".to_owned());
6578
6579        let encoded = Some(serde_json::to_vec(&input).unwrap());
6580        request.set_payload(encoded);
6581
6582        let mut response = self
6583            .client
6584            .sign_and_dispatch(request)
6585            .await
6586            .map_err(RusotoError::from)?;
6587        if response.status.is_success() {
6588            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6589            let result = ::std::mem::drop(response);
6590
6591            Ok(result)
6592        } else {
6593            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6594            Err(TagResourceError::from_response(response))
6595        }
6596    }
6597
6598    /// <p>Removes a set of key-value pairs from a recovery point, backup plan, or backup vault identified by an Amazon Resource Name (ARN)</p>
6599    #[allow(unused_mut)]
6600    async fn untag_resource(
6601        &self,
6602        input: UntagResourceInput,
6603    ) -> Result<(), RusotoError<UntagResourceError>> {
6604        let request_uri = format!("/untag/{resource_arn}", resource_arn = input.resource_arn);
6605
6606        let mut request = SignedRequest::new("POST", "backup", &self.region, &request_uri);
6607        request.set_content_type("application/x-amz-json-1.1".to_owned());
6608
6609        let encoded = Some(serde_json::to_vec(&input).unwrap());
6610        request.set_payload(encoded);
6611
6612        let mut response = self
6613            .client
6614            .sign_and_dispatch(request)
6615            .await
6616            .map_err(RusotoError::from)?;
6617        if response.status.is_success() {
6618            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6619            let result = ::std::mem::drop(response);
6620
6621            Ok(result)
6622        } else {
6623            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6624            Err(UntagResourceError::from_response(response))
6625        }
6626    }
6627
6628    /// <p>Replaces the body of a saved backup plan identified by its <code>backupPlanId</code> with the input document in JSON format. The new version is uniquely identified by a <code>VersionId</code>.</p>
6629    #[allow(unused_mut)]
6630    async fn update_backup_plan(
6631        &self,
6632        input: UpdateBackupPlanInput,
6633    ) -> Result<UpdateBackupPlanOutput, RusotoError<UpdateBackupPlanError>> {
6634        let request_uri = format!(
6635            "/backup/plans/{backup_plan_id}",
6636            backup_plan_id = input.backup_plan_id
6637        );
6638
6639        let mut request = SignedRequest::new("POST", "backup", &self.region, &request_uri);
6640        request.set_content_type("application/x-amz-json-1.1".to_owned());
6641
6642        let encoded = Some(serde_json::to_vec(&input).unwrap());
6643        request.set_payload(encoded);
6644
6645        let mut response = self
6646            .client
6647            .sign_and_dispatch(request)
6648            .await
6649            .map_err(RusotoError::from)?;
6650        if response.status.is_success() {
6651            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6652            let result = proto::json::ResponsePayload::new(&response)
6653                .deserialize::<UpdateBackupPlanOutput, _>()?;
6654
6655            Ok(result)
6656        } else {
6657            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6658            Err(UpdateBackupPlanError::from_response(response))
6659        }
6660    }
6661
6662    /// <p>Sets the transition lifecycle of a recovery point.</p> <p>The lifecycle defines when a protected resource is transitioned to cold storage and when it expires. AWS Backup transitions and expires backups automatically according to the lifecycle that you define. </p> <p>Backups transitioned to cold storage must be stored in cold storage for a minimum of 90 days. Therefore, the “expire after days” setting must be 90 days greater than the “transition to cold after days” setting. The “transition to cold after days” setting cannot be changed after a backup has been transitioned to cold. </p>
6663    #[allow(unused_mut)]
6664    async fn update_recovery_point_lifecycle(
6665        &self,
6666        input: UpdateRecoveryPointLifecycleInput,
6667    ) -> Result<UpdateRecoveryPointLifecycleOutput, RusotoError<UpdateRecoveryPointLifecycleError>>
6668    {
6669        let request_uri = format!(
6670            "/backup-vaults/{backup_vault_name}/recovery-points/{recovery_point_arn}",
6671            backup_vault_name = input.backup_vault_name,
6672            recovery_point_arn = input.recovery_point_arn
6673        );
6674
6675        let mut request = SignedRequest::new("POST", "backup", &self.region, &request_uri);
6676        request.set_content_type("application/x-amz-json-1.1".to_owned());
6677
6678        let encoded = Some(serde_json::to_vec(&input).unwrap());
6679        request.set_payload(encoded);
6680
6681        let mut response = self
6682            .client
6683            .sign_and_dispatch(request)
6684            .await
6685            .map_err(RusotoError::from)?;
6686        if response.status.is_success() {
6687            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6688            let result = proto::json::ResponsePayload::new(&response)
6689                .deserialize::<UpdateRecoveryPointLifecycleOutput, _>()?;
6690
6691            Ok(result)
6692        } else {
6693            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6694            Err(UpdateRecoveryPointLifecycleError::from_response(response))
6695        }
6696    }
6697
6698    /// <p>Updates the current service opt-in settings for the Region. If the service has a value set to <code>true</code>, AWS Backup attempts to protect that service's resources in this Region, when included in an on-demand backup or scheduled backup plan. If the value is set to <code>false</code> for a service, AWS Backup does not attempt to protect that service's resources in this Region.</p>
6699    #[allow(unused_mut)]
6700    async fn update_region_settings(
6701        &self,
6702        input: UpdateRegionSettingsInput,
6703    ) -> Result<(), RusotoError<UpdateRegionSettingsError>> {
6704        let request_uri = "/account-settings";
6705
6706        let mut request = SignedRequest::new("PUT", "backup", &self.region, &request_uri);
6707        request.set_content_type("application/x-amz-json-1.1".to_owned());
6708
6709        let encoded = Some(serde_json::to_vec(&input).unwrap());
6710        request.set_payload(encoded);
6711
6712        let mut response = self
6713            .client
6714            .sign_and_dispatch(request)
6715            .await
6716            .map_err(RusotoError::from)?;
6717        if response.status.is_success() {
6718            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6719            let result = ::std::mem::drop(response);
6720
6721            Ok(result)
6722        } else {
6723            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6724            Err(UpdateRegionSettingsError::from_response(response))
6725        }
6726    }
6727}