rusoto_datasync/
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::proto;
23use rusoto_core::request::HttpResponse;
24use rusoto_core::signature::SignedRequest;
25#[allow(unused_imports)]
26use serde::{Deserialize, Serialize};
27
28impl DataSyncClient {
29    fn new_signed_request(&self, http_method: &str, request_uri: &str) -> SignedRequest {
30        let mut request = SignedRequest::new(http_method, "datasync", &self.region, request_uri);
31
32        request.set_content_type("application/x-amz-json-1.1".to_owned());
33
34        request
35    }
36
37    async fn sign_and_dispatch<E>(
38        &self,
39        request: SignedRequest,
40        from_response: fn(BufferedHttpResponse) -> RusotoError<E>,
41    ) -> Result<HttpResponse, RusotoError<E>> {
42        let mut response = self.client.sign_and_dispatch(request).await?;
43        if !response.status.is_success() {
44            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
45            return Err(from_response(response));
46        }
47
48        Ok(response)
49    }
50}
51
52use serde_json;
53/// <p>Represents a single entry in a list of agents. <code>AgentListEntry</code> returns an array that contains a list of agents when the <a>ListAgents</a> operation is called.</p>
54#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
55#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
56pub struct AgentListEntry {
57    /// <p>The Amazon Resource Name (ARN) of the agent.</p>
58    #[serde(rename = "AgentArn")]
59    #[serde(skip_serializing_if = "Option::is_none")]
60    pub agent_arn: Option<String>,
61    /// <p>The name of the agent.</p>
62    #[serde(rename = "Name")]
63    #[serde(skip_serializing_if = "Option::is_none")]
64    pub name: Option<String>,
65    /// <p>The status of the agent.</p>
66    #[serde(rename = "Status")]
67    #[serde(skip_serializing_if = "Option::is_none")]
68    pub status: Option<String>,
69}
70
71/// <p>CancelTaskExecutionRequest</p>
72#[derive(Clone, Debug, Default, PartialEq, Serialize)]
73#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
74pub struct CancelTaskExecutionRequest {
75    /// <p>The Amazon Resource Name (ARN) of the task execution to cancel.</p>
76    #[serde(rename = "TaskExecutionArn")]
77    pub task_execution_arn: String,
78}
79
80#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
81#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
82pub struct CancelTaskExecutionResponse {}
83
84/// <p>CreateAgentRequest</p>
85#[derive(Clone, Debug, Default, PartialEq, Serialize)]
86#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
87pub struct CreateAgentRequest {
88    /// <p>Your agent activation key. You can get the activation key either by sending an HTTP GET request with redirects that enable you to get the agent IP address (port 80). Alternatively, you can get it from the AWS DataSync console.</p> <p>The redirect URL returned in the response provides you the activation key for your agent in the query string parameter <code>activationKey</code>. It might also include other activation-related parameters; however, these are merely defaults. The arguments you pass to this API call determine the actual configuration of your agent.</p> <p>For more information, see Activating an Agent in the <i>AWS DataSync User Guide.</i> </p>
89    #[serde(rename = "ActivationKey")]
90    pub activation_key: String,
91    /// <p>The name you configured for your agent. This value is a text reference that is used to identify the agent in the console.</p>
92    #[serde(rename = "AgentName")]
93    #[serde(skip_serializing_if = "Option::is_none")]
94    pub agent_name: Option<String>,
95    /// <p>The ARNs of the security groups used to protect your data transfer task subnets. See <a>CreateAgentRequest$SubnetArns</a>.</p>
96    #[serde(rename = "SecurityGroupArns")]
97    #[serde(skip_serializing_if = "Option::is_none")]
98    pub security_group_arns: Option<Vec<String>>,
99    /// <p>The Amazon Resource Names (ARNs) of the subnets in which DataSync will create elastic network interfaces for each data transfer task. The agent that runs a task must be private. When you start a task that is associated with an agent created in a VPC, or one that has access to an IP address in a VPC, then the task is also private. In this case, DataSync creates four network interfaces for each task in your subnet. For a data transfer to work, the agent must be able to route to all these four network interfaces.</p>
100    #[serde(rename = "SubnetArns")]
101    #[serde(skip_serializing_if = "Option::is_none")]
102    pub subnet_arns: Option<Vec<String>>,
103    /// <p><p>The key-value pair that represents the tag that you want to associate with the agent. The value can be an empty string. This value helps you manage, filter, and search for your agents.</p> <note> <p>Valid characters for key and value are letters, spaces, and numbers representable in UTF-8 format, and the following special characters: + - = . _ : / @. </p> </note></p>
104    #[serde(rename = "Tags")]
105    #[serde(skip_serializing_if = "Option::is_none")]
106    pub tags: Option<Vec<TagListEntry>>,
107    /// <p>The ID of the VPC (Virtual Private Cloud) endpoint that the agent has access to. This is the client-side VPC endpoint, also called a PrivateLink. If you don't have a PrivateLink VPC endpoint, see <a href="https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-service.html#create-endpoint-service">Creating a VPC Endpoint Service Configuration</a> in the AWS VPC User Guide.</p> <p>VPC endpoint ID looks like this: <code>vpce-01234d5aff67890e1</code>.</p>
108    #[serde(rename = "VpcEndpointId")]
109    #[serde(skip_serializing_if = "Option::is_none")]
110    pub vpc_endpoint_id: Option<String>,
111}
112
113/// <p>CreateAgentResponse</p>
114#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
115#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
116pub struct CreateAgentResponse {
117    /// <p>The Amazon Resource Name (ARN) of the agent. Use the <code>ListAgents</code> operation to return a list of agents for your account and AWS Region.</p>
118    #[serde(rename = "AgentArn")]
119    #[serde(skip_serializing_if = "Option::is_none")]
120    pub agent_arn: Option<String>,
121}
122
123/// <p>CreateLocationEfsRequest</p>
124#[derive(Clone, Debug, Default, PartialEq, Serialize)]
125#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
126pub struct CreateLocationEfsRequest {
127    /// <p><p>The subnet and security group that the Amazon EFS file system uses. The security group that you provide needs to be able to communicate with the security group on the mount target in the subnet specified.</p> <p>The exact relationship between security group M (of the mount target) and security group S (which you provide for DataSync to use at this stage) is as follows: </p> <ul> <li> <p> Security group M (which you associate with the mount target) must allow inbound access for the Transmission Control Protocol (TCP) on the NFS port (2049) from security group S. You can enable inbound connections either by IP address (CIDR range) or security group. </p> </li> <li> <p>Security group S (provided to DataSync to access EFS) should have a rule that enables outbound connections to the NFS port on one of the file system’s mount targets. You can enable outbound connections either by IP address (CIDR range) or security group.</p> <p>For information about security groups and mount targets, see Security Groups for Amazon EC2 Instances and Mount Targets in the <i>Amazon EFS User Guide.</i> </p> </li> </ul></p>
128    #[serde(rename = "Ec2Config")]
129    pub ec_2_config: Ec2Config,
130    /// <p>The Amazon Resource Name (ARN) for the Amazon EFS file system.</p>
131    #[serde(rename = "EfsFilesystemArn")]
132    pub efs_filesystem_arn: String,
133    /// <p><p>A subdirectory in the location’s path. This subdirectory in the EFS file system is used to read data from the EFS source location or write data to the EFS destination. By default, AWS DataSync uses the root directory.</p> <note> <p> <code>Subdirectory</code> must be specified with forward slashes. For example <code>/path/to/folder</code>.</p> </note></p>
134    #[serde(rename = "Subdirectory")]
135    #[serde(skip_serializing_if = "Option::is_none")]
136    pub subdirectory: Option<String>,
137    /// <p>The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.</p>
138    #[serde(rename = "Tags")]
139    #[serde(skip_serializing_if = "Option::is_none")]
140    pub tags: Option<Vec<TagListEntry>>,
141}
142
143/// <p>CreateLocationEfs</p>
144#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
145#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
146pub struct CreateLocationEfsResponse {
147    /// <p>The Amazon Resource Name (ARN) of the Amazon EFS file system location that is created.</p>
148    #[serde(rename = "LocationArn")]
149    #[serde(skip_serializing_if = "Option::is_none")]
150    pub location_arn: Option<String>,
151}
152
153#[derive(Clone, Debug, Default, PartialEq, Serialize)]
154#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
155pub struct CreateLocationFsxWindowsRequest {
156    /// <p>The name of the Windows domain that the FSx for Windows server belongs to.</p>
157    #[serde(rename = "Domain")]
158    #[serde(skip_serializing_if = "Option::is_none")]
159    pub domain: Option<String>,
160    /// <p>The Amazon Resource Name (ARN) for the FSx for Windows file system.</p>
161    #[serde(rename = "FsxFilesystemArn")]
162    pub fsx_filesystem_arn: String,
163    /// <p>The password of the user who has the permissions to access files and folders in the FSx for Windows file system.</p>
164    #[serde(rename = "Password")]
165    pub password: String,
166    /// <p>The Amazon Resource Names (ARNs) of the security groups that are to use to configure the FSx for Windows file system.</p>
167    #[serde(rename = "SecurityGroupArns")]
168    pub security_group_arns: Vec<String>,
169    /// <p>A subdirectory in the location’s path. This subdirectory in the Amazon FSx for Windows file system is used to read data from the Amazon FSx for Windows source location or write data to the FSx for Windows destination.</p>
170    #[serde(rename = "Subdirectory")]
171    #[serde(skip_serializing_if = "Option::is_none")]
172    pub subdirectory: Option<String>,
173    /// <p>The key-value pair that represents a tag that you want to add to the resource. The value can be an empty string. This value helps you manage, filter, and search for your resources. We recommend that you create a name tag for your location.</p>
174    #[serde(rename = "Tags")]
175    #[serde(skip_serializing_if = "Option::is_none")]
176    pub tags: Option<Vec<TagListEntry>>,
177    /// <p>The user who has the permissions to access files and folders in the FSx for Windows file system.</p>
178    #[serde(rename = "User")]
179    pub user: String,
180}
181
182#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
183#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
184pub struct CreateLocationFsxWindowsResponse {
185    /// <p>The Amazon Resource Name (ARN) of the FSx for Windows file system location that is created.</p>
186    #[serde(rename = "LocationArn")]
187    #[serde(skip_serializing_if = "Option::is_none")]
188    pub location_arn: Option<String>,
189}
190
191/// <p>CreateLocationNfsRequest</p>
192#[derive(Clone, Debug, Default, PartialEq, Serialize)]
193#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
194pub struct CreateLocationNfsRequest {
195    /// <p>The NFS mount options that DataSync can use to mount your NFS share.</p>
196    #[serde(rename = "MountOptions")]
197    #[serde(skip_serializing_if = "Option::is_none")]
198    pub mount_options: Option<NfsMountOptions>,
199    /// <p>Contains a list of Amazon Resource Names (ARNs) of agents that are used to connect to an NFS server.</p>
200    #[serde(rename = "OnPremConfig")]
201    pub on_prem_config: OnPremConfig,
202    /// <p><p>The name of the NFS server. This value is the IP address or Domain Name Service (DNS) name of the NFS server. An agent that is installed on-premises uses this host name to mount the NFS server in a network. </p> <note> <p>This name must either be DNS-compliant or must be an IP version 4 (IPv4) address.</p> </note></p>
203    #[serde(rename = "ServerHostname")]
204    pub server_hostname: String,
205    /// <p>The subdirectory in the NFS file system that is used to read data from the NFS source location or write data to the NFS destination. The NFS path should be a path that's exported by the NFS server, or a subdirectory of that path. The path should be such that it can be mounted by other NFS clients in your network. </p> <p>To see all the paths exported by your NFS server. run "<code>showmount -e nfs-server-name</code>" from an NFS client that has access to your server. You can specify any directory that appears in the results, and any subdirectory of that directory. Ensure that the NFS export is accessible without Kerberos authentication. </p> <p>To transfer all the data in the folder you specified, DataSync needs to have permissions to read all the data. To ensure this, either configure the NFS export with <code>no_root_squash,</code> or ensure that the permissions for all of the files that you want DataSync allow read access for all users. Doing either enables the agent to read the files. For the agent to access directories, you must additionally enable all execute access.</p> <p>For information about NFS export configuration, see 18.7. The /etc/exports Configuration File in the Red Hat Enterprise Linux documentation.</p>
206    #[serde(rename = "Subdirectory")]
207    pub subdirectory: String,
208    /// <p>The key-value pair that represents the tag that you want to add to the location. The value can be an empty string. We recommend using tags to name your resources.</p>
209    #[serde(rename = "Tags")]
210    #[serde(skip_serializing_if = "Option::is_none")]
211    pub tags: Option<Vec<TagListEntry>>,
212}
213
214/// <p>CreateLocationNfsResponse</p>
215#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
216#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
217pub struct CreateLocationNfsResponse {
218    /// <p>The Amazon Resource Name (ARN) of the source NFS file system location that is created.</p>
219    #[serde(rename = "LocationArn")]
220    #[serde(skip_serializing_if = "Option::is_none")]
221    pub location_arn: Option<String>,
222}
223
224/// <p>CreateLocationS3Request</p>
225#[derive(Clone, Debug, Default, PartialEq, Serialize)]
226#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
227pub struct CreateLocationS3Request {
228    /// <p>The Amazon Resource Name (ARN) of the Amazon S3 bucket.</p>
229    #[serde(rename = "S3BucketArn")]
230    pub s3_bucket_arn: String,
231    #[serde(rename = "S3Config")]
232    pub s3_config: S3Config,
233    /// <p>The Amazon S3 storage class that you want to store your files in when this location is used as a task destination. For more information about S3 storage classes, see <a href="https://aws.amazon.com/s3/storage-classes/">Amazon S3 Storage Classes</a> in the <i>Amazon Simple Storage Service Developer Guide</i>. Some storage classes have behaviors that can affect your S3 storage cost. For detailed information, see <a>using-storage-classes</a>.</p>
234    #[serde(rename = "S3StorageClass")]
235    #[serde(skip_serializing_if = "Option::is_none")]
236    pub s3_storage_class: Option<String>,
237    /// <p>A subdirectory in the Amazon S3 bucket. This subdirectory in Amazon S3 is used to read data from the S3 source location or write data to the S3 destination.</p>
238    #[serde(rename = "Subdirectory")]
239    #[serde(skip_serializing_if = "Option::is_none")]
240    pub subdirectory: Option<String>,
241    /// <p>The key-value pair that represents the tag that you want to add to the location. The value can be an empty string. We recommend using tags to name your resources.</p>
242    #[serde(rename = "Tags")]
243    #[serde(skip_serializing_if = "Option::is_none")]
244    pub tags: Option<Vec<TagListEntry>>,
245}
246
247/// <p>CreateLocationS3Response</p>
248#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
249#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
250pub struct CreateLocationS3Response {
251    /// <p>The Amazon Resource Name (ARN) of the source Amazon S3 bucket location that is created.</p>
252    #[serde(rename = "LocationArn")]
253    #[serde(skip_serializing_if = "Option::is_none")]
254    pub location_arn: Option<String>,
255}
256
257/// <p>CreateLocationSmbRequest</p>
258#[derive(Clone, Debug, Default, PartialEq, Serialize)]
259#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
260pub struct CreateLocationSmbRequest {
261    /// <p>The Amazon Resource Names (ARNs) of agents to use for a Simple Message Block (SMB) location. </p>
262    #[serde(rename = "AgentArns")]
263    pub agent_arns: Vec<String>,
264    /// <p>The name of the Windows domain that the SMB server belongs to.</p>
265    #[serde(rename = "Domain")]
266    #[serde(skip_serializing_if = "Option::is_none")]
267    pub domain: Option<String>,
268    /// <p>The mount options used by DataSync to access the SMB server.</p>
269    #[serde(rename = "MountOptions")]
270    #[serde(skip_serializing_if = "Option::is_none")]
271    pub mount_options: Option<SmbMountOptions>,
272    /// <p>The password of the user who can mount the share, has the permissions to access files and folders in the SMB share.</p>
273    #[serde(rename = "Password")]
274    pub password: String,
275    /// <p><p>The name of the SMB server. This value is the IP address or Domain Name Service (DNS) name of the SMB server. An agent that is installed on-premises uses this hostname to mount the SMB server in a network.</p> <note> <p>This name must either be DNS-compliant or must be an IP version 4 (IPv4) address.</p> </note></p>
276    #[serde(rename = "ServerHostname")]
277    pub server_hostname: String,
278    /// <p>The subdirectory in the SMB file system that is used to read data from the SMB source location or write data to the SMB destination. The SMB path should be a path that's exported by the SMB server, or a subdirectory of that path. The path should be such that it can be mounted by other SMB clients in your network.</p> <note> <p> <code>Subdirectory</code> must be specified with forward slashes. For example <code>/path/to/folder</code>.</p> </note> <p>To transfer all the data in the folder you specified, DataSync needs to have permissions to mount the SMB share, as well as to access all the data in that share. To ensure this, either ensure that the user/password specified belongs to the user who can mount the share, and who has the appropriate permissions for all of the files and directories that you want DataSync to access, or use credentials of a member of the Backup Operators group to mount the share. Doing either enables the agent to access the data. For the agent to access directories, you must additionally enable all execute access.</p>
279    #[serde(rename = "Subdirectory")]
280    pub subdirectory: String,
281    /// <p>The key-value pair that represents the tag that you want to add to the location. The value can be an empty string. We recommend using tags to name your resources.</p>
282    #[serde(rename = "Tags")]
283    #[serde(skip_serializing_if = "Option::is_none")]
284    pub tags: Option<Vec<TagListEntry>>,
285    /// <p>The user who can mount the share, has the permissions to access files and folders in the SMB share.</p>
286    #[serde(rename = "User")]
287    pub user: String,
288}
289
290/// <p>CreateLocationSmbResponse</p>
291#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
292#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
293pub struct CreateLocationSmbResponse {
294    /// <p>The Amazon Resource Name (ARN) of the source SMB file system location that is created.</p>
295    #[serde(rename = "LocationArn")]
296    #[serde(skip_serializing_if = "Option::is_none")]
297    pub location_arn: Option<String>,
298}
299
300/// <p>CreateTaskRequest</p>
301#[derive(Clone, Debug, Default, PartialEq, Serialize)]
302#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
303pub struct CreateTaskRequest {
304    /// <p>The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that is used to monitor and log events in the task. </p> <p>For more information on these groups, see Working with Log Groups and Log Streams in the <i>Amazon CloudWatch User Guide.</i> </p> <p>For more information about how to use CloudWatch Logs with DataSync, see Monitoring Your Task in the <i>AWS DataSync User Guide.</i> </p>
305    #[serde(rename = "CloudWatchLogGroupArn")]
306    #[serde(skip_serializing_if = "Option::is_none")]
307    pub cloud_watch_log_group_arn: Option<String>,
308    /// <p>The Amazon Resource Name (ARN) of an AWS storage resource's location. </p>
309    #[serde(rename = "DestinationLocationArn")]
310    pub destination_location_arn: String,
311    /// <p>A list of filter rules that determines which files to exclude from a task. The list should contain a single filter string that consists of the patterns to exclude. The patterns are delimited by "|" (that is, a pipe), for example, <code>"/folder1|/folder2"</code> </p> <p> </p>
312    #[serde(rename = "Excludes")]
313    #[serde(skip_serializing_if = "Option::is_none")]
314    pub excludes: Option<Vec<FilterRule>>,
315    /// <p>The name of a task. This value is a text reference that is used to identify the task in the console. </p>
316    #[serde(rename = "Name")]
317    #[serde(skip_serializing_if = "Option::is_none")]
318    pub name: Option<String>,
319    /// <p>The set of configuration options that control the behavior of a single execution of the task that occurs when you call <code>StartTaskExecution</code>. You can configure these options to preserve metadata such as user ID (UID) and group ID (GID), file permissions, data integrity verification, and so on.</p> <p>For each individual task execution, you can override these options by specifying the <code>OverrideOptions</code> before starting a the task execution. For more information, see the operation. </p>
320    #[serde(rename = "Options")]
321    #[serde(skip_serializing_if = "Option::is_none")]
322    pub options: Option<Options>,
323    /// <p>Specifies a schedule used to periodically transfer files from a source to a destination location. The schedule should be specified in UTC time. For more information, see <a>task-scheduling</a>.</p>
324    #[serde(rename = "Schedule")]
325    #[serde(skip_serializing_if = "Option::is_none")]
326    pub schedule: Option<TaskSchedule>,
327    /// <p>The Amazon Resource Name (ARN) of the source location for the task.</p>
328    #[serde(rename = "SourceLocationArn")]
329    pub source_location_arn: String,
330    /// <p>The key-value pair that represents the tag that you want to add to the resource. The value can be an empty string. </p>
331    #[serde(rename = "Tags")]
332    #[serde(skip_serializing_if = "Option::is_none")]
333    pub tags: Option<Vec<TagListEntry>>,
334}
335
336/// <p>CreateTaskResponse</p>
337#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
338#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
339pub struct CreateTaskResponse {
340    /// <p>The Amazon Resource Name (ARN) of the task.</p>
341    #[serde(rename = "TaskArn")]
342    #[serde(skip_serializing_if = "Option::is_none")]
343    pub task_arn: Option<String>,
344}
345
346/// <p>DeleteAgentRequest</p>
347#[derive(Clone, Debug, Default, PartialEq, Serialize)]
348#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
349pub struct DeleteAgentRequest {
350    /// <p>The Amazon Resource Name (ARN) of the agent to delete. Use the <code>ListAgents</code> operation to return a list of agents for your account and AWS Region.</p>
351    #[serde(rename = "AgentArn")]
352    pub agent_arn: String,
353}
354
355#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
356#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
357pub struct DeleteAgentResponse {}
358
359/// <p>DeleteLocation</p>
360#[derive(Clone, Debug, Default, PartialEq, Serialize)]
361#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
362pub struct DeleteLocationRequest {
363    /// <p>The Amazon Resource Name (ARN) of the location to delete.</p>
364    #[serde(rename = "LocationArn")]
365    pub location_arn: String,
366}
367
368#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
369#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
370pub struct DeleteLocationResponse {}
371
372/// <p>DeleteTask</p>
373#[derive(Clone, Debug, Default, PartialEq, Serialize)]
374#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
375pub struct DeleteTaskRequest {
376    /// <p>The Amazon Resource Name (ARN) of the task to delete.</p>
377    #[serde(rename = "TaskArn")]
378    pub task_arn: String,
379}
380
381#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
382#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
383pub struct DeleteTaskResponse {}
384
385/// <p>DescribeAgent</p>
386#[derive(Clone, Debug, Default, PartialEq, Serialize)]
387#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
388pub struct DescribeAgentRequest {
389    /// <p>The Amazon Resource Name (ARN) of the agent to describe.</p>
390    #[serde(rename = "AgentArn")]
391    pub agent_arn: String,
392}
393
394/// <p>DescribeAgentResponse</p>
395#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
396#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
397pub struct DescribeAgentResponse {
398    /// <p>The Amazon Resource Name (ARN) of the agent.</p>
399    #[serde(rename = "AgentArn")]
400    #[serde(skip_serializing_if = "Option::is_none")]
401    pub agent_arn: Option<String>,
402    /// <p>The time that the agent was activated (that is, created in your account).</p>
403    #[serde(rename = "CreationTime")]
404    #[serde(skip_serializing_if = "Option::is_none")]
405    pub creation_time: Option<f64>,
406    /// <p>The type of endpoint that your agent is connected to. If the endpoint is a VPC endpoint, the agent is not accessible over the public Internet. </p>
407    #[serde(rename = "EndpointType")]
408    #[serde(skip_serializing_if = "Option::is_none")]
409    pub endpoint_type: Option<String>,
410    /// <p>The time that the agent last connected to DataSyc.</p>
411    #[serde(rename = "LastConnectionTime")]
412    #[serde(skip_serializing_if = "Option::is_none")]
413    pub last_connection_time: Option<f64>,
414    /// <p>The name of the agent.</p>
415    #[serde(rename = "Name")]
416    #[serde(skip_serializing_if = "Option::is_none")]
417    pub name: Option<String>,
418    /// <p>The subnet and the security group that DataSync used to access a VPC endpoint.</p>
419    #[serde(rename = "PrivateLinkConfig")]
420    #[serde(skip_serializing_if = "Option::is_none")]
421    pub private_link_config: Option<PrivateLinkConfig>,
422    /// <p>The status of the agent. If the status is ONLINE, then the agent is configured properly and is available to use. The Running status is the normal running status for an agent. If the status is OFFLINE, the agent's VM is turned off or the agent is in an unhealthy state. When the issue that caused the unhealthy state is resolved, the agent returns to ONLINE status.</p>
423    #[serde(rename = "Status")]
424    #[serde(skip_serializing_if = "Option::is_none")]
425    pub status: Option<String>,
426}
427
428/// <p>DescribeLocationEfsRequest</p>
429#[derive(Clone, Debug, Default, PartialEq, Serialize)]
430#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
431pub struct DescribeLocationEfsRequest {
432    /// <p>The Amazon Resource Name (ARN) of the EFS location to describe.</p>
433    #[serde(rename = "LocationArn")]
434    pub location_arn: String,
435}
436
437/// <p>DescribeLocationEfsResponse</p>
438#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
439#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
440pub struct DescribeLocationEfsResponse {
441    /// <p>The time that the EFS location was created.</p>
442    #[serde(rename = "CreationTime")]
443    #[serde(skip_serializing_if = "Option::is_none")]
444    pub creation_time: Option<f64>,
445    #[serde(rename = "Ec2Config")]
446    #[serde(skip_serializing_if = "Option::is_none")]
447    pub ec_2_config: Option<Ec2Config>,
448    /// <p>The Amazon resource Name (ARN) of the EFS location that was described.</p>
449    #[serde(rename = "LocationArn")]
450    #[serde(skip_serializing_if = "Option::is_none")]
451    pub location_arn: Option<String>,
452    /// <p>The URL of the EFS location that was described.</p>
453    #[serde(rename = "LocationUri")]
454    #[serde(skip_serializing_if = "Option::is_none")]
455    pub location_uri: Option<String>,
456}
457
458#[derive(Clone, Debug, Default, PartialEq, Serialize)]
459#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
460pub struct DescribeLocationFsxWindowsRequest {
461    /// <p>The Amazon Resource Name (ARN) of the FSx for Windows location to describe.</p>
462    #[serde(rename = "LocationArn")]
463    pub location_arn: String,
464}
465
466#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
467#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
468pub struct DescribeLocationFsxWindowsResponse {
469    /// <p>The time that the FSx for Windows location was created.</p>
470    #[serde(rename = "CreationTime")]
471    #[serde(skip_serializing_if = "Option::is_none")]
472    pub creation_time: Option<f64>,
473    /// <p>The name of the Windows domain that the FSx for Windows server belongs to.</p>
474    #[serde(rename = "Domain")]
475    #[serde(skip_serializing_if = "Option::is_none")]
476    pub domain: Option<String>,
477    /// <p>The Amazon resource Name (ARN) of the FSx for Windows location that was described.</p>
478    #[serde(rename = "LocationArn")]
479    #[serde(skip_serializing_if = "Option::is_none")]
480    pub location_arn: Option<String>,
481    /// <p>The URL of the FSx for Windows location that was described.</p>
482    #[serde(rename = "LocationUri")]
483    #[serde(skip_serializing_if = "Option::is_none")]
484    pub location_uri: Option<String>,
485    /// <p>The Amazon Resource Names (ARNs) of the security groups that are configured for the for the FSx for Windows file system.</p>
486    #[serde(rename = "SecurityGroupArns")]
487    #[serde(skip_serializing_if = "Option::is_none")]
488    pub security_group_arns: Option<Vec<String>>,
489    /// <p>The user who has the permissions to access files and folders in the FSx for Windows file system.</p>
490    #[serde(rename = "User")]
491    #[serde(skip_serializing_if = "Option::is_none")]
492    pub user: Option<String>,
493}
494
495/// <p>DescribeLocationNfsRequest</p>
496#[derive(Clone, Debug, Default, PartialEq, Serialize)]
497#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
498pub struct DescribeLocationNfsRequest {
499    /// <p>The Amazon resource Name (ARN) of the NFS location to describe.</p>
500    #[serde(rename = "LocationArn")]
501    pub location_arn: String,
502}
503
504/// <p>DescribeLocationNfsResponse</p>
505#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
506#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
507pub struct DescribeLocationNfsResponse {
508    /// <p>The time that the NFS location was created.</p>
509    #[serde(rename = "CreationTime")]
510    #[serde(skip_serializing_if = "Option::is_none")]
511    pub creation_time: Option<f64>,
512    /// <p>The Amazon resource Name (ARN) of the NFS location that was described.</p>
513    #[serde(rename = "LocationArn")]
514    #[serde(skip_serializing_if = "Option::is_none")]
515    pub location_arn: Option<String>,
516    /// <p>The URL of the source NFS location that was described.</p>
517    #[serde(rename = "LocationUri")]
518    #[serde(skip_serializing_if = "Option::is_none")]
519    pub location_uri: Option<String>,
520    /// <p>The NFS mount options that DataSync used to mount your NFS share.</p>
521    #[serde(rename = "MountOptions")]
522    #[serde(skip_serializing_if = "Option::is_none")]
523    pub mount_options: Option<NfsMountOptions>,
524    #[serde(rename = "OnPremConfig")]
525    #[serde(skip_serializing_if = "Option::is_none")]
526    pub on_prem_config: Option<OnPremConfig>,
527}
528
529/// <p>DescribeLocationS3Request</p>
530#[derive(Clone, Debug, Default, PartialEq, Serialize)]
531#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
532pub struct DescribeLocationS3Request {
533    /// <p>The Amazon Resource Name (ARN) of the Amazon S3 bucket location to describe.</p>
534    #[serde(rename = "LocationArn")]
535    pub location_arn: String,
536}
537
538/// <p>DescribeLocationS3Response</p>
539#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
540#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
541pub struct DescribeLocationS3Response {
542    /// <p>The time that the Amazon S3 bucket location was created.</p>
543    #[serde(rename = "CreationTime")]
544    #[serde(skip_serializing_if = "Option::is_none")]
545    pub creation_time: Option<f64>,
546    /// <p>The Amazon Resource Name (ARN) of the Amazon S3 bucket location.</p>
547    #[serde(rename = "LocationArn")]
548    #[serde(skip_serializing_if = "Option::is_none")]
549    pub location_arn: Option<String>,
550    /// <p>The URL of the Amazon S3 location that was described.</p>
551    #[serde(rename = "LocationUri")]
552    #[serde(skip_serializing_if = "Option::is_none")]
553    pub location_uri: Option<String>,
554    #[serde(rename = "S3Config")]
555    #[serde(skip_serializing_if = "Option::is_none")]
556    pub s3_config: Option<S3Config>,
557    /// <p>The Amazon S3 storage class that you chose to store your files in when this location is used as a task destination. For more information about S3 storage classes, see <a href="https://aws.amazon.com/s3/storage-classes/">Amazon S3 Storage Classes</a> in the <i>Amazon Simple Storage Service Developer Guide</i>. Some storage classes have behaviors that can affect your S3 storage cost. For detailed information, see <a>using-storage-classes</a>.</p>
558    #[serde(rename = "S3StorageClass")]
559    #[serde(skip_serializing_if = "Option::is_none")]
560    pub s3_storage_class: Option<String>,
561}
562
563/// <p>DescribeLocationSmbRequest</p>
564#[derive(Clone, Debug, Default, PartialEq, Serialize)]
565#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
566pub struct DescribeLocationSmbRequest {
567    /// <p>The Amazon resource Name (ARN) of the SMB location to describe.</p>
568    #[serde(rename = "LocationArn")]
569    pub location_arn: String,
570}
571
572/// <p>DescribeLocationSmbResponse</p>
573#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
574#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
575pub struct DescribeLocationSmbResponse {
576    /// <p>The Amazon Resource Name (ARN) of the source SMB file system location that is created.</p>
577    #[serde(rename = "AgentArns")]
578    #[serde(skip_serializing_if = "Option::is_none")]
579    pub agent_arns: Option<Vec<String>>,
580    /// <p>The time that the SMB location was created.</p>
581    #[serde(rename = "CreationTime")]
582    #[serde(skip_serializing_if = "Option::is_none")]
583    pub creation_time: Option<f64>,
584    /// <p>The name of the Windows domain that the SMB server belongs to.</p>
585    #[serde(rename = "Domain")]
586    #[serde(skip_serializing_if = "Option::is_none")]
587    pub domain: Option<String>,
588    /// <p>The Amazon resource Name (ARN) of the SMB location that was described.</p>
589    #[serde(rename = "LocationArn")]
590    #[serde(skip_serializing_if = "Option::is_none")]
591    pub location_arn: Option<String>,
592    /// <p>The URL of the source SBM location that was described.</p>
593    #[serde(rename = "LocationUri")]
594    #[serde(skip_serializing_if = "Option::is_none")]
595    pub location_uri: Option<String>,
596    /// <p>The mount options that are available for DataSync to use to access an SMB location.</p>
597    #[serde(rename = "MountOptions")]
598    #[serde(skip_serializing_if = "Option::is_none")]
599    pub mount_options: Option<SmbMountOptions>,
600    /// <p>The user who can mount the share, has the permissions to access files and folders in the SMB share.</p>
601    #[serde(rename = "User")]
602    #[serde(skip_serializing_if = "Option::is_none")]
603    pub user: Option<String>,
604}
605
606/// <p>DescribeTaskExecutionRequest</p>
607#[derive(Clone, Debug, Default, PartialEq, Serialize)]
608#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
609pub struct DescribeTaskExecutionRequest {
610    /// <p>The Amazon Resource Name (ARN) of the task that is being executed.</p>
611    #[serde(rename = "TaskExecutionArn")]
612    pub task_execution_arn: String,
613}
614
615/// <p>DescribeTaskExecutionResponse</p>
616#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
617#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
618pub struct DescribeTaskExecutionResponse {
619    /// <p>The physical number of bytes transferred over the network.</p>
620    #[serde(rename = "BytesTransferred")]
621    #[serde(skip_serializing_if = "Option::is_none")]
622    pub bytes_transferred: Option<i64>,
623    /// <p>The number of logical bytes written to the destination AWS storage resource.</p>
624    #[serde(rename = "BytesWritten")]
625    #[serde(skip_serializing_if = "Option::is_none")]
626    pub bytes_written: Option<i64>,
627    /// <p>The estimated physical number of bytes that is to be transferred over the network.</p>
628    #[serde(rename = "EstimatedBytesToTransfer")]
629    #[serde(skip_serializing_if = "Option::is_none")]
630    pub estimated_bytes_to_transfer: Option<i64>,
631    /// <p>The expected number of files that is to be transferred over the network. This value is calculated during the PREPARING phase, before the TRANSFERRING phase. This value is the expected number of files to be transferred. It's calculated based on comparing the content of the source and destination locations and finding the delta that needs to be transferred. </p>
632    #[serde(rename = "EstimatedFilesToTransfer")]
633    #[serde(skip_serializing_if = "Option::is_none")]
634    pub estimated_files_to_transfer: Option<i64>,
635    /// <p>A list of filter rules that determines which files to exclude from a task. The list should contain a single filter string that consists of the patterns to exclude. The patterns are delimited by "|" (that is, a pipe), for example: <code>"/folder1|/folder2"</code> </p> <p> </p>
636    #[serde(rename = "Excludes")]
637    #[serde(skip_serializing_if = "Option::is_none")]
638    pub excludes: Option<Vec<FilterRule>>,
639    /// <p>The actual number of files that was transferred over the network. This value is calculated and updated on an ongoing basis during the TRANSFERRING phase. It's updated periodically when each file is read from the source and sent over the network. </p> <p>If failures occur during a transfer, this value can be less than <code>EstimatedFilesToTransfer</code>. This value can also be greater than <code>EstimatedFilesTransferred</code> in some cases. This element is implementation-specific for some location types, so don't use it as an indicator for a correct file number or to monitor your task execution.</p>
640    #[serde(rename = "FilesTransferred")]
641    #[serde(skip_serializing_if = "Option::is_none")]
642    pub files_transferred: Option<i64>,
643    /// <p>A list of filter rules that determines which files to include when running a task. The list should contain a single filter string that consists of the patterns to include. The patterns are delimited by "|" (that is, a pipe), for example: <code>"/folder1|/folder2"</code> </p> <p> </p>
644    #[serde(rename = "Includes")]
645    #[serde(skip_serializing_if = "Option::is_none")]
646    pub includes: Option<Vec<FilterRule>>,
647    #[serde(rename = "Options")]
648    #[serde(skip_serializing_if = "Option::is_none")]
649    pub options: Option<Options>,
650    /// <p>The result of the task execution.</p>
651    #[serde(rename = "Result")]
652    #[serde(skip_serializing_if = "Option::is_none")]
653    pub result: Option<TaskExecutionResultDetail>,
654    /// <p>The time that the task execution was started.</p>
655    #[serde(rename = "StartTime")]
656    #[serde(skip_serializing_if = "Option::is_none")]
657    pub start_time: Option<f64>,
658    /// <p>The status of the task execution. </p> <p>For detailed information about task execution statuses, see Understanding Task Statuses in the <i>AWS DataSync User Guide.</i> </p>
659    #[serde(rename = "Status")]
660    #[serde(skip_serializing_if = "Option::is_none")]
661    pub status: Option<String>,
662    /// <p>The Amazon Resource Name (ARN) of the task execution that was described. <code>TaskExecutionArn</code> is hierarchical and includes <code>TaskArn</code> for the task that was executed. </p> <p>For example, a <code>TaskExecution</code> value with the ARN <code>arn:aws:datasync:us-east-1:111222333444:task/task-0208075f79cedf4a2/execution/exec-08ef1e88ec491019b</code> executed the task with the ARN <code>arn:aws:datasync:us-east-1:111222333444:task/task-0208075f79cedf4a2</code>. </p>
663    #[serde(rename = "TaskExecutionArn")]
664    #[serde(skip_serializing_if = "Option::is_none")]
665    pub task_execution_arn: Option<String>,
666}
667
668/// <p>DescribeTaskRequest</p>
669#[derive(Clone, Debug, Default, PartialEq, Serialize)]
670#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
671pub struct DescribeTaskRequest {
672    /// <p>The Amazon Resource Name (ARN) of the task to describe.</p>
673    #[serde(rename = "TaskArn")]
674    pub task_arn: String,
675}
676
677/// <p>DescribeTaskResponse</p>
678#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
679#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
680pub struct DescribeTaskResponse {
681    /// <p>The Amazon Resource Name (ARN) of the Amazon CloudWatch log group that was used to monitor and log events in the task.</p> <p>For more information on these groups, see Working with Log Groups and Log Streams in the <i>Amazon CloudWatch User Guide</i>.</p>
682    #[serde(rename = "CloudWatchLogGroupArn")]
683    #[serde(skip_serializing_if = "Option::is_none")]
684    pub cloud_watch_log_group_arn: Option<String>,
685    /// <p>The time that the task was created.</p>
686    #[serde(rename = "CreationTime")]
687    #[serde(skip_serializing_if = "Option::is_none")]
688    pub creation_time: Option<f64>,
689    /// <p>The Amazon Resource Name (ARN) of the task execution that is syncing files.</p>
690    #[serde(rename = "CurrentTaskExecutionArn")]
691    #[serde(skip_serializing_if = "Option::is_none")]
692    pub current_task_execution_arn: Option<String>,
693    /// <p>The Amazon Resource Name (ARN) of the AWS storage resource's location.</p>
694    #[serde(rename = "DestinationLocationArn")]
695    #[serde(skip_serializing_if = "Option::is_none")]
696    pub destination_location_arn: Option<String>,
697    /// <p>The Amazon Resource Name (ARN) of the destination ENIs (Elastic Network Interface) that was created for your subnet.</p>
698    #[serde(rename = "DestinationNetworkInterfaceArns")]
699    #[serde(skip_serializing_if = "Option::is_none")]
700    pub destination_network_interface_arns: Option<Vec<String>>,
701    /// <p>Errors that AWS DataSync encountered during execution of the task. You can use this error code to help troubleshoot issues.</p>
702    #[serde(rename = "ErrorCode")]
703    #[serde(skip_serializing_if = "Option::is_none")]
704    pub error_code: Option<String>,
705    /// <p>Detailed description of an error that was encountered during the task execution. You can use this information to help troubleshoot issues. </p>
706    #[serde(rename = "ErrorDetail")]
707    #[serde(skip_serializing_if = "Option::is_none")]
708    pub error_detail: Option<String>,
709    /// <p>A list of filter rules that determines which files to exclude from a task. The list should contain a single filter string that consists of the patterns to exclude. The patterns are delimited by "|" (that is, a pipe), for example: <code>"/folder1|/folder2"</code> </p> <p> </p>
710    #[serde(rename = "Excludes")]
711    #[serde(skip_serializing_if = "Option::is_none")]
712    pub excludes: Option<Vec<FilterRule>>,
713    /// <p>The name of the task that was described.</p>
714    #[serde(rename = "Name")]
715    #[serde(skip_serializing_if = "Option::is_none")]
716    pub name: Option<String>,
717    /// <p>The set of configuration options that control the behavior of a single execution of the task that occurs when you call <code>StartTaskExecution</code>. You can configure these options to preserve metadata such as user ID (UID) and group (GID), file permissions, data integrity verification, and so on.</p> <p>For each individual task execution, you can override these options by specifying the overriding <code>OverrideOptions</code> value to operation. </p>
718    #[serde(rename = "Options")]
719    #[serde(skip_serializing_if = "Option::is_none")]
720    pub options: Option<Options>,
721    /// <p>The schedule used to periodically transfer files from a source to a destination location.</p>
722    #[serde(rename = "Schedule")]
723    #[serde(skip_serializing_if = "Option::is_none")]
724    pub schedule: Option<TaskSchedule>,
725    /// <p>The Amazon Resource Name (ARN) of the source file system's location.</p>
726    #[serde(rename = "SourceLocationArn")]
727    #[serde(skip_serializing_if = "Option::is_none")]
728    pub source_location_arn: Option<String>,
729    /// <p>The Amazon Resource Name (ARN) of the source ENIs (Elastic Network Interface) that was created for your subnet.</p>
730    #[serde(rename = "SourceNetworkInterfaceArns")]
731    #[serde(skip_serializing_if = "Option::is_none")]
732    pub source_network_interface_arns: Option<Vec<String>>,
733    /// <p>The status of the task that was described.</p> <p>For detailed information about task execution statuses, see Understanding Task Statuses in the <i>AWS DataSync User Guide.</i> </p>
734    #[serde(rename = "Status")]
735    #[serde(skip_serializing_if = "Option::is_none")]
736    pub status: Option<String>,
737    /// <p>The Amazon Resource Name (ARN) of the task that was described.</p>
738    #[serde(rename = "TaskArn")]
739    #[serde(skip_serializing_if = "Option::is_none")]
740    pub task_arn: Option<String>,
741}
742
743/// <p>The subnet and the security group that DataSync uses to access target EFS file system. The subnet must have at least one mount target for that file system. The security group that you provide needs to be able to communicate with the security group on the mount target in the subnet specified. </p>
744#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
745pub struct Ec2Config {
746    /// <p>The Amazon Resource Names (ARNs) of the security groups that are configured for the Amazon EC2 resource.</p>
747    #[serde(rename = "SecurityGroupArns")]
748    pub security_group_arns: Vec<String>,
749    /// <p>The ARN of the subnet and the security group that DataSync uses to access the target EFS file system.</p>
750    #[serde(rename = "SubnetArn")]
751    pub subnet_arn: String,
752}
753
754/// <p>Specifies which files, folders and objects to include or exclude when transferring files from source to destination.</p>
755#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
756pub struct FilterRule {
757    /// <p>The type of filter rule to apply. AWS DataSync only supports the SIMPLE_PATTERN rule type.</p>
758    #[serde(rename = "FilterType")]
759    #[serde(skip_serializing_if = "Option::is_none")]
760    pub filter_type: Option<String>,
761    /// <p>A single filter string that consists of the patterns to include or exclude. The patterns are delimited by "|" (that is, a pipe), for example: <code>/folder1|/folder2</code> </p> <p> </p>
762    #[serde(rename = "Value")]
763    #[serde(skip_serializing_if = "Option::is_none")]
764    pub value: Option<String>,
765}
766
767/// <p>ListAgentsRequest</p>
768#[derive(Clone, Debug, Default, PartialEq, Serialize)]
769#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
770pub struct ListAgentsRequest {
771    /// <p>The maximum number of agents to list.</p>
772    #[serde(rename = "MaxResults")]
773    #[serde(skip_serializing_if = "Option::is_none")]
774    pub max_results: Option<i64>,
775    /// <p>An opaque string that indicates the position at which to begin the next list of agents.</p>
776    #[serde(rename = "NextToken")]
777    #[serde(skip_serializing_if = "Option::is_none")]
778    pub next_token: Option<String>,
779}
780
781/// <p>ListAgentsResponse</p>
782#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
783#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
784pub struct ListAgentsResponse {
785    /// <p>A list of agents in your account.</p>
786    #[serde(rename = "Agents")]
787    #[serde(skip_serializing_if = "Option::is_none")]
788    pub agents: Option<Vec<AgentListEntry>>,
789    /// <p>An opaque string that indicates the position at which to begin returning the next list of agents.</p>
790    #[serde(rename = "NextToken")]
791    #[serde(skip_serializing_if = "Option::is_none")]
792    pub next_token: Option<String>,
793}
794
795/// <p>ListLocationsRequest</p>
796#[derive(Clone, Debug, Default, PartialEq, Serialize)]
797#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
798pub struct ListLocationsRequest {
799    /// <p>The maximum number of locations to return.</p>
800    #[serde(rename = "MaxResults")]
801    #[serde(skip_serializing_if = "Option::is_none")]
802    pub max_results: Option<i64>,
803    /// <p>An opaque string that indicates the position at which to begin the next list of locations.</p>
804    #[serde(rename = "NextToken")]
805    #[serde(skip_serializing_if = "Option::is_none")]
806    pub next_token: Option<String>,
807}
808
809/// <p>ListLocationsResponse</p>
810#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
811#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
812pub struct ListLocationsResponse {
813    /// <p>An array that contains a list of locations.</p>
814    #[serde(rename = "Locations")]
815    #[serde(skip_serializing_if = "Option::is_none")]
816    pub locations: Option<Vec<LocationListEntry>>,
817    /// <p>An opaque string that indicates the position at which to begin returning the next list of locations.</p>
818    #[serde(rename = "NextToken")]
819    #[serde(skip_serializing_if = "Option::is_none")]
820    pub next_token: Option<String>,
821}
822
823/// <p>ListTagsForResourceRequest</p>
824#[derive(Clone, Debug, Default, PartialEq, Serialize)]
825#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
826pub struct ListTagsForResourceRequest {
827    /// <p>The maximum number of locations to return.</p>
828    #[serde(rename = "MaxResults")]
829    #[serde(skip_serializing_if = "Option::is_none")]
830    pub max_results: Option<i64>,
831    /// <p>An opaque string that indicates the position at which to begin the next list of locations.</p>
832    #[serde(rename = "NextToken")]
833    #[serde(skip_serializing_if = "Option::is_none")]
834    pub next_token: Option<String>,
835    /// <p>The Amazon Resource Name (ARN) of the resource whose tags to list.</p>
836    #[serde(rename = "ResourceArn")]
837    pub resource_arn: String,
838}
839
840/// <p>ListTagsForResourceResponse</p>
841#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
842#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
843pub struct ListTagsForResourceResponse {
844    /// <p>An opaque string that indicates the position at which to begin returning the next list of resource tags.</p>
845    #[serde(rename = "NextToken")]
846    #[serde(skip_serializing_if = "Option::is_none")]
847    pub next_token: Option<String>,
848    /// <p>Array of resource tags.</p>
849    #[serde(rename = "Tags")]
850    #[serde(skip_serializing_if = "Option::is_none")]
851    pub tags: Option<Vec<TagListEntry>>,
852}
853
854/// <p>ListTaskExecutions</p>
855#[derive(Clone, Debug, Default, PartialEq, Serialize)]
856#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
857pub struct ListTaskExecutionsRequest {
858    /// <p>The maximum number of executed tasks to list.</p>
859    #[serde(rename = "MaxResults")]
860    #[serde(skip_serializing_if = "Option::is_none")]
861    pub max_results: Option<i64>,
862    /// <p>An opaque string that indicates the position at which to begin the next list of the executed tasks.</p>
863    #[serde(rename = "NextToken")]
864    #[serde(skip_serializing_if = "Option::is_none")]
865    pub next_token: Option<String>,
866    /// <p>The Amazon Resource Name (ARN) of the task whose tasks you want to list.</p>
867    #[serde(rename = "TaskArn")]
868    #[serde(skip_serializing_if = "Option::is_none")]
869    pub task_arn: Option<String>,
870}
871
872/// <p>ListTaskExecutionsResponse</p>
873#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
874#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
875pub struct ListTaskExecutionsResponse {
876    /// <p>An opaque string that indicates the position at which to begin returning the next list of executed tasks.</p>
877    #[serde(rename = "NextToken")]
878    #[serde(skip_serializing_if = "Option::is_none")]
879    pub next_token: Option<String>,
880    /// <p>A list of executed tasks.</p>
881    #[serde(rename = "TaskExecutions")]
882    #[serde(skip_serializing_if = "Option::is_none")]
883    pub task_executions: Option<Vec<TaskExecutionListEntry>>,
884}
885
886/// <p>ListTasksRequest</p>
887#[derive(Clone, Debug, Default, PartialEq, Serialize)]
888#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
889pub struct ListTasksRequest {
890    /// <p>The maximum number of tasks to return.</p>
891    #[serde(rename = "MaxResults")]
892    #[serde(skip_serializing_if = "Option::is_none")]
893    pub max_results: Option<i64>,
894    /// <p>An opaque string that indicates the position at which to begin the next list of tasks.</p>
895    #[serde(rename = "NextToken")]
896    #[serde(skip_serializing_if = "Option::is_none")]
897    pub next_token: Option<String>,
898}
899
900/// <p>ListTasksResponse</p>
901#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
902#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
903pub struct ListTasksResponse {
904    /// <p>An opaque string that indicates the position at which to begin returning the next list of tasks.</p>
905    #[serde(rename = "NextToken")]
906    #[serde(skip_serializing_if = "Option::is_none")]
907    pub next_token: Option<String>,
908    /// <p>A list of all the tasks that are returned.</p>
909    #[serde(rename = "Tasks")]
910    #[serde(skip_serializing_if = "Option::is_none")]
911    pub tasks: Option<Vec<TaskListEntry>>,
912}
913
914/// <p>Represents a single entry in a list of locations. <code>LocationListEntry</code> returns an array that contains a list of locations when the <a>ListLocations</a> operation is called.</p>
915#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
916#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
917pub struct LocationListEntry {
918    /// <p>The Amazon Resource Name (ARN) of the location. For Network File System (NFS) or Amazon EFS, the location is the export path. For Amazon S3, the location is the prefix path that you want to mount and use as the root of the location.</p>
919    #[serde(rename = "LocationArn")]
920    #[serde(skip_serializing_if = "Option::is_none")]
921    pub location_arn: Option<String>,
922    /// <p><p>Represents a list of URLs of a location. <code>LocationUri</code> returns an array that contains a list of locations when the <a>ListLocations</a> operation is called.</p> <p>Format: <code>TYPE://GLOBAL<em>ID/SUBDIR</code>.</p> <p>TYPE designates the type of location. Valid values: NFS | EFS | S3.</p> <p>GLOBAL</em>ID is the globally unique identifier of the resource that backs the location. An example for EFS is <code>us-east-2.fs-abcd1234</code>. An example for Amazon S3 is the bucket name, such as <code>myBucket</code>. An example for NFS is a valid IPv4 address or a host name compliant with Domain Name Service (DNS).</p> <p>SUBDIR is a valid file system path, delimited by forward slashes as is the *nix convention. For NFS and Amazon EFS, it&#39;s the export path to mount the location. For Amazon S3, it&#39;s the prefix path that you mount to and treat as the root of the location.</p> <p/></p>
923    #[serde(rename = "LocationUri")]
924    #[serde(skip_serializing_if = "Option::is_none")]
925    pub location_uri: Option<String>,
926}
927
928/// <p>Represents the mount options that are available for DataSync to access an NFS location.</p>
929#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
930pub struct NfsMountOptions {
931    /// <p><p>The specific NFS version that you want DataSync to use to mount your NFS share. If the server refuses to use the version specified, the sync will fail. If you don&#39;t specify a version, DataSync defaults to <code>AUTOMATIC</code>. That is, DataSync automatically selects a version based on negotiation with the NFS server.</p> <p>You can specify the following NFS versions:</p> <ul> <li> <p> <b> <a href="https://tools.ietf.org/html/rfc1813">NFSv3</a> </b> - stateless protocol version that allows for asynchronous writes on the server.</p> </li> <li> <p> <b> <a href="https://tools.ietf.org/html/rfc3530">NFSv4.0</a> </b> - stateful, firewall-friendly protocol version that supports delegations and pseudo filesystems.</p> </li> <li> <p> <b> <a href="https://tools.ietf.org/html/rfc5661">NFSv4.1</a> </b> - stateful protocol version that supports sessions, directory delegations, and parallel data processing. Version 4.1 also includes all features available in version 4.0.</p> </li> </ul></p>
932    #[serde(rename = "Version")]
933    #[serde(skip_serializing_if = "Option::is_none")]
934    pub version: Option<String>,
935}
936
937/// <p>A list of Amazon Resource Names (ARNs) of agents to use for a Network File System (NFS) location.</p>
938#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
939pub struct OnPremConfig {
940    /// <p>ARNs)of the agents to use for an NFS location.</p>
941    #[serde(rename = "AgentArns")]
942    pub agent_arns: Vec<String>,
943}
944
945/// <p>Represents the options that are available to control the behavior of a <a>StartTaskExecution</a> operation. Behavior includes preserving metadata such as user ID (UID), group ID (GID), and file permissions, and also overwriting files in the destination, data integrity verification, and so on.</p> <p>A task has a set of default options associated with it. If you don't specify an option in <a>StartTaskExecution</a>, the default value is used. You can override the defaults options on each task execution by specifying an overriding <code>Options</code> value to <a>StartTaskExecution</a>.</p>
946#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
947pub struct Options {
948    /// <p><p>A file metadata value that shows the last time a file was accessed (that is, when the file was read or written to). If you set <code>Atime</code> to BEST<em>EFFORT, DataSync attempts to preserve the original <code>Atime</code> attribute on all source files (that is, the version before the PREPARING phase). However, <code>Atime</code>&#39;s behavior is not fully standard across platforms, so AWS DataSync can only do this on a best-effort basis. </p> <p>Default value: BEST</em>EFFORT.</p> <p>BEST<em>EFFORT: Attempt to preserve the per-file <code>Atime</code> value (recommended).</p> <p>NONE: Ignore <code>Atime</code>.</p> <note> <p>If <code>Atime</code> is set to BEST</em>EFFORT, <code>Mtime</code> must be set to PRESERVE. </p> <p>If <code>Atime</code> is set to NONE, <code>Mtime</code> must also be NONE. </p> </note></p>
949    #[serde(rename = "Atime")]
950    #[serde(skip_serializing_if = "Option::is_none")]
951    pub atime: Option<String>,
952    /// <p>A value that limits the bandwidth used by AWS DataSync. For example, if you want AWS DataSync to use a maximum of 1 MB, set this value to <code>1048576</code> (<code>=1024*1024</code>).</p>
953    #[serde(rename = "BytesPerSecond")]
954    #[serde(skip_serializing_if = "Option::is_none")]
955    pub bytes_per_second: Option<i64>,
956    /// <p>The group ID (GID) of the file's owners. </p> <p>Default value: INT_VALUE. This preserves the integer value of the ID.</p> <p>INT_VALUE: Preserve the integer value of user ID (UID) and GID (recommended).</p> <p>NONE: Ignore UID and GID. </p>
957    #[serde(rename = "Gid")]
958    #[serde(skip_serializing_if = "Option::is_none")]
959    pub gid: Option<String>,
960    /// <p>A value that determines the type of logs DataSync will deliver to your AWS CloudWatch Logs file. If set to <code>OFF</code>, no logs will be delivered. <code>BASIC</code> will deliver a few logs per transfer operation and <code>TRANSFER</code> will deliver a verbose log that contains logs for every file that is transferred.</p>
961    #[serde(rename = "LogLevel")]
962    #[serde(skip_serializing_if = "Option::is_none")]
963    pub log_level: Option<String>,
964    /// <p><p>A value that indicates the last time that a file was modified (that is, a file was written to) before the PREPARING phase. </p> <p>Default value: PRESERVE. </p> <p>PRESERVE: Preserve original <code>Mtime</code> (recommended)</p> <p> NONE: Ignore <code>Mtime</code>. </p> <note> <p>If <code>Mtime</code> is set to PRESERVE, <code>Atime</code> must be set to BEST_EFFORT.</p> <p>If <code>Mtime</code> is set to NONE, <code>Atime</code> must also be set to NONE. </p> </note></p>
965    #[serde(rename = "Mtime")]
966    #[serde(skip_serializing_if = "Option::is_none")]
967    pub mtime: Option<String>,
968    /// <p>A value that determines whether files at the destination should be overwritten or preserved when copying files. If set to <code>NEVER</code> a destination file will not be replaced by a source file, even if the destination file differs from the source file. If you modify files in the destination and you sync the files, you can use this value to protect against overwriting those changes. </p> <p>Some storage classes have specific behaviors that can affect your S3 storage cost. For detailed information, see <a>using-storage-classes</a> in the <i>AWS DataSync User Guide</i>.</p>
969    #[serde(rename = "OverwriteMode")]
970    #[serde(skip_serializing_if = "Option::is_none")]
971    pub overwrite_mode: Option<String>,
972    /// <p><p>A value that determines which users or groups can access a file for a specific purpose such as reading, writing, or execution of the file. </p> <p>Default value: PRESERVE.</p> <p>PRESERVE: Preserve POSIX-style permissions (recommended).</p> <p>NONE: Ignore permissions. </p> <note> <p>AWS DataSync can preserve extant permissions of a source location.</p> </note></p>
973    #[serde(rename = "PosixPermissions")]
974    #[serde(skip_serializing_if = "Option::is_none")]
975    pub posix_permissions: Option<String>,
976    /// <p>A value that specifies whether files in the destination that don't exist in the source file system should be preserved. This option can affect your storage cost. If your task deletes objects, you might incur minimum storage duration charges for certain storage classes. For detailed information, see <a>using-storage-classes</a> in the <i>AWS DataSync User Guide</i>.</p> <p>Default value: PRESERVE.</p> <p>PRESERVE: Ignore such destination files (recommended). </p> <p>REMOVE: Delete destination files that aren’t present in the source.</p>
977    #[serde(rename = "PreserveDeletedFiles")]
978    #[serde(skip_serializing_if = "Option::is_none")]
979    pub preserve_deleted_files: Option<String>,
980    /// <p>A value that determines whether AWS DataSync should preserve the metadata of block and character devices in the source file system, and recreate the files with that device name and metadata on the destination.</p> <note> <p>AWS DataSync can't sync the actual contents of such devices, because they are nonterminal and don't return an end-of-file (EOF) marker.</p> </note> <p>Default value: NONE.</p> <p>NONE: Ignore special devices (recommended). </p> <p>PRESERVE: Preserve character and block device metadata. This option isn't currently supported for Amazon EFS. </p>
981    #[serde(rename = "PreserveDevices")]
982    #[serde(skip_serializing_if = "Option::is_none")]
983    pub preserve_devices: Option<String>,
984    /// <p>A value that determines whether tasks should be queued before executing the tasks. If set to <code>ENABLED</code>, the tasks will be queued. The default is <code>ENABLED</code>.</p> <p>If you use the same agent to run multiple tasks you can enable the tasks to run in series. For more information see <a>queue-task-execution</a>.</p>
985    #[serde(rename = "TaskQueueing")]
986    #[serde(skip_serializing_if = "Option::is_none")]
987    pub task_queueing: Option<String>,
988    /// <p>The user ID (UID) of the file's owner. </p> <p>Default value: INT_VALUE. This preserves the integer value of the ID.</p> <p>INT_VALUE: Preserve the integer value of UID and group ID (GID) (recommended).</p> <p>NONE: Ignore UID and GID. </p>
989    #[serde(rename = "Uid")]
990    #[serde(skip_serializing_if = "Option::is_none")]
991    pub uid: Option<String>,
992    /// <p>A value that determines whether a data integrity verification should be performed at the end of a task execution after all data and metadata have been transferred. </p> <p>Default value: POINT_IN_TIME_CONSISTENT.</p> <p>POINT_IN_TIME_CONSISTENT: Perform verification (recommended). </p> <p>ONLY_FILES_TRANSFERRED: Perform verification on only files that were transferred.</p> <p>NONE: Skip verification.</p>
993    #[serde(rename = "VerifyMode")]
994    #[serde(skip_serializing_if = "Option::is_none")]
995    pub verify_mode: Option<String>,
996}
997
998/// <p>The VPC endpoint, subnet and security group that an agent uses to access IP addresses in a VPC (Virtual Private Cloud).</p>
999#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1000#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1001pub struct PrivateLinkConfig {
1002    /// <p>The private endpoint that is configured for an agent that has access to IP addresses in a <a href="https://docs.aws.amazon.com/vpc/latest/userguide/endpoint-service.html">PrivateLink</a>. An agent that is configured with this endpoint will not be accessible over the public Internet.</p>
1003    #[serde(rename = "PrivateLinkEndpoint")]
1004    #[serde(skip_serializing_if = "Option::is_none")]
1005    pub private_link_endpoint: Option<String>,
1006    /// <p>The Amazon Resource Names (ARNs) of the security groups that are configured for the EC2 resource that hosts an agent activated in a VPC or an agent that has access to a VPC endpoint.</p>
1007    #[serde(rename = "SecurityGroupArns")]
1008    #[serde(skip_serializing_if = "Option::is_none")]
1009    pub security_group_arns: Option<Vec<String>>,
1010    /// <p>The Amazon Resource Names (ARNs) of the subnets that are configured for an agent activated in a VPC or an agent that has access to a VPC endpoint.</p>
1011    #[serde(rename = "SubnetArns")]
1012    #[serde(skip_serializing_if = "Option::is_none")]
1013    pub subnet_arns: Option<Vec<String>>,
1014    /// <p>The ID of the VPC endpoint that is configured for an agent. An agent that is configured with a VPC endpoint will not be accessible over the public Internet.</p>
1015    #[serde(rename = "VpcEndpointId")]
1016    #[serde(skip_serializing_if = "Option::is_none")]
1017    pub vpc_endpoint_id: Option<String>,
1018}
1019
1020/// <p>The Amazon Resource Name (ARN) of the AWS Identity and Access Management (IAM) role that is used to access an Amazon S3 bucket.</p> <p>For detailed information about using such a role, see Creating a Location for Amazon S3 in the <i>AWS DataSync User Guide</i>.</p>
1021#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1022pub struct S3Config {
1023    /// <p>The Amazon S3 bucket to access. This bucket is used as a parameter in the <a>CreateLocationS3</a> operation. </p>
1024    #[serde(rename = "BucketAccessRoleArn")]
1025    pub bucket_access_role_arn: String,
1026}
1027
1028/// <p>Represents the mount options that are available for DataSync to access an SMB location.</p>
1029#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1030pub struct SmbMountOptions {
1031    /// <p>The specific SMB version that you want DataSync to use to mount your SMB share. If you don't specify a version, DataSync defaults to <code>AUTOMATIC</code>. That is, DataSync automatically selects a version based on negotiation with the SMB server.</p>
1032    #[serde(rename = "Version")]
1033    #[serde(skip_serializing_if = "Option::is_none")]
1034    pub version: Option<String>,
1035}
1036
1037/// <p>StartTaskExecutionRequest</p>
1038#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1039#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1040pub struct StartTaskExecutionRequest {
1041    /// <p>A list of filter rules that determines which files to include when running a task. The pattern should contain a single filter string that consists of the patterns to include. The patterns are delimited by "|" (that is, a pipe). For example: <code>"/folder1|/folder2"</code> </p> <p> </p>
1042    #[serde(rename = "Includes")]
1043    #[serde(skip_serializing_if = "Option::is_none")]
1044    pub includes: Option<Vec<FilterRule>>,
1045    #[serde(rename = "OverrideOptions")]
1046    #[serde(skip_serializing_if = "Option::is_none")]
1047    pub override_options: Option<Options>,
1048    /// <p>The Amazon Resource Name (ARN) of the task to start.</p>
1049    #[serde(rename = "TaskArn")]
1050    pub task_arn: String,
1051}
1052
1053/// <p>StartTaskExecutionResponse</p>
1054#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1055#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1056pub struct StartTaskExecutionResponse {
1057    /// <p>The Amazon Resource Name (ARN) of the specific task execution that was started.</p>
1058    #[serde(rename = "TaskExecutionArn")]
1059    #[serde(skip_serializing_if = "Option::is_none")]
1060    pub task_execution_arn: Option<String>,
1061}
1062
1063/// <p>Represents a single entry in a list of AWS resource tags. <code>TagListEntry</code> returns an array that contains a list of tasks when the <a>ListTagsForResource</a> operation is called.</p>
1064#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1065pub struct TagListEntry {
1066    /// <p>The key for an AWS resource tag.</p>
1067    #[serde(rename = "Key")]
1068    pub key: String,
1069    /// <p>The value for an AWS resource tag.</p>
1070    #[serde(rename = "Value")]
1071    #[serde(skip_serializing_if = "Option::is_none")]
1072    pub value: Option<String>,
1073}
1074
1075/// <p>TagResourceRequest</p>
1076#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1077#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1078pub struct TagResourceRequest {
1079    /// <p>The Amazon Resource Name (ARN) of the resource to apply the tag to.</p>
1080    #[serde(rename = "ResourceArn")]
1081    pub resource_arn: String,
1082    /// <p>The tags to apply.</p>
1083    #[serde(rename = "Tags")]
1084    pub tags: Vec<TagListEntry>,
1085}
1086
1087#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1088#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1089pub struct TagResourceResponse {}
1090
1091/// <p>Represents a single entry in a list of task executions. <code>TaskExecutionListEntry</code> returns an array that contains a list of specific invocations of a task when <a>ListTaskExecutions</a> operation is called.</p>
1092#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1093#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1094pub struct TaskExecutionListEntry {
1095    /// <p>The status of a task execution.</p>
1096    #[serde(rename = "Status")]
1097    #[serde(skip_serializing_if = "Option::is_none")]
1098    pub status: Option<String>,
1099    /// <p>The Amazon Resource Name (ARN) of the task that was executed.</p>
1100    #[serde(rename = "TaskExecutionArn")]
1101    #[serde(skip_serializing_if = "Option::is_none")]
1102    pub task_execution_arn: Option<String>,
1103}
1104
1105/// <p>Describes the detailed result of a <code>TaskExecution</code> operation. This result includes the time in milliseconds spent in each phase, the status of the task execution, and the errors encountered.</p>
1106#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1107#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1108pub struct TaskExecutionResultDetail {
1109    /// <p>Errors that AWS DataSync encountered during execution of the task. You can use this error code to help troubleshoot issues.</p>
1110    #[serde(rename = "ErrorCode")]
1111    #[serde(skip_serializing_if = "Option::is_none")]
1112    pub error_code: Option<String>,
1113    /// <p>Detailed description of an error that was encountered during the task execution. You can use this information to help troubleshoot issues. </p>
1114    #[serde(rename = "ErrorDetail")]
1115    #[serde(skip_serializing_if = "Option::is_none")]
1116    pub error_detail: Option<String>,
1117    /// <p>The total time in milliseconds that AWS DataSync spent in the PREPARING phase. </p>
1118    #[serde(rename = "PrepareDuration")]
1119    #[serde(skip_serializing_if = "Option::is_none")]
1120    pub prepare_duration: Option<i64>,
1121    /// <p>The status of the PREPARING phase.</p>
1122    #[serde(rename = "PrepareStatus")]
1123    #[serde(skip_serializing_if = "Option::is_none")]
1124    pub prepare_status: Option<String>,
1125    /// <p>The total time in milliseconds that AWS DataSync took to transfer the file from the source to the destination location.</p>
1126    #[serde(rename = "TotalDuration")]
1127    #[serde(skip_serializing_if = "Option::is_none")]
1128    pub total_duration: Option<i64>,
1129    /// <p>The total time in milliseconds that AWS DataSync spent in the TRANSFERRING phase.</p>
1130    #[serde(rename = "TransferDuration")]
1131    #[serde(skip_serializing_if = "Option::is_none")]
1132    pub transfer_duration: Option<i64>,
1133    /// <p>The status of the TRANSFERRING Phase.</p>
1134    #[serde(rename = "TransferStatus")]
1135    #[serde(skip_serializing_if = "Option::is_none")]
1136    pub transfer_status: Option<String>,
1137    /// <p>The total time in milliseconds that AWS DataSync spent in the VERIFYING phase.</p>
1138    #[serde(rename = "VerifyDuration")]
1139    #[serde(skip_serializing_if = "Option::is_none")]
1140    pub verify_duration: Option<i64>,
1141    /// <p>The status of the VERIFYING Phase.</p>
1142    #[serde(rename = "VerifyStatus")]
1143    #[serde(skip_serializing_if = "Option::is_none")]
1144    pub verify_status: Option<String>,
1145}
1146
1147/// <p>Represents a single entry in a list of tasks. <code>TaskListEntry</code> returns an array that contains a list of tasks when the <a>ListTasks</a> operation is called. A task includes the source and destination file systems to sync and the options to use for the tasks.</p>
1148#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1149#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1150pub struct TaskListEntry {
1151    /// <p>The name of the task.</p>
1152    #[serde(rename = "Name")]
1153    #[serde(skip_serializing_if = "Option::is_none")]
1154    pub name: Option<String>,
1155    /// <p>The status of the task.</p>
1156    #[serde(rename = "Status")]
1157    #[serde(skip_serializing_if = "Option::is_none")]
1158    pub status: Option<String>,
1159    /// <p>The Amazon Resource Name (ARN) of the task.</p>
1160    #[serde(rename = "TaskArn")]
1161    #[serde(skip_serializing_if = "Option::is_none")]
1162    pub task_arn: Option<String>,
1163}
1164
1165/// <p>Specifies the schedule you want your task to use for repeated executions. For more information, see <a href="https://docs.aws.amazon.com/AmazonCloudWatch/latest/events/ScheduledEvents.html">Schedule Expressions for Rules</a>.</p>
1166#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1167pub struct TaskSchedule {
1168    /// <p>A cron expression that specifies when AWS DataSync initiates a scheduled transfer from a source to a destination location. </p>
1169    #[serde(rename = "ScheduleExpression")]
1170    pub schedule_expression: String,
1171}
1172
1173/// <p>UntagResourceRequest</p>
1174#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1175#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1176pub struct UntagResourceRequest {
1177    /// <p>The keys in the key-value pair in the tag to remove.</p>
1178    #[serde(rename = "Keys")]
1179    pub keys: Vec<String>,
1180    /// <p>The Amazon Resource Name (ARN) of the resource to remove the tag from.</p>
1181    #[serde(rename = "ResourceArn")]
1182    pub resource_arn: String,
1183}
1184
1185#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1186#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1187pub struct UntagResourceResponse {}
1188
1189/// <p>UpdateAgentRequest</p>
1190#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1191#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1192pub struct UpdateAgentRequest {
1193    /// <p>The Amazon Resource Name (ARN) of the agent to update.</p>
1194    #[serde(rename = "AgentArn")]
1195    pub agent_arn: String,
1196    /// <p>The name that you want to use to configure the agent.</p>
1197    #[serde(rename = "Name")]
1198    #[serde(skip_serializing_if = "Option::is_none")]
1199    pub name: Option<String>,
1200}
1201
1202#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1203#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1204pub struct UpdateAgentResponse {}
1205
1206/// <p>UpdateTaskResponse</p>
1207#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1208#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1209pub struct UpdateTaskRequest {
1210    /// <p>The Amazon Resource Name (ARN) of the resource name of the CloudWatch LogGroup.</p>
1211    #[serde(rename = "CloudWatchLogGroupArn")]
1212    #[serde(skip_serializing_if = "Option::is_none")]
1213    pub cloud_watch_log_group_arn: Option<String>,
1214    /// <p>A list of filter rules that determines which files to exclude from a task. The list should contain a single filter string that consists of the patterns to exclude. The patterns are delimited by "|" (that is, a pipe), for example: <code>"/folder1|/folder2"</code> </p> <p> </p>
1215    #[serde(rename = "Excludes")]
1216    #[serde(skip_serializing_if = "Option::is_none")]
1217    pub excludes: Option<Vec<FilterRule>>,
1218    /// <p>The name of the task to update.</p>
1219    #[serde(rename = "Name")]
1220    #[serde(skip_serializing_if = "Option::is_none")]
1221    pub name: Option<String>,
1222    #[serde(rename = "Options")]
1223    #[serde(skip_serializing_if = "Option::is_none")]
1224    pub options: Option<Options>,
1225    /// <p>Specifies a schedule used to periodically transfer files from a source to a destination location. You can configure your task to execute hourly, daily, weekly or on specific days of the week. You control when in the day or hour you want the task to execute. The time you specify is UTC time. For more information, see <a>task-scheduling</a>.</p>
1226    #[serde(rename = "Schedule")]
1227    #[serde(skip_serializing_if = "Option::is_none")]
1228    pub schedule: Option<TaskSchedule>,
1229    /// <p>The Amazon Resource Name (ARN) of the resource name of the task to update.</p>
1230    #[serde(rename = "TaskArn")]
1231    pub task_arn: String,
1232}
1233
1234#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1235#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1236pub struct UpdateTaskResponse {}
1237
1238/// Errors returned by CancelTaskExecution
1239#[derive(Debug, PartialEq)]
1240pub enum CancelTaskExecutionError {
1241    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
1242    Internal(String),
1243    /// <p>This exception is thrown when the client submits a malformed request.</p>
1244    InvalidRequest(String),
1245}
1246
1247impl CancelTaskExecutionError {
1248    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CancelTaskExecutionError> {
1249        if let Some(err) = proto::json::Error::parse(&res) {
1250            match err.typ.as_str() {
1251                "InternalException" => {
1252                    return RusotoError::Service(CancelTaskExecutionError::Internal(err.msg))
1253                }
1254                "InvalidRequestException" => {
1255                    return RusotoError::Service(CancelTaskExecutionError::InvalidRequest(err.msg))
1256                }
1257                "ValidationException" => return RusotoError::Validation(err.msg),
1258                _ => {}
1259            }
1260        }
1261        RusotoError::Unknown(res)
1262    }
1263}
1264impl fmt::Display for CancelTaskExecutionError {
1265    #[allow(unused_variables)]
1266    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1267        match *self {
1268            CancelTaskExecutionError::Internal(ref cause) => write!(f, "{}", cause),
1269            CancelTaskExecutionError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1270        }
1271    }
1272}
1273impl Error for CancelTaskExecutionError {}
1274/// Errors returned by CreateAgent
1275#[derive(Debug, PartialEq)]
1276pub enum CreateAgentError {
1277    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
1278    Internal(String),
1279    /// <p>This exception is thrown when the client submits a malformed request.</p>
1280    InvalidRequest(String),
1281}
1282
1283impl CreateAgentError {
1284    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateAgentError> {
1285        if let Some(err) = proto::json::Error::parse(&res) {
1286            match err.typ.as_str() {
1287                "InternalException" => {
1288                    return RusotoError::Service(CreateAgentError::Internal(err.msg))
1289                }
1290                "InvalidRequestException" => {
1291                    return RusotoError::Service(CreateAgentError::InvalidRequest(err.msg))
1292                }
1293                "ValidationException" => return RusotoError::Validation(err.msg),
1294                _ => {}
1295            }
1296        }
1297        RusotoError::Unknown(res)
1298    }
1299}
1300impl fmt::Display for CreateAgentError {
1301    #[allow(unused_variables)]
1302    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1303        match *self {
1304            CreateAgentError::Internal(ref cause) => write!(f, "{}", cause),
1305            CreateAgentError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1306        }
1307    }
1308}
1309impl Error for CreateAgentError {}
1310/// Errors returned by CreateLocationEfs
1311#[derive(Debug, PartialEq)]
1312pub enum CreateLocationEfsError {
1313    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
1314    Internal(String),
1315    /// <p>This exception is thrown when the client submits a malformed request.</p>
1316    InvalidRequest(String),
1317}
1318
1319impl CreateLocationEfsError {
1320    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateLocationEfsError> {
1321        if let Some(err) = proto::json::Error::parse(&res) {
1322            match err.typ.as_str() {
1323                "InternalException" => {
1324                    return RusotoError::Service(CreateLocationEfsError::Internal(err.msg))
1325                }
1326                "InvalidRequestException" => {
1327                    return RusotoError::Service(CreateLocationEfsError::InvalidRequest(err.msg))
1328                }
1329                "ValidationException" => return RusotoError::Validation(err.msg),
1330                _ => {}
1331            }
1332        }
1333        RusotoError::Unknown(res)
1334    }
1335}
1336impl fmt::Display for CreateLocationEfsError {
1337    #[allow(unused_variables)]
1338    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1339        match *self {
1340            CreateLocationEfsError::Internal(ref cause) => write!(f, "{}", cause),
1341            CreateLocationEfsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1342        }
1343    }
1344}
1345impl Error for CreateLocationEfsError {}
1346/// Errors returned by CreateLocationFsxWindows
1347#[derive(Debug, PartialEq)]
1348pub enum CreateLocationFsxWindowsError {
1349    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
1350    Internal(String),
1351    /// <p>This exception is thrown when the client submits a malformed request.</p>
1352    InvalidRequest(String),
1353}
1354
1355impl CreateLocationFsxWindowsError {
1356    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateLocationFsxWindowsError> {
1357        if let Some(err) = proto::json::Error::parse(&res) {
1358            match err.typ.as_str() {
1359                "InternalException" => {
1360                    return RusotoError::Service(CreateLocationFsxWindowsError::Internal(err.msg))
1361                }
1362                "InvalidRequestException" => {
1363                    return RusotoError::Service(CreateLocationFsxWindowsError::InvalidRequest(
1364                        err.msg,
1365                    ))
1366                }
1367                "ValidationException" => return RusotoError::Validation(err.msg),
1368                _ => {}
1369            }
1370        }
1371        RusotoError::Unknown(res)
1372    }
1373}
1374impl fmt::Display for CreateLocationFsxWindowsError {
1375    #[allow(unused_variables)]
1376    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1377        match *self {
1378            CreateLocationFsxWindowsError::Internal(ref cause) => write!(f, "{}", cause),
1379            CreateLocationFsxWindowsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1380        }
1381    }
1382}
1383impl Error for CreateLocationFsxWindowsError {}
1384/// Errors returned by CreateLocationNfs
1385#[derive(Debug, PartialEq)]
1386pub enum CreateLocationNfsError {
1387    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
1388    Internal(String),
1389    /// <p>This exception is thrown when the client submits a malformed request.</p>
1390    InvalidRequest(String),
1391}
1392
1393impl CreateLocationNfsError {
1394    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateLocationNfsError> {
1395        if let Some(err) = proto::json::Error::parse(&res) {
1396            match err.typ.as_str() {
1397                "InternalException" => {
1398                    return RusotoError::Service(CreateLocationNfsError::Internal(err.msg))
1399                }
1400                "InvalidRequestException" => {
1401                    return RusotoError::Service(CreateLocationNfsError::InvalidRequest(err.msg))
1402                }
1403                "ValidationException" => return RusotoError::Validation(err.msg),
1404                _ => {}
1405            }
1406        }
1407        RusotoError::Unknown(res)
1408    }
1409}
1410impl fmt::Display for CreateLocationNfsError {
1411    #[allow(unused_variables)]
1412    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1413        match *self {
1414            CreateLocationNfsError::Internal(ref cause) => write!(f, "{}", cause),
1415            CreateLocationNfsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1416        }
1417    }
1418}
1419impl Error for CreateLocationNfsError {}
1420/// Errors returned by CreateLocationS3
1421#[derive(Debug, PartialEq)]
1422pub enum CreateLocationS3Error {
1423    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
1424    Internal(String),
1425    /// <p>This exception is thrown when the client submits a malformed request.</p>
1426    InvalidRequest(String),
1427}
1428
1429impl CreateLocationS3Error {
1430    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateLocationS3Error> {
1431        if let Some(err) = proto::json::Error::parse(&res) {
1432            match err.typ.as_str() {
1433                "InternalException" => {
1434                    return RusotoError::Service(CreateLocationS3Error::Internal(err.msg))
1435                }
1436                "InvalidRequestException" => {
1437                    return RusotoError::Service(CreateLocationS3Error::InvalidRequest(err.msg))
1438                }
1439                "ValidationException" => return RusotoError::Validation(err.msg),
1440                _ => {}
1441            }
1442        }
1443        RusotoError::Unknown(res)
1444    }
1445}
1446impl fmt::Display for CreateLocationS3Error {
1447    #[allow(unused_variables)]
1448    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1449        match *self {
1450            CreateLocationS3Error::Internal(ref cause) => write!(f, "{}", cause),
1451            CreateLocationS3Error::InvalidRequest(ref cause) => write!(f, "{}", cause),
1452        }
1453    }
1454}
1455impl Error for CreateLocationS3Error {}
1456/// Errors returned by CreateLocationSmb
1457#[derive(Debug, PartialEq)]
1458pub enum CreateLocationSmbError {
1459    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
1460    Internal(String),
1461    /// <p>This exception is thrown when the client submits a malformed request.</p>
1462    InvalidRequest(String),
1463}
1464
1465impl CreateLocationSmbError {
1466    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateLocationSmbError> {
1467        if let Some(err) = proto::json::Error::parse(&res) {
1468            match err.typ.as_str() {
1469                "InternalException" => {
1470                    return RusotoError::Service(CreateLocationSmbError::Internal(err.msg))
1471                }
1472                "InvalidRequestException" => {
1473                    return RusotoError::Service(CreateLocationSmbError::InvalidRequest(err.msg))
1474                }
1475                "ValidationException" => return RusotoError::Validation(err.msg),
1476                _ => {}
1477            }
1478        }
1479        RusotoError::Unknown(res)
1480    }
1481}
1482impl fmt::Display for CreateLocationSmbError {
1483    #[allow(unused_variables)]
1484    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1485        match *self {
1486            CreateLocationSmbError::Internal(ref cause) => write!(f, "{}", cause),
1487            CreateLocationSmbError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1488        }
1489    }
1490}
1491impl Error for CreateLocationSmbError {}
1492/// Errors returned by CreateTask
1493#[derive(Debug, PartialEq)]
1494pub enum CreateTaskError {
1495    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
1496    Internal(String),
1497    /// <p>This exception is thrown when the client submits a malformed request.</p>
1498    InvalidRequest(String),
1499}
1500
1501impl CreateTaskError {
1502    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateTaskError> {
1503        if let Some(err) = proto::json::Error::parse(&res) {
1504            match err.typ.as_str() {
1505                "InternalException" => {
1506                    return RusotoError::Service(CreateTaskError::Internal(err.msg))
1507                }
1508                "InvalidRequestException" => {
1509                    return RusotoError::Service(CreateTaskError::InvalidRequest(err.msg))
1510                }
1511                "ValidationException" => return RusotoError::Validation(err.msg),
1512                _ => {}
1513            }
1514        }
1515        RusotoError::Unknown(res)
1516    }
1517}
1518impl fmt::Display for CreateTaskError {
1519    #[allow(unused_variables)]
1520    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1521        match *self {
1522            CreateTaskError::Internal(ref cause) => write!(f, "{}", cause),
1523            CreateTaskError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1524        }
1525    }
1526}
1527impl Error for CreateTaskError {}
1528/// Errors returned by DeleteAgent
1529#[derive(Debug, PartialEq)]
1530pub enum DeleteAgentError {
1531    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
1532    Internal(String),
1533    /// <p>This exception is thrown when the client submits a malformed request.</p>
1534    InvalidRequest(String),
1535}
1536
1537impl DeleteAgentError {
1538    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteAgentError> {
1539        if let Some(err) = proto::json::Error::parse(&res) {
1540            match err.typ.as_str() {
1541                "InternalException" => {
1542                    return RusotoError::Service(DeleteAgentError::Internal(err.msg))
1543                }
1544                "InvalidRequestException" => {
1545                    return RusotoError::Service(DeleteAgentError::InvalidRequest(err.msg))
1546                }
1547                "ValidationException" => return RusotoError::Validation(err.msg),
1548                _ => {}
1549            }
1550        }
1551        RusotoError::Unknown(res)
1552    }
1553}
1554impl fmt::Display for DeleteAgentError {
1555    #[allow(unused_variables)]
1556    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1557        match *self {
1558            DeleteAgentError::Internal(ref cause) => write!(f, "{}", cause),
1559            DeleteAgentError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1560        }
1561    }
1562}
1563impl Error for DeleteAgentError {}
1564/// Errors returned by DeleteLocation
1565#[derive(Debug, PartialEq)]
1566pub enum DeleteLocationError {
1567    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
1568    Internal(String),
1569    /// <p>This exception is thrown when the client submits a malformed request.</p>
1570    InvalidRequest(String),
1571}
1572
1573impl DeleteLocationError {
1574    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteLocationError> {
1575        if let Some(err) = proto::json::Error::parse(&res) {
1576            match err.typ.as_str() {
1577                "InternalException" => {
1578                    return RusotoError::Service(DeleteLocationError::Internal(err.msg))
1579                }
1580                "InvalidRequestException" => {
1581                    return RusotoError::Service(DeleteLocationError::InvalidRequest(err.msg))
1582                }
1583                "ValidationException" => return RusotoError::Validation(err.msg),
1584                _ => {}
1585            }
1586        }
1587        RusotoError::Unknown(res)
1588    }
1589}
1590impl fmt::Display for DeleteLocationError {
1591    #[allow(unused_variables)]
1592    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1593        match *self {
1594            DeleteLocationError::Internal(ref cause) => write!(f, "{}", cause),
1595            DeleteLocationError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1596        }
1597    }
1598}
1599impl Error for DeleteLocationError {}
1600/// Errors returned by DeleteTask
1601#[derive(Debug, PartialEq)]
1602pub enum DeleteTaskError {
1603    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
1604    Internal(String),
1605    /// <p>This exception is thrown when the client submits a malformed request.</p>
1606    InvalidRequest(String),
1607}
1608
1609impl DeleteTaskError {
1610    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteTaskError> {
1611        if let Some(err) = proto::json::Error::parse(&res) {
1612            match err.typ.as_str() {
1613                "InternalException" => {
1614                    return RusotoError::Service(DeleteTaskError::Internal(err.msg))
1615                }
1616                "InvalidRequestException" => {
1617                    return RusotoError::Service(DeleteTaskError::InvalidRequest(err.msg))
1618                }
1619                "ValidationException" => return RusotoError::Validation(err.msg),
1620                _ => {}
1621            }
1622        }
1623        RusotoError::Unknown(res)
1624    }
1625}
1626impl fmt::Display for DeleteTaskError {
1627    #[allow(unused_variables)]
1628    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1629        match *self {
1630            DeleteTaskError::Internal(ref cause) => write!(f, "{}", cause),
1631            DeleteTaskError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1632        }
1633    }
1634}
1635impl Error for DeleteTaskError {}
1636/// Errors returned by DescribeAgent
1637#[derive(Debug, PartialEq)]
1638pub enum DescribeAgentError {
1639    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
1640    Internal(String),
1641    /// <p>This exception is thrown when the client submits a malformed request.</p>
1642    InvalidRequest(String),
1643}
1644
1645impl DescribeAgentError {
1646    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeAgentError> {
1647        if let Some(err) = proto::json::Error::parse(&res) {
1648            match err.typ.as_str() {
1649                "InternalException" => {
1650                    return RusotoError::Service(DescribeAgentError::Internal(err.msg))
1651                }
1652                "InvalidRequestException" => {
1653                    return RusotoError::Service(DescribeAgentError::InvalidRequest(err.msg))
1654                }
1655                "ValidationException" => return RusotoError::Validation(err.msg),
1656                _ => {}
1657            }
1658        }
1659        RusotoError::Unknown(res)
1660    }
1661}
1662impl fmt::Display for DescribeAgentError {
1663    #[allow(unused_variables)]
1664    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1665        match *self {
1666            DescribeAgentError::Internal(ref cause) => write!(f, "{}", cause),
1667            DescribeAgentError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1668        }
1669    }
1670}
1671impl Error for DescribeAgentError {}
1672/// Errors returned by DescribeLocationEfs
1673#[derive(Debug, PartialEq)]
1674pub enum DescribeLocationEfsError {
1675    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
1676    Internal(String),
1677    /// <p>This exception is thrown when the client submits a malformed request.</p>
1678    InvalidRequest(String),
1679}
1680
1681impl DescribeLocationEfsError {
1682    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeLocationEfsError> {
1683        if let Some(err) = proto::json::Error::parse(&res) {
1684            match err.typ.as_str() {
1685                "InternalException" => {
1686                    return RusotoError::Service(DescribeLocationEfsError::Internal(err.msg))
1687                }
1688                "InvalidRequestException" => {
1689                    return RusotoError::Service(DescribeLocationEfsError::InvalidRequest(err.msg))
1690                }
1691                "ValidationException" => return RusotoError::Validation(err.msg),
1692                _ => {}
1693            }
1694        }
1695        RusotoError::Unknown(res)
1696    }
1697}
1698impl fmt::Display for DescribeLocationEfsError {
1699    #[allow(unused_variables)]
1700    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1701        match *self {
1702            DescribeLocationEfsError::Internal(ref cause) => write!(f, "{}", cause),
1703            DescribeLocationEfsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1704        }
1705    }
1706}
1707impl Error for DescribeLocationEfsError {}
1708/// Errors returned by DescribeLocationFsxWindows
1709#[derive(Debug, PartialEq)]
1710pub enum DescribeLocationFsxWindowsError {
1711    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
1712    Internal(String),
1713    /// <p>This exception is thrown when the client submits a malformed request.</p>
1714    InvalidRequest(String),
1715}
1716
1717impl DescribeLocationFsxWindowsError {
1718    pub fn from_response(
1719        res: BufferedHttpResponse,
1720    ) -> RusotoError<DescribeLocationFsxWindowsError> {
1721        if let Some(err) = proto::json::Error::parse(&res) {
1722            match err.typ.as_str() {
1723                "InternalException" => {
1724                    return RusotoError::Service(DescribeLocationFsxWindowsError::Internal(err.msg))
1725                }
1726                "InvalidRequestException" => {
1727                    return RusotoError::Service(DescribeLocationFsxWindowsError::InvalidRequest(
1728                        err.msg,
1729                    ))
1730                }
1731                "ValidationException" => return RusotoError::Validation(err.msg),
1732                _ => {}
1733            }
1734        }
1735        RusotoError::Unknown(res)
1736    }
1737}
1738impl fmt::Display for DescribeLocationFsxWindowsError {
1739    #[allow(unused_variables)]
1740    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1741        match *self {
1742            DescribeLocationFsxWindowsError::Internal(ref cause) => write!(f, "{}", cause),
1743            DescribeLocationFsxWindowsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1744        }
1745    }
1746}
1747impl Error for DescribeLocationFsxWindowsError {}
1748/// Errors returned by DescribeLocationNfs
1749#[derive(Debug, PartialEq)]
1750pub enum DescribeLocationNfsError {
1751    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
1752    Internal(String),
1753    /// <p>This exception is thrown when the client submits a malformed request.</p>
1754    InvalidRequest(String),
1755}
1756
1757impl DescribeLocationNfsError {
1758    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeLocationNfsError> {
1759        if let Some(err) = proto::json::Error::parse(&res) {
1760            match err.typ.as_str() {
1761                "InternalException" => {
1762                    return RusotoError::Service(DescribeLocationNfsError::Internal(err.msg))
1763                }
1764                "InvalidRequestException" => {
1765                    return RusotoError::Service(DescribeLocationNfsError::InvalidRequest(err.msg))
1766                }
1767                "ValidationException" => return RusotoError::Validation(err.msg),
1768                _ => {}
1769            }
1770        }
1771        RusotoError::Unknown(res)
1772    }
1773}
1774impl fmt::Display for DescribeLocationNfsError {
1775    #[allow(unused_variables)]
1776    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1777        match *self {
1778            DescribeLocationNfsError::Internal(ref cause) => write!(f, "{}", cause),
1779            DescribeLocationNfsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1780        }
1781    }
1782}
1783impl Error for DescribeLocationNfsError {}
1784/// Errors returned by DescribeLocationS3
1785#[derive(Debug, PartialEq)]
1786pub enum DescribeLocationS3Error {
1787    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
1788    Internal(String),
1789    /// <p>This exception is thrown when the client submits a malformed request.</p>
1790    InvalidRequest(String),
1791}
1792
1793impl DescribeLocationS3Error {
1794    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeLocationS3Error> {
1795        if let Some(err) = proto::json::Error::parse(&res) {
1796            match err.typ.as_str() {
1797                "InternalException" => {
1798                    return RusotoError::Service(DescribeLocationS3Error::Internal(err.msg))
1799                }
1800                "InvalidRequestException" => {
1801                    return RusotoError::Service(DescribeLocationS3Error::InvalidRequest(err.msg))
1802                }
1803                "ValidationException" => return RusotoError::Validation(err.msg),
1804                _ => {}
1805            }
1806        }
1807        RusotoError::Unknown(res)
1808    }
1809}
1810impl fmt::Display for DescribeLocationS3Error {
1811    #[allow(unused_variables)]
1812    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1813        match *self {
1814            DescribeLocationS3Error::Internal(ref cause) => write!(f, "{}", cause),
1815            DescribeLocationS3Error::InvalidRequest(ref cause) => write!(f, "{}", cause),
1816        }
1817    }
1818}
1819impl Error for DescribeLocationS3Error {}
1820/// Errors returned by DescribeLocationSmb
1821#[derive(Debug, PartialEq)]
1822pub enum DescribeLocationSmbError {
1823    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
1824    Internal(String),
1825    /// <p>This exception is thrown when the client submits a malformed request.</p>
1826    InvalidRequest(String),
1827}
1828
1829impl DescribeLocationSmbError {
1830    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeLocationSmbError> {
1831        if let Some(err) = proto::json::Error::parse(&res) {
1832            match err.typ.as_str() {
1833                "InternalException" => {
1834                    return RusotoError::Service(DescribeLocationSmbError::Internal(err.msg))
1835                }
1836                "InvalidRequestException" => {
1837                    return RusotoError::Service(DescribeLocationSmbError::InvalidRequest(err.msg))
1838                }
1839                "ValidationException" => return RusotoError::Validation(err.msg),
1840                _ => {}
1841            }
1842        }
1843        RusotoError::Unknown(res)
1844    }
1845}
1846impl fmt::Display for DescribeLocationSmbError {
1847    #[allow(unused_variables)]
1848    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1849        match *self {
1850            DescribeLocationSmbError::Internal(ref cause) => write!(f, "{}", cause),
1851            DescribeLocationSmbError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1852        }
1853    }
1854}
1855impl Error for DescribeLocationSmbError {}
1856/// Errors returned by DescribeTask
1857#[derive(Debug, PartialEq)]
1858pub enum DescribeTaskError {
1859    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
1860    Internal(String),
1861    /// <p>This exception is thrown when the client submits a malformed request.</p>
1862    InvalidRequest(String),
1863}
1864
1865impl DescribeTaskError {
1866    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTaskError> {
1867        if let Some(err) = proto::json::Error::parse(&res) {
1868            match err.typ.as_str() {
1869                "InternalException" => {
1870                    return RusotoError::Service(DescribeTaskError::Internal(err.msg))
1871                }
1872                "InvalidRequestException" => {
1873                    return RusotoError::Service(DescribeTaskError::InvalidRequest(err.msg))
1874                }
1875                "ValidationException" => return RusotoError::Validation(err.msg),
1876                _ => {}
1877            }
1878        }
1879        RusotoError::Unknown(res)
1880    }
1881}
1882impl fmt::Display for DescribeTaskError {
1883    #[allow(unused_variables)]
1884    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1885        match *self {
1886            DescribeTaskError::Internal(ref cause) => write!(f, "{}", cause),
1887            DescribeTaskError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1888        }
1889    }
1890}
1891impl Error for DescribeTaskError {}
1892/// Errors returned by DescribeTaskExecution
1893#[derive(Debug, PartialEq)]
1894pub enum DescribeTaskExecutionError {
1895    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
1896    Internal(String),
1897    /// <p>This exception is thrown when the client submits a malformed request.</p>
1898    InvalidRequest(String),
1899}
1900
1901impl DescribeTaskExecutionError {
1902    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeTaskExecutionError> {
1903        if let Some(err) = proto::json::Error::parse(&res) {
1904            match err.typ.as_str() {
1905                "InternalException" => {
1906                    return RusotoError::Service(DescribeTaskExecutionError::Internal(err.msg))
1907                }
1908                "InvalidRequestException" => {
1909                    return RusotoError::Service(DescribeTaskExecutionError::InvalidRequest(
1910                        err.msg,
1911                    ))
1912                }
1913                "ValidationException" => return RusotoError::Validation(err.msg),
1914                _ => {}
1915            }
1916        }
1917        RusotoError::Unknown(res)
1918    }
1919}
1920impl fmt::Display for DescribeTaskExecutionError {
1921    #[allow(unused_variables)]
1922    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1923        match *self {
1924            DescribeTaskExecutionError::Internal(ref cause) => write!(f, "{}", cause),
1925            DescribeTaskExecutionError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1926        }
1927    }
1928}
1929impl Error for DescribeTaskExecutionError {}
1930/// Errors returned by ListAgents
1931#[derive(Debug, PartialEq)]
1932pub enum ListAgentsError {
1933    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
1934    Internal(String),
1935    /// <p>This exception is thrown when the client submits a malformed request.</p>
1936    InvalidRequest(String),
1937}
1938
1939impl ListAgentsError {
1940    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListAgentsError> {
1941        if let Some(err) = proto::json::Error::parse(&res) {
1942            match err.typ.as_str() {
1943                "InternalException" => {
1944                    return RusotoError::Service(ListAgentsError::Internal(err.msg))
1945                }
1946                "InvalidRequestException" => {
1947                    return RusotoError::Service(ListAgentsError::InvalidRequest(err.msg))
1948                }
1949                "ValidationException" => return RusotoError::Validation(err.msg),
1950                _ => {}
1951            }
1952        }
1953        RusotoError::Unknown(res)
1954    }
1955}
1956impl fmt::Display for ListAgentsError {
1957    #[allow(unused_variables)]
1958    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1959        match *self {
1960            ListAgentsError::Internal(ref cause) => write!(f, "{}", cause),
1961            ListAgentsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1962        }
1963    }
1964}
1965impl Error for ListAgentsError {}
1966/// Errors returned by ListLocations
1967#[derive(Debug, PartialEq)]
1968pub enum ListLocationsError {
1969    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
1970    Internal(String),
1971    /// <p>This exception is thrown when the client submits a malformed request.</p>
1972    InvalidRequest(String),
1973}
1974
1975impl ListLocationsError {
1976    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListLocationsError> {
1977        if let Some(err) = proto::json::Error::parse(&res) {
1978            match err.typ.as_str() {
1979                "InternalException" => {
1980                    return RusotoError::Service(ListLocationsError::Internal(err.msg))
1981                }
1982                "InvalidRequestException" => {
1983                    return RusotoError::Service(ListLocationsError::InvalidRequest(err.msg))
1984                }
1985                "ValidationException" => return RusotoError::Validation(err.msg),
1986                _ => {}
1987            }
1988        }
1989        RusotoError::Unknown(res)
1990    }
1991}
1992impl fmt::Display for ListLocationsError {
1993    #[allow(unused_variables)]
1994    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1995        match *self {
1996            ListLocationsError::Internal(ref cause) => write!(f, "{}", cause),
1997            ListLocationsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
1998        }
1999    }
2000}
2001impl Error for ListLocationsError {}
2002/// Errors returned by ListTagsForResource
2003#[derive(Debug, PartialEq)]
2004pub enum ListTagsForResourceError {
2005    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
2006    Internal(String),
2007    /// <p>This exception is thrown when the client submits a malformed request.</p>
2008    InvalidRequest(String),
2009}
2010
2011impl ListTagsForResourceError {
2012    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTagsForResourceError> {
2013        if let Some(err) = proto::json::Error::parse(&res) {
2014            match err.typ.as_str() {
2015                "InternalException" => {
2016                    return RusotoError::Service(ListTagsForResourceError::Internal(err.msg))
2017                }
2018                "InvalidRequestException" => {
2019                    return RusotoError::Service(ListTagsForResourceError::InvalidRequest(err.msg))
2020                }
2021                "ValidationException" => return RusotoError::Validation(err.msg),
2022                _ => {}
2023            }
2024        }
2025        RusotoError::Unknown(res)
2026    }
2027}
2028impl fmt::Display for ListTagsForResourceError {
2029    #[allow(unused_variables)]
2030    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2031        match *self {
2032            ListTagsForResourceError::Internal(ref cause) => write!(f, "{}", cause),
2033            ListTagsForResourceError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2034        }
2035    }
2036}
2037impl Error for ListTagsForResourceError {}
2038/// Errors returned by ListTaskExecutions
2039#[derive(Debug, PartialEq)]
2040pub enum ListTaskExecutionsError {
2041    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
2042    Internal(String),
2043    /// <p>This exception is thrown when the client submits a malformed request.</p>
2044    InvalidRequest(String),
2045}
2046
2047impl ListTaskExecutionsError {
2048    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTaskExecutionsError> {
2049        if let Some(err) = proto::json::Error::parse(&res) {
2050            match err.typ.as_str() {
2051                "InternalException" => {
2052                    return RusotoError::Service(ListTaskExecutionsError::Internal(err.msg))
2053                }
2054                "InvalidRequestException" => {
2055                    return RusotoError::Service(ListTaskExecutionsError::InvalidRequest(err.msg))
2056                }
2057                "ValidationException" => return RusotoError::Validation(err.msg),
2058                _ => {}
2059            }
2060        }
2061        RusotoError::Unknown(res)
2062    }
2063}
2064impl fmt::Display for ListTaskExecutionsError {
2065    #[allow(unused_variables)]
2066    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2067        match *self {
2068            ListTaskExecutionsError::Internal(ref cause) => write!(f, "{}", cause),
2069            ListTaskExecutionsError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2070        }
2071    }
2072}
2073impl Error for ListTaskExecutionsError {}
2074/// Errors returned by ListTasks
2075#[derive(Debug, PartialEq)]
2076pub enum ListTasksError {
2077    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
2078    Internal(String),
2079    /// <p>This exception is thrown when the client submits a malformed request.</p>
2080    InvalidRequest(String),
2081}
2082
2083impl ListTasksError {
2084    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ListTasksError> {
2085        if let Some(err) = proto::json::Error::parse(&res) {
2086            match err.typ.as_str() {
2087                "InternalException" => {
2088                    return RusotoError::Service(ListTasksError::Internal(err.msg))
2089                }
2090                "InvalidRequestException" => {
2091                    return RusotoError::Service(ListTasksError::InvalidRequest(err.msg))
2092                }
2093                "ValidationException" => return RusotoError::Validation(err.msg),
2094                _ => {}
2095            }
2096        }
2097        RusotoError::Unknown(res)
2098    }
2099}
2100impl fmt::Display for ListTasksError {
2101    #[allow(unused_variables)]
2102    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2103        match *self {
2104            ListTasksError::Internal(ref cause) => write!(f, "{}", cause),
2105            ListTasksError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2106        }
2107    }
2108}
2109impl Error for ListTasksError {}
2110/// Errors returned by StartTaskExecution
2111#[derive(Debug, PartialEq)]
2112pub enum StartTaskExecutionError {
2113    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
2114    Internal(String),
2115    /// <p>This exception is thrown when the client submits a malformed request.</p>
2116    InvalidRequest(String),
2117}
2118
2119impl StartTaskExecutionError {
2120    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<StartTaskExecutionError> {
2121        if let Some(err) = proto::json::Error::parse(&res) {
2122            match err.typ.as_str() {
2123                "InternalException" => {
2124                    return RusotoError::Service(StartTaskExecutionError::Internal(err.msg))
2125                }
2126                "InvalidRequestException" => {
2127                    return RusotoError::Service(StartTaskExecutionError::InvalidRequest(err.msg))
2128                }
2129                "ValidationException" => return RusotoError::Validation(err.msg),
2130                _ => {}
2131            }
2132        }
2133        RusotoError::Unknown(res)
2134    }
2135}
2136impl fmt::Display for StartTaskExecutionError {
2137    #[allow(unused_variables)]
2138    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2139        match *self {
2140            StartTaskExecutionError::Internal(ref cause) => write!(f, "{}", cause),
2141            StartTaskExecutionError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2142        }
2143    }
2144}
2145impl Error for StartTaskExecutionError {}
2146/// Errors returned by TagResource
2147#[derive(Debug, PartialEq)]
2148pub enum TagResourceError {
2149    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
2150    Internal(String),
2151    /// <p>This exception is thrown when the client submits a malformed request.</p>
2152    InvalidRequest(String),
2153}
2154
2155impl TagResourceError {
2156    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<TagResourceError> {
2157        if let Some(err) = proto::json::Error::parse(&res) {
2158            match err.typ.as_str() {
2159                "InternalException" => {
2160                    return RusotoError::Service(TagResourceError::Internal(err.msg))
2161                }
2162                "InvalidRequestException" => {
2163                    return RusotoError::Service(TagResourceError::InvalidRequest(err.msg))
2164                }
2165                "ValidationException" => return RusotoError::Validation(err.msg),
2166                _ => {}
2167            }
2168        }
2169        RusotoError::Unknown(res)
2170    }
2171}
2172impl fmt::Display for TagResourceError {
2173    #[allow(unused_variables)]
2174    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2175        match *self {
2176            TagResourceError::Internal(ref cause) => write!(f, "{}", cause),
2177            TagResourceError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2178        }
2179    }
2180}
2181impl Error for TagResourceError {}
2182/// Errors returned by UntagResource
2183#[derive(Debug, PartialEq)]
2184pub enum UntagResourceError {
2185    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
2186    Internal(String),
2187    /// <p>This exception is thrown when the client submits a malformed request.</p>
2188    InvalidRequest(String),
2189}
2190
2191impl UntagResourceError {
2192    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UntagResourceError> {
2193        if let Some(err) = proto::json::Error::parse(&res) {
2194            match err.typ.as_str() {
2195                "InternalException" => {
2196                    return RusotoError::Service(UntagResourceError::Internal(err.msg))
2197                }
2198                "InvalidRequestException" => {
2199                    return RusotoError::Service(UntagResourceError::InvalidRequest(err.msg))
2200                }
2201                "ValidationException" => return RusotoError::Validation(err.msg),
2202                _ => {}
2203            }
2204        }
2205        RusotoError::Unknown(res)
2206    }
2207}
2208impl fmt::Display for UntagResourceError {
2209    #[allow(unused_variables)]
2210    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2211        match *self {
2212            UntagResourceError::Internal(ref cause) => write!(f, "{}", cause),
2213            UntagResourceError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2214        }
2215    }
2216}
2217impl Error for UntagResourceError {}
2218/// Errors returned by UpdateAgent
2219#[derive(Debug, PartialEq)]
2220pub enum UpdateAgentError {
2221    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
2222    Internal(String),
2223    /// <p>This exception is thrown when the client submits a malformed request.</p>
2224    InvalidRequest(String),
2225}
2226
2227impl UpdateAgentError {
2228    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateAgentError> {
2229        if let Some(err) = proto::json::Error::parse(&res) {
2230            match err.typ.as_str() {
2231                "InternalException" => {
2232                    return RusotoError::Service(UpdateAgentError::Internal(err.msg))
2233                }
2234                "InvalidRequestException" => {
2235                    return RusotoError::Service(UpdateAgentError::InvalidRequest(err.msg))
2236                }
2237                "ValidationException" => return RusotoError::Validation(err.msg),
2238                _ => {}
2239            }
2240        }
2241        RusotoError::Unknown(res)
2242    }
2243}
2244impl fmt::Display for UpdateAgentError {
2245    #[allow(unused_variables)]
2246    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2247        match *self {
2248            UpdateAgentError::Internal(ref cause) => write!(f, "{}", cause),
2249            UpdateAgentError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2250        }
2251    }
2252}
2253impl Error for UpdateAgentError {}
2254/// Errors returned by UpdateTask
2255#[derive(Debug, PartialEq)]
2256pub enum UpdateTaskError {
2257    /// <p>This exception is thrown when an error occurs in the AWS DataSync service.</p>
2258    Internal(String),
2259    /// <p>This exception is thrown when the client submits a malformed request.</p>
2260    InvalidRequest(String),
2261}
2262
2263impl UpdateTaskError {
2264    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateTaskError> {
2265        if let Some(err) = proto::json::Error::parse(&res) {
2266            match err.typ.as_str() {
2267                "InternalException" => {
2268                    return RusotoError::Service(UpdateTaskError::Internal(err.msg))
2269                }
2270                "InvalidRequestException" => {
2271                    return RusotoError::Service(UpdateTaskError::InvalidRequest(err.msg))
2272                }
2273                "ValidationException" => return RusotoError::Validation(err.msg),
2274                _ => {}
2275            }
2276        }
2277        RusotoError::Unknown(res)
2278    }
2279}
2280impl fmt::Display for UpdateTaskError {
2281    #[allow(unused_variables)]
2282    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2283        match *self {
2284            UpdateTaskError::Internal(ref cause) => write!(f, "{}", cause),
2285            UpdateTaskError::InvalidRequest(ref cause) => write!(f, "{}", cause),
2286        }
2287    }
2288}
2289impl Error for UpdateTaskError {}
2290/// Trait representing the capabilities of the DataSync API. DataSync clients implement this trait.
2291#[async_trait]
2292pub trait DataSync {
2293    /// <p>Cancels execution of a task. </p> <p>When you cancel a task execution, the transfer of some files are abruptly interrupted. The contents of files that are transferred to the destination might be incomplete or inconsistent with the source files. However, if you start a new task execution on the same task and you allow the task execution to complete, file content on the destination is complete and consistent. This applies to other unexpected failures that interrupt a task execution. In all of these cases, AWS DataSync successfully complete the transfer when you start the next task execution.</p>
2294    async fn cancel_task_execution(
2295        &self,
2296        input: CancelTaskExecutionRequest,
2297    ) -> Result<CancelTaskExecutionResponse, RusotoError<CancelTaskExecutionError>>;
2298
2299    /// <p><p>Activates an AWS DataSync agent that you have deployed on your host. The activation process associates your agent with your account. In the activation process, you specify information such as the AWS Region that you want to activate the agent in. You activate the agent in the AWS Region where your target locations (in Amazon S3 or Amazon EFS) reside. Your tasks are created in this AWS Region.</p> <p>You can activate the agent in a VPC (Virtual private Cloud) or provide the agent access to a VPC endpoint so you can run tasks without going over the public Internet.</p> <p>You can use an agent for more than one location. If a task uses multiple agents, all of them need to have status AVAILABLE for the task to run. If you use multiple agents for a source location, the status of all the agents must be AVAILABLE for the task to run. </p> <p>Agents are automatically updated by AWS on a regular basis, using a mechanism that ensures minimal interruption to your tasks.</p> <p/></p>
2300    async fn create_agent(
2301        &self,
2302        input: CreateAgentRequest,
2303    ) -> Result<CreateAgentResponse, RusotoError<CreateAgentError>>;
2304
2305    /// <p>Creates an endpoint for an Amazon EFS file system.</p>
2306    async fn create_location_efs(
2307        &self,
2308        input: CreateLocationEfsRequest,
2309    ) -> Result<CreateLocationEfsResponse, RusotoError<CreateLocationEfsError>>;
2310
2311    /// <p>Creates an endpoint for an Amazon FSx for Windows file system.</p>
2312    async fn create_location_fsx_windows(
2313        &self,
2314        input: CreateLocationFsxWindowsRequest,
2315    ) -> Result<CreateLocationFsxWindowsResponse, RusotoError<CreateLocationFsxWindowsError>>;
2316
2317    /// <p>Defines a file system on a Network File System (NFS) server that can be read from or written to</p>
2318    async fn create_location_nfs(
2319        &self,
2320        input: CreateLocationNfsRequest,
2321    ) -> Result<CreateLocationNfsResponse, RusotoError<CreateLocationNfsError>>;
2322
2323    /// <p>Creates an endpoint for an Amazon S3 bucket.</p> <p>For AWS DataSync to access a destination S3 bucket, it needs an AWS Identity and Access Management (IAM) role that has the required permissions. You can set up the required permissions by creating an IAM policy that grants the required permissions and attaching the policy to the role. An example of such a policy is shown in the examples section.</p> <p>For more information, see https://docs.aws.amazon.com/datasync/latest/userguide/working-with-locations.html#create-s3-location in the <i>AWS DataSync User Guide.</i> </p>
2324    async fn create_location_s3(
2325        &self,
2326        input: CreateLocationS3Request,
2327    ) -> Result<CreateLocationS3Response, RusotoError<CreateLocationS3Error>>;
2328
2329    /// <p>Defines a file system on an Server Message Block (SMB) server that can be read from or written to.</p>
2330    async fn create_location_smb(
2331        &self,
2332        input: CreateLocationSmbRequest,
2333    ) -> Result<CreateLocationSmbResponse, RusotoError<CreateLocationSmbError>>;
2334
2335    /// <p>Creates a task. A task is a set of two locations (source and destination) and a set of Options that you use to control the behavior of a task. If you don't specify Options when you create a task, AWS DataSync populates them with service defaults.</p> <p>When you create a task, it first enters the CREATING state. During CREATING AWS DataSync attempts to mount the on-premises Network File System (NFS) location. The task transitions to the AVAILABLE state without waiting for the AWS location to become mounted. If required, AWS DataSync mounts the AWS location before each task execution.</p> <p>If an agent that is associated with a source (NFS) location goes offline, the task transitions to the UNAVAILABLE status. If the status of the task remains in the CREATING status for more than a few minutes, it means that your agent might be having trouble mounting the source NFS file system. Check the task's ErrorCode and ErrorDetail. Mount issues are often caused by either a misconfigured firewall or a mistyped NFS server host name.</p>
2336    async fn create_task(
2337        &self,
2338        input: CreateTaskRequest,
2339    ) -> Result<CreateTaskResponse, RusotoError<CreateTaskError>>;
2340
2341    /// <p>Deletes an agent. To specify which agent to delete, use the Amazon Resource Name (ARN) of the agent in your request. The operation disassociates the agent from your AWS account. However, it doesn't delete the agent virtual machine (VM) from your on-premises environment.</p>
2342    async fn delete_agent(
2343        &self,
2344        input: DeleteAgentRequest,
2345    ) -> Result<DeleteAgentResponse, RusotoError<DeleteAgentError>>;
2346
2347    /// <p>Deletes the configuration of a location used by AWS DataSync. </p>
2348    async fn delete_location(
2349        &self,
2350        input: DeleteLocationRequest,
2351    ) -> Result<DeleteLocationResponse, RusotoError<DeleteLocationError>>;
2352
2353    /// <p>Deletes a task.</p>
2354    async fn delete_task(
2355        &self,
2356        input: DeleteTaskRequest,
2357    ) -> Result<DeleteTaskResponse, RusotoError<DeleteTaskError>>;
2358
2359    /// <p>Returns metadata such as the name, the network interfaces, and the status (that is, whether the agent is running or not) for an agent. To specify which agent to describe, use the Amazon Resource Name (ARN) of the agent in your request. </p>
2360    async fn describe_agent(
2361        &self,
2362        input: DescribeAgentRequest,
2363    ) -> Result<DescribeAgentResponse, RusotoError<DescribeAgentError>>;
2364
2365    /// <p>Returns metadata, such as the path information about an Amazon EFS location.</p>
2366    async fn describe_location_efs(
2367        &self,
2368        input: DescribeLocationEfsRequest,
2369    ) -> Result<DescribeLocationEfsResponse, RusotoError<DescribeLocationEfsError>>;
2370
2371    /// <p>Returns metadata, such as the path information about an Amazon FSx for Windows location.</p>
2372    async fn describe_location_fsx_windows(
2373        &self,
2374        input: DescribeLocationFsxWindowsRequest,
2375    ) -> Result<DescribeLocationFsxWindowsResponse, RusotoError<DescribeLocationFsxWindowsError>>;
2376
2377    /// <p>Returns metadata, such as the path information, about a NFS location.</p>
2378    async fn describe_location_nfs(
2379        &self,
2380        input: DescribeLocationNfsRequest,
2381    ) -> Result<DescribeLocationNfsResponse, RusotoError<DescribeLocationNfsError>>;
2382
2383    /// <p>Returns metadata, such as bucket name, about an Amazon S3 bucket location.</p>
2384    async fn describe_location_s3(
2385        &self,
2386        input: DescribeLocationS3Request,
2387    ) -> Result<DescribeLocationS3Response, RusotoError<DescribeLocationS3Error>>;
2388
2389    /// <p>Returns metadata, such as the path and user information about a SMB location.</p>
2390    async fn describe_location_smb(
2391        &self,
2392        input: DescribeLocationSmbRequest,
2393    ) -> Result<DescribeLocationSmbResponse, RusotoError<DescribeLocationSmbError>>;
2394
2395    /// <p>Returns metadata about a task.</p>
2396    async fn describe_task(
2397        &self,
2398        input: DescribeTaskRequest,
2399    ) -> Result<DescribeTaskResponse, RusotoError<DescribeTaskError>>;
2400
2401    /// <p>Returns detailed metadata about a task that is being executed.</p>
2402    async fn describe_task_execution(
2403        &self,
2404        input: DescribeTaskExecutionRequest,
2405    ) -> Result<DescribeTaskExecutionResponse, RusotoError<DescribeTaskExecutionError>>;
2406
2407    /// <p>Returns a list of agents owned by an AWS account in the AWS Region specified in the request. The returned list is ordered by agent Amazon Resource Name (ARN).</p> <p>By default, this operation returns a maximum of 100 agents. This operation supports pagination that enables you to optionally reduce the number of agents returned in a response.</p> <p>If you have more agents than are returned in a response (that is, the response returns only a truncated list of your agents), the response contains a marker that you can specify in your next request to fetch the next page of agents.</p>
2408    async fn list_agents(
2409        &self,
2410        input: ListAgentsRequest,
2411    ) -> Result<ListAgentsResponse, RusotoError<ListAgentsError>>;
2412
2413    /// <p>Returns a lists of source and destination locations.</p> <p>If you have more locations than are returned in a response (that is, the response returns only a truncated list of your agents), the response contains a token that you can specify in your next request to fetch the next page of locations.</p>
2414    async fn list_locations(
2415        &self,
2416        input: ListLocationsRequest,
2417    ) -> Result<ListLocationsResponse, RusotoError<ListLocationsError>>;
2418
2419    /// <p>Returns all the tags associated with a specified resources. </p>
2420    async fn list_tags_for_resource(
2421        &self,
2422        input: ListTagsForResourceRequest,
2423    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>>;
2424
2425    /// <p>Returns a list of executed tasks.</p>
2426    async fn list_task_executions(
2427        &self,
2428        input: ListTaskExecutionsRequest,
2429    ) -> Result<ListTaskExecutionsResponse, RusotoError<ListTaskExecutionsError>>;
2430
2431    /// <p>Returns a list of all the tasks.</p>
2432    async fn list_tasks(
2433        &self,
2434        input: ListTasksRequest,
2435    ) -> Result<ListTasksResponse, RusotoError<ListTasksError>>;
2436
2437    /// <p>Starts a specific invocation of a task. A <code>TaskExecution</code> value represents an individual run of a task. Each task can have at most one <code>TaskExecution</code> at a time.</p> <p> <code>TaskExecution</code> has the following transition phases: INITIALIZING | PREPARING | TRANSFERRING | VERIFYING | SUCCESS/FAILURE. </p> <p>For detailed information, see the Task Execution section in the Components and Terminology topic in the <i>AWS DataSync User Guide</i>.</p>
2438    async fn start_task_execution(
2439        &self,
2440        input: StartTaskExecutionRequest,
2441    ) -> Result<StartTaskExecutionResponse, RusotoError<StartTaskExecutionError>>;
2442
2443    /// <p>Applies a key-value pair to an AWS resource.</p>
2444    async fn tag_resource(
2445        &self,
2446        input: TagResourceRequest,
2447    ) -> Result<TagResourceResponse, RusotoError<TagResourceError>>;
2448
2449    /// <p>Removes a tag from an AWS resource.</p>
2450    async fn untag_resource(
2451        &self,
2452        input: UntagResourceRequest,
2453    ) -> Result<UntagResourceResponse, RusotoError<UntagResourceError>>;
2454
2455    /// <p>Updates the name of an agent.</p>
2456    async fn update_agent(
2457        &self,
2458        input: UpdateAgentRequest,
2459    ) -> Result<UpdateAgentResponse, RusotoError<UpdateAgentError>>;
2460
2461    /// <p>Updates the metadata associated with a task.</p>
2462    async fn update_task(
2463        &self,
2464        input: UpdateTaskRequest,
2465    ) -> Result<UpdateTaskResponse, RusotoError<UpdateTaskError>>;
2466}
2467/// A client for the DataSync API.
2468#[derive(Clone)]
2469pub struct DataSyncClient {
2470    client: Client,
2471    region: region::Region,
2472}
2473
2474impl DataSyncClient {
2475    /// Creates a client backed by the default tokio event loop.
2476    ///
2477    /// The client will use the default credentials provider and tls client.
2478    pub fn new(region: region::Region) -> DataSyncClient {
2479        DataSyncClient {
2480            client: Client::shared(),
2481            region,
2482        }
2483    }
2484
2485    pub fn new_with<P, D>(
2486        request_dispatcher: D,
2487        credentials_provider: P,
2488        region: region::Region,
2489    ) -> DataSyncClient
2490    where
2491        P: ProvideAwsCredentials + Send + Sync + 'static,
2492        D: DispatchSignedRequest + Send + Sync + 'static,
2493    {
2494        DataSyncClient {
2495            client: Client::new_with(credentials_provider, request_dispatcher),
2496            region,
2497        }
2498    }
2499
2500    pub fn new_with_client(client: Client, region: region::Region) -> DataSyncClient {
2501        DataSyncClient { client, region }
2502    }
2503}
2504
2505#[async_trait]
2506impl DataSync for DataSyncClient {
2507    /// <p>Cancels execution of a task. </p> <p>When you cancel a task execution, the transfer of some files are abruptly interrupted. The contents of files that are transferred to the destination might be incomplete or inconsistent with the source files. However, if you start a new task execution on the same task and you allow the task execution to complete, file content on the destination is complete and consistent. This applies to other unexpected failures that interrupt a task execution. In all of these cases, AWS DataSync successfully complete the transfer when you start the next task execution.</p>
2508    async fn cancel_task_execution(
2509        &self,
2510        input: CancelTaskExecutionRequest,
2511    ) -> Result<CancelTaskExecutionResponse, RusotoError<CancelTaskExecutionError>> {
2512        let mut request = self.new_signed_request("POST", "/");
2513        request.add_header("x-amz-target", "FmrsService.CancelTaskExecution");
2514        let encoded = serde_json::to_string(&input).unwrap();
2515        request.set_payload(Some(encoded));
2516
2517        let response = self
2518            .sign_and_dispatch(request, CancelTaskExecutionError::from_response)
2519            .await?;
2520        let mut response = response;
2521        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2522        proto::json::ResponsePayload::new(&response).deserialize::<CancelTaskExecutionResponse, _>()
2523    }
2524
2525    /// <p><p>Activates an AWS DataSync agent that you have deployed on your host. The activation process associates your agent with your account. In the activation process, you specify information such as the AWS Region that you want to activate the agent in. You activate the agent in the AWS Region where your target locations (in Amazon S3 or Amazon EFS) reside. Your tasks are created in this AWS Region.</p> <p>You can activate the agent in a VPC (Virtual private Cloud) or provide the agent access to a VPC endpoint so you can run tasks without going over the public Internet.</p> <p>You can use an agent for more than one location. If a task uses multiple agents, all of them need to have status AVAILABLE for the task to run. If you use multiple agents for a source location, the status of all the agents must be AVAILABLE for the task to run. </p> <p>Agents are automatically updated by AWS on a regular basis, using a mechanism that ensures minimal interruption to your tasks.</p> <p/></p>
2526    async fn create_agent(
2527        &self,
2528        input: CreateAgentRequest,
2529    ) -> Result<CreateAgentResponse, RusotoError<CreateAgentError>> {
2530        let mut request = self.new_signed_request("POST", "/");
2531        request.add_header("x-amz-target", "FmrsService.CreateAgent");
2532        let encoded = serde_json::to_string(&input).unwrap();
2533        request.set_payload(Some(encoded));
2534
2535        let response = self
2536            .sign_and_dispatch(request, CreateAgentError::from_response)
2537            .await?;
2538        let mut response = response;
2539        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2540        proto::json::ResponsePayload::new(&response).deserialize::<CreateAgentResponse, _>()
2541    }
2542
2543    /// <p>Creates an endpoint for an Amazon EFS file system.</p>
2544    async fn create_location_efs(
2545        &self,
2546        input: CreateLocationEfsRequest,
2547    ) -> Result<CreateLocationEfsResponse, RusotoError<CreateLocationEfsError>> {
2548        let mut request = self.new_signed_request("POST", "/");
2549        request.add_header("x-amz-target", "FmrsService.CreateLocationEfs");
2550        let encoded = serde_json::to_string(&input).unwrap();
2551        request.set_payload(Some(encoded));
2552
2553        let response = self
2554            .sign_and_dispatch(request, CreateLocationEfsError::from_response)
2555            .await?;
2556        let mut response = response;
2557        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2558        proto::json::ResponsePayload::new(&response).deserialize::<CreateLocationEfsResponse, _>()
2559    }
2560
2561    /// <p>Creates an endpoint for an Amazon FSx for Windows file system.</p>
2562    async fn create_location_fsx_windows(
2563        &self,
2564        input: CreateLocationFsxWindowsRequest,
2565    ) -> Result<CreateLocationFsxWindowsResponse, RusotoError<CreateLocationFsxWindowsError>> {
2566        let mut request = self.new_signed_request("POST", "/");
2567        request.add_header("x-amz-target", "FmrsService.CreateLocationFsxWindows");
2568        let encoded = serde_json::to_string(&input).unwrap();
2569        request.set_payload(Some(encoded));
2570
2571        let response = self
2572            .sign_and_dispatch(request, CreateLocationFsxWindowsError::from_response)
2573            .await?;
2574        let mut response = response;
2575        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2576        proto::json::ResponsePayload::new(&response)
2577            .deserialize::<CreateLocationFsxWindowsResponse, _>()
2578    }
2579
2580    /// <p>Defines a file system on a Network File System (NFS) server that can be read from or written to</p>
2581    async fn create_location_nfs(
2582        &self,
2583        input: CreateLocationNfsRequest,
2584    ) -> Result<CreateLocationNfsResponse, RusotoError<CreateLocationNfsError>> {
2585        let mut request = self.new_signed_request("POST", "/");
2586        request.add_header("x-amz-target", "FmrsService.CreateLocationNfs");
2587        let encoded = serde_json::to_string(&input).unwrap();
2588        request.set_payload(Some(encoded));
2589
2590        let response = self
2591            .sign_and_dispatch(request, CreateLocationNfsError::from_response)
2592            .await?;
2593        let mut response = response;
2594        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2595        proto::json::ResponsePayload::new(&response).deserialize::<CreateLocationNfsResponse, _>()
2596    }
2597
2598    /// <p>Creates an endpoint for an Amazon S3 bucket.</p> <p>For AWS DataSync to access a destination S3 bucket, it needs an AWS Identity and Access Management (IAM) role that has the required permissions. You can set up the required permissions by creating an IAM policy that grants the required permissions and attaching the policy to the role. An example of such a policy is shown in the examples section.</p> <p>For more information, see https://docs.aws.amazon.com/datasync/latest/userguide/working-with-locations.html#create-s3-location in the <i>AWS DataSync User Guide.</i> </p>
2599    async fn create_location_s3(
2600        &self,
2601        input: CreateLocationS3Request,
2602    ) -> Result<CreateLocationS3Response, RusotoError<CreateLocationS3Error>> {
2603        let mut request = self.new_signed_request("POST", "/");
2604        request.add_header("x-amz-target", "FmrsService.CreateLocationS3");
2605        let encoded = serde_json::to_string(&input).unwrap();
2606        request.set_payload(Some(encoded));
2607
2608        let response = self
2609            .sign_and_dispatch(request, CreateLocationS3Error::from_response)
2610            .await?;
2611        let mut response = response;
2612        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2613        proto::json::ResponsePayload::new(&response).deserialize::<CreateLocationS3Response, _>()
2614    }
2615
2616    /// <p>Defines a file system on an Server Message Block (SMB) server that can be read from or written to.</p>
2617    async fn create_location_smb(
2618        &self,
2619        input: CreateLocationSmbRequest,
2620    ) -> Result<CreateLocationSmbResponse, RusotoError<CreateLocationSmbError>> {
2621        let mut request = self.new_signed_request("POST", "/");
2622        request.add_header("x-amz-target", "FmrsService.CreateLocationSmb");
2623        let encoded = serde_json::to_string(&input).unwrap();
2624        request.set_payload(Some(encoded));
2625
2626        let response = self
2627            .sign_and_dispatch(request, CreateLocationSmbError::from_response)
2628            .await?;
2629        let mut response = response;
2630        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2631        proto::json::ResponsePayload::new(&response).deserialize::<CreateLocationSmbResponse, _>()
2632    }
2633
2634    /// <p>Creates a task. A task is a set of two locations (source and destination) and a set of Options that you use to control the behavior of a task. If you don't specify Options when you create a task, AWS DataSync populates them with service defaults.</p> <p>When you create a task, it first enters the CREATING state. During CREATING AWS DataSync attempts to mount the on-premises Network File System (NFS) location. The task transitions to the AVAILABLE state without waiting for the AWS location to become mounted. If required, AWS DataSync mounts the AWS location before each task execution.</p> <p>If an agent that is associated with a source (NFS) location goes offline, the task transitions to the UNAVAILABLE status. If the status of the task remains in the CREATING status for more than a few minutes, it means that your agent might be having trouble mounting the source NFS file system. Check the task's ErrorCode and ErrorDetail. Mount issues are often caused by either a misconfigured firewall or a mistyped NFS server host name.</p>
2635    async fn create_task(
2636        &self,
2637        input: CreateTaskRequest,
2638    ) -> Result<CreateTaskResponse, RusotoError<CreateTaskError>> {
2639        let mut request = self.new_signed_request("POST", "/");
2640        request.add_header("x-amz-target", "FmrsService.CreateTask");
2641        let encoded = serde_json::to_string(&input).unwrap();
2642        request.set_payload(Some(encoded));
2643
2644        let response = self
2645            .sign_and_dispatch(request, CreateTaskError::from_response)
2646            .await?;
2647        let mut response = response;
2648        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2649        proto::json::ResponsePayload::new(&response).deserialize::<CreateTaskResponse, _>()
2650    }
2651
2652    /// <p>Deletes an agent. To specify which agent to delete, use the Amazon Resource Name (ARN) of the agent in your request. The operation disassociates the agent from your AWS account. However, it doesn't delete the agent virtual machine (VM) from your on-premises environment.</p>
2653    async fn delete_agent(
2654        &self,
2655        input: DeleteAgentRequest,
2656    ) -> Result<DeleteAgentResponse, RusotoError<DeleteAgentError>> {
2657        let mut request = self.new_signed_request("POST", "/");
2658        request.add_header("x-amz-target", "FmrsService.DeleteAgent");
2659        let encoded = serde_json::to_string(&input).unwrap();
2660        request.set_payload(Some(encoded));
2661
2662        let response = self
2663            .sign_and_dispatch(request, DeleteAgentError::from_response)
2664            .await?;
2665        let mut response = response;
2666        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2667        proto::json::ResponsePayload::new(&response).deserialize::<DeleteAgentResponse, _>()
2668    }
2669
2670    /// <p>Deletes the configuration of a location used by AWS DataSync. </p>
2671    async fn delete_location(
2672        &self,
2673        input: DeleteLocationRequest,
2674    ) -> Result<DeleteLocationResponse, RusotoError<DeleteLocationError>> {
2675        let mut request = self.new_signed_request("POST", "/");
2676        request.add_header("x-amz-target", "FmrsService.DeleteLocation");
2677        let encoded = serde_json::to_string(&input).unwrap();
2678        request.set_payload(Some(encoded));
2679
2680        let response = self
2681            .sign_and_dispatch(request, DeleteLocationError::from_response)
2682            .await?;
2683        let mut response = response;
2684        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2685        proto::json::ResponsePayload::new(&response).deserialize::<DeleteLocationResponse, _>()
2686    }
2687
2688    /// <p>Deletes a task.</p>
2689    async fn delete_task(
2690        &self,
2691        input: DeleteTaskRequest,
2692    ) -> Result<DeleteTaskResponse, RusotoError<DeleteTaskError>> {
2693        let mut request = self.new_signed_request("POST", "/");
2694        request.add_header("x-amz-target", "FmrsService.DeleteTask");
2695        let encoded = serde_json::to_string(&input).unwrap();
2696        request.set_payload(Some(encoded));
2697
2698        let response = self
2699            .sign_and_dispatch(request, DeleteTaskError::from_response)
2700            .await?;
2701        let mut response = response;
2702        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2703        proto::json::ResponsePayload::new(&response).deserialize::<DeleteTaskResponse, _>()
2704    }
2705
2706    /// <p>Returns metadata such as the name, the network interfaces, and the status (that is, whether the agent is running or not) for an agent. To specify which agent to describe, use the Amazon Resource Name (ARN) of the agent in your request. </p>
2707    async fn describe_agent(
2708        &self,
2709        input: DescribeAgentRequest,
2710    ) -> Result<DescribeAgentResponse, RusotoError<DescribeAgentError>> {
2711        let mut request = self.new_signed_request("POST", "/");
2712        request.add_header("x-amz-target", "FmrsService.DescribeAgent");
2713        let encoded = serde_json::to_string(&input).unwrap();
2714        request.set_payload(Some(encoded));
2715
2716        let response = self
2717            .sign_and_dispatch(request, DescribeAgentError::from_response)
2718            .await?;
2719        let mut response = response;
2720        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2721        proto::json::ResponsePayload::new(&response).deserialize::<DescribeAgentResponse, _>()
2722    }
2723
2724    /// <p>Returns metadata, such as the path information about an Amazon EFS location.</p>
2725    async fn describe_location_efs(
2726        &self,
2727        input: DescribeLocationEfsRequest,
2728    ) -> Result<DescribeLocationEfsResponse, RusotoError<DescribeLocationEfsError>> {
2729        let mut request = self.new_signed_request("POST", "/");
2730        request.add_header("x-amz-target", "FmrsService.DescribeLocationEfs");
2731        let encoded = serde_json::to_string(&input).unwrap();
2732        request.set_payload(Some(encoded));
2733
2734        let response = self
2735            .sign_and_dispatch(request, DescribeLocationEfsError::from_response)
2736            .await?;
2737        let mut response = response;
2738        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2739        proto::json::ResponsePayload::new(&response).deserialize::<DescribeLocationEfsResponse, _>()
2740    }
2741
2742    /// <p>Returns metadata, such as the path information about an Amazon FSx for Windows location.</p>
2743    async fn describe_location_fsx_windows(
2744        &self,
2745        input: DescribeLocationFsxWindowsRequest,
2746    ) -> Result<DescribeLocationFsxWindowsResponse, RusotoError<DescribeLocationFsxWindowsError>>
2747    {
2748        let mut request = self.new_signed_request("POST", "/");
2749        request.add_header("x-amz-target", "FmrsService.DescribeLocationFsxWindows");
2750        let encoded = serde_json::to_string(&input).unwrap();
2751        request.set_payload(Some(encoded));
2752
2753        let response = self
2754            .sign_and_dispatch(request, DescribeLocationFsxWindowsError::from_response)
2755            .await?;
2756        let mut response = response;
2757        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2758        proto::json::ResponsePayload::new(&response)
2759            .deserialize::<DescribeLocationFsxWindowsResponse, _>()
2760    }
2761
2762    /// <p>Returns metadata, such as the path information, about a NFS location.</p>
2763    async fn describe_location_nfs(
2764        &self,
2765        input: DescribeLocationNfsRequest,
2766    ) -> Result<DescribeLocationNfsResponse, RusotoError<DescribeLocationNfsError>> {
2767        let mut request = self.new_signed_request("POST", "/");
2768        request.add_header("x-amz-target", "FmrsService.DescribeLocationNfs");
2769        let encoded = serde_json::to_string(&input).unwrap();
2770        request.set_payload(Some(encoded));
2771
2772        let response = self
2773            .sign_and_dispatch(request, DescribeLocationNfsError::from_response)
2774            .await?;
2775        let mut response = response;
2776        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2777        proto::json::ResponsePayload::new(&response).deserialize::<DescribeLocationNfsResponse, _>()
2778    }
2779
2780    /// <p>Returns metadata, such as bucket name, about an Amazon S3 bucket location.</p>
2781    async fn describe_location_s3(
2782        &self,
2783        input: DescribeLocationS3Request,
2784    ) -> Result<DescribeLocationS3Response, RusotoError<DescribeLocationS3Error>> {
2785        let mut request = self.new_signed_request("POST", "/");
2786        request.add_header("x-amz-target", "FmrsService.DescribeLocationS3");
2787        let encoded = serde_json::to_string(&input).unwrap();
2788        request.set_payload(Some(encoded));
2789
2790        let response = self
2791            .sign_and_dispatch(request, DescribeLocationS3Error::from_response)
2792            .await?;
2793        let mut response = response;
2794        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2795        proto::json::ResponsePayload::new(&response).deserialize::<DescribeLocationS3Response, _>()
2796    }
2797
2798    /// <p>Returns metadata, such as the path and user information about a SMB location.</p>
2799    async fn describe_location_smb(
2800        &self,
2801        input: DescribeLocationSmbRequest,
2802    ) -> Result<DescribeLocationSmbResponse, RusotoError<DescribeLocationSmbError>> {
2803        let mut request = self.new_signed_request("POST", "/");
2804        request.add_header("x-amz-target", "FmrsService.DescribeLocationSmb");
2805        let encoded = serde_json::to_string(&input).unwrap();
2806        request.set_payload(Some(encoded));
2807
2808        let response = self
2809            .sign_and_dispatch(request, DescribeLocationSmbError::from_response)
2810            .await?;
2811        let mut response = response;
2812        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2813        proto::json::ResponsePayload::new(&response).deserialize::<DescribeLocationSmbResponse, _>()
2814    }
2815
2816    /// <p>Returns metadata about a task.</p>
2817    async fn describe_task(
2818        &self,
2819        input: DescribeTaskRequest,
2820    ) -> Result<DescribeTaskResponse, RusotoError<DescribeTaskError>> {
2821        let mut request = self.new_signed_request("POST", "/");
2822        request.add_header("x-amz-target", "FmrsService.DescribeTask");
2823        let encoded = serde_json::to_string(&input).unwrap();
2824        request.set_payload(Some(encoded));
2825
2826        let response = self
2827            .sign_and_dispatch(request, DescribeTaskError::from_response)
2828            .await?;
2829        let mut response = response;
2830        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2831        proto::json::ResponsePayload::new(&response).deserialize::<DescribeTaskResponse, _>()
2832    }
2833
2834    /// <p>Returns detailed metadata about a task that is being executed.</p>
2835    async fn describe_task_execution(
2836        &self,
2837        input: DescribeTaskExecutionRequest,
2838    ) -> Result<DescribeTaskExecutionResponse, RusotoError<DescribeTaskExecutionError>> {
2839        let mut request = self.new_signed_request("POST", "/");
2840        request.add_header("x-amz-target", "FmrsService.DescribeTaskExecution");
2841        let encoded = serde_json::to_string(&input).unwrap();
2842        request.set_payload(Some(encoded));
2843
2844        let response = self
2845            .sign_and_dispatch(request, DescribeTaskExecutionError::from_response)
2846            .await?;
2847        let mut response = response;
2848        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2849        proto::json::ResponsePayload::new(&response)
2850            .deserialize::<DescribeTaskExecutionResponse, _>()
2851    }
2852
2853    /// <p>Returns a list of agents owned by an AWS account in the AWS Region specified in the request. The returned list is ordered by agent Amazon Resource Name (ARN).</p> <p>By default, this operation returns a maximum of 100 agents. This operation supports pagination that enables you to optionally reduce the number of agents returned in a response.</p> <p>If you have more agents than are returned in a response (that is, the response returns only a truncated list of your agents), the response contains a marker that you can specify in your next request to fetch the next page of agents.</p>
2854    async fn list_agents(
2855        &self,
2856        input: ListAgentsRequest,
2857    ) -> Result<ListAgentsResponse, RusotoError<ListAgentsError>> {
2858        let mut request = self.new_signed_request("POST", "/");
2859        request.add_header("x-amz-target", "FmrsService.ListAgents");
2860        let encoded = serde_json::to_string(&input).unwrap();
2861        request.set_payload(Some(encoded));
2862
2863        let response = self
2864            .sign_and_dispatch(request, ListAgentsError::from_response)
2865            .await?;
2866        let mut response = response;
2867        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2868        proto::json::ResponsePayload::new(&response).deserialize::<ListAgentsResponse, _>()
2869    }
2870
2871    /// <p>Returns a lists of source and destination locations.</p> <p>If you have more locations than are returned in a response (that is, the response returns only a truncated list of your agents), the response contains a token that you can specify in your next request to fetch the next page of locations.</p>
2872    async fn list_locations(
2873        &self,
2874        input: ListLocationsRequest,
2875    ) -> Result<ListLocationsResponse, RusotoError<ListLocationsError>> {
2876        let mut request = self.new_signed_request("POST", "/");
2877        request.add_header("x-amz-target", "FmrsService.ListLocations");
2878        let encoded = serde_json::to_string(&input).unwrap();
2879        request.set_payload(Some(encoded));
2880
2881        let response = self
2882            .sign_and_dispatch(request, ListLocationsError::from_response)
2883            .await?;
2884        let mut response = response;
2885        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2886        proto::json::ResponsePayload::new(&response).deserialize::<ListLocationsResponse, _>()
2887    }
2888
2889    /// <p>Returns all the tags associated with a specified resources. </p>
2890    async fn list_tags_for_resource(
2891        &self,
2892        input: ListTagsForResourceRequest,
2893    ) -> Result<ListTagsForResourceResponse, RusotoError<ListTagsForResourceError>> {
2894        let mut request = self.new_signed_request("POST", "/");
2895        request.add_header("x-amz-target", "FmrsService.ListTagsForResource");
2896        let encoded = serde_json::to_string(&input).unwrap();
2897        request.set_payload(Some(encoded));
2898
2899        let response = self
2900            .sign_and_dispatch(request, ListTagsForResourceError::from_response)
2901            .await?;
2902        let mut response = response;
2903        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2904        proto::json::ResponsePayload::new(&response).deserialize::<ListTagsForResourceResponse, _>()
2905    }
2906
2907    /// <p>Returns a list of executed tasks.</p>
2908    async fn list_task_executions(
2909        &self,
2910        input: ListTaskExecutionsRequest,
2911    ) -> Result<ListTaskExecutionsResponse, RusotoError<ListTaskExecutionsError>> {
2912        let mut request = self.new_signed_request("POST", "/");
2913        request.add_header("x-amz-target", "FmrsService.ListTaskExecutions");
2914        let encoded = serde_json::to_string(&input).unwrap();
2915        request.set_payload(Some(encoded));
2916
2917        let response = self
2918            .sign_and_dispatch(request, ListTaskExecutionsError::from_response)
2919            .await?;
2920        let mut response = response;
2921        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2922        proto::json::ResponsePayload::new(&response).deserialize::<ListTaskExecutionsResponse, _>()
2923    }
2924
2925    /// <p>Returns a list of all the tasks.</p>
2926    async fn list_tasks(
2927        &self,
2928        input: ListTasksRequest,
2929    ) -> Result<ListTasksResponse, RusotoError<ListTasksError>> {
2930        let mut request = self.new_signed_request("POST", "/");
2931        request.add_header("x-amz-target", "FmrsService.ListTasks");
2932        let encoded = serde_json::to_string(&input).unwrap();
2933        request.set_payload(Some(encoded));
2934
2935        let response = self
2936            .sign_and_dispatch(request, ListTasksError::from_response)
2937            .await?;
2938        let mut response = response;
2939        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2940        proto::json::ResponsePayload::new(&response).deserialize::<ListTasksResponse, _>()
2941    }
2942
2943    /// <p>Starts a specific invocation of a task. A <code>TaskExecution</code> value represents an individual run of a task. Each task can have at most one <code>TaskExecution</code> at a time.</p> <p> <code>TaskExecution</code> has the following transition phases: INITIALIZING | PREPARING | TRANSFERRING | VERIFYING | SUCCESS/FAILURE. </p> <p>For detailed information, see the Task Execution section in the Components and Terminology topic in the <i>AWS DataSync User Guide</i>.</p>
2944    async fn start_task_execution(
2945        &self,
2946        input: StartTaskExecutionRequest,
2947    ) -> Result<StartTaskExecutionResponse, RusotoError<StartTaskExecutionError>> {
2948        let mut request = self.new_signed_request("POST", "/");
2949        request.add_header("x-amz-target", "FmrsService.StartTaskExecution");
2950        let encoded = serde_json::to_string(&input).unwrap();
2951        request.set_payload(Some(encoded));
2952
2953        let response = self
2954            .sign_and_dispatch(request, StartTaskExecutionError::from_response)
2955            .await?;
2956        let mut response = response;
2957        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2958        proto::json::ResponsePayload::new(&response).deserialize::<StartTaskExecutionResponse, _>()
2959    }
2960
2961    /// <p>Applies a key-value pair to an AWS resource.</p>
2962    async fn tag_resource(
2963        &self,
2964        input: TagResourceRequest,
2965    ) -> Result<TagResourceResponse, RusotoError<TagResourceError>> {
2966        let mut request = self.new_signed_request("POST", "/");
2967        request.add_header("x-amz-target", "FmrsService.TagResource");
2968        let encoded = serde_json::to_string(&input).unwrap();
2969        request.set_payload(Some(encoded));
2970
2971        let response = self
2972            .sign_and_dispatch(request, TagResourceError::from_response)
2973            .await?;
2974        let mut response = response;
2975        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2976        proto::json::ResponsePayload::new(&response).deserialize::<TagResourceResponse, _>()
2977    }
2978
2979    /// <p>Removes a tag from an AWS resource.</p>
2980    async fn untag_resource(
2981        &self,
2982        input: UntagResourceRequest,
2983    ) -> Result<UntagResourceResponse, RusotoError<UntagResourceError>> {
2984        let mut request = self.new_signed_request("POST", "/");
2985        request.add_header("x-amz-target", "FmrsService.UntagResource");
2986        let encoded = serde_json::to_string(&input).unwrap();
2987        request.set_payload(Some(encoded));
2988
2989        let response = self
2990            .sign_and_dispatch(request, UntagResourceError::from_response)
2991            .await?;
2992        let mut response = response;
2993        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
2994        proto::json::ResponsePayload::new(&response).deserialize::<UntagResourceResponse, _>()
2995    }
2996
2997    /// <p>Updates the name of an agent.</p>
2998    async fn update_agent(
2999        &self,
3000        input: UpdateAgentRequest,
3001    ) -> Result<UpdateAgentResponse, RusotoError<UpdateAgentError>> {
3002        let mut request = self.new_signed_request("POST", "/");
3003        request.add_header("x-amz-target", "FmrsService.UpdateAgent");
3004        let encoded = serde_json::to_string(&input).unwrap();
3005        request.set_payload(Some(encoded));
3006
3007        let response = self
3008            .sign_and_dispatch(request, UpdateAgentError::from_response)
3009            .await?;
3010        let mut response = response;
3011        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3012        proto::json::ResponsePayload::new(&response).deserialize::<UpdateAgentResponse, _>()
3013    }
3014
3015    /// <p>Updates the metadata associated with a task.</p>
3016    async fn update_task(
3017        &self,
3018        input: UpdateTaskRequest,
3019    ) -> Result<UpdateTaskResponse, RusotoError<UpdateTaskError>> {
3020        let mut request = self.new_signed_request("POST", "/");
3021        request.add_header("x-amz-target", "FmrsService.UpdateTask");
3022        let encoded = serde_json::to_string(&input).unwrap();
3023        request.set_payload(Some(encoded));
3024
3025        let response = self
3026            .sign_and_dispatch(request, UpdateTaskError::from_response)
3027            .await?;
3028        let mut response = response;
3029        let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
3030        proto::json::ResponsePayload::new(&response).deserialize::<UpdateTaskResponse, _>()
3031    }
3032}