rusoto_workdocs/
generated.rs

1// =================================================================
2//
3//                           * WARNING *
4//
5//                    This file is generated!
6//
7//  Changes made to this file will be overwritten. If changes are
8//  required to the generated code, the service_crategen project
9//  must be updated to generate the changes.
10//
11// =================================================================
12
13use std::error::Error;
14use std::fmt;
15
16use async_trait::async_trait;
17use rusoto_core::credential::ProvideAwsCredentials;
18use rusoto_core::region;
19use rusoto_core::request::{BufferedHttpResponse, DispatchSignedRequest};
20use rusoto_core::{Client, RusotoError};
21
22use rusoto_core::param::{Params, ServiceParams};
23use rusoto_core::proto;
24use rusoto_core::signature::SignedRequest;
25#[allow(unused_imports)]
26use serde::{Deserialize, Serialize};
27use serde_json;
28#[derive(Clone, Debug, Default, PartialEq, Serialize)]
29#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
30pub struct AbortDocumentVersionUploadRequest {
31    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
32    #[serde(rename = "AuthenticationToken")]
33    #[serde(skip_serializing_if = "Option::is_none")]
34    pub authentication_token: Option<String>,
35    /// <p>The ID of the document.</p>
36    #[serde(rename = "DocumentId")]
37    pub document_id: String,
38    /// <p>The ID of the version.</p>
39    #[serde(rename = "VersionId")]
40    pub version_id: String,
41}
42
43#[derive(Clone, Debug, Default, PartialEq, Serialize)]
44#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
45pub struct ActivateUserRequest {
46    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
47    #[serde(rename = "AuthenticationToken")]
48    #[serde(skip_serializing_if = "Option::is_none")]
49    pub authentication_token: Option<String>,
50    /// <p>The ID of the user.</p>
51    #[serde(rename = "UserId")]
52    pub user_id: String,
53}
54
55#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
56#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
57pub struct ActivateUserResponse {
58    /// <p>The user information.</p>
59    #[serde(rename = "User")]
60    #[serde(skip_serializing_if = "Option::is_none")]
61    pub user: Option<User>,
62}
63
64/// <p>Describes the activity information.</p>
65#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
66#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
67pub struct Activity {
68    /// <p>Metadata of the commenting activity. This is an optional field and is filled for commenting activities.</p>
69    #[serde(rename = "CommentMetadata")]
70    #[serde(skip_serializing_if = "Option::is_none")]
71    pub comment_metadata: Option<CommentMetadata>,
72    /// <p>The user who performed the action.</p>
73    #[serde(rename = "Initiator")]
74    #[serde(skip_serializing_if = "Option::is_none")]
75    pub initiator: Option<UserMetadata>,
76    /// <p>Indicates whether an activity is indirect or direct. An indirect activity results from a direct activity performed on a parent resource. For example, sharing a parent folder (the direct activity) shares all of the subfolders and documents within the parent folder (the indirect activity).</p>
77    #[serde(rename = "IsIndirectActivity")]
78    #[serde(skip_serializing_if = "Option::is_none")]
79    pub is_indirect_activity: Option<bool>,
80    /// <p>The ID of the organization.</p>
81    #[serde(rename = "OrganizationId")]
82    #[serde(skip_serializing_if = "Option::is_none")]
83    pub organization_id: Option<String>,
84    /// <p>The original parent of the resource. This is an optional field and is filled for move activities.</p>
85    #[serde(rename = "OriginalParent")]
86    #[serde(skip_serializing_if = "Option::is_none")]
87    pub original_parent: Option<ResourceMetadata>,
88    /// <p>The list of users or groups impacted by this action. This is an optional field and is filled for the following sharing activities: DOCUMENT_SHARED, DOCUMENT_SHARED, DOCUMENT_UNSHARED, FOLDER_SHARED, FOLDER_UNSHARED.</p>
89    #[serde(rename = "Participants")]
90    #[serde(skip_serializing_if = "Option::is_none")]
91    pub participants: Option<Participants>,
92    /// <p>The metadata of the resource involved in the user action.</p>
93    #[serde(rename = "ResourceMetadata")]
94    #[serde(skip_serializing_if = "Option::is_none")]
95    pub resource_metadata: Option<ResourceMetadata>,
96    /// <p>The timestamp when the action was performed.</p>
97    #[serde(rename = "TimeStamp")]
98    #[serde(skip_serializing_if = "Option::is_none")]
99    pub time_stamp: Option<f64>,
100    /// <p>The activity type.</p>
101    #[serde(rename = "Type")]
102    #[serde(skip_serializing_if = "Option::is_none")]
103    pub type_: Option<String>,
104}
105
106#[derive(Clone, Debug, Default, PartialEq, Serialize)]
107#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
108pub struct AddResourcePermissionsRequest {
109    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
110    #[serde(rename = "AuthenticationToken")]
111    #[serde(skip_serializing_if = "Option::is_none")]
112    pub authentication_token: Option<String>,
113    /// <p>The notification options.</p>
114    #[serde(rename = "NotificationOptions")]
115    #[serde(skip_serializing_if = "Option::is_none")]
116    pub notification_options: Option<NotificationOptions>,
117    /// <p>The users, groups, or organization being granted permission.</p>
118    #[serde(rename = "Principals")]
119    pub principals: Vec<SharePrincipal>,
120    /// <p>The ID of the resource.</p>
121    #[serde(rename = "ResourceId")]
122    pub resource_id: String,
123}
124
125#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
126#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
127pub struct AddResourcePermissionsResponse {
128    /// <p>The share results.</p>
129    #[serde(rename = "ShareResults")]
130    #[serde(skip_serializing_if = "Option::is_none")]
131    pub share_results: Option<Vec<ShareResult>>,
132}
133
134/// <p>Describes a comment.</p>
135#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
136#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
137pub struct Comment {
138    /// <p>The ID of the comment.</p>
139    #[serde(rename = "CommentId")]
140    pub comment_id: String,
141    /// <p>The details of the user who made the comment.</p>
142    #[serde(rename = "Contributor")]
143    #[serde(skip_serializing_if = "Option::is_none")]
144    pub contributor: Option<User>,
145    /// <p>The time that the comment was created.</p>
146    #[serde(rename = "CreatedTimestamp")]
147    #[serde(skip_serializing_if = "Option::is_none")]
148    pub created_timestamp: Option<f64>,
149    /// <p>The ID of the parent comment.</p>
150    #[serde(rename = "ParentId")]
151    #[serde(skip_serializing_if = "Option::is_none")]
152    pub parent_id: Option<String>,
153    /// <p>If the comment is a reply to another user's comment, this field contains the user ID of the user being replied to.</p>
154    #[serde(rename = "RecipientId")]
155    #[serde(skip_serializing_if = "Option::is_none")]
156    pub recipient_id: Option<String>,
157    /// <p>The status of the comment.</p>
158    #[serde(rename = "Status")]
159    #[serde(skip_serializing_if = "Option::is_none")]
160    pub status: Option<String>,
161    /// <p>The text of the comment.</p>
162    #[serde(rename = "Text")]
163    #[serde(skip_serializing_if = "Option::is_none")]
164    pub text: Option<String>,
165    /// <p>The ID of the root comment in the thread.</p>
166    #[serde(rename = "ThreadId")]
167    #[serde(skip_serializing_if = "Option::is_none")]
168    pub thread_id: Option<String>,
169    /// <p>The visibility of the comment. Options are either PRIVATE, where the comment is visible only to the comment author and document owner and co-owners, or PUBLIC, where the comment is visible to document owners, co-owners, and contributors.</p>
170    #[serde(rename = "Visibility")]
171    #[serde(skip_serializing_if = "Option::is_none")]
172    pub visibility: Option<String>,
173}
174
175/// <p>Describes the metadata of a comment.</p>
176#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
177#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
178pub struct CommentMetadata {
179    /// <p>The ID of the comment.</p>
180    #[serde(rename = "CommentId")]
181    #[serde(skip_serializing_if = "Option::is_none")]
182    pub comment_id: Option<String>,
183    /// <p>The status of the comment.</p>
184    #[serde(rename = "CommentStatus")]
185    #[serde(skip_serializing_if = "Option::is_none")]
186    pub comment_status: Option<String>,
187    /// <p>The user who made the comment.</p>
188    #[serde(rename = "Contributor")]
189    #[serde(skip_serializing_if = "Option::is_none")]
190    pub contributor: Option<User>,
191    /// <p>The timestamp that the comment was created.</p>
192    #[serde(rename = "CreatedTimestamp")]
193    #[serde(skip_serializing_if = "Option::is_none")]
194    pub created_timestamp: Option<f64>,
195    /// <p>The ID of the user being replied to.</p>
196    #[serde(rename = "RecipientId")]
197    #[serde(skip_serializing_if = "Option::is_none")]
198    pub recipient_id: Option<String>,
199}
200
201#[derive(Clone, Debug, Default, PartialEq, Serialize)]
202#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
203pub struct CreateCommentRequest {
204    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
205    #[serde(rename = "AuthenticationToken")]
206    #[serde(skip_serializing_if = "Option::is_none")]
207    pub authentication_token: Option<String>,
208    /// <p>The ID of the document.</p>
209    #[serde(rename = "DocumentId")]
210    pub document_id: String,
211    /// <p>Set this parameter to TRUE to send an email out to the document collaborators after the comment is created.</p>
212    #[serde(rename = "NotifyCollaborators")]
213    #[serde(skip_serializing_if = "Option::is_none")]
214    pub notify_collaborators: Option<bool>,
215    /// <p>The ID of the parent comment.</p>
216    #[serde(rename = "ParentId")]
217    #[serde(skip_serializing_if = "Option::is_none")]
218    pub parent_id: Option<String>,
219    /// <p>The text of the comment.</p>
220    #[serde(rename = "Text")]
221    pub text: String,
222    /// <p>The ID of the root comment in the thread.</p>
223    #[serde(rename = "ThreadId")]
224    #[serde(skip_serializing_if = "Option::is_none")]
225    pub thread_id: Option<String>,
226    /// <p>The ID of the document version.</p>
227    #[serde(rename = "VersionId")]
228    pub version_id: String,
229    /// <p>The visibility of the comment. Options are either PRIVATE, where the comment is visible only to the comment author and document owner and co-owners, or PUBLIC, where the comment is visible to document owners, co-owners, and contributors.</p>
230    #[serde(rename = "Visibility")]
231    #[serde(skip_serializing_if = "Option::is_none")]
232    pub visibility: Option<String>,
233}
234
235#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
236#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
237pub struct CreateCommentResponse {
238    /// <p>The comment that has been created.</p>
239    #[serde(rename = "Comment")]
240    #[serde(skip_serializing_if = "Option::is_none")]
241    pub comment: Option<Comment>,
242}
243
244#[derive(Clone, Debug, Default, PartialEq, Serialize)]
245#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
246pub struct CreateCustomMetadataRequest {
247    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
248    #[serde(rename = "AuthenticationToken")]
249    #[serde(skip_serializing_if = "Option::is_none")]
250    pub authentication_token: Option<String>,
251    /// <p>Custom metadata in the form of name-value pairs.</p>
252    #[serde(rename = "CustomMetadata")]
253    pub custom_metadata: ::std::collections::HashMap<String, String>,
254    /// <p>The ID of the resource.</p>
255    #[serde(rename = "ResourceId")]
256    pub resource_id: String,
257    /// <p>The ID of the version, if the custom metadata is being added to a document version.</p>
258    #[serde(rename = "VersionId")]
259    #[serde(skip_serializing_if = "Option::is_none")]
260    pub version_id: Option<String>,
261}
262
263#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
264#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
265pub struct CreateCustomMetadataResponse {}
266
267#[derive(Clone, Debug, Default, PartialEq, Serialize)]
268#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
269pub struct CreateFolderRequest {
270    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
271    #[serde(rename = "AuthenticationToken")]
272    #[serde(skip_serializing_if = "Option::is_none")]
273    pub authentication_token: Option<String>,
274    /// <p>The name of the new folder.</p>
275    #[serde(rename = "Name")]
276    #[serde(skip_serializing_if = "Option::is_none")]
277    pub name: Option<String>,
278    /// <p>The ID of the parent folder.</p>
279    #[serde(rename = "ParentFolderId")]
280    pub parent_folder_id: String,
281}
282
283#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
284#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
285pub struct CreateFolderResponse {
286    /// <p>The metadata of the folder.</p>
287    #[serde(rename = "Metadata")]
288    #[serde(skip_serializing_if = "Option::is_none")]
289    pub metadata: Option<FolderMetadata>,
290}
291
292#[derive(Clone, Debug, Default, PartialEq, Serialize)]
293#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
294pub struct CreateLabelsRequest {
295    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
296    #[serde(rename = "AuthenticationToken")]
297    #[serde(skip_serializing_if = "Option::is_none")]
298    pub authentication_token: Option<String>,
299    /// <p>List of labels to add to the resource.</p>
300    #[serde(rename = "Labels")]
301    pub labels: Vec<String>,
302    /// <p>The ID of the resource.</p>
303    #[serde(rename = "ResourceId")]
304    pub resource_id: String,
305}
306
307#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
308#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
309pub struct CreateLabelsResponse {}
310
311#[derive(Clone, Debug, Default, PartialEq, Serialize)]
312#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
313pub struct CreateNotificationSubscriptionRequest {
314    /// <p>The endpoint to receive the notifications. If the protocol is HTTPS, the endpoint is a URL that begins with <code>https</code>.</p>
315    #[serde(rename = "Endpoint")]
316    pub endpoint: String,
317    /// <p>The ID of the organization.</p>
318    #[serde(rename = "OrganizationId")]
319    pub organization_id: String,
320    /// <p>The protocol to use. The supported value is https, which delivers JSON-encoded messages using HTTPS POST.</p>
321    #[serde(rename = "Protocol")]
322    pub protocol: String,
323    /// <p>The notification type.</p>
324    #[serde(rename = "SubscriptionType")]
325    pub subscription_type: String,
326}
327
328#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
329#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
330pub struct CreateNotificationSubscriptionResponse {
331    /// <p>The subscription.</p>
332    #[serde(rename = "Subscription")]
333    #[serde(skip_serializing_if = "Option::is_none")]
334    pub subscription: Option<Subscription>,
335}
336
337#[derive(Clone, Debug, Default, PartialEq, Serialize)]
338#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
339pub struct CreateUserRequest {
340    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
341    #[serde(rename = "AuthenticationToken")]
342    #[serde(skip_serializing_if = "Option::is_none")]
343    pub authentication_token: Option<String>,
344    /// <p>The email address of the user.</p>
345    #[serde(rename = "EmailAddress")]
346    #[serde(skip_serializing_if = "Option::is_none")]
347    pub email_address: Option<String>,
348    /// <p>The given name of the user.</p>
349    #[serde(rename = "GivenName")]
350    pub given_name: String,
351    /// <p>The ID of the organization.</p>
352    #[serde(rename = "OrganizationId")]
353    #[serde(skip_serializing_if = "Option::is_none")]
354    pub organization_id: Option<String>,
355    /// <p>The password of the user.</p>
356    #[serde(rename = "Password")]
357    pub password: String,
358    /// <p>The amount of storage for the user.</p>
359    #[serde(rename = "StorageRule")]
360    #[serde(skip_serializing_if = "Option::is_none")]
361    pub storage_rule: Option<StorageRuleType>,
362    /// <p>The surname of the user.</p>
363    #[serde(rename = "Surname")]
364    pub surname: String,
365    /// <p>The time zone ID of the user.</p>
366    #[serde(rename = "TimeZoneId")]
367    #[serde(skip_serializing_if = "Option::is_none")]
368    pub time_zone_id: Option<String>,
369    /// <p>The login name of the user.</p>
370    #[serde(rename = "Username")]
371    pub username: String,
372}
373
374#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
375#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
376pub struct CreateUserResponse {
377    /// <p>The user information.</p>
378    #[serde(rename = "User")]
379    #[serde(skip_serializing_if = "Option::is_none")]
380    pub user: Option<User>,
381}
382
383#[derive(Clone, Debug, Default, PartialEq, Serialize)]
384#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
385pub struct DeactivateUserRequest {
386    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
387    #[serde(rename = "AuthenticationToken")]
388    #[serde(skip_serializing_if = "Option::is_none")]
389    pub authentication_token: Option<String>,
390    /// <p>The ID of the user.</p>
391    #[serde(rename = "UserId")]
392    pub user_id: String,
393}
394
395#[derive(Clone, Debug, Default, PartialEq, Serialize)]
396#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
397pub struct DeleteCommentRequest {
398    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
399    #[serde(rename = "AuthenticationToken")]
400    #[serde(skip_serializing_if = "Option::is_none")]
401    pub authentication_token: Option<String>,
402    /// <p>The ID of the comment.</p>
403    #[serde(rename = "CommentId")]
404    pub comment_id: String,
405    /// <p>The ID of the document.</p>
406    #[serde(rename = "DocumentId")]
407    pub document_id: String,
408    /// <p>The ID of the document version.</p>
409    #[serde(rename = "VersionId")]
410    pub version_id: String,
411}
412
413#[derive(Clone, Debug, Default, PartialEq, Serialize)]
414#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
415pub struct DeleteCustomMetadataRequest {
416    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
417    #[serde(rename = "AuthenticationToken")]
418    #[serde(skip_serializing_if = "Option::is_none")]
419    pub authentication_token: Option<String>,
420    /// <p>Flag to indicate removal of all custom metadata properties from the specified resource.</p>
421    #[serde(rename = "DeleteAll")]
422    #[serde(skip_serializing_if = "Option::is_none")]
423    pub delete_all: Option<bool>,
424    /// <p>List of properties to remove.</p>
425    #[serde(rename = "Keys")]
426    #[serde(skip_serializing_if = "Option::is_none")]
427    pub keys: Option<Vec<String>>,
428    /// <p>The ID of the resource, either a document or folder.</p>
429    #[serde(rename = "ResourceId")]
430    pub resource_id: String,
431    /// <p>The ID of the version, if the custom metadata is being deleted from a document version.</p>
432    #[serde(rename = "VersionId")]
433    #[serde(skip_serializing_if = "Option::is_none")]
434    pub version_id: Option<String>,
435}
436
437#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
438#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
439pub struct DeleteCustomMetadataResponse {}
440
441#[derive(Clone, Debug, Default, PartialEq, Serialize)]
442#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
443pub struct DeleteDocumentRequest {
444    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
445    #[serde(rename = "AuthenticationToken")]
446    #[serde(skip_serializing_if = "Option::is_none")]
447    pub authentication_token: Option<String>,
448    /// <p>The ID of the document.</p>
449    #[serde(rename = "DocumentId")]
450    pub document_id: String,
451}
452
453#[derive(Clone, Debug, Default, PartialEq, Serialize)]
454#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
455pub struct DeleteFolderContentsRequest {
456    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
457    #[serde(rename = "AuthenticationToken")]
458    #[serde(skip_serializing_if = "Option::is_none")]
459    pub authentication_token: Option<String>,
460    /// <p>The ID of the folder.</p>
461    #[serde(rename = "FolderId")]
462    pub folder_id: String,
463}
464
465#[derive(Clone, Debug, Default, PartialEq, Serialize)]
466#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
467pub struct DeleteFolderRequest {
468    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
469    #[serde(rename = "AuthenticationToken")]
470    #[serde(skip_serializing_if = "Option::is_none")]
471    pub authentication_token: Option<String>,
472    /// <p>The ID of the folder.</p>
473    #[serde(rename = "FolderId")]
474    pub folder_id: String,
475}
476
477#[derive(Clone, Debug, Default, PartialEq, Serialize)]
478#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
479pub struct DeleteLabelsRequest {
480    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
481    #[serde(rename = "AuthenticationToken")]
482    #[serde(skip_serializing_if = "Option::is_none")]
483    pub authentication_token: Option<String>,
484    /// <p>Flag to request removal of all labels from the specified resource.</p>
485    #[serde(rename = "DeleteAll")]
486    #[serde(skip_serializing_if = "Option::is_none")]
487    pub delete_all: Option<bool>,
488    /// <p>List of labels to delete from the resource.</p>
489    #[serde(rename = "Labels")]
490    #[serde(skip_serializing_if = "Option::is_none")]
491    pub labels: Option<Vec<String>>,
492    /// <p>The ID of the resource.</p>
493    #[serde(rename = "ResourceId")]
494    pub resource_id: String,
495}
496
497#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
498#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
499pub struct DeleteLabelsResponse {}
500
501#[derive(Clone, Debug, Default, PartialEq, Serialize)]
502#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
503pub struct DeleteNotificationSubscriptionRequest {
504    /// <p>The ID of the organization.</p>
505    #[serde(rename = "OrganizationId")]
506    pub organization_id: String,
507    /// <p>The ID of the subscription.</p>
508    #[serde(rename = "SubscriptionId")]
509    pub subscription_id: String,
510}
511
512#[derive(Clone, Debug, Default, PartialEq, Serialize)]
513#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
514pub struct DeleteUserRequest {
515    /// <p>Amazon WorkDocs authentication token. Do not set this field when using administrative API actions, as in accessing the API using AWS credentials.</p>
516    #[serde(rename = "AuthenticationToken")]
517    #[serde(skip_serializing_if = "Option::is_none")]
518    pub authentication_token: Option<String>,
519    /// <p>The ID of the user.</p>
520    #[serde(rename = "UserId")]
521    pub user_id: String,
522}
523
524#[derive(Clone, Debug, Default, PartialEq, Serialize)]
525#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
526pub struct DescribeActivitiesRequest {
527    /// <p>Specifies which activity types to include in the response. If this field is left empty, all activity types are returned.</p>
528    #[serde(rename = "ActivityTypes")]
529    #[serde(skip_serializing_if = "Option::is_none")]
530    pub activity_types: Option<String>,
531    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
532    #[serde(rename = "AuthenticationToken")]
533    #[serde(skip_serializing_if = "Option::is_none")]
534    pub authentication_token: Option<String>,
535    /// <p>The timestamp that determines the end time of the activities. The response includes the activities performed before the specified timestamp.</p>
536    #[serde(rename = "EndTime")]
537    #[serde(skip_serializing_if = "Option::is_none")]
538    pub end_time: Option<f64>,
539    /// <p>Includes indirect activities. An indirect activity results from a direct activity performed on a parent resource. For example, sharing a parent folder (the direct activity) shares all of the subfolders and documents within the parent folder (the indirect activity).</p>
540    #[serde(rename = "IncludeIndirectActivities")]
541    #[serde(skip_serializing_if = "Option::is_none")]
542    pub include_indirect_activities: Option<bool>,
543    /// <p>The maximum number of items to return.</p>
544    #[serde(rename = "Limit")]
545    #[serde(skip_serializing_if = "Option::is_none")]
546    pub limit: Option<i64>,
547    /// <p>The marker for the next set of results.</p>
548    #[serde(rename = "Marker")]
549    #[serde(skip_serializing_if = "Option::is_none")]
550    pub marker: Option<String>,
551    /// <p>The ID of the organization. This is a mandatory parameter when using administrative API (SigV4) requests.</p>
552    #[serde(rename = "OrganizationId")]
553    #[serde(skip_serializing_if = "Option::is_none")]
554    pub organization_id: Option<String>,
555    /// <p>The document or folder ID for which to describe activity types.</p>
556    #[serde(rename = "ResourceId")]
557    #[serde(skip_serializing_if = "Option::is_none")]
558    pub resource_id: Option<String>,
559    /// <p>The timestamp that determines the starting time of the activities. The response includes the activities performed after the specified timestamp.</p>
560    #[serde(rename = "StartTime")]
561    #[serde(skip_serializing_if = "Option::is_none")]
562    pub start_time: Option<f64>,
563    /// <p>The ID of the user who performed the action. The response includes activities pertaining to this user. This is an optional parameter and is only applicable for administrative API (SigV4) requests.</p>
564    #[serde(rename = "UserId")]
565    #[serde(skip_serializing_if = "Option::is_none")]
566    pub user_id: Option<String>,
567}
568
569#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
570#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
571pub struct DescribeActivitiesResponse {
572    /// <p>The marker for the next set of results.</p>
573    #[serde(rename = "Marker")]
574    #[serde(skip_serializing_if = "Option::is_none")]
575    pub marker: Option<String>,
576    /// <p>The list of activities for the specified user and time period.</p>
577    #[serde(rename = "UserActivities")]
578    #[serde(skip_serializing_if = "Option::is_none")]
579    pub user_activities: Option<Vec<Activity>>,
580}
581
582#[derive(Clone, Debug, Default, PartialEq, Serialize)]
583#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
584pub struct DescribeCommentsRequest {
585    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
586    #[serde(rename = "AuthenticationToken")]
587    #[serde(skip_serializing_if = "Option::is_none")]
588    pub authentication_token: Option<String>,
589    /// <p>The ID of the document.</p>
590    #[serde(rename = "DocumentId")]
591    pub document_id: String,
592    /// <p>The maximum number of items to return.</p>
593    #[serde(rename = "Limit")]
594    #[serde(skip_serializing_if = "Option::is_none")]
595    pub limit: Option<i64>,
596    /// <p>The marker for the next set of results. This marker was received from a previous call.</p>
597    #[serde(rename = "Marker")]
598    #[serde(skip_serializing_if = "Option::is_none")]
599    pub marker: Option<String>,
600    /// <p>The ID of the document version.</p>
601    #[serde(rename = "VersionId")]
602    pub version_id: String,
603}
604
605#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
606#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
607pub struct DescribeCommentsResponse {
608    /// <p>The list of comments for the specified document version.</p>
609    #[serde(rename = "Comments")]
610    #[serde(skip_serializing_if = "Option::is_none")]
611    pub comments: Option<Vec<Comment>>,
612    /// <p>The marker for the next set of results. This marker was received from a previous call.</p>
613    #[serde(rename = "Marker")]
614    #[serde(skip_serializing_if = "Option::is_none")]
615    pub marker: Option<String>,
616}
617
618#[derive(Clone, Debug, Default, PartialEq, Serialize)]
619#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
620pub struct DescribeDocumentVersionsRequest {
621    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
622    #[serde(rename = "AuthenticationToken")]
623    #[serde(skip_serializing_if = "Option::is_none")]
624    pub authentication_token: Option<String>,
625    /// <p>The ID of the document.</p>
626    #[serde(rename = "DocumentId")]
627    pub document_id: String,
628    /// <p>Specify "SOURCE" to include initialized versions and a URL for the source document.</p>
629    #[serde(rename = "Fields")]
630    #[serde(skip_serializing_if = "Option::is_none")]
631    pub fields: Option<String>,
632    /// <p>A comma-separated list of values. Specify "INITIALIZED" to include incomplete versions.</p>
633    #[serde(rename = "Include")]
634    #[serde(skip_serializing_if = "Option::is_none")]
635    pub include: Option<String>,
636    /// <p>The maximum number of versions to return with this call.</p>
637    #[serde(rename = "Limit")]
638    #[serde(skip_serializing_if = "Option::is_none")]
639    pub limit: Option<i64>,
640    /// <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
641    #[serde(rename = "Marker")]
642    #[serde(skip_serializing_if = "Option::is_none")]
643    pub marker: Option<String>,
644}
645
646#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
647#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
648pub struct DescribeDocumentVersionsResponse {
649    /// <p>The document versions.</p>
650    #[serde(rename = "DocumentVersions")]
651    #[serde(skip_serializing_if = "Option::is_none")]
652    pub document_versions: Option<Vec<DocumentVersionMetadata>>,
653    /// <p>The marker to use when requesting the next set of results. If there are no additional results, the string is empty.</p>
654    #[serde(rename = "Marker")]
655    #[serde(skip_serializing_if = "Option::is_none")]
656    pub marker: Option<String>,
657}
658
659#[derive(Clone, Debug, Default, PartialEq, Serialize)]
660#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
661pub struct DescribeFolderContentsRequest {
662    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
663    #[serde(rename = "AuthenticationToken")]
664    #[serde(skip_serializing_if = "Option::is_none")]
665    pub authentication_token: Option<String>,
666    /// <p>The ID of the folder.</p>
667    #[serde(rename = "FolderId")]
668    pub folder_id: String,
669    /// <p>The contents to include. Specify "INITIALIZED" to include initialized documents.</p>
670    #[serde(rename = "Include")]
671    #[serde(skip_serializing_if = "Option::is_none")]
672    pub include: Option<String>,
673    /// <p>The maximum number of items to return with this call.</p>
674    #[serde(rename = "Limit")]
675    #[serde(skip_serializing_if = "Option::is_none")]
676    pub limit: Option<i64>,
677    /// <p>The marker for the next set of results. This marker was received from a previous call.</p>
678    #[serde(rename = "Marker")]
679    #[serde(skip_serializing_if = "Option::is_none")]
680    pub marker: Option<String>,
681    /// <p>The order for the contents of the folder.</p>
682    #[serde(rename = "Order")]
683    #[serde(skip_serializing_if = "Option::is_none")]
684    pub order: Option<String>,
685    /// <p>The sorting criteria.</p>
686    #[serde(rename = "Sort")]
687    #[serde(skip_serializing_if = "Option::is_none")]
688    pub sort: Option<String>,
689    /// <p>The type of items.</p>
690    #[serde(rename = "Type")]
691    #[serde(skip_serializing_if = "Option::is_none")]
692    pub type_: Option<String>,
693}
694
695#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
696#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
697pub struct DescribeFolderContentsResponse {
698    /// <p>The documents in the specified folder.</p>
699    #[serde(rename = "Documents")]
700    #[serde(skip_serializing_if = "Option::is_none")]
701    pub documents: Option<Vec<DocumentMetadata>>,
702    /// <p>The subfolders in the specified folder.</p>
703    #[serde(rename = "Folders")]
704    #[serde(skip_serializing_if = "Option::is_none")]
705    pub folders: Option<Vec<FolderMetadata>>,
706    /// <p>The marker to use when requesting the next set of results. If there are no additional results, the string is empty.</p>
707    #[serde(rename = "Marker")]
708    #[serde(skip_serializing_if = "Option::is_none")]
709    pub marker: Option<String>,
710}
711
712#[derive(Clone, Debug, Default, PartialEq, Serialize)]
713#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
714pub struct DescribeGroupsRequest {
715    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
716    #[serde(rename = "AuthenticationToken")]
717    #[serde(skip_serializing_if = "Option::is_none")]
718    pub authentication_token: Option<String>,
719    /// <p>The maximum number of items to return with this call.</p>
720    #[serde(rename = "Limit")]
721    #[serde(skip_serializing_if = "Option::is_none")]
722    pub limit: Option<i64>,
723    /// <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
724    #[serde(rename = "Marker")]
725    #[serde(skip_serializing_if = "Option::is_none")]
726    pub marker: Option<String>,
727    /// <p>The ID of the organization.</p>
728    #[serde(rename = "OrganizationId")]
729    #[serde(skip_serializing_if = "Option::is_none")]
730    pub organization_id: Option<String>,
731    /// <p>A query to describe groups by group name.</p>
732    #[serde(rename = "SearchQuery")]
733    pub search_query: String,
734}
735
736#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
737#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
738pub struct DescribeGroupsResponse {
739    /// <p>The list of groups.</p>
740    #[serde(rename = "Groups")]
741    #[serde(skip_serializing_if = "Option::is_none")]
742    pub groups: Option<Vec<GroupMetadata>>,
743    /// <p>The marker to use when requesting the next set of results. If there are no additional results, the string is empty.</p>
744    #[serde(rename = "Marker")]
745    #[serde(skip_serializing_if = "Option::is_none")]
746    pub marker: Option<String>,
747}
748
749#[derive(Clone, Debug, Default, PartialEq, Serialize)]
750#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
751pub struct DescribeNotificationSubscriptionsRequest {
752    /// <p>The maximum number of items to return with this call.</p>
753    #[serde(rename = "Limit")]
754    #[serde(skip_serializing_if = "Option::is_none")]
755    pub limit: Option<i64>,
756    /// <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
757    #[serde(rename = "Marker")]
758    #[serde(skip_serializing_if = "Option::is_none")]
759    pub marker: Option<String>,
760    /// <p>The ID of the organization.</p>
761    #[serde(rename = "OrganizationId")]
762    pub organization_id: String,
763}
764
765#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
766#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
767pub struct DescribeNotificationSubscriptionsResponse {
768    /// <p>The marker to use when requesting the next set of results. If there are no additional results, the string is empty.</p>
769    #[serde(rename = "Marker")]
770    #[serde(skip_serializing_if = "Option::is_none")]
771    pub marker: Option<String>,
772    /// <p>The subscriptions.</p>
773    #[serde(rename = "Subscriptions")]
774    #[serde(skip_serializing_if = "Option::is_none")]
775    pub subscriptions: Option<Vec<Subscription>>,
776}
777
778#[derive(Clone, Debug, Default, PartialEq, Serialize)]
779#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
780pub struct DescribeResourcePermissionsRequest {
781    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
782    #[serde(rename = "AuthenticationToken")]
783    #[serde(skip_serializing_if = "Option::is_none")]
784    pub authentication_token: Option<String>,
785    /// <p>The maximum number of items to return with this call.</p>
786    #[serde(rename = "Limit")]
787    #[serde(skip_serializing_if = "Option::is_none")]
788    pub limit: Option<i64>,
789    /// <p>The marker for the next set of results. (You received this marker from a previous call)</p>
790    #[serde(rename = "Marker")]
791    #[serde(skip_serializing_if = "Option::is_none")]
792    pub marker: Option<String>,
793    /// <p>The ID of the principal to filter permissions by.</p>
794    #[serde(rename = "PrincipalId")]
795    #[serde(skip_serializing_if = "Option::is_none")]
796    pub principal_id: Option<String>,
797    /// <p>The ID of the resource.</p>
798    #[serde(rename = "ResourceId")]
799    pub resource_id: String,
800}
801
802#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
803#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
804pub struct DescribeResourcePermissionsResponse {
805    /// <p>The marker to use when requesting the next set of results. If there are no additional results, the string is empty.</p>
806    #[serde(rename = "Marker")]
807    #[serde(skip_serializing_if = "Option::is_none")]
808    pub marker: Option<String>,
809    /// <p>The principals.</p>
810    #[serde(rename = "Principals")]
811    #[serde(skip_serializing_if = "Option::is_none")]
812    pub principals: Option<Vec<Principal>>,
813}
814
815#[derive(Clone, Debug, Default, PartialEq, Serialize)]
816#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
817pub struct DescribeRootFoldersRequest {
818    /// <p>Amazon WorkDocs authentication token.</p>
819    #[serde(rename = "AuthenticationToken")]
820    pub authentication_token: String,
821    /// <p>The maximum number of items to return.</p>
822    #[serde(rename = "Limit")]
823    #[serde(skip_serializing_if = "Option::is_none")]
824    pub limit: Option<i64>,
825    /// <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
826    #[serde(rename = "Marker")]
827    #[serde(skip_serializing_if = "Option::is_none")]
828    pub marker: Option<String>,
829}
830
831#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
832#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
833pub struct DescribeRootFoldersResponse {
834    /// <p>The user's special folders.</p>
835    #[serde(rename = "Folders")]
836    #[serde(skip_serializing_if = "Option::is_none")]
837    pub folders: Option<Vec<FolderMetadata>>,
838    /// <p>The marker for the next set of results.</p>
839    #[serde(rename = "Marker")]
840    #[serde(skip_serializing_if = "Option::is_none")]
841    pub marker: Option<String>,
842}
843
844#[derive(Clone, Debug, Default, PartialEq, Serialize)]
845#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
846pub struct DescribeUsersRequest {
847    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
848    #[serde(rename = "AuthenticationToken")]
849    #[serde(skip_serializing_if = "Option::is_none")]
850    pub authentication_token: Option<String>,
851    /// <p>A comma-separated list of values. Specify "STORAGE_METADATA" to include the user storage quota and utilization information.</p>
852    #[serde(rename = "Fields")]
853    #[serde(skip_serializing_if = "Option::is_none")]
854    pub fields: Option<String>,
855    /// <p>The state of the users. Specify "ALL" to include inactive users.</p>
856    #[serde(rename = "Include")]
857    #[serde(skip_serializing_if = "Option::is_none")]
858    pub include: Option<String>,
859    /// <p>The maximum number of items to return.</p>
860    #[serde(rename = "Limit")]
861    #[serde(skip_serializing_if = "Option::is_none")]
862    pub limit: Option<i64>,
863    /// <p>The marker for the next set of results. (You received this marker from a previous call.)</p>
864    #[serde(rename = "Marker")]
865    #[serde(skip_serializing_if = "Option::is_none")]
866    pub marker: Option<String>,
867    /// <p>The order for the results.</p>
868    #[serde(rename = "Order")]
869    #[serde(skip_serializing_if = "Option::is_none")]
870    pub order: Option<String>,
871    /// <p>The ID of the organization.</p>
872    #[serde(rename = "OrganizationId")]
873    #[serde(skip_serializing_if = "Option::is_none")]
874    pub organization_id: Option<String>,
875    /// <p>A query to filter users by user name.</p>
876    #[serde(rename = "Query")]
877    #[serde(skip_serializing_if = "Option::is_none")]
878    pub query: Option<String>,
879    /// <p>The sorting criteria.</p>
880    #[serde(rename = "Sort")]
881    #[serde(skip_serializing_if = "Option::is_none")]
882    pub sort: Option<String>,
883    /// <p>The IDs of the users.</p>
884    #[serde(rename = "UserIds")]
885    #[serde(skip_serializing_if = "Option::is_none")]
886    pub user_ids: Option<String>,
887}
888
889#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
890#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
891pub struct DescribeUsersResponse {
892    /// <p>The marker to use when requesting the next set of results. If there are no additional results, the string is empty.</p>
893    #[serde(rename = "Marker")]
894    #[serde(skip_serializing_if = "Option::is_none")]
895    pub marker: Option<String>,
896    /// <p>The users.</p>
897    #[serde(rename = "Users")]
898    #[serde(skip_serializing_if = "Option::is_none")]
899    pub users: Option<Vec<User>>,
900}
901
902/// <p>Describes the document.</p>
903#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
904#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
905pub struct DocumentMetadata {
906    /// <p>The time when the document was created.</p>
907    #[serde(rename = "CreatedTimestamp")]
908    #[serde(skip_serializing_if = "Option::is_none")]
909    pub created_timestamp: Option<f64>,
910    /// <p>The ID of the creator.</p>
911    #[serde(rename = "CreatorId")]
912    #[serde(skip_serializing_if = "Option::is_none")]
913    pub creator_id: Option<String>,
914    /// <p>The ID of the document.</p>
915    #[serde(rename = "Id")]
916    #[serde(skip_serializing_if = "Option::is_none")]
917    pub id: Option<String>,
918    /// <p>List of labels on the document.</p>
919    #[serde(rename = "Labels")]
920    #[serde(skip_serializing_if = "Option::is_none")]
921    pub labels: Option<Vec<String>>,
922    /// <p>The latest version of the document.</p>
923    #[serde(rename = "LatestVersionMetadata")]
924    #[serde(skip_serializing_if = "Option::is_none")]
925    pub latest_version_metadata: Option<DocumentVersionMetadata>,
926    /// <p>The time when the document was updated.</p>
927    #[serde(rename = "ModifiedTimestamp")]
928    #[serde(skip_serializing_if = "Option::is_none")]
929    pub modified_timestamp: Option<f64>,
930    /// <p>The ID of the parent folder.</p>
931    #[serde(rename = "ParentFolderId")]
932    #[serde(skip_serializing_if = "Option::is_none")]
933    pub parent_folder_id: Option<String>,
934    /// <p>The resource state.</p>
935    #[serde(rename = "ResourceState")]
936    #[serde(skip_serializing_if = "Option::is_none")]
937    pub resource_state: Option<String>,
938}
939
940/// <p>Describes a version of a document.</p>
941#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
942#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
943pub struct DocumentVersionMetadata {
944    /// <p>The timestamp when the content of the document was originally created.</p>
945    #[serde(rename = "ContentCreatedTimestamp")]
946    #[serde(skip_serializing_if = "Option::is_none")]
947    pub content_created_timestamp: Option<f64>,
948    /// <p>The timestamp when the content of the document was modified.</p>
949    #[serde(rename = "ContentModifiedTimestamp")]
950    #[serde(skip_serializing_if = "Option::is_none")]
951    pub content_modified_timestamp: Option<f64>,
952    /// <p>The content type of the document.</p>
953    #[serde(rename = "ContentType")]
954    #[serde(skip_serializing_if = "Option::is_none")]
955    pub content_type: Option<String>,
956    /// <p>The timestamp when the document was first uploaded.</p>
957    #[serde(rename = "CreatedTimestamp")]
958    #[serde(skip_serializing_if = "Option::is_none")]
959    pub created_timestamp: Option<f64>,
960    /// <p>The ID of the creator.</p>
961    #[serde(rename = "CreatorId")]
962    #[serde(skip_serializing_if = "Option::is_none")]
963    pub creator_id: Option<String>,
964    /// <p>The ID of the version.</p>
965    #[serde(rename = "Id")]
966    #[serde(skip_serializing_if = "Option::is_none")]
967    pub id: Option<String>,
968    /// <p>The timestamp when the document was last uploaded.</p>
969    #[serde(rename = "ModifiedTimestamp")]
970    #[serde(skip_serializing_if = "Option::is_none")]
971    pub modified_timestamp: Option<f64>,
972    /// <p>The name of the version.</p>
973    #[serde(rename = "Name")]
974    #[serde(skip_serializing_if = "Option::is_none")]
975    pub name: Option<String>,
976    /// <p>The signature of the document.</p>
977    #[serde(rename = "Signature")]
978    #[serde(skip_serializing_if = "Option::is_none")]
979    pub signature: Option<String>,
980    /// <p>The size of the document, in bytes.</p>
981    #[serde(rename = "Size")]
982    #[serde(skip_serializing_if = "Option::is_none")]
983    pub size: Option<i64>,
984    /// <p>The source of the document.</p>
985    #[serde(rename = "Source")]
986    #[serde(skip_serializing_if = "Option::is_none")]
987    pub source: Option<::std::collections::HashMap<String, String>>,
988    /// <p>The status of the document.</p>
989    #[serde(rename = "Status")]
990    #[serde(skip_serializing_if = "Option::is_none")]
991    pub status: Option<String>,
992    /// <p>The thumbnail of the document.</p>
993    #[serde(rename = "Thumbnail")]
994    #[serde(skip_serializing_if = "Option::is_none")]
995    pub thumbnail: Option<::std::collections::HashMap<String, String>>,
996}
997
998/// <p>Describes a folder.</p>
999#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1000#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1001pub struct FolderMetadata {
1002    /// <p>The time when the folder was created.</p>
1003    #[serde(rename = "CreatedTimestamp")]
1004    #[serde(skip_serializing_if = "Option::is_none")]
1005    pub created_timestamp: Option<f64>,
1006    /// <p>The ID of the creator.</p>
1007    #[serde(rename = "CreatorId")]
1008    #[serde(skip_serializing_if = "Option::is_none")]
1009    pub creator_id: Option<String>,
1010    /// <p>The ID of the folder.</p>
1011    #[serde(rename = "Id")]
1012    #[serde(skip_serializing_if = "Option::is_none")]
1013    pub id: Option<String>,
1014    /// <p>List of labels on the folder.</p>
1015    #[serde(rename = "Labels")]
1016    #[serde(skip_serializing_if = "Option::is_none")]
1017    pub labels: Option<Vec<String>>,
1018    /// <p>The size of the latest version of the folder metadata.</p>
1019    #[serde(rename = "LatestVersionSize")]
1020    #[serde(skip_serializing_if = "Option::is_none")]
1021    pub latest_version_size: Option<i64>,
1022    /// <p>The time when the folder was updated.</p>
1023    #[serde(rename = "ModifiedTimestamp")]
1024    #[serde(skip_serializing_if = "Option::is_none")]
1025    pub modified_timestamp: Option<f64>,
1026    /// <p>The name of the folder.</p>
1027    #[serde(rename = "Name")]
1028    #[serde(skip_serializing_if = "Option::is_none")]
1029    pub name: Option<String>,
1030    /// <p>The ID of the parent folder.</p>
1031    #[serde(rename = "ParentFolderId")]
1032    #[serde(skip_serializing_if = "Option::is_none")]
1033    pub parent_folder_id: Option<String>,
1034    /// <p>The resource state of the folder.</p>
1035    #[serde(rename = "ResourceState")]
1036    #[serde(skip_serializing_if = "Option::is_none")]
1037    pub resource_state: Option<String>,
1038    /// <p>The unique identifier created from the subfolders and documents of the folder.</p>
1039    #[serde(rename = "Signature")]
1040    #[serde(skip_serializing_if = "Option::is_none")]
1041    pub signature: Option<String>,
1042    /// <p>The size of the folder metadata.</p>
1043    #[serde(rename = "Size")]
1044    #[serde(skip_serializing_if = "Option::is_none")]
1045    pub size: Option<i64>,
1046}
1047
1048#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1049#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1050pub struct GetCurrentUserRequest {
1051    /// <p>Amazon WorkDocs authentication token.</p>
1052    #[serde(rename = "AuthenticationToken")]
1053    pub authentication_token: String,
1054}
1055
1056#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1057#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1058pub struct GetCurrentUserResponse {
1059    /// <p>Metadata of the user.</p>
1060    #[serde(rename = "User")]
1061    #[serde(skip_serializing_if = "Option::is_none")]
1062    pub user: Option<User>,
1063}
1064
1065#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1066#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1067pub struct GetDocumentPathRequest {
1068    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
1069    #[serde(rename = "AuthenticationToken")]
1070    #[serde(skip_serializing_if = "Option::is_none")]
1071    pub authentication_token: Option<String>,
1072    /// <p>The ID of the document.</p>
1073    #[serde(rename = "DocumentId")]
1074    pub document_id: String,
1075    /// <p>A comma-separated list of values. Specify <code>NAME</code> to include the names of the parent folders.</p>
1076    #[serde(rename = "Fields")]
1077    #[serde(skip_serializing_if = "Option::is_none")]
1078    pub fields: Option<String>,
1079    /// <p>The maximum number of levels in the hierarchy to return.</p>
1080    #[serde(rename = "Limit")]
1081    #[serde(skip_serializing_if = "Option::is_none")]
1082    pub limit: Option<i64>,
1083    /// <p>This value is not supported.</p>
1084    #[serde(rename = "Marker")]
1085    #[serde(skip_serializing_if = "Option::is_none")]
1086    pub marker: Option<String>,
1087}
1088
1089#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1090#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1091pub struct GetDocumentPathResponse {
1092    /// <p>The path information.</p>
1093    #[serde(rename = "Path")]
1094    #[serde(skip_serializing_if = "Option::is_none")]
1095    pub path: Option<ResourcePath>,
1096}
1097
1098#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1099#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1100pub struct GetDocumentRequest {
1101    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
1102    #[serde(rename = "AuthenticationToken")]
1103    #[serde(skip_serializing_if = "Option::is_none")]
1104    pub authentication_token: Option<String>,
1105    /// <p>The ID of the document.</p>
1106    #[serde(rename = "DocumentId")]
1107    pub document_id: String,
1108    /// <p>Set this to <code>TRUE</code> to include custom metadata in the response.</p>
1109    #[serde(rename = "IncludeCustomMetadata")]
1110    #[serde(skip_serializing_if = "Option::is_none")]
1111    pub include_custom_metadata: Option<bool>,
1112}
1113
1114#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1115#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1116pub struct GetDocumentResponse {
1117    /// <p>The custom metadata on the document.</p>
1118    #[serde(rename = "CustomMetadata")]
1119    #[serde(skip_serializing_if = "Option::is_none")]
1120    pub custom_metadata: Option<::std::collections::HashMap<String, String>>,
1121    /// <p>The metadata details of the document.</p>
1122    #[serde(rename = "Metadata")]
1123    #[serde(skip_serializing_if = "Option::is_none")]
1124    pub metadata: Option<DocumentMetadata>,
1125}
1126
1127#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1128#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1129pub struct GetDocumentVersionRequest {
1130    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
1131    #[serde(rename = "AuthenticationToken")]
1132    #[serde(skip_serializing_if = "Option::is_none")]
1133    pub authentication_token: Option<String>,
1134    /// <p>The ID of the document.</p>
1135    #[serde(rename = "DocumentId")]
1136    pub document_id: String,
1137    /// <p>A comma-separated list of values. Specify "SOURCE" to include a URL for the source document.</p>
1138    #[serde(rename = "Fields")]
1139    #[serde(skip_serializing_if = "Option::is_none")]
1140    pub fields: Option<String>,
1141    /// <p>Set this to TRUE to include custom metadata in the response.</p>
1142    #[serde(rename = "IncludeCustomMetadata")]
1143    #[serde(skip_serializing_if = "Option::is_none")]
1144    pub include_custom_metadata: Option<bool>,
1145    /// <p>The version ID of the document.</p>
1146    #[serde(rename = "VersionId")]
1147    pub version_id: String,
1148}
1149
1150#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1151#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1152pub struct GetDocumentVersionResponse {
1153    /// <p>The custom metadata on the document version.</p>
1154    #[serde(rename = "CustomMetadata")]
1155    #[serde(skip_serializing_if = "Option::is_none")]
1156    pub custom_metadata: Option<::std::collections::HashMap<String, String>>,
1157    /// <p>The version metadata.</p>
1158    #[serde(rename = "Metadata")]
1159    #[serde(skip_serializing_if = "Option::is_none")]
1160    pub metadata: Option<DocumentVersionMetadata>,
1161}
1162
1163#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1164#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1165pub struct GetFolderPathRequest {
1166    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
1167    #[serde(rename = "AuthenticationToken")]
1168    #[serde(skip_serializing_if = "Option::is_none")]
1169    pub authentication_token: Option<String>,
1170    /// <p>A comma-separated list of values. Specify "NAME" to include the names of the parent folders.</p>
1171    #[serde(rename = "Fields")]
1172    #[serde(skip_serializing_if = "Option::is_none")]
1173    pub fields: Option<String>,
1174    /// <p>The ID of the folder.</p>
1175    #[serde(rename = "FolderId")]
1176    pub folder_id: String,
1177    /// <p>The maximum number of levels in the hierarchy to return.</p>
1178    #[serde(rename = "Limit")]
1179    #[serde(skip_serializing_if = "Option::is_none")]
1180    pub limit: Option<i64>,
1181    /// <p>This value is not supported.</p>
1182    #[serde(rename = "Marker")]
1183    #[serde(skip_serializing_if = "Option::is_none")]
1184    pub marker: Option<String>,
1185}
1186
1187#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1188#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1189pub struct GetFolderPathResponse {
1190    /// <p>The path information.</p>
1191    #[serde(rename = "Path")]
1192    #[serde(skip_serializing_if = "Option::is_none")]
1193    pub path: Option<ResourcePath>,
1194}
1195
1196#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1197#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1198pub struct GetFolderRequest {
1199    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
1200    #[serde(rename = "AuthenticationToken")]
1201    #[serde(skip_serializing_if = "Option::is_none")]
1202    pub authentication_token: Option<String>,
1203    /// <p>The ID of the folder.</p>
1204    #[serde(rename = "FolderId")]
1205    pub folder_id: String,
1206    /// <p>Set to TRUE to include custom metadata in the response.</p>
1207    #[serde(rename = "IncludeCustomMetadata")]
1208    #[serde(skip_serializing_if = "Option::is_none")]
1209    pub include_custom_metadata: Option<bool>,
1210}
1211
1212#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1213#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1214pub struct GetFolderResponse {
1215    /// <p>The custom metadata on the folder.</p>
1216    #[serde(rename = "CustomMetadata")]
1217    #[serde(skip_serializing_if = "Option::is_none")]
1218    pub custom_metadata: Option<::std::collections::HashMap<String, String>>,
1219    /// <p>The metadata of the folder.</p>
1220    #[serde(rename = "Metadata")]
1221    #[serde(skip_serializing_if = "Option::is_none")]
1222    pub metadata: Option<FolderMetadata>,
1223}
1224
1225#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1226#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1227pub struct GetResourcesRequest {
1228    /// <p>The Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
1229    #[serde(rename = "AuthenticationToken")]
1230    #[serde(skip_serializing_if = "Option::is_none")]
1231    pub authentication_token: Option<String>,
1232    /// <p>The collection type.</p>
1233    #[serde(rename = "CollectionType")]
1234    #[serde(skip_serializing_if = "Option::is_none")]
1235    pub collection_type: Option<String>,
1236    /// <p>The maximum number of resources to return.</p>
1237    #[serde(rename = "Limit")]
1238    #[serde(skip_serializing_if = "Option::is_none")]
1239    pub limit: Option<i64>,
1240    /// <p>The marker for the next set of results. This marker was received from a previous call.</p>
1241    #[serde(rename = "Marker")]
1242    #[serde(skip_serializing_if = "Option::is_none")]
1243    pub marker: Option<String>,
1244    /// <p>The user ID for the resource collection. This is a required field for accessing the API operation using IAM credentials.</p>
1245    #[serde(rename = "UserId")]
1246    #[serde(skip_serializing_if = "Option::is_none")]
1247    pub user_id: Option<String>,
1248}
1249
1250#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1251#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1252pub struct GetResourcesResponse {
1253    /// <p>The documents in the specified collection.</p>
1254    #[serde(rename = "Documents")]
1255    #[serde(skip_serializing_if = "Option::is_none")]
1256    pub documents: Option<Vec<DocumentMetadata>>,
1257    /// <p>The folders in the specified folder.</p>
1258    #[serde(rename = "Folders")]
1259    #[serde(skip_serializing_if = "Option::is_none")]
1260    pub folders: Option<Vec<FolderMetadata>>,
1261    /// <p>The marker to use when requesting the next set of results. If there are no additional results, the string is empty.</p>
1262    #[serde(rename = "Marker")]
1263    #[serde(skip_serializing_if = "Option::is_none")]
1264    pub marker: Option<String>,
1265}
1266
1267/// <p>Describes the metadata of a user group.</p>
1268#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1269#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1270pub struct GroupMetadata {
1271    /// <p>The ID of the user group.</p>
1272    #[serde(rename = "Id")]
1273    #[serde(skip_serializing_if = "Option::is_none")]
1274    pub id: Option<String>,
1275    /// <p>The name of the group.</p>
1276    #[serde(rename = "Name")]
1277    #[serde(skip_serializing_if = "Option::is_none")]
1278    pub name: Option<String>,
1279}
1280
1281#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1282#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1283pub struct InitiateDocumentVersionUploadRequest {
1284    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
1285    #[serde(rename = "AuthenticationToken")]
1286    #[serde(skip_serializing_if = "Option::is_none")]
1287    pub authentication_token: Option<String>,
1288    /// <p>The timestamp when the content of the document was originally created.</p>
1289    #[serde(rename = "ContentCreatedTimestamp")]
1290    #[serde(skip_serializing_if = "Option::is_none")]
1291    pub content_created_timestamp: Option<f64>,
1292    /// <p>The timestamp when the content of the document was modified.</p>
1293    #[serde(rename = "ContentModifiedTimestamp")]
1294    #[serde(skip_serializing_if = "Option::is_none")]
1295    pub content_modified_timestamp: Option<f64>,
1296    /// <p>The content type of the document.</p>
1297    #[serde(rename = "ContentType")]
1298    #[serde(skip_serializing_if = "Option::is_none")]
1299    pub content_type: Option<String>,
1300    /// <p>The size of the document, in bytes.</p>
1301    #[serde(rename = "DocumentSizeInBytes")]
1302    #[serde(skip_serializing_if = "Option::is_none")]
1303    pub document_size_in_bytes: Option<i64>,
1304    /// <p>The ID of the document.</p>
1305    #[serde(rename = "Id")]
1306    #[serde(skip_serializing_if = "Option::is_none")]
1307    pub id: Option<String>,
1308    /// <p>The name of the document.</p>
1309    #[serde(rename = "Name")]
1310    #[serde(skip_serializing_if = "Option::is_none")]
1311    pub name: Option<String>,
1312    /// <p>The ID of the parent folder.</p>
1313    #[serde(rename = "ParentFolderId")]
1314    pub parent_folder_id: String,
1315}
1316
1317#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1318#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1319pub struct InitiateDocumentVersionUploadResponse {
1320    /// <p>The document metadata.</p>
1321    #[serde(rename = "Metadata")]
1322    #[serde(skip_serializing_if = "Option::is_none")]
1323    pub metadata: Option<DocumentMetadata>,
1324    /// <p>The upload metadata.</p>
1325    #[serde(rename = "UploadMetadata")]
1326    #[serde(skip_serializing_if = "Option::is_none")]
1327    pub upload_metadata: Option<UploadMetadata>,
1328}
1329
1330/// <p>Set of options which defines notification preferences of given action.</p>
1331#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1332#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1333pub struct NotificationOptions {
1334    /// <p>Text value to be included in the email body.</p>
1335    #[serde(rename = "EmailMessage")]
1336    #[serde(skip_serializing_if = "Option::is_none")]
1337    pub email_message: Option<String>,
1338    /// <p>Boolean value to indicate an email notification should be sent to the receipients.</p>
1339    #[serde(rename = "SendEmail")]
1340    #[serde(skip_serializing_if = "Option::is_none")]
1341    pub send_email: Option<bool>,
1342}
1343
1344/// <p>Describes the users or user groups.</p>
1345#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1346#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1347pub struct Participants {
1348    /// <p>The list of user groups.</p>
1349    #[serde(rename = "Groups")]
1350    #[serde(skip_serializing_if = "Option::is_none")]
1351    pub groups: Option<Vec<GroupMetadata>>,
1352    /// <p>The list of users.</p>
1353    #[serde(rename = "Users")]
1354    #[serde(skip_serializing_if = "Option::is_none")]
1355    pub users: Option<Vec<UserMetadata>>,
1356}
1357
1358/// <p>Describes the permissions.</p>
1359#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1360#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1361pub struct PermissionInfo {
1362    /// <p>The role of the user.</p>
1363    #[serde(rename = "Role")]
1364    #[serde(skip_serializing_if = "Option::is_none")]
1365    pub role: Option<String>,
1366    /// <p>The type of permissions.</p>
1367    #[serde(rename = "Type")]
1368    #[serde(skip_serializing_if = "Option::is_none")]
1369    pub type_: Option<String>,
1370}
1371
1372/// <p>Describes a resource.</p>
1373#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1374#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1375pub struct Principal {
1376    /// <p>The ID of the resource.</p>
1377    #[serde(rename = "Id")]
1378    #[serde(skip_serializing_if = "Option::is_none")]
1379    pub id: Option<String>,
1380    /// <p>The permission information for the resource.</p>
1381    #[serde(rename = "Roles")]
1382    #[serde(skip_serializing_if = "Option::is_none")]
1383    pub roles: Option<Vec<PermissionInfo>>,
1384    /// <p>The type of resource.</p>
1385    #[serde(rename = "Type")]
1386    #[serde(skip_serializing_if = "Option::is_none")]
1387    pub type_: Option<String>,
1388}
1389
1390#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1391#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1392pub struct RemoveAllResourcePermissionsRequest {
1393    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
1394    #[serde(rename = "AuthenticationToken")]
1395    #[serde(skip_serializing_if = "Option::is_none")]
1396    pub authentication_token: Option<String>,
1397    /// <p>The ID of the resource.</p>
1398    #[serde(rename = "ResourceId")]
1399    pub resource_id: String,
1400}
1401
1402#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1403#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1404pub struct RemoveResourcePermissionRequest {
1405    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
1406    #[serde(rename = "AuthenticationToken")]
1407    #[serde(skip_serializing_if = "Option::is_none")]
1408    pub authentication_token: Option<String>,
1409    /// <p>The principal ID of the resource.</p>
1410    #[serde(rename = "PrincipalId")]
1411    pub principal_id: String,
1412    /// <p>The principal type of the resource.</p>
1413    #[serde(rename = "PrincipalType")]
1414    #[serde(skip_serializing_if = "Option::is_none")]
1415    pub principal_type: Option<String>,
1416    /// <p>The ID of the resource.</p>
1417    #[serde(rename = "ResourceId")]
1418    pub resource_id: String,
1419}
1420
1421/// <p>Describes the metadata of a resource.</p>
1422#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1423#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1424pub struct ResourceMetadata {
1425    /// <p>The ID of the resource.</p>
1426    #[serde(rename = "Id")]
1427    #[serde(skip_serializing_if = "Option::is_none")]
1428    pub id: Option<String>,
1429    /// <p>The name of the resource.</p>
1430    #[serde(rename = "Name")]
1431    #[serde(skip_serializing_if = "Option::is_none")]
1432    pub name: Option<String>,
1433    /// <p>The original name of the resource before a rename operation.</p>
1434    #[serde(rename = "OriginalName")]
1435    #[serde(skip_serializing_if = "Option::is_none")]
1436    pub original_name: Option<String>,
1437    /// <p>The owner of the resource.</p>
1438    #[serde(rename = "Owner")]
1439    #[serde(skip_serializing_if = "Option::is_none")]
1440    pub owner: Option<UserMetadata>,
1441    /// <p>The parent ID of the resource before a rename operation.</p>
1442    #[serde(rename = "ParentId")]
1443    #[serde(skip_serializing_if = "Option::is_none")]
1444    pub parent_id: Option<String>,
1445    /// <p>The type of resource.</p>
1446    #[serde(rename = "Type")]
1447    #[serde(skip_serializing_if = "Option::is_none")]
1448    pub type_: Option<String>,
1449    /// <p>The version ID of the resource. This is an optional field and is filled for action on document version.</p>
1450    #[serde(rename = "VersionId")]
1451    #[serde(skip_serializing_if = "Option::is_none")]
1452    pub version_id: Option<String>,
1453}
1454
1455/// <p>Describes the path information of a resource.</p>
1456#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1457#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1458pub struct ResourcePath {
1459    /// <p>The components of the resource path.</p>
1460    #[serde(rename = "Components")]
1461    #[serde(skip_serializing_if = "Option::is_none")]
1462    pub components: Option<Vec<ResourcePathComponent>>,
1463}
1464
1465/// <p>Describes the resource path.</p>
1466#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1467#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1468pub struct ResourcePathComponent {
1469    /// <p>The ID of the resource path.</p>
1470    #[serde(rename = "Id")]
1471    #[serde(skip_serializing_if = "Option::is_none")]
1472    pub id: Option<String>,
1473    /// <p>The name of the resource path.</p>
1474    #[serde(rename = "Name")]
1475    #[serde(skip_serializing_if = "Option::is_none")]
1476    pub name: Option<String>,
1477}
1478
1479/// <p>Describes the recipient type and ID, if available.</p>
1480#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1481#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1482pub struct SharePrincipal {
1483    /// <p>The ID of the recipient.</p>
1484    #[serde(rename = "Id")]
1485    pub id: String,
1486    /// <p>The role of the recipient.</p>
1487    #[serde(rename = "Role")]
1488    pub role: String,
1489    /// <p>The type of the recipient.</p>
1490    #[serde(rename = "Type")]
1491    pub type_: String,
1492}
1493
1494/// <p>Describes the share results of a resource.</p>
1495#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1496#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1497pub struct ShareResult {
1498    /// <p>The ID of the invited user.</p>
1499    #[serde(rename = "InviteePrincipalId")]
1500    #[serde(skip_serializing_if = "Option::is_none")]
1501    pub invitee_principal_id: Option<String>,
1502    /// <p>The ID of the principal.</p>
1503    #[serde(rename = "PrincipalId")]
1504    #[serde(skip_serializing_if = "Option::is_none")]
1505    pub principal_id: Option<String>,
1506    /// <p>The role.</p>
1507    #[serde(rename = "Role")]
1508    #[serde(skip_serializing_if = "Option::is_none")]
1509    pub role: Option<String>,
1510    /// <p>The ID of the resource that was shared.</p>
1511    #[serde(rename = "ShareId")]
1512    #[serde(skip_serializing_if = "Option::is_none")]
1513    pub share_id: Option<String>,
1514    /// <p>The status.</p>
1515    #[serde(rename = "Status")]
1516    #[serde(skip_serializing_if = "Option::is_none")]
1517    pub status: Option<String>,
1518    /// <p>The status message.</p>
1519    #[serde(rename = "StatusMessage")]
1520    #[serde(skip_serializing_if = "Option::is_none")]
1521    pub status_message: Option<String>,
1522}
1523
1524/// <p>Describes the storage for a user.</p>
1525#[derive(Clone, Debug, Default, Deserialize, PartialEq, Serialize)]
1526pub struct StorageRuleType {
1527    /// <p>The amount of storage allocated, in bytes.</p>
1528    #[serde(rename = "StorageAllocatedInBytes")]
1529    #[serde(skip_serializing_if = "Option::is_none")]
1530    pub storage_allocated_in_bytes: Option<i64>,
1531    /// <p>The type of storage.</p>
1532    #[serde(rename = "StorageType")]
1533    #[serde(skip_serializing_if = "Option::is_none")]
1534    pub storage_type: Option<String>,
1535}
1536
1537/// <p>Describes a subscription.</p>
1538#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1539#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1540pub struct Subscription {
1541    /// <p>The endpoint of the subscription.</p>
1542    #[serde(rename = "EndPoint")]
1543    #[serde(skip_serializing_if = "Option::is_none")]
1544    pub end_point: Option<String>,
1545    /// <p>The protocol of the subscription.</p>
1546    #[serde(rename = "Protocol")]
1547    #[serde(skip_serializing_if = "Option::is_none")]
1548    pub protocol: Option<String>,
1549    /// <p>The ID of the subscription.</p>
1550    #[serde(rename = "SubscriptionId")]
1551    #[serde(skip_serializing_if = "Option::is_none")]
1552    pub subscription_id: Option<String>,
1553}
1554
1555#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1556#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1557pub struct UpdateDocumentRequest {
1558    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
1559    #[serde(rename = "AuthenticationToken")]
1560    #[serde(skip_serializing_if = "Option::is_none")]
1561    pub authentication_token: Option<String>,
1562    /// <p>The ID of the document.</p>
1563    #[serde(rename = "DocumentId")]
1564    pub document_id: String,
1565    /// <p>The name of the document.</p>
1566    #[serde(rename = "Name")]
1567    #[serde(skip_serializing_if = "Option::is_none")]
1568    pub name: Option<String>,
1569    /// <p>The ID of the parent folder.</p>
1570    #[serde(rename = "ParentFolderId")]
1571    #[serde(skip_serializing_if = "Option::is_none")]
1572    pub parent_folder_id: Option<String>,
1573    /// <p>The resource state of the document. Only ACTIVE and RECYCLED are supported.</p>
1574    #[serde(rename = "ResourceState")]
1575    #[serde(skip_serializing_if = "Option::is_none")]
1576    pub resource_state: Option<String>,
1577}
1578
1579#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1580#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1581pub struct UpdateDocumentVersionRequest {
1582    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
1583    #[serde(rename = "AuthenticationToken")]
1584    #[serde(skip_serializing_if = "Option::is_none")]
1585    pub authentication_token: Option<String>,
1586    /// <p>The ID of the document.</p>
1587    #[serde(rename = "DocumentId")]
1588    pub document_id: String,
1589    /// <p>The version ID of the document.</p>
1590    #[serde(rename = "VersionId")]
1591    pub version_id: String,
1592    /// <p>The status of the version.</p>
1593    #[serde(rename = "VersionStatus")]
1594    #[serde(skip_serializing_if = "Option::is_none")]
1595    pub version_status: Option<String>,
1596}
1597
1598#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1599#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1600pub struct UpdateFolderRequest {
1601    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
1602    #[serde(rename = "AuthenticationToken")]
1603    #[serde(skip_serializing_if = "Option::is_none")]
1604    pub authentication_token: Option<String>,
1605    /// <p>The ID of the folder.</p>
1606    #[serde(rename = "FolderId")]
1607    pub folder_id: String,
1608    /// <p>The name of the folder.</p>
1609    #[serde(rename = "Name")]
1610    #[serde(skip_serializing_if = "Option::is_none")]
1611    pub name: Option<String>,
1612    /// <p>The ID of the parent folder.</p>
1613    #[serde(rename = "ParentFolderId")]
1614    #[serde(skip_serializing_if = "Option::is_none")]
1615    pub parent_folder_id: Option<String>,
1616    /// <p>The resource state of the folder. Only ACTIVE and RECYCLED are accepted values from the API.</p>
1617    #[serde(rename = "ResourceState")]
1618    #[serde(skip_serializing_if = "Option::is_none")]
1619    pub resource_state: Option<String>,
1620}
1621
1622#[derive(Clone, Debug, Default, PartialEq, Serialize)]
1623#[cfg_attr(feature = "deserialize_structs", derive(Deserialize))]
1624pub struct UpdateUserRequest {
1625    /// <p>Amazon WorkDocs authentication token. Not required when using AWS administrator credentials to access the API.</p>
1626    #[serde(rename = "AuthenticationToken")]
1627    #[serde(skip_serializing_if = "Option::is_none")]
1628    pub authentication_token: Option<String>,
1629    /// <p>The given name of the user.</p>
1630    #[serde(rename = "GivenName")]
1631    #[serde(skip_serializing_if = "Option::is_none")]
1632    pub given_name: Option<String>,
1633    /// <p>Boolean value to determine whether the user is granted Poweruser privileges.</p>
1634    #[serde(rename = "GrantPoweruserPrivileges")]
1635    #[serde(skip_serializing_if = "Option::is_none")]
1636    pub grant_poweruser_privileges: Option<String>,
1637    /// <p>The locale of the user.</p>
1638    #[serde(rename = "Locale")]
1639    #[serde(skip_serializing_if = "Option::is_none")]
1640    pub locale: Option<String>,
1641    /// <p>The amount of storage for the user.</p>
1642    #[serde(rename = "StorageRule")]
1643    #[serde(skip_serializing_if = "Option::is_none")]
1644    pub storage_rule: Option<StorageRuleType>,
1645    /// <p>The surname of the user.</p>
1646    #[serde(rename = "Surname")]
1647    #[serde(skip_serializing_if = "Option::is_none")]
1648    pub surname: Option<String>,
1649    /// <p>The time zone ID of the user.</p>
1650    #[serde(rename = "TimeZoneId")]
1651    #[serde(skip_serializing_if = "Option::is_none")]
1652    pub time_zone_id: Option<String>,
1653    /// <p>The type of the user.</p>
1654    #[serde(rename = "Type")]
1655    #[serde(skip_serializing_if = "Option::is_none")]
1656    pub type_: Option<String>,
1657    /// <p>The ID of the user.</p>
1658    #[serde(rename = "UserId")]
1659    pub user_id: String,
1660}
1661
1662#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1663#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1664pub struct UpdateUserResponse {
1665    /// <p>The user information.</p>
1666    #[serde(rename = "User")]
1667    #[serde(skip_serializing_if = "Option::is_none")]
1668    pub user: Option<User>,
1669}
1670
1671/// <p>Describes the upload.</p>
1672#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1673#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1674pub struct UploadMetadata {
1675    /// <p>The signed headers.</p>
1676    #[serde(rename = "SignedHeaders")]
1677    #[serde(skip_serializing_if = "Option::is_none")]
1678    pub signed_headers: Option<::std::collections::HashMap<String, String>>,
1679    /// <p>The URL of the upload.</p>
1680    #[serde(rename = "UploadUrl")]
1681    #[serde(skip_serializing_if = "Option::is_none")]
1682    pub upload_url: Option<String>,
1683}
1684
1685/// <p>Describes a user.</p>
1686#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1687#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1688pub struct User {
1689    /// <p>The time when the user was created.</p>
1690    #[serde(rename = "CreatedTimestamp")]
1691    #[serde(skip_serializing_if = "Option::is_none")]
1692    pub created_timestamp: Option<f64>,
1693    /// <p>The email address of the user.</p>
1694    #[serde(rename = "EmailAddress")]
1695    #[serde(skip_serializing_if = "Option::is_none")]
1696    pub email_address: Option<String>,
1697    /// <p>The given name of the user.</p>
1698    #[serde(rename = "GivenName")]
1699    #[serde(skip_serializing_if = "Option::is_none")]
1700    pub given_name: Option<String>,
1701    /// <p>The ID of the user.</p>
1702    #[serde(rename = "Id")]
1703    #[serde(skip_serializing_if = "Option::is_none")]
1704    pub id: Option<String>,
1705    /// <p>The locale of the user.</p>
1706    #[serde(rename = "Locale")]
1707    #[serde(skip_serializing_if = "Option::is_none")]
1708    pub locale: Option<String>,
1709    /// <p>The time when the user was modified.</p>
1710    #[serde(rename = "ModifiedTimestamp")]
1711    #[serde(skip_serializing_if = "Option::is_none")]
1712    pub modified_timestamp: Option<f64>,
1713    /// <p>The ID of the organization.</p>
1714    #[serde(rename = "OrganizationId")]
1715    #[serde(skip_serializing_if = "Option::is_none")]
1716    pub organization_id: Option<String>,
1717    /// <p>The ID of the recycle bin folder.</p>
1718    #[serde(rename = "RecycleBinFolderId")]
1719    #[serde(skip_serializing_if = "Option::is_none")]
1720    pub recycle_bin_folder_id: Option<String>,
1721    /// <p>The ID of the root folder.</p>
1722    #[serde(rename = "RootFolderId")]
1723    #[serde(skip_serializing_if = "Option::is_none")]
1724    pub root_folder_id: Option<String>,
1725    /// <p>The status of the user.</p>
1726    #[serde(rename = "Status")]
1727    #[serde(skip_serializing_if = "Option::is_none")]
1728    pub status: Option<String>,
1729    /// <p>The storage for the user.</p>
1730    #[serde(rename = "Storage")]
1731    #[serde(skip_serializing_if = "Option::is_none")]
1732    pub storage: Option<UserStorageMetadata>,
1733    /// <p>The surname of the user.</p>
1734    #[serde(rename = "Surname")]
1735    #[serde(skip_serializing_if = "Option::is_none")]
1736    pub surname: Option<String>,
1737    /// <p>The time zone ID of the user.</p>
1738    #[serde(rename = "TimeZoneId")]
1739    #[serde(skip_serializing_if = "Option::is_none")]
1740    pub time_zone_id: Option<String>,
1741    /// <p>The type of user.</p>
1742    #[serde(rename = "Type")]
1743    #[serde(skip_serializing_if = "Option::is_none")]
1744    pub type_: Option<String>,
1745    /// <p>The login name of the user.</p>
1746    #[serde(rename = "Username")]
1747    #[serde(skip_serializing_if = "Option::is_none")]
1748    pub username: Option<String>,
1749}
1750
1751/// <p>Describes the metadata of the user.</p>
1752#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1753#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1754pub struct UserMetadata {
1755    /// <p>The email address of the user.</p>
1756    #[serde(rename = "EmailAddress")]
1757    #[serde(skip_serializing_if = "Option::is_none")]
1758    pub email_address: Option<String>,
1759    /// <p>The given name of the user before a rename operation.</p>
1760    #[serde(rename = "GivenName")]
1761    #[serde(skip_serializing_if = "Option::is_none")]
1762    pub given_name: Option<String>,
1763    /// <p>The ID of the user.</p>
1764    #[serde(rename = "Id")]
1765    #[serde(skip_serializing_if = "Option::is_none")]
1766    pub id: Option<String>,
1767    /// <p>The surname of the user.</p>
1768    #[serde(rename = "Surname")]
1769    #[serde(skip_serializing_if = "Option::is_none")]
1770    pub surname: Option<String>,
1771    /// <p>The name of the user.</p>
1772    #[serde(rename = "Username")]
1773    #[serde(skip_serializing_if = "Option::is_none")]
1774    pub username: Option<String>,
1775}
1776
1777/// <p>Describes the storage for a user.</p>
1778#[derive(Clone, Debug, Default, Deserialize, PartialEq)]
1779#[cfg_attr(any(test, feature = "serialize_structs"), derive(Serialize))]
1780pub struct UserStorageMetadata {
1781    /// <p>The storage for a user.</p>
1782    #[serde(rename = "StorageRule")]
1783    #[serde(skip_serializing_if = "Option::is_none")]
1784    pub storage_rule: Option<StorageRuleType>,
1785    /// <p>The amount of storage used, in bytes.</p>
1786    #[serde(rename = "StorageUtilizedInBytes")]
1787    #[serde(skip_serializing_if = "Option::is_none")]
1788    pub storage_utilized_in_bytes: Option<i64>,
1789}
1790
1791/// Errors returned by AbortDocumentVersionUpload
1792#[derive(Debug, PartialEq)]
1793pub enum AbortDocumentVersionUploadError {
1794    /// <p>The resource does not exist.</p>
1795    EntityNotExists(String),
1796    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
1797    FailedDependency(String),
1798    /// <p>The specified document version is not in the INITIALIZED state.</p>
1799    ProhibitedState(String),
1800    /// <p>One or more of the dependencies is unavailable.</p>
1801    ServiceUnavailable(String),
1802    /// <p>The operation is not permitted.</p>
1803    UnauthorizedOperation(String),
1804    /// <p>The caller does not have access to perform the action on the resource.</p>
1805    UnauthorizedResourceAccess(String),
1806}
1807
1808impl AbortDocumentVersionUploadError {
1809    pub fn from_response(
1810        res: BufferedHttpResponse,
1811    ) -> RusotoError<AbortDocumentVersionUploadError> {
1812        if let Some(err) = proto::json::Error::parse_rest(&res) {
1813            match err.typ.as_str() {
1814                "EntityNotExistsException" => {
1815                    return RusotoError::Service(AbortDocumentVersionUploadError::EntityNotExists(
1816                        err.msg,
1817                    ))
1818                }
1819                "FailedDependencyException" => {
1820                    return RusotoError::Service(AbortDocumentVersionUploadError::FailedDependency(
1821                        err.msg,
1822                    ))
1823                }
1824                "ProhibitedStateException" => {
1825                    return RusotoError::Service(AbortDocumentVersionUploadError::ProhibitedState(
1826                        err.msg,
1827                    ))
1828                }
1829                "ServiceUnavailableException" => {
1830                    return RusotoError::Service(
1831                        AbortDocumentVersionUploadError::ServiceUnavailable(err.msg),
1832                    )
1833                }
1834                "UnauthorizedOperationException" => {
1835                    return RusotoError::Service(
1836                        AbortDocumentVersionUploadError::UnauthorizedOperation(err.msg),
1837                    )
1838                }
1839                "UnauthorizedResourceAccessException" => {
1840                    return RusotoError::Service(
1841                        AbortDocumentVersionUploadError::UnauthorizedResourceAccess(err.msg),
1842                    )
1843                }
1844                "ValidationException" => return RusotoError::Validation(err.msg),
1845                _ => {}
1846            }
1847        }
1848        RusotoError::Unknown(res)
1849    }
1850}
1851impl fmt::Display for AbortDocumentVersionUploadError {
1852    #[allow(unused_variables)]
1853    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1854        match *self {
1855            AbortDocumentVersionUploadError::EntityNotExists(ref cause) => write!(f, "{}", cause),
1856            AbortDocumentVersionUploadError::FailedDependency(ref cause) => write!(f, "{}", cause),
1857            AbortDocumentVersionUploadError::ProhibitedState(ref cause) => write!(f, "{}", cause),
1858            AbortDocumentVersionUploadError::ServiceUnavailable(ref cause) => {
1859                write!(f, "{}", cause)
1860            }
1861            AbortDocumentVersionUploadError::UnauthorizedOperation(ref cause) => {
1862                write!(f, "{}", cause)
1863            }
1864            AbortDocumentVersionUploadError::UnauthorizedResourceAccess(ref cause) => {
1865                write!(f, "{}", cause)
1866            }
1867        }
1868    }
1869}
1870impl Error for AbortDocumentVersionUploadError {}
1871/// Errors returned by ActivateUser
1872#[derive(Debug, PartialEq)]
1873pub enum ActivateUserError {
1874    /// <p>The resource does not exist.</p>
1875    EntityNotExists(String),
1876    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
1877    FailedDependency(String),
1878    /// <p>One or more of the dependencies is unavailable.</p>
1879    ServiceUnavailable(String),
1880    /// <p>The operation is not permitted.</p>
1881    UnauthorizedOperation(String),
1882    /// <p>The caller does not have access to perform the action on the resource.</p>
1883    UnauthorizedResourceAccess(String),
1884}
1885
1886impl ActivateUserError {
1887    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<ActivateUserError> {
1888        if let Some(err) = proto::json::Error::parse_rest(&res) {
1889            match err.typ.as_str() {
1890                "EntityNotExistsException" => {
1891                    return RusotoError::Service(ActivateUserError::EntityNotExists(err.msg))
1892                }
1893                "FailedDependencyException" => {
1894                    return RusotoError::Service(ActivateUserError::FailedDependency(err.msg))
1895                }
1896                "ServiceUnavailableException" => {
1897                    return RusotoError::Service(ActivateUserError::ServiceUnavailable(err.msg))
1898                }
1899                "UnauthorizedOperationException" => {
1900                    return RusotoError::Service(ActivateUserError::UnauthorizedOperation(err.msg))
1901                }
1902                "UnauthorizedResourceAccessException" => {
1903                    return RusotoError::Service(ActivateUserError::UnauthorizedResourceAccess(
1904                        err.msg,
1905                    ))
1906                }
1907                "ValidationException" => return RusotoError::Validation(err.msg),
1908                _ => {}
1909            }
1910        }
1911        RusotoError::Unknown(res)
1912    }
1913}
1914impl fmt::Display for ActivateUserError {
1915    #[allow(unused_variables)]
1916    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1917        match *self {
1918            ActivateUserError::EntityNotExists(ref cause) => write!(f, "{}", cause),
1919            ActivateUserError::FailedDependency(ref cause) => write!(f, "{}", cause),
1920            ActivateUserError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1921            ActivateUserError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
1922            ActivateUserError::UnauthorizedResourceAccess(ref cause) => write!(f, "{}", cause),
1923        }
1924    }
1925}
1926impl Error for ActivateUserError {}
1927/// Errors returned by AddResourcePermissions
1928#[derive(Debug, PartialEq)]
1929pub enum AddResourcePermissionsError {
1930    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
1931    FailedDependency(String),
1932    /// <p>One or more of the dependencies is unavailable.</p>
1933    ServiceUnavailable(String),
1934    /// <p>The operation is not permitted.</p>
1935    UnauthorizedOperation(String),
1936    /// <p>The caller does not have access to perform the action on the resource.</p>
1937    UnauthorizedResourceAccess(String),
1938}
1939
1940impl AddResourcePermissionsError {
1941    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<AddResourcePermissionsError> {
1942        if let Some(err) = proto::json::Error::parse_rest(&res) {
1943            match err.typ.as_str() {
1944                "FailedDependencyException" => {
1945                    return RusotoError::Service(AddResourcePermissionsError::FailedDependency(
1946                        err.msg,
1947                    ))
1948                }
1949                "ServiceUnavailableException" => {
1950                    return RusotoError::Service(AddResourcePermissionsError::ServiceUnavailable(
1951                        err.msg,
1952                    ))
1953                }
1954                "UnauthorizedOperationException" => {
1955                    return RusotoError::Service(
1956                        AddResourcePermissionsError::UnauthorizedOperation(err.msg),
1957                    )
1958                }
1959                "UnauthorizedResourceAccessException" => {
1960                    return RusotoError::Service(
1961                        AddResourcePermissionsError::UnauthorizedResourceAccess(err.msg),
1962                    )
1963                }
1964                "ValidationException" => return RusotoError::Validation(err.msg),
1965                _ => {}
1966            }
1967        }
1968        RusotoError::Unknown(res)
1969    }
1970}
1971impl fmt::Display for AddResourcePermissionsError {
1972    #[allow(unused_variables)]
1973    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
1974        match *self {
1975            AddResourcePermissionsError::FailedDependency(ref cause) => write!(f, "{}", cause),
1976            AddResourcePermissionsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
1977            AddResourcePermissionsError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
1978            AddResourcePermissionsError::UnauthorizedResourceAccess(ref cause) => {
1979                write!(f, "{}", cause)
1980            }
1981        }
1982    }
1983}
1984impl Error for AddResourcePermissionsError {}
1985/// Errors returned by CreateComment
1986#[derive(Debug, PartialEq)]
1987pub enum CreateCommentError {
1988    /// <p>This exception is thrown when the document is locked for comments and user tries to create or delete a comment on that document.</p>
1989    DocumentLockedForComments(String),
1990    /// <p>The resource does not exist.</p>
1991    EntityNotExists(String),
1992    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
1993    FailedDependency(String),
1994    /// <p>The requested operation is not allowed on the specified comment object.</p>
1995    InvalidCommentOperation(String),
1996    /// <p>The specified document version is not in the INITIALIZED state.</p>
1997    ProhibitedState(String),
1998    /// <p>One or more of the dependencies is unavailable.</p>
1999    ServiceUnavailable(String),
2000    /// <p>The operation is not permitted.</p>
2001    UnauthorizedOperation(String),
2002    /// <p>The caller does not have access to perform the action on the resource.</p>
2003    UnauthorizedResourceAccess(String),
2004}
2005
2006impl CreateCommentError {
2007    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateCommentError> {
2008        if let Some(err) = proto::json::Error::parse_rest(&res) {
2009            match err.typ.as_str() {
2010                "DocumentLockedForCommentsException" => {
2011                    return RusotoError::Service(CreateCommentError::DocumentLockedForComments(
2012                        err.msg,
2013                    ))
2014                }
2015                "EntityNotExistsException" => {
2016                    return RusotoError::Service(CreateCommentError::EntityNotExists(err.msg))
2017                }
2018                "FailedDependencyException" => {
2019                    return RusotoError::Service(CreateCommentError::FailedDependency(err.msg))
2020                }
2021                "InvalidCommentOperationException" => {
2022                    return RusotoError::Service(CreateCommentError::InvalidCommentOperation(
2023                        err.msg,
2024                    ))
2025                }
2026                "ProhibitedStateException" => {
2027                    return RusotoError::Service(CreateCommentError::ProhibitedState(err.msg))
2028                }
2029                "ServiceUnavailableException" => {
2030                    return RusotoError::Service(CreateCommentError::ServiceUnavailable(err.msg))
2031                }
2032                "UnauthorizedOperationException" => {
2033                    return RusotoError::Service(CreateCommentError::UnauthorizedOperation(err.msg))
2034                }
2035                "UnauthorizedResourceAccessException" => {
2036                    return RusotoError::Service(CreateCommentError::UnauthorizedResourceAccess(
2037                        err.msg,
2038                    ))
2039                }
2040                "ValidationException" => return RusotoError::Validation(err.msg),
2041                _ => {}
2042            }
2043        }
2044        RusotoError::Unknown(res)
2045    }
2046}
2047impl fmt::Display for CreateCommentError {
2048    #[allow(unused_variables)]
2049    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2050        match *self {
2051            CreateCommentError::DocumentLockedForComments(ref cause) => write!(f, "{}", cause),
2052            CreateCommentError::EntityNotExists(ref cause) => write!(f, "{}", cause),
2053            CreateCommentError::FailedDependency(ref cause) => write!(f, "{}", cause),
2054            CreateCommentError::InvalidCommentOperation(ref cause) => write!(f, "{}", cause),
2055            CreateCommentError::ProhibitedState(ref cause) => write!(f, "{}", cause),
2056            CreateCommentError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2057            CreateCommentError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2058            CreateCommentError::UnauthorizedResourceAccess(ref cause) => write!(f, "{}", cause),
2059        }
2060    }
2061}
2062impl Error for CreateCommentError {}
2063/// Errors returned by CreateCustomMetadata
2064#[derive(Debug, PartialEq)]
2065pub enum CreateCustomMetadataError {
2066    /// <p>The limit has been reached on the number of custom properties for the specified resource.</p>
2067    CustomMetadataLimitExceeded(String),
2068    /// <p>The resource does not exist.</p>
2069    EntityNotExists(String),
2070    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2071    FailedDependency(String),
2072    /// <p>The specified document version is not in the INITIALIZED state.</p>
2073    ProhibitedState(String),
2074    /// <p>One or more of the dependencies is unavailable.</p>
2075    ServiceUnavailable(String),
2076    /// <p>The operation is not permitted.</p>
2077    UnauthorizedOperation(String),
2078    /// <p>The caller does not have access to perform the action on the resource.</p>
2079    UnauthorizedResourceAccess(String),
2080}
2081
2082impl CreateCustomMetadataError {
2083    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateCustomMetadataError> {
2084        if let Some(err) = proto::json::Error::parse_rest(&res) {
2085            match err.typ.as_str() {
2086                "CustomMetadataLimitExceededException" => {
2087                    return RusotoError::Service(
2088                        CreateCustomMetadataError::CustomMetadataLimitExceeded(err.msg),
2089                    )
2090                }
2091                "EntityNotExistsException" => {
2092                    return RusotoError::Service(CreateCustomMetadataError::EntityNotExists(
2093                        err.msg,
2094                    ))
2095                }
2096                "FailedDependencyException" => {
2097                    return RusotoError::Service(CreateCustomMetadataError::FailedDependency(
2098                        err.msg,
2099                    ))
2100                }
2101                "ProhibitedStateException" => {
2102                    return RusotoError::Service(CreateCustomMetadataError::ProhibitedState(
2103                        err.msg,
2104                    ))
2105                }
2106                "ServiceUnavailableException" => {
2107                    return RusotoError::Service(CreateCustomMetadataError::ServiceUnavailable(
2108                        err.msg,
2109                    ))
2110                }
2111                "UnauthorizedOperationException" => {
2112                    return RusotoError::Service(CreateCustomMetadataError::UnauthorizedOperation(
2113                        err.msg,
2114                    ))
2115                }
2116                "UnauthorizedResourceAccessException" => {
2117                    return RusotoError::Service(
2118                        CreateCustomMetadataError::UnauthorizedResourceAccess(err.msg),
2119                    )
2120                }
2121                "ValidationException" => return RusotoError::Validation(err.msg),
2122                _ => {}
2123            }
2124        }
2125        RusotoError::Unknown(res)
2126    }
2127}
2128impl fmt::Display for CreateCustomMetadataError {
2129    #[allow(unused_variables)]
2130    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2131        match *self {
2132            CreateCustomMetadataError::CustomMetadataLimitExceeded(ref cause) => {
2133                write!(f, "{}", cause)
2134            }
2135            CreateCustomMetadataError::EntityNotExists(ref cause) => write!(f, "{}", cause),
2136            CreateCustomMetadataError::FailedDependency(ref cause) => write!(f, "{}", cause),
2137            CreateCustomMetadataError::ProhibitedState(ref cause) => write!(f, "{}", cause),
2138            CreateCustomMetadataError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2139            CreateCustomMetadataError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2140            CreateCustomMetadataError::UnauthorizedResourceAccess(ref cause) => {
2141                write!(f, "{}", cause)
2142            }
2143        }
2144    }
2145}
2146impl Error for CreateCustomMetadataError {}
2147/// Errors returned by CreateFolder
2148#[derive(Debug, PartialEq)]
2149pub enum CreateFolderError {
2150    /// <p>Another operation is in progress on the resource that conflicts with the current operation.</p>
2151    ConflictingOperation(String),
2152    /// <p>The resource already exists.</p>
2153    EntityAlreadyExists(String),
2154    /// <p>The resource does not exist.</p>
2155    EntityNotExists(String),
2156    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2157    FailedDependency(String),
2158    /// <p>The maximum of 100,000 folders under the parent folder has been exceeded.</p>
2159    LimitExceeded(String),
2160    /// <p>The specified document version is not in the INITIALIZED state.</p>
2161    ProhibitedState(String),
2162    /// <p>One or more of the dependencies is unavailable.</p>
2163    ServiceUnavailable(String),
2164    /// <p>The operation is not permitted.</p>
2165    UnauthorizedOperation(String),
2166    /// <p>The caller does not have access to perform the action on the resource.</p>
2167    UnauthorizedResourceAccess(String),
2168}
2169
2170impl CreateFolderError {
2171    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateFolderError> {
2172        if let Some(err) = proto::json::Error::parse_rest(&res) {
2173            match err.typ.as_str() {
2174                "ConflictingOperationException" => {
2175                    return RusotoError::Service(CreateFolderError::ConflictingOperation(err.msg))
2176                }
2177                "EntityAlreadyExistsException" => {
2178                    return RusotoError::Service(CreateFolderError::EntityAlreadyExists(err.msg))
2179                }
2180                "EntityNotExistsException" => {
2181                    return RusotoError::Service(CreateFolderError::EntityNotExists(err.msg))
2182                }
2183                "FailedDependencyException" => {
2184                    return RusotoError::Service(CreateFolderError::FailedDependency(err.msg))
2185                }
2186                "LimitExceededException" => {
2187                    return RusotoError::Service(CreateFolderError::LimitExceeded(err.msg))
2188                }
2189                "ProhibitedStateException" => {
2190                    return RusotoError::Service(CreateFolderError::ProhibitedState(err.msg))
2191                }
2192                "ServiceUnavailableException" => {
2193                    return RusotoError::Service(CreateFolderError::ServiceUnavailable(err.msg))
2194                }
2195                "UnauthorizedOperationException" => {
2196                    return RusotoError::Service(CreateFolderError::UnauthorizedOperation(err.msg))
2197                }
2198                "UnauthorizedResourceAccessException" => {
2199                    return RusotoError::Service(CreateFolderError::UnauthorizedResourceAccess(
2200                        err.msg,
2201                    ))
2202                }
2203                "ValidationException" => return RusotoError::Validation(err.msg),
2204                _ => {}
2205            }
2206        }
2207        RusotoError::Unknown(res)
2208    }
2209}
2210impl fmt::Display for CreateFolderError {
2211    #[allow(unused_variables)]
2212    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2213        match *self {
2214            CreateFolderError::ConflictingOperation(ref cause) => write!(f, "{}", cause),
2215            CreateFolderError::EntityAlreadyExists(ref cause) => write!(f, "{}", cause),
2216            CreateFolderError::EntityNotExists(ref cause) => write!(f, "{}", cause),
2217            CreateFolderError::FailedDependency(ref cause) => write!(f, "{}", cause),
2218            CreateFolderError::LimitExceeded(ref cause) => write!(f, "{}", cause),
2219            CreateFolderError::ProhibitedState(ref cause) => write!(f, "{}", cause),
2220            CreateFolderError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2221            CreateFolderError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2222            CreateFolderError::UnauthorizedResourceAccess(ref cause) => write!(f, "{}", cause),
2223        }
2224    }
2225}
2226impl Error for CreateFolderError {}
2227/// Errors returned by CreateLabels
2228#[derive(Debug, PartialEq)]
2229pub enum CreateLabelsError {
2230    /// <p>The resource does not exist.</p>
2231    EntityNotExists(String),
2232    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2233    FailedDependency(String),
2234    /// <p>One or more of the dependencies is unavailable.</p>
2235    ServiceUnavailable(String),
2236    /// <p>The limit has been reached on the number of labels for the specified resource.</p>
2237    TooManyLabels(String),
2238    /// <p>The operation is not permitted.</p>
2239    UnauthorizedOperation(String),
2240    /// <p>The caller does not have access to perform the action on the resource.</p>
2241    UnauthorizedResourceAccess(String),
2242}
2243
2244impl CreateLabelsError {
2245    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateLabelsError> {
2246        if let Some(err) = proto::json::Error::parse_rest(&res) {
2247            match err.typ.as_str() {
2248                "EntityNotExistsException" => {
2249                    return RusotoError::Service(CreateLabelsError::EntityNotExists(err.msg))
2250                }
2251                "FailedDependencyException" => {
2252                    return RusotoError::Service(CreateLabelsError::FailedDependency(err.msg))
2253                }
2254                "ServiceUnavailableException" => {
2255                    return RusotoError::Service(CreateLabelsError::ServiceUnavailable(err.msg))
2256                }
2257                "TooManyLabelsException" => {
2258                    return RusotoError::Service(CreateLabelsError::TooManyLabels(err.msg))
2259                }
2260                "UnauthorizedOperationException" => {
2261                    return RusotoError::Service(CreateLabelsError::UnauthorizedOperation(err.msg))
2262                }
2263                "UnauthorizedResourceAccessException" => {
2264                    return RusotoError::Service(CreateLabelsError::UnauthorizedResourceAccess(
2265                        err.msg,
2266                    ))
2267                }
2268                "ValidationException" => return RusotoError::Validation(err.msg),
2269                _ => {}
2270            }
2271        }
2272        RusotoError::Unknown(res)
2273    }
2274}
2275impl fmt::Display for CreateLabelsError {
2276    #[allow(unused_variables)]
2277    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2278        match *self {
2279            CreateLabelsError::EntityNotExists(ref cause) => write!(f, "{}", cause),
2280            CreateLabelsError::FailedDependency(ref cause) => write!(f, "{}", cause),
2281            CreateLabelsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2282            CreateLabelsError::TooManyLabels(ref cause) => write!(f, "{}", cause),
2283            CreateLabelsError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2284            CreateLabelsError::UnauthorizedResourceAccess(ref cause) => write!(f, "{}", cause),
2285        }
2286    }
2287}
2288impl Error for CreateLabelsError {}
2289/// Errors returned by CreateNotificationSubscription
2290#[derive(Debug, PartialEq)]
2291pub enum CreateNotificationSubscriptionError {
2292    /// <p>One or more of the dependencies is unavailable.</p>
2293    ServiceUnavailable(String),
2294    /// <p>You've reached the limit on the number of subscriptions for the WorkDocs instance.</p>
2295    TooManySubscriptions(String),
2296    /// <p>The caller does not have access to perform the action on the resource.</p>
2297    UnauthorizedResourceAccess(String),
2298}
2299
2300impl CreateNotificationSubscriptionError {
2301    pub fn from_response(
2302        res: BufferedHttpResponse,
2303    ) -> RusotoError<CreateNotificationSubscriptionError> {
2304        if let Some(err) = proto::json::Error::parse_rest(&res) {
2305            match err.typ.as_str() {
2306                "ServiceUnavailableException" => {
2307                    return RusotoError::Service(
2308                        CreateNotificationSubscriptionError::ServiceUnavailable(err.msg),
2309                    )
2310                }
2311                "TooManySubscriptionsException" => {
2312                    return RusotoError::Service(
2313                        CreateNotificationSubscriptionError::TooManySubscriptions(err.msg),
2314                    )
2315                }
2316                "UnauthorizedResourceAccessException" => {
2317                    return RusotoError::Service(
2318                        CreateNotificationSubscriptionError::UnauthorizedResourceAccess(err.msg),
2319                    )
2320                }
2321                "ValidationException" => return RusotoError::Validation(err.msg),
2322                _ => {}
2323            }
2324        }
2325        RusotoError::Unknown(res)
2326    }
2327}
2328impl fmt::Display for CreateNotificationSubscriptionError {
2329    #[allow(unused_variables)]
2330    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2331        match *self {
2332            CreateNotificationSubscriptionError::ServiceUnavailable(ref cause) => {
2333                write!(f, "{}", cause)
2334            }
2335            CreateNotificationSubscriptionError::TooManySubscriptions(ref cause) => {
2336                write!(f, "{}", cause)
2337            }
2338            CreateNotificationSubscriptionError::UnauthorizedResourceAccess(ref cause) => {
2339                write!(f, "{}", cause)
2340            }
2341        }
2342    }
2343}
2344impl Error for CreateNotificationSubscriptionError {}
2345/// Errors returned by CreateUser
2346#[derive(Debug, PartialEq)]
2347pub enum CreateUserError {
2348    /// <p>The resource already exists.</p>
2349    EntityAlreadyExists(String),
2350    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2351    FailedDependency(String),
2352    /// <p>One or more of the dependencies is unavailable.</p>
2353    ServiceUnavailable(String),
2354    /// <p>The operation is not permitted.</p>
2355    UnauthorizedOperation(String),
2356    /// <p>The caller does not have access to perform the action on the resource.</p>
2357    UnauthorizedResourceAccess(String),
2358}
2359
2360impl CreateUserError {
2361    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<CreateUserError> {
2362        if let Some(err) = proto::json::Error::parse_rest(&res) {
2363            match err.typ.as_str() {
2364                "EntityAlreadyExistsException" => {
2365                    return RusotoError::Service(CreateUserError::EntityAlreadyExists(err.msg))
2366                }
2367                "FailedDependencyException" => {
2368                    return RusotoError::Service(CreateUserError::FailedDependency(err.msg))
2369                }
2370                "ServiceUnavailableException" => {
2371                    return RusotoError::Service(CreateUserError::ServiceUnavailable(err.msg))
2372                }
2373                "UnauthorizedOperationException" => {
2374                    return RusotoError::Service(CreateUserError::UnauthorizedOperation(err.msg))
2375                }
2376                "UnauthorizedResourceAccessException" => {
2377                    return RusotoError::Service(CreateUserError::UnauthorizedResourceAccess(
2378                        err.msg,
2379                    ))
2380                }
2381                "ValidationException" => return RusotoError::Validation(err.msg),
2382                _ => {}
2383            }
2384        }
2385        RusotoError::Unknown(res)
2386    }
2387}
2388impl fmt::Display for CreateUserError {
2389    #[allow(unused_variables)]
2390    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2391        match *self {
2392            CreateUserError::EntityAlreadyExists(ref cause) => write!(f, "{}", cause),
2393            CreateUserError::FailedDependency(ref cause) => write!(f, "{}", cause),
2394            CreateUserError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2395            CreateUserError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2396            CreateUserError::UnauthorizedResourceAccess(ref cause) => write!(f, "{}", cause),
2397        }
2398    }
2399}
2400impl Error for CreateUserError {}
2401/// Errors returned by DeactivateUser
2402#[derive(Debug, PartialEq)]
2403pub enum DeactivateUserError {
2404    /// <p>The resource does not exist.</p>
2405    EntityNotExists(String),
2406    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2407    FailedDependency(String),
2408    /// <p>One or more of the dependencies is unavailable.</p>
2409    ServiceUnavailable(String),
2410    /// <p>The operation is not permitted.</p>
2411    UnauthorizedOperation(String),
2412    /// <p>The caller does not have access to perform the action on the resource.</p>
2413    UnauthorizedResourceAccess(String),
2414}
2415
2416impl DeactivateUserError {
2417    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeactivateUserError> {
2418        if let Some(err) = proto::json::Error::parse_rest(&res) {
2419            match err.typ.as_str() {
2420                "EntityNotExistsException" => {
2421                    return RusotoError::Service(DeactivateUserError::EntityNotExists(err.msg))
2422                }
2423                "FailedDependencyException" => {
2424                    return RusotoError::Service(DeactivateUserError::FailedDependency(err.msg))
2425                }
2426                "ServiceUnavailableException" => {
2427                    return RusotoError::Service(DeactivateUserError::ServiceUnavailable(err.msg))
2428                }
2429                "UnauthorizedOperationException" => {
2430                    return RusotoError::Service(DeactivateUserError::UnauthorizedOperation(
2431                        err.msg,
2432                    ))
2433                }
2434                "UnauthorizedResourceAccessException" => {
2435                    return RusotoError::Service(DeactivateUserError::UnauthorizedResourceAccess(
2436                        err.msg,
2437                    ))
2438                }
2439                "ValidationException" => return RusotoError::Validation(err.msg),
2440                _ => {}
2441            }
2442        }
2443        RusotoError::Unknown(res)
2444    }
2445}
2446impl fmt::Display for DeactivateUserError {
2447    #[allow(unused_variables)]
2448    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2449        match *self {
2450            DeactivateUserError::EntityNotExists(ref cause) => write!(f, "{}", cause),
2451            DeactivateUserError::FailedDependency(ref cause) => write!(f, "{}", cause),
2452            DeactivateUserError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2453            DeactivateUserError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2454            DeactivateUserError::UnauthorizedResourceAccess(ref cause) => write!(f, "{}", cause),
2455        }
2456    }
2457}
2458impl Error for DeactivateUserError {}
2459/// Errors returned by DeleteComment
2460#[derive(Debug, PartialEq)]
2461pub enum DeleteCommentError {
2462    /// <p>This exception is thrown when the document is locked for comments and user tries to create or delete a comment on that document.</p>
2463    DocumentLockedForComments(String),
2464    /// <p>The resource does not exist.</p>
2465    EntityNotExists(String),
2466    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2467    FailedDependency(String),
2468    /// <p>The specified document version is not in the INITIALIZED state.</p>
2469    ProhibitedState(String),
2470    /// <p>One or more of the dependencies is unavailable.</p>
2471    ServiceUnavailable(String),
2472    /// <p>The operation is not permitted.</p>
2473    UnauthorizedOperation(String),
2474    /// <p>The caller does not have access to perform the action on the resource.</p>
2475    UnauthorizedResourceAccess(String),
2476}
2477
2478impl DeleteCommentError {
2479    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteCommentError> {
2480        if let Some(err) = proto::json::Error::parse_rest(&res) {
2481            match err.typ.as_str() {
2482                "DocumentLockedForCommentsException" => {
2483                    return RusotoError::Service(DeleteCommentError::DocumentLockedForComments(
2484                        err.msg,
2485                    ))
2486                }
2487                "EntityNotExistsException" => {
2488                    return RusotoError::Service(DeleteCommentError::EntityNotExists(err.msg))
2489                }
2490                "FailedDependencyException" => {
2491                    return RusotoError::Service(DeleteCommentError::FailedDependency(err.msg))
2492                }
2493                "ProhibitedStateException" => {
2494                    return RusotoError::Service(DeleteCommentError::ProhibitedState(err.msg))
2495                }
2496                "ServiceUnavailableException" => {
2497                    return RusotoError::Service(DeleteCommentError::ServiceUnavailable(err.msg))
2498                }
2499                "UnauthorizedOperationException" => {
2500                    return RusotoError::Service(DeleteCommentError::UnauthorizedOperation(err.msg))
2501                }
2502                "UnauthorizedResourceAccessException" => {
2503                    return RusotoError::Service(DeleteCommentError::UnauthorizedResourceAccess(
2504                        err.msg,
2505                    ))
2506                }
2507                "ValidationException" => return RusotoError::Validation(err.msg),
2508                _ => {}
2509            }
2510        }
2511        RusotoError::Unknown(res)
2512    }
2513}
2514impl fmt::Display for DeleteCommentError {
2515    #[allow(unused_variables)]
2516    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2517        match *self {
2518            DeleteCommentError::DocumentLockedForComments(ref cause) => write!(f, "{}", cause),
2519            DeleteCommentError::EntityNotExists(ref cause) => write!(f, "{}", cause),
2520            DeleteCommentError::FailedDependency(ref cause) => write!(f, "{}", cause),
2521            DeleteCommentError::ProhibitedState(ref cause) => write!(f, "{}", cause),
2522            DeleteCommentError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2523            DeleteCommentError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2524            DeleteCommentError::UnauthorizedResourceAccess(ref cause) => write!(f, "{}", cause),
2525        }
2526    }
2527}
2528impl Error for DeleteCommentError {}
2529/// Errors returned by DeleteCustomMetadata
2530#[derive(Debug, PartialEq)]
2531pub enum DeleteCustomMetadataError {
2532    /// <p>The resource does not exist.</p>
2533    EntityNotExists(String),
2534    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2535    FailedDependency(String),
2536    /// <p>The specified document version is not in the INITIALIZED state.</p>
2537    ProhibitedState(String),
2538    /// <p>One or more of the dependencies is unavailable.</p>
2539    ServiceUnavailable(String),
2540    /// <p>The operation is not permitted.</p>
2541    UnauthorizedOperation(String),
2542    /// <p>The caller does not have access to perform the action on the resource.</p>
2543    UnauthorizedResourceAccess(String),
2544}
2545
2546impl DeleteCustomMetadataError {
2547    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteCustomMetadataError> {
2548        if let Some(err) = proto::json::Error::parse_rest(&res) {
2549            match err.typ.as_str() {
2550                "EntityNotExistsException" => {
2551                    return RusotoError::Service(DeleteCustomMetadataError::EntityNotExists(
2552                        err.msg,
2553                    ))
2554                }
2555                "FailedDependencyException" => {
2556                    return RusotoError::Service(DeleteCustomMetadataError::FailedDependency(
2557                        err.msg,
2558                    ))
2559                }
2560                "ProhibitedStateException" => {
2561                    return RusotoError::Service(DeleteCustomMetadataError::ProhibitedState(
2562                        err.msg,
2563                    ))
2564                }
2565                "ServiceUnavailableException" => {
2566                    return RusotoError::Service(DeleteCustomMetadataError::ServiceUnavailable(
2567                        err.msg,
2568                    ))
2569                }
2570                "UnauthorizedOperationException" => {
2571                    return RusotoError::Service(DeleteCustomMetadataError::UnauthorizedOperation(
2572                        err.msg,
2573                    ))
2574                }
2575                "UnauthorizedResourceAccessException" => {
2576                    return RusotoError::Service(
2577                        DeleteCustomMetadataError::UnauthorizedResourceAccess(err.msg),
2578                    )
2579                }
2580                "ValidationException" => return RusotoError::Validation(err.msg),
2581                _ => {}
2582            }
2583        }
2584        RusotoError::Unknown(res)
2585    }
2586}
2587impl fmt::Display for DeleteCustomMetadataError {
2588    #[allow(unused_variables)]
2589    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2590        match *self {
2591            DeleteCustomMetadataError::EntityNotExists(ref cause) => write!(f, "{}", cause),
2592            DeleteCustomMetadataError::FailedDependency(ref cause) => write!(f, "{}", cause),
2593            DeleteCustomMetadataError::ProhibitedState(ref cause) => write!(f, "{}", cause),
2594            DeleteCustomMetadataError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2595            DeleteCustomMetadataError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2596            DeleteCustomMetadataError::UnauthorizedResourceAccess(ref cause) => {
2597                write!(f, "{}", cause)
2598            }
2599        }
2600    }
2601}
2602impl Error for DeleteCustomMetadataError {}
2603/// Errors returned by DeleteDocument
2604#[derive(Debug, PartialEq)]
2605pub enum DeleteDocumentError {
2606    /// <p>The resource hierarchy is changing.</p>
2607    ConcurrentModification(String),
2608    /// <p>Another operation is in progress on the resource that conflicts with the current operation.</p>
2609    ConflictingOperation(String),
2610    /// <p>The resource does not exist.</p>
2611    EntityNotExists(String),
2612    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2613    FailedDependency(String),
2614    /// <p>The specified document version is not in the INITIALIZED state.</p>
2615    ProhibitedState(String),
2616    /// <p>One or more of the dependencies is unavailable.</p>
2617    ServiceUnavailable(String),
2618    /// <p>The operation is not permitted.</p>
2619    UnauthorizedOperation(String),
2620    /// <p>The caller does not have access to perform the action on the resource.</p>
2621    UnauthorizedResourceAccess(String),
2622}
2623
2624impl DeleteDocumentError {
2625    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteDocumentError> {
2626        if let Some(err) = proto::json::Error::parse_rest(&res) {
2627            match err.typ.as_str() {
2628                "ConcurrentModificationException" => {
2629                    return RusotoError::Service(DeleteDocumentError::ConcurrentModification(
2630                        err.msg,
2631                    ))
2632                }
2633                "ConflictingOperationException" => {
2634                    return RusotoError::Service(DeleteDocumentError::ConflictingOperation(err.msg))
2635                }
2636                "EntityNotExistsException" => {
2637                    return RusotoError::Service(DeleteDocumentError::EntityNotExists(err.msg))
2638                }
2639                "FailedDependencyException" => {
2640                    return RusotoError::Service(DeleteDocumentError::FailedDependency(err.msg))
2641                }
2642                "ProhibitedStateException" => {
2643                    return RusotoError::Service(DeleteDocumentError::ProhibitedState(err.msg))
2644                }
2645                "ServiceUnavailableException" => {
2646                    return RusotoError::Service(DeleteDocumentError::ServiceUnavailable(err.msg))
2647                }
2648                "UnauthorizedOperationException" => {
2649                    return RusotoError::Service(DeleteDocumentError::UnauthorizedOperation(
2650                        err.msg,
2651                    ))
2652                }
2653                "UnauthorizedResourceAccessException" => {
2654                    return RusotoError::Service(DeleteDocumentError::UnauthorizedResourceAccess(
2655                        err.msg,
2656                    ))
2657                }
2658                "ValidationException" => return RusotoError::Validation(err.msg),
2659                _ => {}
2660            }
2661        }
2662        RusotoError::Unknown(res)
2663    }
2664}
2665impl fmt::Display for DeleteDocumentError {
2666    #[allow(unused_variables)]
2667    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2668        match *self {
2669            DeleteDocumentError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
2670            DeleteDocumentError::ConflictingOperation(ref cause) => write!(f, "{}", cause),
2671            DeleteDocumentError::EntityNotExists(ref cause) => write!(f, "{}", cause),
2672            DeleteDocumentError::FailedDependency(ref cause) => write!(f, "{}", cause),
2673            DeleteDocumentError::ProhibitedState(ref cause) => write!(f, "{}", cause),
2674            DeleteDocumentError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2675            DeleteDocumentError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2676            DeleteDocumentError::UnauthorizedResourceAccess(ref cause) => write!(f, "{}", cause),
2677        }
2678    }
2679}
2680impl Error for DeleteDocumentError {}
2681/// Errors returned by DeleteFolder
2682#[derive(Debug, PartialEq)]
2683pub enum DeleteFolderError {
2684    /// <p>The resource hierarchy is changing.</p>
2685    ConcurrentModification(String),
2686    /// <p>Another operation is in progress on the resource that conflicts with the current operation.</p>
2687    ConflictingOperation(String),
2688    /// <p>The resource does not exist.</p>
2689    EntityNotExists(String),
2690    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2691    FailedDependency(String),
2692    /// <p>The specified document version is not in the INITIALIZED state.</p>
2693    ProhibitedState(String),
2694    /// <p>One or more of the dependencies is unavailable.</p>
2695    ServiceUnavailable(String),
2696    /// <p>The operation is not permitted.</p>
2697    UnauthorizedOperation(String),
2698    /// <p>The caller does not have access to perform the action on the resource.</p>
2699    UnauthorizedResourceAccess(String),
2700}
2701
2702impl DeleteFolderError {
2703    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteFolderError> {
2704        if let Some(err) = proto::json::Error::parse_rest(&res) {
2705            match err.typ.as_str() {
2706                "ConcurrentModificationException" => {
2707                    return RusotoError::Service(DeleteFolderError::ConcurrentModification(err.msg))
2708                }
2709                "ConflictingOperationException" => {
2710                    return RusotoError::Service(DeleteFolderError::ConflictingOperation(err.msg))
2711                }
2712                "EntityNotExistsException" => {
2713                    return RusotoError::Service(DeleteFolderError::EntityNotExists(err.msg))
2714                }
2715                "FailedDependencyException" => {
2716                    return RusotoError::Service(DeleteFolderError::FailedDependency(err.msg))
2717                }
2718                "ProhibitedStateException" => {
2719                    return RusotoError::Service(DeleteFolderError::ProhibitedState(err.msg))
2720                }
2721                "ServiceUnavailableException" => {
2722                    return RusotoError::Service(DeleteFolderError::ServiceUnavailable(err.msg))
2723                }
2724                "UnauthorizedOperationException" => {
2725                    return RusotoError::Service(DeleteFolderError::UnauthorizedOperation(err.msg))
2726                }
2727                "UnauthorizedResourceAccessException" => {
2728                    return RusotoError::Service(DeleteFolderError::UnauthorizedResourceAccess(
2729                        err.msg,
2730                    ))
2731                }
2732                "ValidationException" => return RusotoError::Validation(err.msg),
2733                _ => {}
2734            }
2735        }
2736        RusotoError::Unknown(res)
2737    }
2738}
2739impl fmt::Display for DeleteFolderError {
2740    #[allow(unused_variables)]
2741    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2742        match *self {
2743            DeleteFolderError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
2744            DeleteFolderError::ConflictingOperation(ref cause) => write!(f, "{}", cause),
2745            DeleteFolderError::EntityNotExists(ref cause) => write!(f, "{}", cause),
2746            DeleteFolderError::FailedDependency(ref cause) => write!(f, "{}", cause),
2747            DeleteFolderError::ProhibitedState(ref cause) => write!(f, "{}", cause),
2748            DeleteFolderError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2749            DeleteFolderError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2750            DeleteFolderError::UnauthorizedResourceAccess(ref cause) => write!(f, "{}", cause),
2751        }
2752    }
2753}
2754impl Error for DeleteFolderError {}
2755/// Errors returned by DeleteFolderContents
2756#[derive(Debug, PartialEq)]
2757pub enum DeleteFolderContentsError {
2758    /// <p>Another operation is in progress on the resource that conflicts with the current operation.</p>
2759    ConflictingOperation(String),
2760    /// <p>The resource does not exist.</p>
2761    EntityNotExists(String),
2762    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2763    FailedDependency(String),
2764    /// <p>The specified document version is not in the INITIALIZED state.</p>
2765    ProhibitedState(String),
2766    /// <p>One or more of the dependencies is unavailable.</p>
2767    ServiceUnavailable(String),
2768    /// <p>The operation is not permitted.</p>
2769    UnauthorizedOperation(String),
2770    /// <p>The caller does not have access to perform the action on the resource.</p>
2771    UnauthorizedResourceAccess(String),
2772}
2773
2774impl DeleteFolderContentsError {
2775    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteFolderContentsError> {
2776        if let Some(err) = proto::json::Error::parse_rest(&res) {
2777            match err.typ.as_str() {
2778                "ConflictingOperationException" => {
2779                    return RusotoError::Service(DeleteFolderContentsError::ConflictingOperation(
2780                        err.msg,
2781                    ))
2782                }
2783                "EntityNotExistsException" => {
2784                    return RusotoError::Service(DeleteFolderContentsError::EntityNotExists(
2785                        err.msg,
2786                    ))
2787                }
2788                "FailedDependencyException" => {
2789                    return RusotoError::Service(DeleteFolderContentsError::FailedDependency(
2790                        err.msg,
2791                    ))
2792                }
2793                "ProhibitedStateException" => {
2794                    return RusotoError::Service(DeleteFolderContentsError::ProhibitedState(
2795                        err.msg,
2796                    ))
2797                }
2798                "ServiceUnavailableException" => {
2799                    return RusotoError::Service(DeleteFolderContentsError::ServiceUnavailable(
2800                        err.msg,
2801                    ))
2802                }
2803                "UnauthorizedOperationException" => {
2804                    return RusotoError::Service(DeleteFolderContentsError::UnauthorizedOperation(
2805                        err.msg,
2806                    ))
2807                }
2808                "UnauthorizedResourceAccessException" => {
2809                    return RusotoError::Service(
2810                        DeleteFolderContentsError::UnauthorizedResourceAccess(err.msg),
2811                    )
2812                }
2813                "ValidationException" => return RusotoError::Validation(err.msg),
2814                _ => {}
2815            }
2816        }
2817        RusotoError::Unknown(res)
2818    }
2819}
2820impl fmt::Display for DeleteFolderContentsError {
2821    #[allow(unused_variables)]
2822    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2823        match *self {
2824            DeleteFolderContentsError::ConflictingOperation(ref cause) => write!(f, "{}", cause),
2825            DeleteFolderContentsError::EntityNotExists(ref cause) => write!(f, "{}", cause),
2826            DeleteFolderContentsError::FailedDependency(ref cause) => write!(f, "{}", cause),
2827            DeleteFolderContentsError::ProhibitedState(ref cause) => write!(f, "{}", cause),
2828            DeleteFolderContentsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2829            DeleteFolderContentsError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2830            DeleteFolderContentsError::UnauthorizedResourceAccess(ref cause) => {
2831                write!(f, "{}", cause)
2832            }
2833        }
2834    }
2835}
2836impl Error for DeleteFolderContentsError {}
2837/// Errors returned by DeleteLabels
2838#[derive(Debug, PartialEq)]
2839pub enum DeleteLabelsError {
2840    /// <p>The resource does not exist.</p>
2841    EntityNotExists(String),
2842    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2843    FailedDependency(String),
2844    /// <p>One or more of the dependencies is unavailable.</p>
2845    ServiceUnavailable(String),
2846    /// <p>The operation is not permitted.</p>
2847    UnauthorizedOperation(String),
2848    /// <p>The caller does not have access to perform the action on the resource.</p>
2849    UnauthorizedResourceAccess(String),
2850}
2851
2852impl DeleteLabelsError {
2853    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteLabelsError> {
2854        if let Some(err) = proto::json::Error::parse_rest(&res) {
2855            match err.typ.as_str() {
2856                "EntityNotExistsException" => {
2857                    return RusotoError::Service(DeleteLabelsError::EntityNotExists(err.msg))
2858                }
2859                "FailedDependencyException" => {
2860                    return RusotoError::Service(DeleteLabelsError::FailedDependency(err.msg))
2861                }
2862                "ServiceUnavailableException" => {
2863                    return RusotoError::Service(DeleteLabelsError::ServiceUnavailable(err.msg))
2864                }
2865                "UnauthorizedOperationException" => {
2866                    return RusotoError::Service(DeleteLabelsError::UnauthorizedOperation(err.msg))
2867                }
2868                "UnauthorizedResourceAccessException" => {
2869                    return RusotoError::Service(DeleteLabelsError::UnauthorizedResourceAccess(
2870                        err.msg,
2871                    ))
2872                }
2873                "ValidationException" => return RusotoError::Validation(err.msg),
2874                _ => {}
2875            }
2876        }
2877        RusotoError::Unknown(res)
2878    }
2879}
2880impl fmt::Display for DeleteLabelsError {
2881    #[allow(unused_variables)]
2882    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2883        match *self {
2884            DeleteLabelsError::EntityNotExists(ref cause) => write!(f, "{}", cause),
2885            DeleteLabelsError::FailedDependency(ref cause) => write!(f, "{}", cause),
2886            DeleteLabelsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
2887            DeleteLabelsError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
2888            DeleteLabelsError::UnauthorizedResourceAccess(ref cause) => write!(f, "{}", cause),
2889        }
2890    }
2891}
2892impl Error for DeleteLabelsError {}
2893/// Errors returned by DeleteNotificationSubscription
2894#[derive(Debug, PartialEq)]
2895pub enum DeleteNotificationSubscriptionError {
2896    /// <p>The resource does not exist.</p>
2897    EntityNotExists(String),
2898    /// <p>The specified document version is not in the INITIALIZED state.</p>
2899    ProhibitedState(String),
2900    /// <p>One or more of the dependencies is unavailable.</p>
2901    ServiceUnavailable(String),
2902    /// <p>The caller does not have access to perform the action on the resource.</p>
2903    UnauthorizedResourceAccess(String),
2904}
2905
2906impl DeleteNotificationSubscriptionError {
2907    pub fn from_response(
2908        res: BufferedHttpResponse,
2909    ) -> RusotoError<DeleteNotificationSubscriptionError> {
2910        if let Some(err) = proto::json::Error::parse_rest(&res) {
2911            match err.typ.as_str() {
2912                "EntityNotExistsException" => {
2913                    return RusotoError::Service(
2914                        DeleteNotificationSubscriptionError::EntityNotExists(err.msg),
2915                    )
2916                }
2917                "ProhibitedStateException" => {
2918                    return RusotoError::Service(
2919                        DeleteNotificationSubscriptionError::ProhibitedState(err.msg),
2920                    )
2921                }
2922                "ServiceUnavailableException" => {
2923                    return RusotoError::Service(
2924                        DeleteNotificationSubscriptionError::ServiceUnavailable(err.msg),
2925                    )
2926                }
2927                "UnauthorizedResourceAccessException" => {
2928                    return RusotoError::Service(
2929                        DeleteNotificationSubscriptionError::UnauthorizedResourceAccess(err.msg),
2930                    )
2931                }
2932                "ValidationException" => return RusotoError::Validation(err.msg),
2933                _ => {}
2934            }
2935        }
2936        RusotoError::Unknown(res)
2937    }
2938}
2939impl fmt::Display for DeleteNotificationSubscriptionError {
2940    #[allow(unused_variables)]
2941    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
2942        match *self {
2943            DeleteNotificationSubscriptionError::EntityNotExists(ref cause) => {
2944                write!(f, "{}", cause)
2945            }
2946            DeleteNotificationSubscriptionError::ProhibitedState(ref cause) => {
2947                write!(f, "{}", cause)
2948            }
2949            DeleteNotificationSubscriptionError::ServiceUnavailable(ref cause) => {
2950                write!(f, "{}", cause)
2951            }
2952            DeleteNotificationSubscriptionError::UnauthorizedResourceAccess(ref cause) => {
2953                write!(f, "{}", cause)
2954            }
2955        }
2956    }
2957}
2958impl Error for DeleteNotificationSubscriptionError {}
2959/// Errors returned by DeleteUser
2960#[derive(Debug, PartialEq)]
2961pub enum DeleteUserError {
2962    /// <p>The resource does not exist.</p>
2963    EntityNotExists(String),
2964    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
2965    FailedDependency(String),
2966    /// <p>One or more of the dependencies is unavailable.</p>
2967    ServiceUnavailable(String),
2968    /// <p>The operation is not permitted.</p>
2969    UnauthorizedOperation(String),
2970    /// <p>The caller does not have access to perform the action on the resource.</p>
2971    UnauthorizedResourceAccess(String),
2972}
2973
2974impl DeleteUserError {
2975    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DeleteUserError> {
2976        if let Some(err) = proto::json::Error::parse_rest(&res) {
2977            match err.typ.as_str() {
2978                "EntityNotExistsException" => {
2979                    return RusotoError::Service(DeleteUserError::EntityNotExists(err.msg))
2980                }
2981                "FailedDependencyException" => {
2982                    return RusotoError::Service(DeleteUserError::FailedDependency(err.msg))
2983                }
2984                "ServiceUnavailableException" => {
2985                    return RusotoError::Service(DeleteUserError::ServiceUnavailable(err.msg))
2986                }
2987                "UnauthorizedOperationException" => {
2988                    return RusotoError::Service(DeleteUserError::UnauthorizedOperation(err.msg))
2989                }
2990                "UnauthorizedResourceAccessException" => {
2991                    return RusotoError::Service(DeleteUserError::UnauthorizedResourceAccess(
2992                        err.msg,
2993                    ))
2994                }
2995                "ValidationException" => return RusotoError::Validation(err.msg),
2996                _ => {}
2997            }
2998        }
2999        RusotoError::Unknown(res)
3000    }
3001}
3002impl fmt::Display for DeleteUserError {
3003    #[allow(unused_variables)]
3004    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3005        match *self {
3006            DeleteUserError::EntityNotExists(ref cause) => write!(f, "{}", cause),
3007            DeleteUserError::FailedDependency(ref cause) => write!(f, "{}", cause),
3008            DeleteUserError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3009            DeleteUserError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
3010            DeleteUserError::UnauthorizedResourceAccess(ref cause) => write!(f, "{}", cause),
3011        }
3012    }
3013}
3014impl Error for DeleteUserError {}
3015/// Errors returned by DescribeActivities
3016#[derive(Debug, PartialEq)]
3017pub enum DescribeActivitiesError {
3018    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
3019    FailedDependency(String),
3020    /// <p>The pagination marker or limit fields are not valid.</p>
3021    InvalidArgument(String),
3022    /// <p>One or more of the dependencies is unavailable.</p>
3023    ServiceUnavailable(String),
3024    /// <p>The operation is not permitted.</p>
3025    UnauthorizedOperation(String),
3026    /// <p>The caller does not have access to perform the action on the resource.</p>
3027    UnauthorizedResourceAccess(String),
3028}
3029
3030impl DescribeActivitiesError {
3031    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeActivitiesError> {
3032        if let Some(err) = proto::json::Error::parse_rest(&res) {
3033            match err.typ.as_str() {
3034                "FailedDependencyException" => {
3035                    return RusotoError::Service(DescribeActivitiesError::FailedDependency(err.msg))
3036                }
3037                "InvalidArgumentException" => {
3038                    return RusotoError::Service(DescribeActivitiesError::InvalidArgument(err.msg))
3039                }
3040                "ServiceUnavailableException" => {
3041                    return RusotoError::Service(DescribeActivitiesError::ServiceUnavailable(
3042                        err.msg,
3043                    ))
3044                }
3045                "UnauthorizedOperationException" => {
3046                    return RusotoError::Service(DescribeActivitiesError::UnauthorizedOperation(
3047                        err.msg,
3048                    ))
3049                }
3050                "UnauthorizedResourceAccessException" => {
3051                    return RusotoError::Service(
3052                        DescribeActivitiesError::UnauthorizedResourceAccess(err.msg),
3053                    )
3054                }
3055                "ValidationException" => return RusotoError::Validation(err.msg),
3056                _ => {}
3057            }
3058        }
3059        RusotoError::Unknown(res)
3060    }
3061}
3062impl fmt::Display for DescribeActivitiesError {
3063    #[allow(unused_variables)]
3064    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3065        match *self {
3066            DescribeActivitiesError::FailedDependency(ref cause) => write!(f, "{}", cause),
3067            DescribeActivitiesError::InvalidArgument(ref cause) => write!(f, "{}", cause),
3068            DescribeActivitiesError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3069            DescribeActivitiesError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
3070            DescribeActivitiesError::UnauthorizedResourceAccess(ref cause) => {
3071                write!(f, "{}", cause)
3072            }
3073        }
3074    }
3075}
3076impl Error for DescribeActivitiesError {}
3077/// Errors returned by DescribeComments
3078#[derive(Debug, PartialEq)]
3079pub enum DescribeCommentsError {
3080    /// <p>The resource does not exist.</p>
3081    EntityNotExists(String),
3082    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
3083    FailedDependency(String),
3084    /// <p>The specified document version is not in the INITIALIZED state.</p>
3085    ProhibitedState(String),
3086    /// <p>One or more of the dependencies is unavailable.</p>
3087    ServiceUnavailable(String),
3088    /// <p>The operation is not permitted.</p>
3089    UnauthorizedOperation(String),
3090    /// <p>The caller does not have access to perform the action on the resource.</p>
3091    UnauthorizedResourceAccess(String),
3092}
3093
3094impl DescribeCommentsError {
3095    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeCommentsError> {
3096        if let Some(err) = proto::json::Error::parse_rest(&res) {
3097            match err.typ.as_str() {
3098                "EntityNotExistsException" => {
3099                    return RusotoError::Service(DescribeCommentsError::EntityNotExists(err.msg))
3100                }
3101                "FailedDependencyException" => {
3102                    return RusotoError::Service(DescribeCommentsError::FailedDependency(err.msg))
3103                }
3104                "ProhibitedStateException" => {
3105                    return RusotoError::Service(DescribeCommentsError::ProhibitedState(err.msg))
3106                }
3107                "ServiceUnavailableException" => {
3108                    return RusotoError::Service(DescribeCommentsError::ServiceUnavailable(err.msg))
3109                }
3110                "UnauthorizedOperationException" => {
3111                    return RusotoError::Service(DescribeCommentsError::UnauthorizedOperation(
3112                        err.msg,
3113                    ))
3114                }
3115                "UnauthorizedResourceAccessException" => {
3116                    return RusotoError::Service(DescribeCommentsError::UnauthorizedResourceAccess(
3117                        err.msg,
3118                    ))
3119                }
3120                "ValidationException" => return RusotoError::Validation(err.msg),
3121                _ => {}
3122            }
3123        }
3124        RusotoError::Unknown(res)
3125    }
3126}
3127impl fmt::Display for DescribeCommentsError {
3128    #[allow(unused_variables)]
3129    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3130        match *self {
3131            DescribeCommentsError::EntityNotExists(ref cause) => write!(f, "{}", cause),
3132            DescribeCommentsError::FailedDependency(ref cause) => write!(f, "{}", cause),
3133            DescribeCommentsError::ProhibitedState(ref cause) => write!(f, "{}", cause),
3134            DescribeCommentsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3135            DescribeCommentsError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
3136            DescribeCommentsError::UnauthorizedResourceAccess(ref cause) => write!(f, "{}", cause),
3137        }
3138    }
3139}
3140impl Error for DescribeCommentsError {}
3141/// Errors returned by DescribeDocumentVersions
3142#[derive(Debug, PartialEq)]
3143pub enum DescribeDocumentVersionsError {
3144    /// <p>The resource does not exist.</p>
3145    EntityNotExists(String),
3146    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
3147    FailedDependency(String),
3148    /// <p>The pagination marker or limit fields are not valid.</p>
3149    InvalidArgument(String),
3150    /// <p>The specified document version is not in the INITIALIZED state.</p>
3151    ProhibitedState(String),
3152    /// <p>One or more of the dependencies is unavailable.</p>
3153    ServiceUnavailable(String),
3154    /// <p>The operation is not permitted.</p>
3155    UnauthorizedOperation(String),
3156    /// <p>The caller does not have access to perform the action on the resource.</p>
3157    UnauthorizedResourceAccess(String),
3158}
3159
3160impl DescribeDocumentVersionsError {
3161    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeDocumentVersionsError> {
3162        if let Some(err) = proto::json::Error::parse_rest(&res) {
3163            match err.typ.as_str() {
3164                "EntityNotExistsException" => {
3165                    return RusotoError::Service(DescribeDocumentVersionsError::EntityNotExists(
3166                        err.msg,
3167                    ))
3168                }
3169                "FailedDependencyException" => {
3170                    return RusotoError::Service(DescribeDocumentVersionsError::FailedDependency(
3171                        err.msg,
3172                    ))
3173                }
3174                "InvalidArgumentException" => {
3175                    return RusotoError::Service(DescribeDocumentVersionsError::InvalidArgument(
3176                        err.msg,
3177                    ))
3178                }
3179                "ProhibitedStateException" => {
3180                    return RusotoError::Service(DescribeDocumentVersionsError::ProhibitedState(
3181                        err.msg,
3182                    ))
3183                }
3184                "ServiceUnavailableException" => {
3185                    return RusotoError::Service(DescribeDocumentVersionsError::ServiceUnavailable(
3186                        err.msg,
3187                    ))
3188                }
3189                "UnauthorizedOperationException" => {
3190                    return RusotoError::Service(
3191                        DescribeDocumentVersionsError::UnauthorizedOperation(err.msg),
3192                    )
3193                }
3194                "UnauthorizedResourceAccessException" => {
3195                    return RusotoError::Service(
3196                        DescribeDocumentVersionsError::UnauthorizedResourceAccess(err.msg),
3197                    )
3198                }
3199                "ValidationException" => return RusotoError::Validation(err.msg),
3200                _ => {}
3201            }
3202        }
3203        RusotoError::Unknown(res)
3204    }
3205}
3206impl fmt::Display for DescribeDocumentVersionsError {
3207    #[allow(unused_variables)]
3208    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3209        match *self {
3210            DescribeDocumentVersionsError::EntityNotExists(ref cause) => write!(f, "{}", cause),
3211            DescribeDocumentVersionsError::FailedDependency(ref cause) => write!(f, "{}", cause),
3212            DescribeDocumentVersionsError::InvalidArgument(ref cause) => write!(f, "{}", cause),
3213            DescribeDocumentVersionsError::ProhibitedState(ref cause) => write!(f, "{}", cause),
3214            DescribeDocumentVersionsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3215            DescribeDocumentVersionsError::UnauthorizedOperation(ref cause) => {
3216                write!(f, "{}", cause)
3217            }
3218            DescribeDocumentVersionsError::UnauthorizedResourceAccess(ref cause) => {
3219                write!(f, "{}", cause)
3220            }
3221        }
3222    }
3223}
3224impl Error for DescribeDocumentVersionsError {}
3225/// Errors returned by DescribeFolderContents
3226#[derive(Debug, PartialEq)]
3227pub enum DescribeFolderContentsError {
3228    /// <p>The resource does not exist.</p>
3229    EntityNotExists(String),
3230    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
3231    FailedDependency(String),
3232    /// <p>The pagination marker or limit fields are not valid.</p>
3233    InvalidArgument(String),
3234    /// <p>The specified document version is not in the INITIALIZED state.</p>
3235    ProhibitedState(String),
3236    /// <p>One or more of the dependencies is unavailable.</p>
3237    ServiceUnavailable(String),
3238    /// <p>The caller does not have access to perform the action on the resource.</p>
3239    UnauthorizedResourceAccess(String),
3240}
3241
3242impl DescribeFolderContentsError {
3243    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeFolderContentsError> {
3244        if let Some(err) = proto::json::Error::parse_rest(&res) {
3245            match err.typ.as_str() {
3246                "EntityNotExistsException" => {
3247                    return RusotoError::Service(DescribeFolderContentsError::EntityNotExists(
3248                        err.msg,
3249                    ))
3250                }
3251                "FailedDependencyException" => {
3252                    return RusotoError::Service(DescribeFolderContentsError::FailedDependency(
3253                        err.msg,
3254                    ))
3255                }
3256                "InvalidArgumentException" => {
3257                    return RusotoError::Service(DescribeFolderContentsError::InvalidArgument(
3258                        err.msg,
3259                    ))
3260                }
3261                "ProhibitedStateException" => {
3262                    return RusotoError::Service(DescribeFolderContentsError::ProhibitedState(
3263                        err.msg,
3264                    ))
3265                }
3266                "ServiceUnavailableException" => {
3267                    return RusotoError::Service(DescribeFolderContentsError::ServiceUnavailable(
3268                        err.msg,
3269                    ))
3270                }
3271                "UnauthorizedResourceAccessException" => {
3272                    return RusotoError::Service(
3273                        DescribeFolderContentsError::UnauthorizedResourceAccess(err.msg),
3274                    )
3275                }
3276                "ValidationException" => return RusotoError::Validation(err.msg),
3277                _ => {}
3278            }
3279        }
3280        RusotoError::Unknown(res)
3281    }
3282}
3283impl fmt::Display for DescribeFolderContentsError {
3284    #[allow(unused_variables)]
3285    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3286        match *self {
3287            DescribeFolderContentsError::EntityNotExists(ref cause) => write!(f, "{}", cause),
3288            DescribeFolderContentsError::FailedDependency(ref cause) => write!(f, "{}", cause),
3289            DescribeFolderContentsError::InvalidArgument(ref cause) => write!(f, "{}", cause),
3290            DescribeFolderContentsError::ProhibitedState(ref cause) => write!(f, "{}", cause),
3291            DescribeFolderContentsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3292            DescribeFolderContentsError::UnauthorizedResourceAccess(ref cause) => {
3293                write!(f, "{}", cause)
3294            }
3295        }
3296    }
3297}
3298impl Error for DescribeFolderContentsError {}
3299/// Errors returned by DescribeGroups
3300#[derive(Debug, PartialEq)]
3301pub enum DescribeGroupsError {
3302    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
3303    FailedDependency(String),
3304    /// <p>One or more of the dependencies is unavailable.</p>
3305    ServiceUnavailable(String),
3306    /// <p>The operation is not permitted.</p>
3307    UnauthorizedOperation(String),
3308    /// <p>The caller does not have access to perform the action on the resource.</p>
3309    UnauthorizedResourceAccess(String),
3310}
3311
3312impl DescribeGroupsError {
3313    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeGroupsError> {
3314        if let Some(err) = proto::json::Error::parse_rest(&res) {
3315            match err.typ.as_str() {
3316                "FailedDependencyException" => {
3317                    return RusotoError::Service(DescribeGroupsError::FailedDependency(err.msg))
3318                }
3319                "ServiceUnavailableException" => {
3320                    return RusotoError::Service(DescribeGroupsError::ServiceUnavailable(err.msg))
3321                }
3322                "UnauthorizedOperationException" => {
3323                    return RusotoError::Service(DescribeGroupsError::UnauthorizedOperation(
3324                        err.msg,
3325                    ))
3326                }
3327                "UnauthorizedResourceAccessException" => {
3328                    return RusotoError::Service(DescribeGroupsError::UnauthorizedResourceAccess(
3329                        err.msg,
3330                    ))
3331                }
3332                "ValidationException" => return RusotoError::Validation(err.msg),
3333                _ => {}
3334            }
3335        }
3336        RusotoError::Unknown(res)
3337    }
3338}
3339impl fmt::Display for DescribeGroupsError {
3340    #[allow(unused_variables)]
3341    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3342        match *self {
3343            DescribeGroupsError::FailedDependency(ref cause) => write!(f, "{}", cause),
3344            DescribeGroupsError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3345            DescribeGroupsError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
3346            DescribeGroupsError::UnauthorizedResourceAccess(ref cause) => write!(f, "{}", cause),
3347        }
3348    }
3349}
3350impl Error for DescribeGroupsError {}
3351/// Errors returned by DescribeNotificationSubscriptions
3352#[derive(Debug, PartialEq)]
3353pub enum DescribeNotificationSubscriptionsError {
3354    /// <p>The resource does not exist.</p>
3355    EntityNotExists(String),
3356    /// <p>One or more of the dependencies is unavailable.</p>
3357    ServiceUnavailable(String),
3358    /// <p>The caller does not have access to perform the action on the resource.</p>
3359    UnauthorizedResourceAccess(String),
3360}
3361
3362impl DescribeNotificationSubscriptionsError {
3363    pub fn from_response(
3364        res: BufferedHttpResponse,
3365    ) -> RusotoError<DescribeNotificationSubscriptionsError> {
3366        if let Some(err) = proto::json::Error::parse_rest(&res) {
3367            match err.typ.as_str() {
3368                "EntityNotExistsException" => {
3369                    return RusotoError::Service(
3370                        DescribeNotificationSubscriptionsError::EntityNotExists(err.msg),
3371                    )
3372                }
3373                "ServiceUnavailableException" => {
3374                    return RusotoError::Service(
3375                        DescribeNotificationSubscriptionsError::ServiceUnavailable(err.msg),
3376                    )
3377                }
3378                "UnauthorizedResourceAccessException" => {
3379                    return RusotoError::Service(
3380                        DescribeNotificationSubscriptionsError::UnauthorizedResourceAccess(err.msg),
3381                    )
3382                }
3383                "ValidationException" => return RusotoError::Validation(err.msg),
3384                _ => {}
3385            }
3386        }
3387        RusotoError::Unknown(res)
3388    }
3389}
3390impl fmt::Display for DescribeNotificationSubscriptionsError {
3391    #[allow(unused_variables)]
3392    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3393        match *self {
3394            DescribeNotificationSubscriptionsError::EntityNotExists(ref cause) => {
3395                write!(f, "{}", cause)
3396            }
3397            DescribeNotificationSubscriptionsError::ServiceUnavailable(ref cause) => {
3398                write!(f, "{}", cause)
3399            }
3400            DescribeNotificationSubscriptionsError::UnauthorizedResourceAccess(ref cause) => {
3401                write!(f, "{}", cause)
3402            }
3403        }
3404    }
3405}
3406impl Error for DescribeNotificationSubscriptionsError {}
3407/// Errors returned by DescribeResourcePermissions
3408#[derive(Debug, PartialEq)]
3409pub enum DescribeResourcePermissionsError {
3410    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
3411    FailedDependency(String),
3412    /// <p>One or more of the dependencies is unavailable.</p>
3413    ServiceUnavailable(String),
3414    /// <p>The operation is not permitted.</p>
3415    UnauthorizedOperation(String),
3416    /// <p>The caller does not have access to perform the action on the resource.</p>
3417    UnauthorizedResourceAccess(String),
3418}
3419
3420impl DescribeResourcePermissionsError {
3421    pub fn from_response(
3422        res: BufferedHttpResponse,
3423    ) -> RusotoError<DescribeResourcePermissionsError> {
3424        if let Some(err) = proto::json::Error::parse_rest(&res) {
3425            match err.typ.as_str() {
3426                "FailedDependencyException" => {
3427                    return RusotoError::Service(
3428                        DescribeResourcePermissionsError::FailedDependency(err.msg),
3429                    )
3430                }
3431                "ServiceUnavailableException" => {
3432                    return RusotoError::Service(
3433                        DescribeResourcePermissionsError::ServiceUnavailable(err.msg),
3434                    )
3435                }
3436                "UnauthorizedOperationException" => {
3437                    return RusotoError::Service(
3438                        DescribeResourcePermissionsError::UnauthorizedOperation(err.msg),
3439                    )
3440                }
3441                "UnauthorizedResourceAccessException" => {
3442                    return RusotoError::Service(
3443                        DescribeResourcePermissionsError::UnauthorizedResourceAccess(err.msg),
3444                    )
3445                }
3446                "ValidationException" => return RusotoError::Validation(err.msg),
3447                _ => {}
3448            }
3449        }
3450        RusotoError::Unknown(res)
3451    }
3452}
3453impl fmt::Display for DescribeResourcePermissionsError {
3454    #[allow(unused_variables)]
3455    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3456        match *self {
3457            DescribeResourcePermissionsError::FailedDependency(ref cause) => write!(f, "{}", cause),
3458            DescribeResourcePermissionsError::ServiceUnavailable(ref cause) => {
3459                write!(f, "{}", cause)
3460            }
3461            DescribeResourcePermissionsError::UnauthorizedOperation(ref cause) => {
3462                write!(f, "{}", cause)
3463            }
3464            DescribeResourcePermissionsError::UnauthorizedResourceAccess(ref cause) => {
3465                write!(f, "{}", cause)
3466            }
3467        }
3468    }
3469}
3470impl Error for DescribeResourcePermissionsError {}
3471/// Errors returned by DescribeRootFolders
3472#[derive(Debug, PartialEq)]
3473pub enum DescribeRootFoldersError {
3474    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
3475    FailedDependency(String),
3476    /// <p>The pagination marker or limit fields are not valid.</p>
3477    InvalidArgument(String),
3478    /// <p>One or more of the dependencies is unavailable.</p>
3479    ServiceUnavailable(String),
3480    /// <p>The operation is not permitted.</p>
3481    UnauthorizedOperation(String),
3482    /// <p>The caller does not have access to perform the action on the resource.</p>
3483    UnauthorizedResourceAccess(String),
3484}
3485
3486impl DescribeRootFoldersError {
3487    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeRootFoldersError> {
3488        if let Some(err) = proto::json::Error::parse_rest(&res) {
3489            match err.typ.as_str() {
3490                "FailedDependencyException" => {
3491                    return RusotoError::Service(DescribeRootFoldersError::FailedDependency(
3492                        err.msg,
3493                    ))
3494                }
3495                "InvalidArgumentException" => {
3496                    return RusotoError::Service(DescribeRootFoldersError::InvalidArgument(err.msg))
3497                }
3498                "ServiceUnavailableException" => {
3499                    return RusotoError::Service(DescribeRootFoldersError::ServiceUnavailable(
3500                        err.msg,
3501                    ))
3502                }
3503                "UnauthorizedOperationException" => {
3504                    return RusotoError::Service(DescribeRootFoldersError::UnauthorizedOperation(
3505                        err.msg,
3506                    ))
3507                }
3508                "UnauthorizedResourceAccessException" => {
3509                    return RusotoError::Service(
3510                        DescribeRootFoldersError::UnauthorizedResourceAccess(err.msg),
3511                    )
3512                }
3513                "ValidationException" => return RusotoError::Validation(err.msg),
3514                _ => {}
3515            }
3516        }
3517        RusotoError::Unknown(res)
3518    }
3519}
3520impl fmt::Display for DescribeRootFoldersError {
3521    #[allow(unused_variables)]
3522    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3523        match *self {
3524            DescribeRootFoldersError::FailedDependency(ref cause) => write!(f, "{}", cause),
3525            DescribeRootFoldersError::InvalidArgument(ref cause) => write!(f, "{}", cause),
3526            DescribeRootFoldersError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3527            DescribeRootFoldersError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
3528            DescribeRootFoldersError::UnauthorizedResourceAccess(ref cause) => {
3529                write!(f, "{}", cause)
3530            }
3531        }
3532    }
3533}
3534impl Error for DescribeRootFoldersError {}
3535/// Errors returned by DescribeUsers
3536#[derive(Debug, PartialEq)]
3537pub enum DescribeUsersError {
3538    /// <p>The resource does not exist.</p>
3539    EntityNotExists(String),
3540    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
3541    FailedDependency(String),
3542    /// <p>The pagination marker or limit fields are not valid.</p>
3543    InvalidArgument(String),
3544    /// <p>The response is too large to return. The request must include a filter to reduce the size of the response.</p>
3545    RequestedEntityTooLarge(String),
3546    /// <p>One or more of the dependencies is unavailable.</p>
3547    ServiceUnavailable(String),
3548    /// <p>The operation is not permitted.</p>
3549    UnauthorizedOperation(String),
3550    /// <p>The caller does not have access to perform the action on the resource.</p>
3551    UnauthorizedResourceAccess(String),
3552}
3553
3554impl DescribeUsersError {
3555    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<DescribeUsersError> {
3556        if let Some(err) = proto::json::Error::parse_rest(&res) {
3557            match err.typ.as_str() {
3558                "EntityNotExistsException" => {
3559                    return RusotoError::Service(DescribeUsersError::EntityNotExists(err.msg))
3560                }
3561                "FailedDependencyException" => {
3562                    return RusotoError::Service(DescribeUsersError::FailedDependency(err.msg))
3563                }
3564                "InvalidArgumentException" => {
3565                    return RusotoError::Service(DescribeUsersError::InvalidArgument(err.msg))
3566                }
3567                "RequestedEntityTooLargeException" => {
3568                    return RusotoError::Service(DescribeUsersError::RequestedEntityTooLarge(
3569                        err.msg,
3570                    ))
3571                }
3572                "ServiceUnavailableException" => {
3573                    return RusotoError::Service(DescribeUsersError::ServiceUnavailable(err.msg))
3574                }
3575                "UnauthorizedOperationException" => {
3576                    return RusotoError::Service(DescribeUsersError::UnauthorizedOperation(err.msg))
3577                }
3578                "UnauthorizedResourceAccessException" => {
3579                    return RusotoError::Service(DescribeUsersError::UnauthorizedResourceAccess(
3580                        err.msg,
3581                    ))
3582                }
3583                "ValidationException" => return RusotoError::Validation(err.msg),
3584                _ => {}
3585            }
3586        }
3587        RusotoError::Unknown(res)
3588    }
3589}
3590impl fmt::Display for DescribeUsersError {
3591    #[allow(unused_variables)]
3592    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3593        match *self {
3594            DescribeUsersError::EntityNotExists(ref cause) => write!(f, "{}", cause),
3595            DescribeUsersError::FailedDependency(ref cause) => write!(f, "{}", cause),
3596            DescribeUsersError::InvalidArgument(ref cause) => write!(f, "{}", cause),
3597            DescribeUsersError::RequestedEntityTooLarge(ref cause) => write!(f, "{}", cause),
3598            DescribeUsersError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3599            DescribeUsersError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
3600            DescribeUsersError::UnauthorizedResourceAccess(ref cause) => write!(f, "{}", cause),
3601        }
3602    }
3603}
3604impl Error for DescribeUsersError {}
3605/// Errors returned by GetCurrentUser
3606#[derive(Debug, PartialEq)]
3607pub enum GetCurrentUserError {
3608    /// <p>The resource does not exist.</p>
3609    EntityNotExists(String),
3610    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
3611    FailedDependency(String),
3612    /// <p>One or more of the dependencies is unavailable.</p>
3613    ServiceUnavailable(String),
3614    /// <p>The operation is not permitted.</p>
3615    UnauthorizedOperation(String),
3616    /// <p>The caller does not have access to perform the action on the resource.</p>
3617    UnauthorizedResourceAccess(String),
3618}
3619
3620impl GetCurrentUserError {
3621    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetCurrentUserError> {
3622        if let Some(err) = proto::json::Error::parse_rest(&res) {
3623            match err.typ.as_str() {
3624                "EntityNotExistsException" => {
3625                    return RusotoError::Service(GetCurrentUserError::EntityNotExists(err.msg))
3626                }
3627                "FailedDependencyException" => {
3628                    return RusotoError::Service(GetCurrentUserError::FailedDependency(err.msg))
3629                }
3630                "ServiceUnavailableException" => {
3631                    return RusotoError::Service(GetCurrentUserError::ServiceUnavailable(err.msg))
3632                }
3633                "UnauthorizedOperationException" => {
3634                    return RusotoError::Service(GetCurrentUserError::UnauthorizedOperation(
3635                        err.msg,
3636                    ))
3637                }
3638                "UnauthorizedResourceAccessException" => {
3639                    return RusotoError::Service(GetCurrentUserError::UnauthorizedResourceAccess(
3640                        err.msg,
3641                    ))
3642                }
3643                "ValidationException" => return RusotoError::Validation(err.msg),
3644                _ => {}
3645            }
3646        }
3647        RusotoError::Unknown(res)
3648    }
3649}
3650impl fmt::Display for GetCurrentUserError {
3651    #[allow(unused_variables)]
3652    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3653        match *self {
3654            GetCurrentUserError::EntityNotExists(ref cause) => write!(f, "{}", cause),
3655            GetCurrentUserError::FailedDependency(ref cause) => write!(f, "{}", cause),
3656            GetCurrentUserError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3657            GetCurrentUserError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
3658            GetCurrentUserError::UnauthorizedResourceAccess(ref cause) => write!(f, "{}", cause),
3659        }
3660    }
3661}
3662impl Error for GetCurrentUserError {}
3663/// Errors returned by GetDocument
3664#[derive(Debug, PartialEq)]
3665pub enum GetDocumentError {
3666    /// <p>The resource does not exist.</p>
3667    EntityNotExists(String),
3668    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
3669    FailedDependency(String),
3670    /// <p>The pagination marker or limit fields are not valid.</p>
3671    InvalidArgument(String),
3672    /// <p>The password is invalid.</p>
3673    InvalidPassword(String),
3674    /// <p>One or more of the dependencies is unavailable.</p>
3675    ServiceUnavailable(String),
3676    /// <p>The operation is not permitted.</p>
3677    UnauthorizedOperation(String),
3678    /// <p>The caller does not have access to perform the action on the resource.</p>
3679    UnauthorizedResourceAccess(String),
3680}
3681
3682impl GetDocumentError {
3683    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDocumentError> {
3684        if let Some(err) = proto::json::Error::parse_rest(&res) {
3685            match err.typ.as_str() {
3686                "EntityNotExistsException" => {
3687                    return RusotoError::Service(GetDocumentError::EntityNotExists(err.msg))
3688                }
3689                "FailedDependencyException" => {
3690                    return RusotoError::Service(GetDocumentError::FailedDependency(err.msg))
3691                }
3692                "InvalidArgumentException" => {
3693                    return RusotoError::Service(GetDocumentError::InvalidArgument(err.msg))
3694                }
3695                "InvalidPasswordException" => {
3696                    return RusotoError::Service(GetDocumentError::InvalidPassword(err.msg))
3697                }
3698                "ServiceUnavailableException" => {
3699                    return RusotoError::Service(GetDocumentError::ServiceUnavailable(err.msg))
3700                }
3701                "UnauthorizedOperationException" => {
3702                    return RusotoError::Service(GetDocumentError::UnauthorizedOperation(err.msg))
3703                }
3704                "UnauthorizedResourceAccessException" => {
3705                    return RusotoError::Service(GetDocumentError::UnauthorizedResourceAccess(
3706                        err.msg,
3707                    ))
3708                }
3709                "ValidationException" => return RusotoError::Validation(err.msg),
3710                _ => {}
3711            }
3712        }
3713        RusotoError::Unknown(res)
3714    }
3715}
3716impl fmt::Display for GetDocumentError {
3717    #[allow(unused_variables)]
3718    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3719        match *self {
3720            GetDocumentError::EntityNotExists(ref cause) => write!(f, "{}", cause),
3721            GetDocumentError::FailedDependency(ref cause) => write!(f, "{}", cause),
3722            GetDocumentError::InvalidArgument(ref cause) => write!(f, "{}", cause),
3723            GetDocumentError::InvalidPassword(ref cause) => write!(f, "{}", cause),
3724            GetDocumentError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3725            GetDocumentError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
3726            GetDocumentError::UnauthorizedResourceAccess(ref cause) => write!(f, "{}", cause),
3727        }
3728    }
3729}
3730impl Error for GetDocumentError {}
3731/// Errors returned by GetDocumentPath
3732#[derive(Debug, PartialEq)]
3733pub enum GetDocumentPathError {
3734    /// <p>The resource does not exist.</p>
3735    EntityNotExists(String),
3736    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
3737    FailedDependency(String),
3738    /// <p>One or more of the dependencies is unavailable.</p>
3739    ServiceUnavailable(String),
3740    /// <p>The operation is not permitted.</p>
3741    UnauthorizedOperation(String),
3742    /// <p>The caller does not have access to perform the action on the resource.</p>
3743    UnauthorizedResourceAccess(String),
3744}
3745
3746impl GetDocumentPathError {
3747    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDocumentPathError> {
3748        if let Some(err) = proto::json::Error::parse_rest(&res) {
3749            match err.typ.as_str() {
3750                "EntityNotExistsException" => {
3751                    return RusotoError::Service(GetDocumentPathError::EntityNotExists(err.msg))
3752                }
3753                "FailedDependencyException" => {
3754                    return RusotoError::Service(GetDocumentPathError::FailedDependency(err.msg))
3755                }
3756                "ServiceUnavailableException" => {
3757                    return RusotoError::Service(GetDocumentPathError::ServiceUnavailable(err.msg))
3758                }
3759                "UnauthorizedOperationException" => {
3760                    return RusotoError::Service(GetDocumentPathError::UnauthorizedOperation(
3761                        err.msg,
3762                    ))
3763                }
3764                "UnauthorizedResourceAccessException" => {
3765                    return RusotoError::Service(GetDocumentPathError::UnauthorizedResourceAccess(
3766                        err.msg,
3767                    ))
3768                }
3769                "ValidationException" => return RusotoError::Validation(err.msg),
3770                _ => {}
3771            }
3772        }
3773        RusotoError::Unknown(res)
3774    }
3775}
3776impl fmt::Display for GetDocumentPathError {
3777    #[allow(unused_variables)]
3778    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3779        match *self {
3780            GetDocumentPathError::EntityNotExists(ref cause) => write!(f, "{}", cause),
3781            GetDocumentPathError::FailedDependency(ref cause) => write!(f, "{}", cause),
3782            GetDocumentPathError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3783            GetDocumentPathError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
3784            GetDocumentPathError::UnauthorizedResourceAccess(ref cause) => write!(f, "{}", cause),
3785        }
3786    }
3787}
3788impl Error for GetDocumentPathError {}
3789/// Errors returned by GetDocumentVersion
3790#[derive(Debug, PartialEq)]
3791pub enum GetDocumentVersionError {
3792    /// <p>The resource does not exist.</p>
3793    EntityNotExists(String),
3794    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
3795    FailedDependency(String),
3796    /// <p>The password is invalid.</p>
3797    InvalidPassword(String),
3798    /// <p>The specified document version is not in the INITIALIZED state.</p>
3799    ProhibitedState(String),
3800    /// <p>One or more of the dependencies is unavailable.</p>
3801    ServiceUnavailable(String),
3802    /// <p>The operation is not permitted.</p>
3803    UnauthorizedOperation(String),
3804    /// <p>The caller does not have access to perform the action on the resource.</p>
3805    UnauthorizedResourceAccess(String),
3806}
3807
3808impl GetDocumentVersionError {
3809    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetDocumentVersionError> {
3810        if let Some(err) = proto::json::Error::parse_rest(&res) {
3811            match err.typ.as_str() {
3812                "EntityNotExistsException" => {
3813                    return RusotoError::Service(GetDocumentVersionError::EntityNotExists(err.msg))
3814                }
3815                "FailedDependencyException" => {
3816                    return RusotoError::Service(GetDocumentVersionError::FailedDependency(err.msg))
3817                }
3818                "InvalidPasswordException" => {
3819                    return RusotoError::Service(GetDocumentVersionError::InvalidPassword(err.msg))
3820                }
3821                "ProhibitedStateException" => {
3822                    return RusotoError::Service(GetDocumentVersionError::ProhibitedState(err.msg))
3823                }
3824                "ServiceUnavailableException" => {
3825                    return RusotoError::Service(GetDocumentVersionError::ServiceUnavailable(
3826                        err.msg,
3827                    ))
3828                }
3829                "UnauthorizedOperationException" => {
3830                    return RusotoError::Service(GetDocumentVersionError::UnauthorizedOperation(
3831                        err.msg,
3832                    ))
3833                }
3834                "UnauthorizedResourceAccessException" => {
3835                    return RusotoError::Service(
3836                        GetDocumentVersionError::UnauthorizedResourceAccess(err.msg),
3837                    )
3838                }
3839                "ValidationException" => return RusotoError::Validation(err.msg),
3840                _ => {}
3841            }
3842        }
3843        RusotoError::Unknown(res)
3844    }
3845}
3846impl fmt::Display for GetDocumentVersionError {
3847    #[allow(unused_variables)]
3848    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3849        match *self {
3850            GetDocumentVersionError::EntityNotExists(ref cause) => write!(f, "{}", cause),
3851            GetDocumentVersionError::FailedDependency(ref cause) => write!(f, "{}", cause),
3852            GetDocumentVersionError::InvalidPassword(ref cause) => write!(f, "{}", cause),
3853            GetDocumentVersionError::ProhibitedState(ref cause) => write!(f, "{}", cause),
3854            GetDocumentVersionError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3855            GetDocumentVersionError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
3856            GetDocumentVersionError::UnauthorizedResourceAccess(ref cause) => {
3857                write!(f, "{}", cause)
3858            }
3859        }
3860    }
3861}
3862impl Error for GetDocumentVersionError {}
3863/// Errors returned by GetFolder
3864#[derive(Debug, PartialEq)]
3865pub enum GetFolderError {
3866    /// <p>The resource does not exist.</p>
3867    EntityNotExists(String),
3868    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
3869    FailedDependency(String),
3870    /// <p>The pagination marker or limit fields are not valid.</p>
3871    InvalidArgument(String),
3872    /// <p>The specified document version is not in the INITIALIZED state.</p>
3873    ProhibitedState(String),
3874    /// <p>One or more of the dependencies is unavailable.</p>
3875    ServiceUnavailable(String),
3876    /// <p>The operation is not permitted.</p>
3877    UnauthorizedOperation(String),
3878    /// <p>The caller does not have access to perform the action on the resource.</p>
3879    UnauthorizedResourceAccess(String),
3880}
3881
3882impl GetFolderError {
3883    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetFolderError> {
3884        if let Some(err) = proto::json::Error::parse_rest(&res) {
3885            match err.typ.as_str() {
3886                "EntityNotExistsException" => {
3887                    return RusotoError::Service(GetFolderError::EntityNotExists(err.msg))
3888                }
3889                "FailedDependencyException" => {
3890                    return RusotoError::Service(GetFolderError::FailedDependency(err.msg))
3891                }
3892                "InvalidArgumentException" => {
3893                    return RusotoError::Service(GetFolderError::InvalidArgument(err.msg))
3894                }
3895                "ProhibitedStateException" => {
3896                    return RusotoError::Service(GetFolderError::ProhibitedState(err.msg))
3897                }
3898                "ServiceUnavailableException" => {
3899                    return RusotoError::Service(GetFolderError::ServiceUnavailable(err.msg))
3900                }
3901                "UnauthorizedOperationException" => {
3902                    return RusotoError::Service(GetFolderError::UnauthorizedOperation(err.msg))
3903                }
3904                "UnauthorizedResourceAccessException" => {
3905                    return RusotoError::Service(GetFolderError::UnauthorizedResourceAccess(
3906                        err.msg,
3907                    ))
3908                }
3909                "ValidationException" => return RusotoError::Validation(err.msg),
3910                _ => {}
3911            }
3912        }
3913        RusotoError::Unknown(res)
3914    }
3915}
3916impl fmt::Display for GetFolderError {
3917    #[allow(unused_variables)]
3918    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3919        match *self {
3920            GetFolderError::EntityNotExists(ref cause) => write!(f, "{}", cause),
3921            GetFolderError::FailedDependency(ref cause) => write!(f, "{}", cause),
3922            GetFolderError::InvalidArgument(ref cause) => write!(f, "{}", cause),
3923            GetFolderError::ProhibitedState(ref cause) => write!(f, "{}", cause),
3924            GetFolderError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3925            GetFolderError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
3926            GetFolderError::UnauthorizedResourceAccess(ref cause) => write!(f, "{}", cause),
3927        }
3928    }
3929}
3930impl Error for GetFolderError {}
3931/// Errors returned by GetFolderPath
3932#[derive(Debug, PartialEq)]
3933pub enum GetFolderPathError {
3934    /// <p>The resource does not exist.</p>
3935    EntityNotExists(String),
3936    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
3937    FailedDependency(String),
3938    /// <p>One or more of the dependencies is unavailable.</p>
3939    ServiceUnavailable(String),
3940    /// <p>The operation is not permitted.</p>
3941    UnauthorizedOperation(String),
3942    /// <p>The caller does not have access to perform the action on the resource.</p>
3943    UnauthorizedResourceAccess(String),
3944}
3945
3946impl GetFolderPathError {
3947    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetFolderPathError> {
3948        if let Some(err) = proto::json::Error::parse_rest(&res) {
3949            match err.typ.as_str() {
3950                "EntityNotExistsException" => {
3951                    return RusotoError::Service(GetFolderPathError::EntityNotExists(err.msg))
3952                }
3953                "FailedDependencyException" => {
3954                    return RusotoError::Service(GetFolderPathError::FailedDependency(err.msg))
3955                }
3956                "ServiceUnavailableException" => {
3957                    return RusotoError::Service(GetFolderPathError::ServiceUnavailable(err.msg))
3958                }
3959                "UnauthorizedOperationException" => {
3960                    return RusotoError::Service(GetFolderPathError::UnauthorizedOperation(err.msg))
3961                }
3962                "UnauthorizedResourceAccessException" => {
3963                    return RusotoError::Service(GetFolderPathError::UnauthorizedResourceAccess(
3964                        err.msg,
3965                    ))
3966                }
3967                "ValidationException" => return RusotoError::Validation(err.msg),
3968                _ => {}
3969            }
3970        }
3971        RusotoError::Unknown(res)
3972    }
3973}
3974impl fmt::Display for GetFolderPathError {
3975    #[allow(unused_variables)]
3976    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
3977        match *self {
3978            GetFolderPathError::EntityNotExists(ref cause) => write!(f, "{}", cause),
3979            GetFolderPathError::FailedDependency(ref cause) => write!(f, "{}", cause),
3980            GetFolderPathError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
3981            GetFolderPathError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
3982            GetFolderPathError::UnauthorizedResourceAccess(ref cause) => write!(f, "{}", cause),
3983        }
3984    }
3985}
3986impl Error for GetFolderPathError {}
3987/// Errors returned by GetResources
3988#[derive(Debug, PartialEq)]
3989pub enum GetResourcesError {
3990    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
3991    FailedDependency(String),
3992    /// <p>The pagination marker or limit fields are not valid.</p>
3993    InvalidArgument(String),
3994    /// <p>One or more of the dependencies is unavailable.</p>
3995    ServiceUnavailable(String),
3996    /// <p>The operation is not permitted.</p>
3997    UnauthorizedOperation(String),
3998    /// <p>The caller does not have access to perform the action on the resource.</p>
3999    UnauthorizedResourceAccess(String),
4000}
4001
4002impl GetResourcesError {
4003    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<GetResourcesError> {
4004        if let Some(err) = proto::json::Error::parse_rest(&res) {
4005            match err.typ.as_str() {
4006                "FailedDependencyException" => {
4007                    return RusotoError::Service(GetResourcesError::FailedDependency(err.msg))
4008                }
4009                "InvalidArgumentException" => {
4010                    return RusotoError::Service(GetResourcesError::InvalidArgument(err.msg))
4011                }
4012                "ServiceUnavailableException" => {
4013                    return RusotoError::Service(GetResourcesError::ServiceUnavailable(err.msg))
4014                }
4015                "UnauthorizedOperationException" => {
4016                    return RusotoError::Service(GetResourcesError::UnauthorizedOperation(err.msg))
4017                }
4018                "UnauthorizedResourceAccessException" => {
4019                    return RusotoError::Service(GetResourcesError::UnauthorizedResourceAccess(
4020                        err.msg,
4021                    ))
4022                }
4023                "ValidationException" => return RusotoError::Validation(err.msg),
4024                _ => {}
4025            }
4026        }
4027        RusotoError::Unknown(res)
4028    }
4029}
4030impl fmt::Display for GetResourcesError {
4031    #[allow(unused_variables)]
4032    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4033        match *self {
4034            GetResourcesError::FailedDependency(ref cause) => write!(f, "{}", cause),
4035            GetResourcesError::InvalidArgument(ref cause) => write!(f, "{}", cause),
4036            GetResourcesError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
4037            GetResourcesError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
4038            GetResourcesError::UnauthorizedResourceAccess(ref cause) => write!(f, "{}", cause),
4039        }
4040    }
4041}
4042impl Error for GetResourcesError {}
4043/// Errors returned by InitiateDocumentVersionUpload
4044#[derive(Debug, PartialEq)]
4045pub enum InitiateDocumentVersionUploadError {
4046    /// <p>This exception is thrown when a valid checkout ID is not presented on document version upload calls for a document that has been checked out from Web client.</p>
4047    DraftUploadOutOfSync(String),
4048    /// <p>The resource already exists.</p>
4049    EntityAlreadyExists(String),
4050    /// <p>The resource does not exist.</p>
4051    EntityNotExists(String),
4052    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
4053    FailedDependency(String),
4054    /// <p>The specified document version is not in the INITIALIZED state.</p>
4055    ProhibitedState(String),
4056    /// <p>The resource is already checked out.</p>
4057    ResourceAlreadyCheckedOut(String),
4058    /// <p>One or more of the dependencies is unavailable.</p>
4059    ServiceUnavailable(String),
4060    /// <p>The storage limit has been exceeded.</p>
4061    StorageLimitExceeded(String),
4062    /// <p>The storage limit will be exceeded.</p>
4063    StorageLimitWillExceed(String),
4064    /// <p>The operation is not permitted.</p>
4065    UnauthorizedOperation(String),
4066    /// <p>The caller does not have access to perform the action on the resource.</p>
4067    UnauthorizedResourceAccess(String),
4068}
4069
4070impl InitiateDocumentVersionUploadError {
4071    pub fn from_response(
4072        res: BufferedHttpResponse,
4073    ) -> RusotoError<InitiateDocumentVersionUploadError> {
4074        if let Some(err) = proto::json::Error::parse_rest(&res) {
4075            match err.typ.as_str() {
4076                "DraftUploadOutOfSyncException" => {
4077                    return RusotoError::Service(
4078                        InitiateDocumentVersionUploadError::DraftUploadOutOfSync(err.msg),
4079                    )
4080                }
4081                "EntityAlreadyExistsException" => {
4082                    return RusotoError::Service(
4083                        InitiateDocumentVersionUploadError::EntityAlreadyExists(err.msg),
4084                    )
4085                }
4086                "EntityNotExistsException" => {
4087                    return RusotoError::Service(
4088                        InitiateDocumentVersionUploadError::EntityNotExists(err.msg),
4089                    )
4090                }
4091                "FailedDependencyException" => {
4092                    return RusotoError::Service(
4093                        InitiateDocumentVersionUploadError::FailedDependency(err.msg),
4094                    )
4095                }
4096                "ProhibitedStateException" => {
4097                    return RusotoError::Service(
4098                        InitiateDocumentVersionUploadError::ProhibitedState(err.msg),
4099                    )
4100                }
4101                "ResourceAlreadyCheckedOutException" => {
4102                    return RusotoError::Service(
4103                        InitiateDocumentVersionUploadError::ResourceAlreadyCheckedOut(err.msg),
4104                    )
4105                }
4106                "ServiceUnavailableException" => {
4107                    return RusotoError::Service(
4108                        InitiateDocumentVersionUploadError::ServiceUnavailable(err.msg),
4109                    )
4110                }
4111                "StorageLimitExceededException" => {
4112                    return RusotoError::Service(
4113                        InitiateDocumentVersionUploadError::StorageLimitExceeded(err.msg),
4114                    )
4115                }
4116                "StorageLimitWillExceedException" => {
4117                    return RusotoError::Service(
4118                        InitiateDocumentVersionUploadError::StorageLimitWillExceed(err.msg),
4119                    )
4120                }
4121                "UnauthorizedOperationException" => {
4122                    return RusotoError::Service(
4123                        InitiateDocumentVersionUploadError::UnauthorizedOperation(err.msg),
4124                    )
4125                }
4126                "UnauthorizedResourceAccessException" => {
4127                    return RusotoError::Service(
4128                        InitiateDocumentVersionUploadError::UnauthorizedResourceAccess(err.msg),
4129                    )
4130                }
4131                "ValidationException" => return RusotoError::Validation(err.msg),
4132                _ => {}
4133            }
4134        }
4135        RusotoError::Unknown(res)
4136    }
4137}
4138impl fmt::Display for InitiateDocumentVersionUploadError {
4139    #[allow(unused_variables)]
4140    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4141        match *self {
4142            InitiateDocumentVersionUploadError::DraftUploadOutOfSync(ref cause) => {
4143                write!(f, "{}", cause)
4144            }
4145            InitiateDocumentVersionUploadError::EntityAlreadyExists(ref cause) => {
4146                write!(f, "{}", cause)
4147            }
4148            InitiateDocumentVersionUploadError::EntityNotExists(ref cause) => {
4149                write!(f, "{}", cause)
4150            }
4151            InitiateDocumentVersionUploadError::FailedDependency(ref cause) => {
4152                write!(f, "{}", cause)
4153            }
4154            InitiateDocumentVersionUploadError::ProhibitedState(ref cause) => {
4155                write!(f, "{}", cause)
4156            }
4157            InitiateDocumentVersionUploadError::ResourceAlreadyCheckedOut(ref cause) => {
4158                write!(f, "{}", cause)
4159            }
4160            InitiateDocumentVersionUploadError::ServiceUnavailable(ref cause) => {
4161                write!(f, "{}", cause)
4162            }
4163            InitiateDocumentVersionUploadError::StorageLimitExceeded(ref cause) => {
4164                write!(f, "{}", cause)
4165            }
4166            InitiateDocumentVersionUploadError::StorageLimitWillExceed(ref cause) => {
4167                write!(f, "{}", cause)
4168            }
4169            InitiateDocumentVersionUploadError::UnauthorizedOperation(ref cause) => {
4170                write!(f, "{}", cause)
4171            }
4172            InitiateDocumentVersionUploadError::UnauthorizedResourceAccess(ref cause) => {
4173                write!(f, "{}", cause)
4174            }
4175        }
4176    }
4177}
4178impl Error for InitiateDocumentVersionUploadError {}
4179/// Errors returned by RemoveAllResourcePermissions
4180#[derive(Debug, PartialEq)]
4181pub enum RemoveAllResourcePermissionsError {
4182    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
4183    FailedDependency(String),
4184    /// <p>One or more of the dependencies is unavailable.</p>
4185    ServiceUnavailable(String),
4186    /// <p>The operation is not permitted.</p>
4187    UnauthorizedOperation(String),
4188    /// <p>The caller does not have access to perform the action on the resource.</p>
4189    UnauthorizedResourceAccess(String),
4190}
4191
4192impl RemoveAllResourcePermissionsError {
4193    pub fn from_response(
4194        res: BufferedHttpResponse,
4195    ) -> RusotoError<RemoveAllResourcePermissionsError> {
4196        if let Some(err) = proto::json::Error::parse_rest(&res) {
4197            match err.typ.as_str() {
4198                "FailedDependencyException" => {
4199                    return RusotoError::Service(
4200                        RemoveAllResourcePermissionsError::FailedDependency(err.msg),
4201                    )
4202                }
4203                "ServiceUnavailableException" => {
4204                    return RusotoError::Service(
4205                        RemoveAllResourcePermissionsError::ServiceUnavailable(err.msg),
4206                    )
4207                }
4208                "UnauthorizedOperationException" => {
4209                    return RusotoError::Service(
4210                        RemoveAllResourcePermissionsError::UnauthorizedOperation(err.msg),
4211                    )
4212                }
4213                "UnauthorizedResourceAccessException" => {
4214                    return RusotoError::Service(
4215                        RemoveAllResourcePermissionsError::UnauthorizedResourceAccess(err.msg),
4216                    )
4217                }
4218                "ValidationException" => return RusotoError::Validation(err.msg),
4219                _ => {}
4220            }
4221        }
4222        RusotoError::Unknown(res)
4223    }
4224}
4225impl fmt::Display for RemoveAllResourcePermissionsError {
4226    #[allow(unused_variables)]
4227    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4228        match *self {
4229            RemoveAllResourcePermissionsError::FailedDependency(ref cause) => {
4230                write!(f, "{}", cause)
4231            }
4232            RemoveAllResourcePermissionsError::ServiceUnavailable(ref cause) => {
4233                write!(f, "{}", cause)
4234            }
4235            RemoveAllResourcePermissionsError::UnauthorizedOperation(ref cause) => {
4236                write!(f, "{}", cause)
4237            }
4238            RemoveAllResourcePermissionsError::UnauthorizedResourceAccess(ref cause) => {
4239                write!(f, "{}", cause)
4240            }
4241        }
4242    }
4243}
4244impl Error for RemoveAllResourcePermissionsError {}
4245/// Errors returned by RemoveResourcePermission
4246#[derive(Debug, PartialEq)]
4247pub enum RemoveResourcePermissionError {
4248    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
4249    FailedDependency(String),
4250    /// <p>One or more of the dependencies is unavailable.</p>
4251    ServiceUnavailable(String),
4252    /// <p>The operation is not permitted.</p>
4253    UnauthorizedOperation(String),
4254    /// <p>The caller does not have access to perform the action on the resource.</p>
4255    UnauthorizedResourceAccess(String),
4256}
4257
4258impl RemoveResourcePermissionError {
4259    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<RemoveResourcePermissionError> {
4260        if let Some(err) = proto::json::Error::parse_rest(&res) {
4261            match err.typ.as_str() {
4262                "FailedDependencyException" => {
4263                    return RusotoError::Service(RemoveResourcePermissionError::FailedDependency(
4264                        err.msg,
4265                    ))
4266                }
4267                "ServiceUnavailableException" => {
4268                    return RusotoError::Service(RemoveResourcePermissionError::ServiceUnavailable(
4269                        err.msg,
4270                    ))
4271                }
4272                "UnauthorizedOperationException" => {
4273                    return RusotoError::Service(
4274                        RemoveResourcePermissionError::UnauthorizedOperation(err.msg),
4275                    )
4276                }
4277                "UnauthorizedResourceAccessException" => {
4278                    return RusotoError::Service(
4279                        RemoveResourcePermissionError::UnauthorizedResourceAccess(err.msg),
4280                    )
4281                }
4282                "ValidationException" => return RusotoError::Validation(err.msg),
4283                _ => {}
4284            }
4285        }
4286        RusotoError::Unknown(res)
4287    }
4288}
4289impl fmt::Display for RemoveResourcePermissionError {
4290    #[allow(unused_variables)]
4291    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4292        match *self {
4293            RemoveResourcePermissionError::FailedDependency(ref cause) => write!(f, "{}", cause),
4294            RemoveResourcePermissionError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
4295            RemoveResourcePermissionError::UnauthorizedOperation(ref cause) => {
4296                write!(f, "{}", cause)
4297            }
4298            RemoveResourcePermissionError::UnauthorizedResourceAccess(ref cause) => {
4299                write!(f, "{}", cause)
4300            }
4301        }
4302    }
4303}
4304impl Error for RemoveResourcePermissionError {}
4305/// Errors returned by UpdateDocument
4306#[derive(Debug, PartialEq)]
4307pub enum UpdateDocumentError {
4308    /// <p>The resource hierarchy is changing.</p>
4309    ConcurrentModification(String),
4310    /// <p>Another operation is in progress on the resource that conflicts with the current operation.</p>
4311    ConflictingOperation(String),
4312    /// <p>The resource already exists.</p>
4313    EntityAlreadyExists(String),
4314    /// <p>The resource does not exist.</p>
4315    EntityNotExists(String),
4316    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
4317    FailedDependency(String),
4318    /// <p>The maximum of 100,000 folders under the parent folder has been exceeded.</p>
4319    LimitExceeded(String),
4320    /// <p>The specified document version is not in the INITIALIZED state.</p>
4321    ProhibitedState(String),
4322    /// <p>One or more of the dependencies is unavailable.</p>
4323    ServiceUnavailable(String),
4324    /// <p>The operation is not permitted.</p>
4325    UnauthorizedOperation(String),
4326    /// <p>The caller does not have access to perform the action on the resource.</p>
4327    UnauthorizedResourceAccess(String),
4328}
4329
4330impl UpdateDocumentError {
4331    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateDocumentError> {
4332        if let Some(err) = proto::json::Error::parse_rest(&res) {
4333            match err.typ.as_str() {
4334                "ConcurrentModificationException" => {
4335                    return RusotoError::Service(UpdateDocumentError::ConcurrentModification(
4336                        err.msg,
4337                    ))
4338                }
4339                "ConflictingOperationException" => {
4340                    return RusotoError::Service(UpdateDocumentError::ConflictingOperation(err.msg))
4341                }
4342                "EntityAlreadyExistsException" => {
4343                    return RusotoError::Service(UpdateDocumentError::EntityAlreadyExists(err.msg))
4344                }
4345                "EntityNotExistsException" => {
4346                    return RusotoError::Service(UpdateDocumentError::EntityNotExists(err.msg))
4347                }
4348                "FailedDependencyException" => {
4349                    return RusotoError::Service(UpdateDocumentError::FailedDependency(err.msg))
4350                }
4351                "LimitExceededException" => {
4352                    return RusotoError::Service(UpdateDocumentError::LimitExceeded(err.msg))
4353                }
4354                "ProhibitedStateException" => {
4355                    return RusotoError::Service(UpdateDocumentError::ProhibitedState(err.msg))
4356                }
4357                "ServiceUnavailableException" => {
4358                    return RusotoError::Service(UpdateDocumentError::ServiceUnavailable(err.msg))
4359                }
4360                "UnauthorizedOperationException" => {
4361                    return RusotoError::Service(UpdateDocumentError::UnauthorizedOperation(
4362                        err.msg,
4363                    ))
4364                }
4365                "UnauthorizedResourceAccessException" => {
4366                    return RusotoError::Service(UpdateDocumentError::UnauthorizedResourceAccess(
4367                        err.msg,
4368                    ))
4369                }
4370                "ValidationException" => return RusotoError::Validation(err.msg),
4371                _ => {}
4372            }
4373        }
4374        RusotoError::Unknown(res)
4375    }
4376}
4377impl fmt::Display for UpdateDocumentError {
4378    #[allow(unused_variables)]
4379    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4380        match *self {
4381            UpdateDocumentError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
4382            UpdateDocumentError::ConflictingOperation(ref cause) => write!(f, "{}", cause),
4383            UpdateDocumentError::EntityAlreadyExists(ref cause) => write!(f, "{}", cause),
4384            UpdateDocumentError::EntityNotExists(ref cause) => write!(f, "{}", cause),
4385            UpdateDocumentError::FailedDependency(ref cause) => write!(f, "{}", cause),
4386            UpdateDocumentError::LimitExceeded(ref cause) => write!(f, "{}", cause),
4387            UpdateDocumentError::ProhibitedState(ref cause) => write!(f, "{}", cause),
4388            UpdateDocumentError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
4389            UpdateDocumentError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
4390            UpdateDocumentError::UnauthorizedResourceAccess(ref cause) => write!(f, "{}", cause),
4391        }
4392    }
4393}
4394impl Error for UpdateDocumentError {}
4395/// Errors returned by UpdateDocumentVersion
4396#[derive(Debug, PartialEq)]
4397pub enum UpdateDocumentVersionError {
4398    /// <p>The resource hierarchy is changing.</p>
4399    ConcurrentModification(String),
4400    /// <p>The resource does not exist.</p>
4401    EntityNotExists(String),
4402    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
4403    FailedDependency(String),
4404    /// <p>The operation is invalid.</p>
4405    InvalidOperation(String),
4406    /// <p>The specified document version is not in the INITIALIZED state.</p>
4407    ProhibitedState(String),
4408    /// <p>One or more of the dependencies is unavailable.</p>
4409    ServiceUnavailable(String),
4410    /// <p>The operation is not permitted.</p>
4411    UnauthorizedOperation(String),
4412    /// <p>The caller does not have access to perform the action on the resource.</p>
4413    UnauthorizedResourceAccess(String),
4414}
4415
4416impl UpdateDocumentVersionError {
4417    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateDocumentVersionError> {
4418        if let Some(err) = proto::json::Error::parse_rest(&res) {
4419            match err.typ.as_str() {
4420                "ConcurrentModificationException" => {
4421                    return RusotoError::Service(
4422                        UpdateDocumentVersionError::ConcurrentModification(err.msg),
4423                    )
4424                }
4425                "EntityNotExistsException" => {
4426                    return RusotoError::Service(UpdateDocumentVersionError::EntityNotExists(
4427                        err.msg,
4428                    ))
4429                }
4430                "FailedDependencyException" => {
4431                    return RusotoError::Service(UpdateDocumentVersionError::FailedDependency(
4432                        err.msg,
4433                    ))
4434                }
4435                "InvalidOperationException" => {
4436                    return RusotoError::Service(UpdateDocumentVersionError::InvalidOperation(
4437                        err.msg,
4438                    ))
4439                }
4440                "ProhibitedStateException" => {
4441                    return RusotoError::Service(UpdateDocumentVersionError::ProhibitedState(
4442                        err.msg,
4443                    ))
4444                }
4445                "ServiceUnavailableException" => {
4446                    return RusotoError::Service(UpdateDocumentVersionError::ServiceUnavailable(
4447                        err.msg,
4448                    ))
4449                }
4450                "UnauthorizedOperationException" => {
4451                    return RusotoError::Service(UpdateDocumentVersionError::UnauthorizedOperation(
4452                        err.msg,
4453                    ))
4454                }
4455                "UnauthorizedResourceAccessException" => {
4456                    return RusotoError::Service(
4457                        UpdateDocumentVersionError::UnauthorizedResourceAccess(err.msg),
4458                    )
4459                }
4460                "ValidationException" => return RusotoError::Validation(err.msg),
4461                _ => {}
4462            }
4463        }
4464        RusotoError::Unknown(res)
4465    }
4466}
4467impl fmt::Display for UpdateDocumentVersionError {
4468    #[allow(unused_variables)]
4469    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4470        match *self {
4471            UpdateDocumentVersionError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
4472            UpdateDocumentVersionError::EntityNotExists(ref cause) => write!(f, "{}", cause),
4473            UpdateDocumentVersionError::FailedDependency(ref cause) => write!(f, "{}", cause),
4474            UpdateDocumentVersionError::InvalidOperation(ref cause) => write!(f, "{}", cause),
4475            UpdateDocumentVersionError::ProhibitedState(ref cause) => write!(f, "{}", cause),
4476            UpdateDocumentVersionError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
4477            UpdateDocumentVersionError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
4478            UpdateDocumentVersionError::UnauthorizedResourceAccess(ref cause) => {
4479                write!(f, "{}", cause)
4480            }
4481        }
4482    }
4483}
4484impl Error for UpdateDocumentVersionError {}
4485/// Errors returned by UpdateFolder
4486#[derive(Debug, PartialEq)]
4487pub enum UpdateFolderError {
4488    /// <p>The resource hierarchy is changing.</p>
4489    ConcurrentModification(String),
4490    /// <p>Another operation is in progress on the resource that conflicts with the current operation.</p>
4491    ConflictingOperation(String),
4492    /// <p>The resource already exists.</p>
4493    EntityAlreadyExists(String),
4494    /// <p>The resource does not exist.</p>
4495    EntityNotExists(String),
4496    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
4497    FailedDependency(String),
4498    /// <p>The maximum of 100,000 folders under the parent folder has been exceeded.</p>
4499    LimitExceeded(String),
4500    /// <p>The specified document version is not in the INITIALIZED state.</p>
4501    ProhibitedState(String),
4502    /// <p>One or more of the dependencies is unavailable.</p>
4503    ServiceUnavailable(String),
4504    /// <p>The operation is not permitted.</p>
4505    UnauthorizedOperation(String),
4506    /// <p>The caller does not have access to perform the action on the resource.</p>
4507    UnauthorizedResourceAccess(String),
4508}
4509
4510impl UpdateFolderError {
4511    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateFolderError> {
4512        if let Some(err) = proto::json::Error::parse_rest(&res) {
4513            match err.typ.as_str() {
4514                "ConcurrentModificationException" => {
4515                    return RusotoError::Service(UpdateFolderError::ConcurrentModification(err.msg))
4516                }
4517                "ConflictingOperationException" => {
4518                    return RusotoError::Service(UpdateFolderError::ConflictingOperation(err.msg))
4519                }
4520                "EntityAlreadyExistsException" => {
4521                    return RusotoError::Service(UpdateFolderError::EntityAlreadyExists(err.msg))
4522                }
4523                "EntityNotExistsException" => {
4524                    return RusotoError::Service(UpdateFolderError::EntityNotExists(err.msg))
4525                }
4526                "FailedDependencyException" => {
4527                    return RusotoError::Service(UpdateFolderError::FailedDependency(err.msg))
4528                }
4529                "LimitExceededException" => {
4530                    return RusotoError::Service(UpdateFolderError::LimitExceeded(err.msg))
4531                }
4532                "ProhibitedStateException" => {
4533                    return RusotoError::Service(UpdateFolderError::ProhibitedState(err.msg))
4534                }
4535                "ServiceUnavailableException" => {
4536                    return RusotoError::Service(UpdateFolderError::ServiceUnavailable(err.msg))
4537                }
4538                "UnauthorizedOperationException" => {
4539                    return RusotoError::Service(UpdateFolderError::UnauthorizedOperation(err.msg))
4540                }
4541                "UnauthorizedResourceAccessException" => {
4542                    return RusotoError::Service(UpdateFolderError::UnauthorizedResourceAccess(
4543                        err.msg,
4544                    ))
4545                }
4546                "ValidationException" => return RusotoError::Validation(err.msg),
4547                _ => {}
4548            }
4549        }
4550        RusotoError::Unknown(res)
4551    }
4552}
4553impl fmt::Display for UpdateFolderError {
4554    #[allow(unused_variables)]
4555    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4556        match *self {
4557            UpdateFolderError::ConcurrentModification(ref cause) => write!(f, "{}", cause),
4558            UpdateFolderError::ConflictingOperation(ref cause) => write!(f, "{}", cause),
4559            UpdateFolderError::EntityAlreadyExists(ref cause) => write!(f, "{}", cause),
4560            UpdateFolderError::EntityNotExists(ref cause) => write!(f, "{}", cause),
4561            UpdateFolderError::FailedDependency(ref cause) => write!(f, "{}", cause),
4562            UpdateFolderError::LimitExceeded(ref cause) => write!(f, "{}", cause),
4563            UpdateFolderError::ProhibitedState(ref cause) => write!(f, "{}", cause),
4564            UpdateFolderError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
4565            UpdateFolderError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
4566            UpdateFolderError::UnauthorizedResourceAccess(ref cause) => write!(f, "{}", cause),
4567        }
4568    }
4569}
4570impl Error for UpdateFolderError {}
4571/// Errors returned by UpdateUser
4572#[derive(Debug, PartialEq)]
4573pub enum UpdateUserError {
4574    /// <p>The last user in the organization is being deactivated.</p>
4575    DeactivatingLastSystemUser(String),
4576    /// <p>The resource does not exist.</p>
4577    EntityNotExists(String),
4578    /// <p>The AWS Directory Service cannot reach an on-premises instance. Or a dependency under the control of the organization is failing, such as a connected Active Directory.</p>
4579    FailedDependency(String),
4580    /// <p>The user is undergoing transfer of ownership.</p>
4581    IllegalUserState(String),
4582    /// <p>The pagination marker or limit fields are not valid.</p>
4583    InvalidArgument(String),
4584    /// <p>One or more of the dependencies is unavailable.</p>
4585    ServiceUnavailable(String),
4586    /// <p>The operation is not permitted.</p>
4587    UnauthorizedOperation(String),
4588    /// <p>The caller does not have access to perform the action on the resource.</p>
4589    UnauthorizedResourceAccess(String),
4590}
4591
4592impl UpdateUserError {
4593    pub fn from_response(res: BufferedHttpResponse) -> RusotoError<UpdateUserError> {
4594        if let Some(err) = proto::json::Error::parse_rest(&res) {
4595            match err.typ.as_str() {
4596                "DeactivatingLastSystemUserException" => {
4597                    return RusotoError::Service(UpdateUserError::DeactivatingLastSystemUser(
4598                        err.msg,
4599                    ))
4600                }
4601                "EntityNotExistsException" => {
4602                    return RusotoError::Service(UpdateUserError::EntityNotExists(err.msg))
4603                }
4604                "FailedDependencyException" => {
4605                    return RusotoError::Service(UpdateUserError::FailedDependency(err.msg))
4606                }
4607                "IllegalUserStateException" => {
4608                    return RusotoError::Service(UpdateUserError::IllegalUserState(err.msg))
4609                }
4610                "InvalidArgumentException" => {
4611                    return RusotoError::Service(UpdateUserError::InvalidArgument(err.msg))
4612                }
4613                "ServiceUnavailableException" => {
4614                    return RusotoError::Service(UpdateUserError::ServiceUnavailable(err.msg))
4615                }
4616                "UnauthorizedOperationException" => {
4617                    return RusotoError::Service(UpdateUserError::UnauthorizedOperation(err.msg))
4618                }
4619                "UnauthorizedResourceAccessException" => {
4620                    return RusotoError::Service(UpdateUserError::UnauthorizedResourceAccess(
4621                        err.msg,
4622                    ))
4623                }
4624                "ValidationException" => return RusotoError::Validation(err.msg),
4625                _ => {}
4626            }
4627        }
4628        RusotoError::Unknown(res)
4629    }
4630}
4631impl fmt::Display for UpdateUserError {
4632    #[allow(unused_variables)]
4633    fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
4634        match *self {
4635            UpdateUserError::DeactivatingLastSystemUser(ref cause) => write!(f, "{}", cause),
4636            UpdateUserError::EntityNotExists(ref cause) => write!(f, "{}", cause),
4637            UpdateUserError::FailedDependency(ref cause) => write!(f, "{}", cause),
4638            UpdateUserError::IllegalUserState(ref cause) => write!(f, "{}", cause),
4639            UpdateUserError::InvalidArgument(ref cause) => write!(f, "{}", cause),
4640            UpdateUserError::ServiceUnavailable(ref cause) => write!(f, "{}", cause),
4641            UpdateUserError::UnauthorizedOperation(ref cause) => write!(f, "{}", cause),
4642            UpdateUserError::UnauthorizedResourceAccess(ref cause) => write!(f, "{}", cause),
4643        }
4644    }
4645}
4646impl Error for UpdateUserError {}
4647/// Trait representing the capabilities of the Amazon WorkDocs API. Amazon WorkDocs clients implement this trait.
4648#[async_trait]
4649pub trait Workdocs {
4650    /// <p>Aborts the upload of the specified document version that was previously initiated by <a>InitiateDocumentVersionUpload</a>. The client should make this call only when it no longer intends to upload the document version, or fails to do so.</p>
4651    async fn abort_document_version_upload(
4652        &self,
4653        input: AbortDocumentVersionUploadRequest,
4654    ) -> Result<(), RusotoError<AbortDocumentVersionUploadError>>;
4655
4656    /// <p>Activates the specified user. Only active users can access Amazon WorkDocs.</p>
4657    async fn activate_user(
4658        &self,
4659        input: ActivateUserRequest,
4660    ) -> Result<ActivateUserResponse, RusotoError<ActivateUserError>>;
4661
4662    /// <p>Creates a set of permissions for the specified folder or document. The resource permissions are overwritten if the principals already have different permissions.</p>
4663    async fn add_resource_permissions(
4664        &self,
4665        input: AddResourcePermissionsRequest,
4666    ) -> Result<AddResourcePermissionsResponse, RusotoError<AddResourcePermissionsError>>;
4667
4668    /// <p>Adds a new comment to the specified document version.</p>
4669    async fn create_comment(
4670        &self,
4671        input: CreateCommentRequest,
4672    ) -> Result<CreateCommentResponse, RusotoError<CreateCommentError>>;
4673
4674    /// <p>Adds one or more custom properties to the specified resource (a folder, document, or version).</p>
4675    async fn create_custom_metadata(
4676        &self,
4677        input: CreateCustomMetadataRequest,
4678    ) -> Result<CreateCustomMetadataResponse, RusotoError<CreateCustomMetadataError>>;
4679
4680    /// <p>Creates a folder with the specified name and parent folder.</p>
4681    async fn create_folder(
4682        &self,
4683        input: CreateFolderRequest,
4684    ) -> Result<CreateFolderResponse, RusotoError<CreateFolderError>>;
4685
4686    /// <p>Adds the specified list of labels to the given resource (a document or folder)</p>
4687    async fn create_labels(
4688        &self,
4689        input: CreateLabelsRequest,
4690    ) -> Result<CreateLabelsResponse, RusotoError<CreateLabelsError>>;
4691
4692    /// <p>Configure Amazon WorkDocs to use Amazon SNS notifications. The endpoint receives a confirmation message, and must confirm the subscription.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/workdocs/latest/developerguide/subscribe-notifications.html">Subscribe to Notifications</a> in the <i>Amazon WorkDocs Developer Guide</i>.</p>
4693    async fn create_notification_subscription(
4694        &self,
4695        input: CreateNotificationSubscriptionRequest,
4696    ) -> Result<
4697        CreateNotificationSubscriptionResponse,
4698        RusotoError<CreateNotificationSubscriptionError>,
4699    >;
4700
4701    /// <p>Creates a user in a Simple AD or Microsoft AD directory. The status of a newly created user is "ACTIVE". New users can access Amazon WorkDocs.</p>
4702    async fn create_user(
4703        &self,
4704        input: CreateUserRequest,
4705    ) -> Result<CreateUserResponse, RusotoError<CreateUserError>>;
4706
4707    /// <p>Deactivates the specified user, which revokes the user's access to Amazon WorkDocs.</p>
4708    async fn deactivate_user(
4709        &self,
4710        input: DeactivateUserRequest,
4711    ) -> Result<(), RusotoError<DeactivateUserError>>;
4712
4713    /// <p>Deletes the specified comment from the document version.</p>
4714    async fn delete_comment(
4715        &self,
4716        input: DeleteCommentRequest,
4717    ) -> Result<(), RusotoError<DeleteCommentError>>;
4718
4719    /// <p>Deletes custom metadata from the specified resource.</p>
4720    async fn delete_custom_metadata(
4721        &self,
4722        input: DeleteCustomMetadataRequest,
4723    ) -> Result<DeleteCustomMetadataResponse, RusotoError<DeleteCustomMetadataError>>;
4724
4725    /// <p>Permanently deletes the specified document and its associated metadata.</p>
4726    async fn delete_document(
4727        &self,
4728        input: DeleteDocumentRequest,
4729    ) -> Result<(), RusotoError<DeleteDocumentError>>;
4730
4731    /// <p>Permanently deletes the specified folder and its contents.</p>
4732    async fn delete_folder(
4733        &self,
4734        input: DeleteFolderRequest,
4735    ) -> Result<(), RusotoError<DeleteFolderError>>;
4736
4737    /// <p>Deletes the contents of the specified folder.</p>
4738    async fn delete_folder_contents(
4739        &self,
4740        input: DeleteFolderContentsRequest,
4741    ) -> Result<(), RusotoError<DeleteFolderContentsError>>;
4742
4743    /// <p>Deletes the specified list of labels from a resource.</p>
4744    async fn delete_labels(
4745        &self,
4746        input: DeleteLabelsRequest,
4747    ) -> Result<DeleteLabelsResponse, RusotoError<DeleteLabelsError>>;
4748
4749    /// <p>Deletes the specified subscription from the specified organization.</p>
4750    async fn delete_notification_subscription(
4751        &self,
4752        input: DeleteNotificationSubscriptionRequest,
4753    ) -> Result<(), RusotoError<DeleteNotificationSubscriptionError>>;
4754
4755    /// <p>Deletes the specified user from a Simple AD or Microsoft AD directory.</p>
4756    async fn delete_user(
4757        &self,
4758        input: DeleteUserRequest,
4759    ) -> Result<(), RusotoError<DeleteUserError>>;
4760
4761    /// <p>Describes the user activities in a specified time period.</p>
4762    async fn describe_activities(
4763        &self,
4764        input: DescribeActivitiesRequest,
4765    ) -> Result<DescribeActivitiesResponse, RusotoError<DescribeActivitiesError>>;
4766
4767    /// <p>List all the comments for the specified document version.</p>
4768    async fn describe_comments(
4769        &self,
4770        input: DescribeCommentsRequest,
4771    ) -> Result<DescribeCommentsResponse, RusotoError<DescribeCommentsError>>;
4772
4773    /// <p>Retrieves the document versions for the specified document.</p> <p>By default, only active versions are returned.</p>
4774    async fn describe_document_versions(
4775        &self,
4776        input: DescribeDocumentVersionsRequest,
4777    ) -> Result<DescribeDocumentVersionsResponse, RusotoError<DescribeDocumentVersionsError>>;
4778
4779    /// <p>Describes the contents of the specified folder, including its documents and subfolders.</p> <p>By default, Amazon WorkDocs returns the first 100 active document and folder metadata items. If there are more results, the response includes a marker that you can use to request the next set of results. You can also request initialized documents.</p>
4780    async fn describe_folder_contents(
4781        &self,
4782        input: DescribeFolderContentsRequest,
4783    ) -> Result<DescribeFolderContentsResponse, RusotoError<DescribeFolderContentsError>>;
4784
4785    /// <p>Describes the groups specified by the query. Groups are defined by the underlying Active Directory.</p>
4786    async fn describe_groups(
4787        &self,
4788        input: DescribeGroupsRequest,
4789    ) -> Result<DescribeGroupsResponse, RusotoError<DescribeGroupsError>>;
4790
4791    /// <p>Lists the specified notification subscriptions.</p>
4792    async fn describe_notification_subscriptions(
4793        &self,
4794        input: DescribeNotificationSubscriptionsRequest,
4795    ) -> Result<
4796        DescribeNotificationSubscriptionsResponse,
4797        RusotoError<DescribeNotificationSubscriptionsError>,
4798    >;
4799
4800    /// <p>Describes the permissions of a specified resource.</p>
4801    async fn describe_resource_permissions(
4802        &self,
4803        input: DescribeResourcePermissionsRequest,
4804    ) -> Result<DescribeResourcePermissionsResponse, RusotoError<DescribeResourcePermissionsError>>;
4805
4806    /// <p>Describes the current user's special folders; the <code>RootFolder</code> and the <code>RecycleBin</code>. <code>RootFolder</code> is the root of user's files and folders and <code>RecycleBin</code> is the root of recycled items. This is not a valid action for SigV4 (administrative API) clients.</p> <p>This action requires an authentication token. To get an authentication token, register an application with Amazon WorkDocs. For more information, see <a href="https://docs.aws.amazon.com/workdocs/latest/developerguide/wd-auth-user.html">Authentication and Access Control for User Applications</a> in the <i>Amazon WorkDocs Developer Guide</i>.</p>
4807    async fn describe_root_folders(
4808        &self,
4809        input: DescribeRootFoldersRequest,
4810    ) -> Result<DescribeRootFoldersResponse, RusotoError<DescribeRootFoldersError>>;
4811
4812    /// <p>Describes the specified users. You can describe all users or filter the results (for example, by status or organization).</p> <p>By default, Amazon WorkDocs returns the first 24 active or pending users. If there are more results, the response includes a marker that you can use to request the next set of results.</p>
4813    async fn describe_users(
4814        &self,
4815        input: DescribeUsersRequest,
4816    ) -> Result<DescribeUsersResponse, RusotoError<DescribeUsersError>>;
4817
4818    /// <p>Retrieves details of the current user for whom the authentication token was generated. This is not a valid action for SigV4 (administrative API) clients.</p> <p>This action requires an authentication token. To get an authentication token, register an application with Amazon WorkDocs. For more information, see <a href="https://docs.aws.amazon.com/workdocs/latest/developerguide/wd-auth-user.html">Authentication and Access Control for User Applications</a> in the <i>Amazon WorkDocs Developer Guide</i>.</p>
4819    async fn get_current_user(
4820        &self,
4821        input: GetCurrentUserRequest,
4822    ) -> Result<GetCurrentUserResponse, RusotoError<GetCurrentUserError>>;
4823
4824    /// <p>Retrieves details of a document.</p>
4825    async fn get_document(
4826        &self,
4827        input: GetDocumentRequest,
4828    ) -> Result<GetDocumentResponse, RusotoError<GetDocumentError>>;
4829
4830    /// <p>Retrieves the path information (the hierarchy from the root folder) for the requested document.</p> <p>By default, Amazon WorkDocs returns a maximum of 100 levels upwards from the requested document and only includes the IDs of the parent folders in the path. You can limit the maximum number of levels. You can also request the names of the parent folders.</p>
4831    async fn get_document_path(
4832        &self,
4833        input: GetDocumentPathRequest,
4834    ) -> Result<GetDocumentPathResponse, RusotoError<GetDocumentPathError>>;
4835
4836    /// <p>Retrieves version metadata for the specified document.</p>
4837    async fn get_document_version(
4838        &self,
4839        input: GetDocumentVersionRequest,
4840    ) -> Result<GetDocumentVersionResponse, RusotoError<GetDocumentVersionError>>;
4841
4842    /// <p>Retrieves the metadata of the specified folder.</p>
4843    async fn get_folder(
4844        &self,
4845        input: GetFolderRequest,
4846    ) -> Result<GetFolderResponse, RusotoError<GetFolderError>>;
4847
4848    /// <p>Retrieves the path information (the hierarchy from the root folder) for the specified folder.</p> <p>By default, Amazon WorkDocs returns a maximum of 100 levels upwards from the requested folder and only includes the IDs of the parent folders in the path. You can limit the maximum number of levels. You can also request the parent folder names.</p>
4849    async fn get_folder_path(
4850        &self,
4851        input: GetFolderPathRequest,
4852    ) -> Result<GetFolderPathResponse, RusotoError<GetFolderPathError>>;
4853
4854    /// <p>Retrieves a collection of resources, including folders and documents. The only <code>CollectionType</code> supported is <code>SHARED_WITH_ME</code>.</p>
4855    async fn get_resources(
4856        &self,
4857        input: GetResourcesRequest,
4858    ) -> Result<GetResourcesResponse, RusotoError<GetResourcesError>>;
4859
4860    /// <p>Creates a new document object and version object.</p> <p>The client specifies the parent folder ID and name of the document to upload. The ID is optionally specified when creating a new version of an existing document. This is the first step to upload a document. Next, upload the document to the URL returned from the call, and then call <a>UpdateDocumentVersion</a>.</p> <p>To cancel the document upload, call <a>AbortDocumentVersionUpload</a>.</p>
4861    async fn initiate_document_version_upload(
4862        &self,
4863        input: InitiateDocumentVersionUploadRequest,
4864    ) -> Result<
4865        InitiateDocumentVersionUploadResponse,
4866        RusotoError<InitiateDocumentVersionUploadError>,
4867    >;
4868
4869    /// <p>Removes all the permissions from the specified resource.</p>
4870    async fn remove_all_resource_permissions(
4871        &self,
4872        input: RemoveAllResourcePermissionsRequest,
4873    ) -> Result<(), RusotoError<RemoveAllResourcePermissionsError>>;
4874
4875    /// <p>Removes the permission for the specified principal from the specified resource.</p>
4876    async fn remove_resource_permission(
4877        &self,
4878        input: RemoveResourcePermissionRequest,
4879    ) -> Result<(), RusotoError<RemoveResourcePermissionError>>;
4880
4881    /// <p>Updates the specified attributes of a document. The user must have access to both the document and its parent folder, if applicable.</p>
4882    async fn update_document(
4883        &self,
4884        input: UpdateDocumentRequest,
4885    ) -> Result<(), RusotoError<UpdateDocumentError>>;
4886
4887    /// <p>Changes the status of the document version to ACTIVE. </p> <p>Amazon WorkDocs also sets its document container to ACTIVE. This is the last step in a document upload, after the client uploads the document to an S3-presigned URL returned by <a>InitiateDocumentVersionUpload</a>. </p>
4888    async fn update_document_version(
4889        &self,
4890        input: UpdateDocumentVersionRequest,
4891    ) -> Result<(), RusotoError<UpdateDocumentVersionError>>;
4892
4893    /// <p>Updates the specified attributes of the specified folder. The user must have access to both the folder and its parent folder, if applicable.</p>
4894    async fn update_folder(
4895        &self,
4896        input: UpdateFolderRequest,
4897    ) -> Result<(), RusotoError<UpdateFolderError>>;
4898
4899    /// <p>Updates the specified attributes of the specified user, and grants or revokes administrative privileges to the Amazon WorkDocs site.</p>
4900    async fn update_user(
4901        &self,
4902        input: UpdateUserRequest,
4903    ) -> Result<UpdateUserResponse, RusotoError<UpdateUserError>>;
4904}
4905/// A client for the Amazon WorkDocs API.
4906#[derive(Clone)]
4907pub struct WorkdocsClient {
4908    client: Client,
4909    region: region::Region,
4910}
4911
4912impl WorkdocsClient {
4913    /// Creates a client backed by the default tokio event loop.
4914    ///
4915    /// The client will use the default credentials provider and tls client.
4916    pub fn new(region: region::Region) -> WorkdocsClient {
4917        WorkdocsClient {
4918            client: Client::shared(),
4919            region,
4920        }
4921    }
4922
4923    pub fn new_with<P, D>(
4924        request_dispatcher: D,
4925        credentials_provider: P,
4926        region: region::Region,
4927    ) -> WorkdocsClient
4928    where
4929        P: ProvideAwsCredentials + Send + Sync + 'static,
4930        D: DispatchSignedRequest + Send + Sync + 'static,
4931    {
4932        WorkdocsClient {
4933            client: Client::new_with(credentials_provider, request_dispatcher),
4934            region,
4935        }
4936    }
4937
4938    pub fn new_with_client(client: Client, region: region::Region) -> WorkdocsClient {
4939        WorkdocsClient { client, region }
4940    }
4941}
4942
4943#[async_trait]
4944impl Workdocs for WorkdocsClient {
4945    /// <p>Aborts the upload of the specified document version that was previously initiated by <a>InitiateDocumentVersionUpload</a>. The client should make this call only when it no longer intends to upload the document version, or fails to do so.</p>
4946    #[allow(unused_mut)]
4947    async fn abort_document_version_upload(
4948        &self,
4949        input: AbortDocumentVersionUploadRequest,
4950    ) -> Result<(), RusotoError<AbortDocumentVersionUploadError>> {
4951        let request_uri = format!(
4952            "/api/v1/documents/{document_id}/versions/{version_id}",
4953            document_id = input.document_id,
4954            version_id = input.version_id
4955        );
4956
4957        let mut request = SignedRequest::new("DELETE", "workdocs", &self.region, &request_uri);
4958        request.set_content_type("application/x-amz-json-1.1".to_owned());
4959
4960        request.add_optional_header("Authentication", input.authentication_token.as_ref());
4961
4962        let mut response = self
4963            .client
4964            .sign_and_dispatch(request)
4965            .await
4966            .map_err(RusotoError::from)?;
4967        if response.status.as_u16() == 204 {
4968            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4969            let result = ::std::mem::drop(response);
4970
4971            Ok(result)
4972        } else {
4973            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
4974            Err(AbortDocumentVersionUploadError::from_response(response))
4975        }
4976    }
4977
4978    /// <p>Activates the specified user. Only active users can access Amazon WorkDocs.</p>
4979    #[allow(unused_mut)]
4980    async fn activate_user(
4981        &self,
4982        input: ActivateUserRequest,
4983    ) -> Result<ActivateUserResponse, RusotoError<ActivateUserError>> {
4984        let request_uri = format!(
4985            "/api/v1/users/{user_id}/activation",
4986            user_id = input.user_id
4987        );
4988
4989        let mut request = SignedRequest::new("POST", "workdocs", &self.region, &request_uri);
4990        request.set_content_type("application/x-amz-json-1.1".to_owned());
4991
4992        request.add_optional_header("Authentication", input.authentication_token.as_ref());
4993
4994        let mut response = self
4995            .client
4996            .sign_and_dispatch(request)
4997            .await
4998            .map_err(RusotoError::from)?;
4999        if response.status.as_u16() == 200 {
5000            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5001            let result = proto::json::ResponsePayload::new(&response)
5002                .deserialize::<ActivateUserResponse, _>()?;
5003
5004            Ok(result)
5005        } else {
5006            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5007            Err(ActivateUserError::from_response(response))
5008        }
5009    }
5010
5011    /// <p>Creates a set of permissions for the specified folder or document. The resource permissions are overwritten if the principals already have different permissions.</p>
5012    #[allow(unused_mut)]
5013    async fn add_resource_permissions(
5014        &self,
5015        input: AddResourcePermissionsRequest,
5016    ) -> Result<AddResourcePermissionsResponse, RusotoError<AddResourcePermissionsError>> {
5017        let request_uri = format!(
5018            "/api/v1/resources/{resource_id}/permissions",
5019            resource_id = input.resource_id
5020        );
5021
5022        let mut request = SignedRequest::new("POST", "workdocs", &self.region, &request_uri);
5023        request.set_content_type("application/x-amz-json-1.1".to_owned());
5024
5025        let encoded = Some(serde_json::to_vec(&input).unwrap());
5026        request.set_payload(encoded);
5027        request.add_optional_header("Authentication", input.authentication_token.as_ref());
5028
5029        let mut response = self
5030            .client
5031            .sign_and_dispatch(request)
5032            .await
5033            .map_err(RusotoError::from)?;
5034        if response.status.as_u16() == 201 {
5035            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5036            let result = proto::json::ResponsePayload::new(&response)
5037                .deserialize::<AddResourcePermissionsResponse, _>()?;
5038
5039            Ok(result)
5040        } else {
5041            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5042            Err(AddResourcePermissionsError::from_response(response))
5043        }
5044    }
5045
5046    /// <p>Adds a new comment to the specified document version.</p>
5047    #[allow(unused_mut)]
5048    async fn create_comment(
5049        &self,
5050        input: CreateCommentRequest,
5051    ) -> Result<CreateCommentResponse, RusotoError<CreateCommentError>> {
5052        let request_uri = format!(
5053            "/api/v1/documents/{document_id}/versions/{version_id}/comment",
5054            document_id = input.document_id,
5055            version_id = input.version_id
5056        );
5057
5058        let mut request = SignedRequest::new("POST", "workdocs", &self.region, &request_uri);
5059        request.set_content_type("application/x-amz-json-1.1".to_owned());
5060
5061        let encoded = Some(serde_json::to_vec(&input).unwrap());
5062        request.set_payload(encoded);
5063        request.add_optional_header("Authentication", input.authentication_token.as_ref());
5064
5065        let mut response = self
5066            .client
5067            .sign_and_dispatch(request)
5068            .await
5069            .map_err(RusotoError::from)?;
5070        if response.status.as_u16() == 201 {
5071            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5072            let result = proto::json::ResponsePayload::new(&response)
5073                .deserialize::<CreateCommentResponse, _>()?;
5074
5075            Ok(result)
5076        } else {
5077            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5078            Err(CreateCommentError::from_response(response))
5079        }
5080    }
5081
5082    /// <p>Adds one or more custom properties to the specified resource (a folder, document, or version).</p>
5083    #[allow(unused_mut)]
5084    async fn create_custom_metadata(
5085        &self,
5086        input: CreateCustomMetadataRequest,
5087    ) -> Result<CreateCustomMetadataResponse, RusotoError<CreateCustomMetadataError>> {
5088        let request_uri = format!(
5089            "/api/v1/resources/{resource_id}/customMetadata",
5090            resource_id = input.resource_id
5091        );
5092
5093        let mut request = SignedRequest::new("PUT", "workdocs", &self.region, &request_uri);
5094        request.set_content_type("application/x-amz-json-1.1".to_owned());
5095
5096        let encoded = Some(serde_json::to_vec(&input).unwrap());
5097        request.set_payload(encoded);
5098        request.add_optional_header("Authentication", input.authentication_token.as_ref());
5099        let mut params = Params::new();
5100        if let Some(ref x) = input.version_id {
5101            params.put("versionid", x);
5102        }
5103        request.set_params(params);
5104
5105        let mut response = self
5106            .client
5107            .sign_and_dispatch(request)
5108            .await
5109            .map_err(RusotoError::from)?;
5110        if response.status.as_u16() == 200 {
5111            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5112            let result = proto::json::ResponsePayload::new(&response)
5113                .deserialize::<CreateCustomMetadataResponse, _>()?;
5114
5115            Ok(result)
5116        } else {
5117            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5118            Err(CreateCustomMetadataError::from_response(response))
5119        }
5120    }
5121
5122    /// <p>Creates a folder with the specified name and parent folder.</p>
5123    #[allow(unused_mut)]
5124    async fn create_folder(
5125        &self,
5126        input: CreateFolderRequest,
5127    ) -> Result<CreateFolderResponse, RusotoError<CreateFolderError>> {
5128        let request_uri = "/api/v1/folders";
5129
5130        let mut request = SignedRequest::new("POST", "workdocs", &self.region, &request_uri);
5131        request.set_content_type("application/x-amz-json-1.1".to_owned());
5132
5133        let encoded = Some(serde_json::to_vec(&input).unwrap());
5134        request.set_payload(encoded);
5135        request.add_optional_header("Authentication", input.authentication_token.as_ref());
5136
5137        let mut response = self
5138            .client
5139            .sign_and_dispatch(request)
5140            .await
5141            .map_err(RusotoError::from)?;
5142        if response.status.as_u16() == 201 {
5143            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5144            let result = proto::json::ResponsePayload::new(&response)
5145                .deserialize::<CreateFolderResponse, _>()?;
5146
5147            Ok(result)
5148        } else {
5149            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5150            Err(CreateFolderError::from_response(response))
5151        }
5152    }
5153
5154    /// <p>Adds the specified list of labels to the given resource (a document or folder)</p>
5155    #[allow(unused_mut)]
5156    async fn create_labels(
5157        &self,
5158        input: CreateLabelsRequest,
5159    ) -> Result<CreateLabelsResponse, RusotoError<CreateLabelsError>> {
5160        let request_uri = format!(
5161            "/api/v1/resources/{resource_id}/labels",
5162            resource_id = input.resource_id
5163        );
5164
5165        let mut request = SignedRequest::new("PUT", "workdocs", &self.region, &request_uri);
5166        request.set_content_type("application/x-amz-json-1.1".to_owned());
5167
5168        let encoded = Some(serde_json::to_vec(&input).unwrap());
5169        request.set_payload(encoded);
5170        request.add_optional_header("Authentication", input.authentication_token.as_ref());
5171
5172        let mut response = self
5173            .client
5174            .sign_and_dispatch(request)
5175            .await
5176            .map_err(RusotoError::from)?;
5177        if response.status.as_u16() == 200 {
5178            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5179            let result = proto::json::ResponsePayload::new(&response)
5180                .deserialize::<CreateLabelsResponse, _>()?;
5181
5182            Ok(result)
5183        } else {
5184            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5185            Err(CreateLabelsError::from_response(response))
5186        }
5187    }
5188
5189    /// <p>Configure Amazon WorkDocs to use Amazon SNS notifications. The endpoint receives a confirmation message, and must confirm the subscription.</p> <p>For more information, see <a href="https://docs.aws.amazon.com/workdocs/latest/developerguide/subscribe-notifications.html">Subscribe to Notifications</a> in the <i>Amazon WorkDocs Developer Guide</i>.</p>
5190    #[allow(unused_mut)]
5191    async fn create_notification_subscription(
5192        &self,
5193        input: CreateNotificationSubscriptionRequest,
5194    ) -> Result<
5195        CreateNotificationSubscriptionResponse,
5196        RusotoError<CreateNotificationSubscriptionError>,
5197    > {
5198        let request_uri = format!(
5199            "/api/v1/organizations/{organization_id}/subscriptions",
5200            organization_id = input.organization_id
5201        );
5202
5203        let mut request = SignedRequest::new("POST", "workdocs", &self.region, &request_uri);
5204        request.set_content_type("application/x-amz-json-1.1".to_owned());
5205
5206        let encoded = Some(serde_json::to_vec(&input).unwrap());
5207        request.set_payload(encoded);
5208
5209        let mut response = self
5210            .client
5211            .sign_and_dispatch(request)
5212            .await
5213            .map_err(RusotoError::from)?;
5214        if response.status.as_u16() == 200 {
5215            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5216            let result = proto::json::ResponsePayload::new(&response)
5217                .deserialize::<CreateNotificationSubscriptionResponse, _>()?;
5218
5219            Ok(result)
5220        } else {
5221            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5222            Err(CreateNotificationSubscriptionError::from_response(response))
5223        }
5224    }
5225
5226    /// <p>Creates a user in a Simple AD or Microsoft AD directory. The status of a newly created user is "ACTIVE". New users can access Amazon WorkDocs.</p>
5227    #[allow(unused_mut)]
5228    async fn create_user(
5229        &self,
5230        input: CreateUserRequest,
5231    ) -> Result<CreateUserResponse, RusotoError<CreateUserError>> {
5232        let request_uri = "/api/v1/users";
5233
5234        let mut request = SignedRequest::new("POST", "workdocs", &self.region, &request_uri);
5235        request.set_content_type("application/x-amz-json-1.1".to_owned());
5236
5237        let encoded = Some(serde_json::to_vec(&input).unwrap());
5238        request.set_payload(encoded);
5239        request.add_optional_header("Authentication", input.authentication_token.as_ref());
5240
5241        let mut response = self
5242            .client
5243            .sign_and_dispatch(request)
5244            .await
5245            .map_err(RusotoError::from)?;
5246        if response.status.as_u16() == 201 {
5247            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5248            let result = proto::json::ResponsePayload::new(&response)
5249                .deserialize::<CreateUserResponse, _>()?;
5250
5251            Ok(result)
5252        } else {
5253            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5254            Err(CreateUserError::from_response(response))
5255        }
5256    }
5257
5258    /// <p>Deactivates the specified user, which revokes the user's access to Amazon WorkDocs.</p>
5259    #[allow(unused_mut)]
5260    async fn deactivate_user(
5261        &self,
5262        input: DeactivateUserRequest,
5263    ) -> Result<(), RusotoError<DeactivateUserError>> {
5264        let request_uri = format!(
5265            "/api/v1/users/{user_id}/activation",
5266            user_id = input.user_id
5267        );
5268
5269        let mut request = SignedRequest::new("DELETE", "workdocs", &self.region, &request_uri);
5270        request.set_content_type("application/x-amz-json-1.1".to_owned());
5271
5272        request.add_optional_header("Authentication", input.authentication_token.as_ref());
5273
5274        let mut response = self
5275            .client
5276            .sign_and_dispatch(request)
5277            .await
5278            .map_err(RusotoError::from)?;
5279        if response.status.as_u16() == 204 {
5280            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5281            let result = ::std::mem::drop(response);
5282
5283            Ok(result)
5284        } else {
5285            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5286            Err(DeactivateUserError::from_response(response))
5287        }
5288    }
5289
5290    /// <p>Deletes the specified comment from the document version.</p>
5291    #[allow(unused_mut)]
5292    async fn delete_comment(
5293        &self,
5294        input: DeleteCommentRequest,
5295    ) -> Result<(), RusotoError<DeleteCommentError>> {
5296        let request_uri = format!(
5297            "/api/v1/documents/{document_id}/versions/{version_id}/comment/{comment_id}",
5298            comment_id = input.comment_id,
5299            document_id = input.document_id,
5300            version_id = input.version_id
5301        );
5302
5303        let mut request = SignedRequest::new("DELETE", "workdocs", &self.region, &request_uri);
5304        request.set_content_type("application/x-amz-json-1.1".to_owned());
5305
5306        request.add_optional_header("Authentication", input.authentication_token.as_ref());
5307
5308        let mut response = self
5309            .client
5310            .sign_and_dispatch(request)
5311            .await
5312            .map_err(RusotoError::from)?;
5313        if response.status.as_u16() == 204 {
5314            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5315            let result = ::std::mem::drop(response);
5316
5317            Ok(result)
5318        } else {
5319            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5320            Err(DeleteCommentError::from_response(response))
5321        }
5322    }
5323
5324    /// <p>Deletes custom metadata from the specified resource.</p>
5325    #[allow(unused_mut)]
5326    async fn delete_custom_metadata(
5327        &self,
5328        input: DeleteCustomMetadataRequest,
5329    ) -> Result<DeleteCustomMetadataResponse, RusotoError<DeleteCustomMetadataError>> {
5330        let request_uri = format!(
5331            "/api/v1/resources/{resource_id}/customMetadata",
5332            resource_id = input.resource_id
5333        );
5334
5335        let mut request = SignedRequest::new("DELETE", "workdocs", &self.region, &request_uri);
5336        request.set_content_type("application/x-amz-json-1.1".to_owned());
5337
5338        request.add_optional_header("Authentication", input.authentication_token.as_ref());
5339        let mut params = Params::new();
5340        if let Some(ref x) = input.delete_all {
5341            params.put("deleteAll", x);
5342        }
5343        if let Some(ref x) = input.keys {
5344            for item in x.iter() {
5345                params.put("keys", item);
5346            }
5347        }
5348        if let Some(ref x) = input.version_id {
5349            params.put("versionId", x);
5350        }
5351        request.set_params(params);
5352
5353        let mut response = self
5354            .client
5355            .sign_and_dispatch(request)
5356            .await
5357            .map_err(RusotoError::from)?;
5358        if response.status.as_u16() == 200 {
5359            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5360            let result = proto::json::ResponsePayload::new(&response)
5361                .deserialize::<DeleteCustomMetadataResponse, _>()?;
5362
5363            Ok(result)
5364        } else {
5365            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5366            Err(DeleteCustomMetadataError::from_response(response))
5367        }
5368    }
5369
5370    /// <p>Permanently deletes the specified document and its associated metadata.</p>
5371    #[allow(unused_mut)]
5372    async fn delete_document(
5373        &self,
5374        input: DeleteDocumentRequest,
5375    ) -> Result<(), RusotoError<DeleteDocumentError>> {
5376        let request_uri = format!(
5377            "/api/v1/documents/{document_id}",
5378            document_id = input.document_id
5379        );
5380
5381        let mut request = SignedRequest::new("DELETE", "workdocs", &self.region, &request_uri);
5382        request.set_content_type("application/x-amz-json-1.1".to_owned());
5383
5384        request.add_optional_header("Authentication", input.authentication_token.as_ref());
5385
5386        let mut response = self
5387            .client
5388            .sign_and_dispatch(request)
5389            .await
5390            .map_err(RusotoError::from)?;
5391        if response.status.as_u16() == 204 {
5392            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5393            let result = ::std::mem::drop(response);
5394
5395            Ok(result)
5396        } else {
5397            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5398            Err(DeleteDocumentError::from_response(response))
5399        }
5400    }
5401
5402    /// <p>Permanently deletes the specified folder and its contents.</p>
5403    #[allow(unused_mut)]
5404    async fn delete_folder(
5405        &self,
5406        input: DeleteFolderRequest,
5407    ) -> Result<(), RusotoError<DeleteFolderError>> {
5408        let request_uri = format!("/api/v1/folders/{folder_id}", folder_id = input.folder_id);
5409
5410        let mut request = SignedRequest::new("DELETE", "workdocs", &self.region, &request_uri);
5411        request.set_content_type("application/x-amz-json-1.1".to_owned());
5412
5413        request.add_optional_header("Authentication", input.authentication_token.as_ref());
5414
5415        let mut response = self
5416            .client
5417            .sign_and_dispatch(request)
5418            .await
5419            .map_err(RusotoError::from)?;
5420        if response.status.as_u16() == 204 {
5421            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5422            let result = ::std::mem::drop(response);
5423
5424            Ok(result)
5425        } else {
5426            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5427            Err(DeleteFolderError::from_response(response))
5428        }
5429    }
5430
5431    /// <p>Deletes the contents of the specified folder.</p>
5432    #[allow(unused_mut)]
5433    async fn delete_folder_contents(
5434        &self,
5435        input: DeleteFolderContentsRequest,
5436    ) -> Result<(), RusotoError<DeleteFolderContentsError>> {
5437        let request_uri = format!(
5438            "/api/v1/folders/{folder_id}/contents",
5439            folder_id = input.folder_id
5440        );
5441
5442        let mut request = SignedRequest::new("DELETE", "workdocs", &self.region, &request_uri);
5443        request.set_content_type("application/x-amz-json-1.1".to_owned());
5444
5445        request.add_optional_header("Authentication", input.authentication_token.as_ref());
5446
5447        let mut response = self
5448            .client
5449            .sign_and_dispatch(request)
5450            .await
5451            .map_err(RusotoError::from)?;
5452        if response.status.as_u16() == 204 {
5453            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5454            let result = ::std::mem::drop(response);
5455
5456            Ok(result)
5457        } else {
5458            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5459            Err(DeleteFolderContentsError::from_response(response))
5460        }
5461    }
5462
5463    /// <p>Deletes the specified list of labels from a resource.</p>
5464    #[allow(unused_mut)]
5465    async fn delete_labels(
5466        &self,
5467        input: DeleteLabelsRequest,
5468    ) -> Result<DeleteLabelsResponse, RusotoError<DeleteLabelsError>> {
5469        let request_uri = format!(
5470            "/api/v1/resources/{resource_id}/labels",
5471            resource_id = input.resource_id
5472        );
5473
5474        let mut request = SignedRequest::new("DELETE", "workdocs", &self.region, &request_uri);
5475        request.set_content_type("application/x-amz-json-1.1".to_owned());
5476
5477        request.add_optional_header("Authentication", input.authentication_token.as_ref());
5478        let mut params = Params::new();
5479        if let Some(ref x) = input.delete_all {
5480            params.put("deleteAll", x);
5481        }
5482        if let Some(ref x) = input.labels {
5483            for item in x.iter() {
5484                params.put("labels", item);
5485            }
5486        }
5487        request.set_params(params);
5488
5489        let mut response = self
5490            .client
5491            .sign_and_dispatch(request)
5492            .await
5493            .map_err(RusotoError::from)?;
5494        if response.status.as_u16() == 200 {
5495            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5496            let result = proto::json::ResponsePayload::new(&response)
5497                .deserialize::<DeleteLabelsResponse, _>()?;
5498
5499            Ok(result)
5500        } else {
5501            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5502            Err(DeleteLabelsError::from_response(response))
5503        }
5504    }
5505
5506    /// <p>Deletes the specified subscription from the specified organization.</p>
5507    #[allow(unused_mut)]
5508    async fn delete_notification_subscription(
5509        &self,
5510        input: DeleteNotificationSubscriptionRequest,
5511    ) -> Result<(), RusotoError<DeleteNotificationSubscriptionError>> {
5512        let request_uri = format!(
5513            "/api/v1/organizations/{organization_id}/subscriptions/{subscription_id}",
5514            organization_id = input.organization_id,
5515            subscription_id = input.subscription_id
5516        );
5517
5518        let mut request = SignedRequest::new("DELETE", "workdocs", &self.region, &request_uri);
5519        request.set_content_type("application/x-amz-json-1.1".to_owned());
5520
5521        let mut response = self
5522            .client
5523            .sign_and_dispatch(request)
5524            .await
5525            .map_err(RusotoError::from)?;
5526        if response.status.as_u16() == 200 {
5527            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5528            let result = ::std::mem::drop(response);
5529
5530            Ok(result)
5531        } else {
5532            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5533            Err(DeleteNotificationSubscriptionError::from_response(response))
5534        }
5535    }
5536
5537    /// <p>Deletes the specified user from a Simple AD or Microsoft AD directory.</p>
5538    #[allow(unused_mut)]
5539    async fn delete_user(
5540        &self,
5541        input: DeleteUserRequest,
5542    ) -> Result<(), RusotoError<DeleteUserError>> {
5543        let request_uri = format!("/api/v1/users/{user_id}", user_id = input.user_id);
5544
5545        let mut request = SignedRequest::new("DELETE", "workdocs", &self.region, &request_uri);
5546        request.set_content_type("application/x-amz-json-1.1".to_owned());
5547
5548        request.add_optional_header("Authentication", input.authentication_token.as_ref());
5549
5550        let mut response = self
5551            .client
5552            .sign_and_dispatch(request)
5553            .await
5554            .map_err(RusotoError::from)?;
5555        if response.status.as_u16() == 204 {
5556            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5557            let result = ::std::mem::drop(response);
5558
5559            Ok(result)
5560        } else {
5561            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5562            Err(DeleteUserError::from_response(response))
5563        }
5564    }
5565
5566    /// <p>Describes the user activities in a specified time period.</p>
5567    #[allow(unused_mut)]
5568    async fn describe_activities(
5569        &self,
5570        input: DescribeActivitiesRequest,
5571    ) -> Result<DescribeActivitiesResponse, RusotoError<DescribeActivitiesError>> {
5572        let request_uri = "/api/v1/activities";
5573
5574        let mut request = SignedRequest::new("GET", "workdocs", &self.region, &request_uri);
5575        request.set_content_type("application/x-amz-json-1.1".to_owned());
5576
5577        request.add_optional_header("Authentication", input.authentication_token.as_ref());
5578        let mut params = Params::new();
5579        if let Some(ref x) = input.activity_types {
5580            params.put("activityTypes", x);
5581        }
5582        if let Some(ref x) = input.end_time {
5583            params.put("endTime", x);
5584        }
5585        if let Some(ref x) = input.include_indirect_activities {
5586            params.put("includeIndirectActivities", x);
5587        }
5588        if let Some(ref x) = input.limit {
5589            params.put("limit", x);
5590        }
5591        if let Some(ref x) = input.marker {
5592            params.put("marker", x);
5593        }
5594        if let Some(ref x) = input.organization_id {
5595            params.put("organizationId", x);
5596        }
5597        if let Some(ref x) = input.resource_id {
5598            params.put("resourceId", x);
5599        }
5600        if let Some(ref x) = input.start_time {
5601            params.put("startTime", x);
5602        }
5603        if let Some(ref x) = input.user_id {
5604            params.put("userId", x);
5605        }
5606        request.set_params(params);
5607
5608        let mut response = self
5609            .client
5610            .sign_and_dispatch(request)
5611            .await
5612            .map_err(RusotoError::from)?;
5613        if response.status.as_u16() == 200 {
5614            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5615            let result = proto::json::ResponsePayload::new(&response)
5616                .deserialize::<DescribeActivitiesResponse, _>()?;
5617
5618            Ok(result)
5619        } else {
5620            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5621            Err(DescribeActivitiesError::from_response(response))
5622        }
5623    }
5624
5625    /// <p>List all the comments for the specified document version.</p>
5626    #[allow(unused_mut)]
5627    async fn describe_comments(
5628        &self,
5629        input: DescribeCommentsRequest,
5630    ) -> Result<DescribeCommentsResponse, RusotoError<DescribeCommentsError>> {
5631        let request_uri = format!(
5632            "/api/v1/documents/{document_id}/versions/{version_id}/comments",
5633            document_id = input.document_id,
5634            version_id = input.version_id
5635        );
5636
5637        let mut request = SignedRequest::new("GET", "workdocs", &self.region, &request_uri);
5638        request.set_content_type("application/x-amz-json-1.1".to_owned());
5639
5640        request.add_optional_header("Authentication", input.authentication_token.as_ref());
5641        let mut params = Params::new();
5642        if let Some(ref x) = input.limit {
5643            params.put("limit", x);
5644        }
5645        if let Some(ref x) = input.marker {
5646            params.put("marker", x);
5647        }
5648        request.set_params(params);
5649
5650        let mut response = self
5651            .client
5652            .sign_and_dispatch(request)
5653            .await
5654            .map_err(RusotoError::from)?;
5655        if response.status.as_u16() == 200 {
5656            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5657            let result = proto::json::ResponsePayload::new(&response)
5658                .deserialize::<DescribeCommentsResponse, _>()?;
5659
5660            Ok(result)
5661        } else {
5662            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5663            Err(DescribeCommentsError::from_response(response))
5664        }
5665    }
5666
5667    /// <p>Retrieves the document versions for the specified document.</p> <p>By default, only active versions are returned.</p>
5668    #[allow(unused_mut)]
5669    async fn describe_document_versions(
5670        &self,
5671        input: DescribeDocumentVersionsRequest,
5672    ) -> Result<DescribeDocumentVersionsResponse, RusotoError<DescribeDocumentVersionsError>> {
5673        let request_uri = format!(
5674            "/api/v1/documents/{document_id}/versions",
5675            document_id = input.document_id
5676        );
5677
5678        let mut request = SignedRequest::new("GET", "workdocs", &self.region, &request_uri);
5679        request.set_content_type("application/x-amz-json-1.1".to_owned());
5680
5681        request.add_optional_header("Authentication", input.authentication_token.as_ref());
5682        let mut params = Params::new();
5683        if let Some(ref x) = input.fields {
5684            params.put("fields", x);
5685        }
5686        if let Some(ref x) = input.include {
5687            params.put("include", x);
5688        }
5689        if let Some(ref x) = input.limit {
5690            params.put("limit", x);
5691        }
5692        if let Some(ref x) = input.marker {
5693            params.put("marker", x);
5694        }
5695        request.set_params(params);
5696
5697        let mut response = self
5698            .client
5699            .sign_and_dispatch(request)
5700            .await
5701            .map_err(RusotoError::from)?;
5702        if response.status.as_u16() == 200 {
5703            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5704            let result = proto::json::ResponsePayload::new(&response)
5705                .deserialize::<DescribeDocumentVersionsResponse, _>()?;
5706
5707            Ok(result)
5708        } else {
5709            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5710            Err(DescribeDocumentVersionsError::from_response(response))
5711        }
5712    }
5713
5714    /// <p>Describes the contents of the specified folder, including its documents and subfolders.</p> <p>By default, Amazon WorkDocs returns the first 100 active document and folder metadata items. If there are more results, the response includes a marker that you can use to request the next set of results. You can also request initialized documents.</p>
5715    #[allow(unused_mut)]
5716    async fn describe_folder_contents(
5717        &self,
5718        input: DescribeFolderContentsRequest,
5719    ) -> Result<DescribeFolderContentsResponse, RusotoError<DescribeFolderContentsError>> {
5720        let request_uri = format!(
5721            "/api/v1/folders/{folder_id}/contents",
5722            folder_id = input.folder_id
5723        );
5724
5725        let mut request = SignedRequest::new("GET", "workdocs", &self.region, &request_uri);
5726        request.set_content_type("application/x-amz-json-1.1".to_owned());
5727
5728        request.add_optional_header("Authentication", input.authentication_token.as_ref());
5729        let mut params = Params::new();
5730        if let Some(ref x) = input.include {
5731            params.put("include", x);
5732        }
5733        if let Some(ref x) = input.limit {
5734            params.put("limit", x);
5735        }
5736        if let Some(ref x) = input.marker {
5737            params.put("marker", x);
5738        }
5739        if let Some(ref x) = input.order {
5740            params.put("order", x);
5741        }
5742        if let Some(ref x) = input.sort {
5743            params.put("sort", x);
5744        }
5745        if let Some(ref x) = input.type_ {
5746            params.put("type", x);
5747        }
5748        request.set_params(params);
5749
5750        let mut response = self
5751            .client
5752            .sign_and_dispatch(request)
5753            .await
5754            .map_err(RusotoError::from)?;
5755        if response.status.as_u16() == 200 {
5756            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5757            let result = proto::json::ResponsePayload::new(&response)
5758                .deserialize::<DescribeFolderContentsResponse, _>()?;
5759
5760            Ok(result)
5761        } else {
5762            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5763            Err(DescribeFolderContentsError::from_response(response))
5764        }
5765    }
5766
5767    /// <p>Describes the groups specified by the query. Groups are defined by the underlying Active Directory.</p>
5768    #[allow(unused_mut)]
5769    async fn describe_groups(
5770        &self,
5771        input: DescribeGroupsRequest,
5772    ) -> Result<DescribeGroupsResponse, RusotoError<DescribeGroupsError>> {
5773        let request_uri = "/api/v1/groups";
5774
5775        let mut request = SignedRequest::new("GET", "workdocs", &self.region, &request_uri);
5776        request.set_content_type("application/x-amz-json-1.1".to_owned());
5777
5778        request.add_optional_header("Authentication", input.authentication_token.as_ref());
5779        let mut params = Params::new();
5780        if let Some(ref x) = input.limit {
5781            params.put("limit", x);
5782        }
5783        if let Some(ref x) = input.marker {
5784            params.put("marker", x);
5785        }
5786        if let Some(ref x) = input.organization_id {
5787            params.put("organizationId", x);
5788        }
5789        params.put("searchQuery", &input.search_query);
5790        request.set_params(params);
5791
5792        let mut response = self
5793            .client
5794            .sign_and_dispatch(request)
5795            .await
5796            .map_err(RusotoError::from)?;
5797        if response.status.as_u16() == 200 {
5798            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5799            let result = proto::json::ResponsePayload::new(&response)
5800                .deserialize::<DescribeGroupsResponse, _>()?;
5801
5802            Ok(result)
5803        } else {
5804            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5805            Err(DescribeGroupsError::from_response(response))
5806        }
5807    }
5808
5809    /// <p>Lists the specified notification subscriptions.</p>
5810    #[allow(unused_mut)]
5811    async fn describe_notification_subscriptions(
5812        &self,
5813        input: DescribeNotificationSubscriptionsRequest,
5814    ) -> Result<
5815        DescribeNotificationSubscriptionsResponse,
5816        RusotoError<DescribeNotificationSubscriptionsError>,
5817    > {
5818        let request_uri = format!(
5819            "/api/v1/organizations/{organization_id}/subscriptions",
5820            organization_id = input.organization_id
5821        );
5822
5823        let mut request = SignedRequest::new("GET", "workdocs", &self.region, &request_uri);
5824        request.set_content_type("application/x-amz-json-1.1".to_owned());
5825
5826        let mut params = Params::new();
5827        if let Some(ref x) = input.limit {
5828            params.put("limit", x);
5829        }
5830        if let Some(ref x) = input.marker {
5831            params.put("marker", x);
5832        }
5833        request.set_params(params);
5834
5835        let mut response = self
5836            .client
5837            .sign_and_dispatch(request)
5838            .await
5839            .map_err(RusotoError::from)?;
5840        if response.status.as_u16() == 200 {
5841            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5842            let result = proto::json::ResponsePayload::new(&response)
5843                .deserialize::<DescribeNotificationSubscriptionsResponse, _>()?;
5844
5845            Ok(result)
5846        } else {
5847            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5848            Err(DescribeNotificationSubscriptionsError::from_response(
5849                response,
5850            ))
5851        }
5852    }
5853
5854    /// <p>Describes the permissions of a specified resource.</p>
5855    #[allow(unused_mut)]
5856    async fn describe_resource_permissions(
5857        &self,
5858        input: DescribeResourcePermissionsRequest,
5859    ) -> Result<DescribeResourcePermissionsResponse, RusotoError<DescribeResourcePermissionsError>>
5860    {
5861        let request_uri = format!(
5862            "/api/v1/resources/{resource_id}/permissions",
5863            resource_id = input.resource_id
5864        );
5865
5866        let mut request = SignedRequest::new("GET", "workdocs", &self.region, &request_uri);
5867        request.set_content_type("application/x-amz-json-1.1".to_owned());
5868
5869        request.add_optional_header("Authentication", input.authentication_token.as_ref());
5870        let mut params = Params::new();
5871        if let Some(ref x) = input.limit {
5872            params.put("limit", x);
5873        }
5874        if let Some(ref x) = input.marker {
5875            params.put("marker", x);
5876        }
5877        if let Some(ref x) = input.principal_id {
5878            params.put("principalId", x);
5879        }
5880        request.set_params(params);
5881
5882        let mut response = self
5883            .client
5884            .sign_and_dispatch(request)
5885            .await
5886            .map_err(RusotoError::from)?;
5887        if response.status.as_u16() == 200 {
5888            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5889            let result = proto::json::ResponsePayload::new(&response)
5890                .deserialize::<DescribeResourcePermissionsResponse, _>()?;
5891
5892            Ok(result)
5893        } else {
5894            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5895            Err(DescribeResourcePermissionsError::from_response(response))
5896        }
5897    }
5898
5899    /// <p>Describes the current user's special folders; the <code>RootFolder</code> and the <code>RecycleBin</code>. <code>RootFolder</code> is the root of user's files and folders and <code>RecycleBin</code> is the root of recycled items. This is not a valid action for SigV4 (administrative API) clients.</p> <p>This action requires an authentication token. To get an authentication token, register an application with Amazon WorkDocs. For more information, see <a href="https://docs.aws.amazon.com/workdocs/latest/developerguide/wd-auth-user.html">Authentication and Access Control for User Applications</a> in the <i>Amazon WorkDocs Developer Guide</i>.</p>
5900    #[allow(unused_mut)]
5901    async fn describe_root_folders(
5902        &self,
5903        input: DescribeRootFoldersRequest,
5904    ) -> Result<DescribeRootFoldersResponse, RusotoError<DescribeRootFoldersError>> {
5905        let request_uri = "/api/v1/me/root";
5906
5907        let mut request = SignedRequest::new("GET", "workdocs", &self.region, &request_uri);
5908        request.set_content_type("application/x-amz-json-1.1".to_owned());
5909
5910        request.add_header("Authentication", &input.authentication_token.to_string());
5911        let mut params = Params::new();
5912        if let Some(ref x) = input.limit {
5913            params.put("limit", x);
5914        }
5915        if let Some(ref x) = input.marker {
5916            params.put("marker", x);
5917        }
5918        request.set_params(params);
5919
5920        let mut response = self
5921            .client
5922            .sign_and_dispatch(request)
5923            .await
5924            .map_err(RusotoError::from)?;
5925        if response.status.as_u16() == 200 {
5926            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5927            let result = proto::json::ResponsePayload::new(&response)
5928                .deserialize::<DescribeRootFoldersResponse, _>()?;
5929
5930            Ok(result)
5931        } else {
5932            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5933            Err(DescribeRootFoldersError::from_response(response))
5934        }
5935    }
5936
5937    /// <p>Describes the specified users. You can describe all users or filter the results (for example, by status or organization).</p> <p>By default, Amazon WorkDocs returns the first 24 active or pending users. If there are more results, the response includes a marker that you can use to request the next set of results.</p>
5938    #[allow(unused_mut)]
5939    async fn describe_users(
5940        &self,
5941        input: DescribeUsersRequest,
5942    ) -> Result<DescribeUsersResponse, RusotoError<DescribeUsersError>> {
5943        let request_uri = "/api/v1/users";
5944
5945        let mut request = SignedRequest::new("GET", "workdocs", &self.region, &request_uri);
5946        request.set_content_type("application/x-amz-json-1.1".to_owned());
5947
5948        request.add_optional_header("Authentication", input.authentication_token.as_ref());
5949        let mut params = Params::new();
5950        if let Some(ref x) = input.fields {
5951            params.put("fields", x);
5952        }
5953        if let Some(ref x) = input.include {
5954            params.put("include", x);
5955        }
5956        if let Some(ref x) = input.limit {
5957            params.put("limit", x);
5958        }
5959        if let Some(ref x) = input.marker {
5960            params.put("marker", x);
5961        }
5962        if let Some(ref x) = input.order {
5963            params.put("order", x);
5964        }
5965        if let Some(ref x) = input.organization_id {
5966            params.put("organizationId", x);
5967        }
5968        if let Some(ref x) = input.query {
5969            params.put("query", x);
5970        }
5971        if let Some(ref x) = input.sort {
5972            params.put("sort", x);
5973        }
5974        if let Some(ref x) = input.user_ids {
5975            params.put("userIds", x);
5976        }
5977        request.set_params(params);
5978
5979        let mut response = self
5980            .client
5981            .sign_and_dispatch(request)
5982            .await
5983            .map_err(RusotoError::from)?;
5984        if response.status.as_u16() == 200 {
5985            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5986            let result = proto::json::ResponsePayload::new(&response)
5987                .deserialize::<DescribeUsersResponse, _>()?;
5988
5989            Ok(result)
5990        } else {
5991            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
5992            Err(DescribeUsersError::from_response(response))
5993        }
5994    }
5995
5996    /// <p>Retrieves details of the current user for whom the authentication token was generated. This is not a valid action for SigV4 (administrative API) clients.</p> <p>This action requires an authentication token. To get an authentication token, register an application with Amazon WorkDocs. For more information, see <a href="https://docs.aws.amazon.com/workdocs/latest/developerguide/wd-auth-user.html">Authentication and Access Control for User Applications</a> in the <i>Amazon WorkDocs Developer Guide</i>.</p>
5997    #[allow(unused_mut)]
5998    async fn get_current_user(
5999        &self,
6000        input: GetCurrentUserRequest,
6001    ) -> Result<GetCurrentUserResponse, RusotoError<GetCurrentUserError>> {
6002        let request_uri = "/api/v1/me";
6003
6004        let mut request = SignedRequest::new("GET", "workdocs", &self.region, &request_uri);
6005        request.set_content_type("application/x-amz-json-1.1".to_owned());
6006
6007        request.add_header("Authentication", &input.authentication_token.to_string());
6008
6009        let mut response = self
6010            .client
6011            .sign_and_dispatch(request)
6012            .await
6013            .map_err(RusotoError::from)?;
6014        if response.status.as_u16() == 200 {
6015            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6016            let result = proto::json::ResponsePayload::new(&response)
6017                .deserialize::<GetCurrentUserResponse, _>()?;
6018
6019            Ok(result)
6020        } else {
6021            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6022            Err(GetCurrentUserError::from_response(response))
6023        }
6024    }
6025
6026    /// <p>Retrieves details of a document.</p>
6027    #[allow(unused_mut)]
6028    async fn get_document(
6029        &self,
6030        input: GetDocumentRequest,
6031    ) -> Result<GetDocumentResponse, RusotoError<GetDocumentError>> {
6032        let request_uri = format!(
6033            "/api/v1/documents/{document_id}",
6034            document_id = input.document_id
6035        );
6036
6037        let mut request = SignedRequest::new("GET", "workdocs", &self.region, &request_uri);
6038        request.set_content_type("application/x-amz-json-1.1".to_owned());
6039
6040        request.add_optional_header("Authentication", input.authentication_token.as_ref());
6041        let mut params = Params::new();
6042        if let Some(ref x) = input.include_custom_metadata {
6043            params.put("includeCustomMetadata", x);
6044        }
6045        request.set_params(params);
6046
6047        let mut response = self
6048            .client
6049            .sign_and_dispatch(request)
6050            .await
6051            .map_err(RusotoError::from)?;
6052        if response.status.as_u16() == 200 {
6053            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6054            let result = proto::json::ResponsePayload::new(&response)
6055                .deserialize::<GetDocumentResponse, _>()?;
6056
6057            Ok(result)
6058        } else {
6059            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6060            Err(GetDocumentError::from_response(response))
6061        }
6062    }
6063
6064    /// <p>Retrieves the path information (the hierarchy from the root folder) for the requested document.</p> <p>By default, Amazon WorkDocs returns a maximum of 100 levels upwards from the requested document and only includes the IDs of the parent folders in the path. You can limit the maximum number of levels. You can also request the names of the parent folders.</p>
6065    #[allow(unused_mut)]
6066    async fn get_document_path(
6067        &self,
6068        input: GetDocumentPathRequest,
6069    ) -> Result<GetDocumentPathResponse, RusotoError<GetDocumentPathError>> {
6070        let request_uri = format!(
6071            "/api/v1/documents/{document_id}/path",
6072            document_id = input.document_id
6073        );
6074
6075        let mut request = SignedRequest::new("GET", "workdocs", &self.region, &request_uri);
6076        request.set_content_type("application/x-amz-json-1.1".to_owned());
6077
6078        request.add_optional_header("Authentication", input.authentication_token.as_ref());
6079        let mut params = Params::new();
6080        if let Some(ref x) = input.fields {
6081            params.put("fields", x);
6082        }
6083        if let Some(ref x) = input.limit {
6084            params.put("limit", x);
6085        }
6086        if let Some(ref x) = input.marker {
6087            params.put("marker", x);
6088        }
6089        request.set_params(params);
6090
6091        let mut response = self
6092            .client
6093            .sign_and_dispatch(request)
6094            .await
6095            .map_err(RusotoError::from)?;
6096        if response.status.as_u16() == 200 {
6097            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6098            let result = proto::json::ResponsePayload::new(&response)
6099                .deserialize::<GetDocumentPathResponse, _>()?;
6100
6101            Ok(result)
6102        } else {
6103            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6104            Err(GetDocumentPathError::from_response(response))
6105        }
6106    }
6107
6108    /// <p>Retrieves version metadata for the specified document.</p>
6109    #[allow(unused_mut)]
6110    async fn get_document_version(
6111        &self,
6112        input: GetDocumentVersionRequest,
6113    ) -> Result<GetDocumentVersionResponse, RusotoError<GetDocumentVersionError>> {
6114        let request_uri = format!(
6115            "/api/v1/documents/{document_id}/versions/{version_id}",
6116            document_id = input.document_id,
6117            version_id = input.version_id
6118        );
6119
6120        let mut request = SignedRequest::new("GET", "workdocs", &self.region, &request_uri);
6121        request.set_content_type("application/x-amz-json-1.1".to_owned());
6122
6123        request.add_optional_header("Authentication", input.authentication_token.as_ref());
6124        let mut params = Params::new();
6125        if let Some(ref x) = input.fields {
6126            params.put("fields", x);
6127        }
6128        if let Some(ref x) = input.include_custom_metadata {
6129            params.put("includeCustomMetadata", x);
6130        }
6131        request.set_params(params);
6132
6133        let mut response = self
6134            .client
6135            .sign_and_dispatch(request)
6136            .await
6137            .map_err(RusotoError::from)?;
6138        if response.status.as_u16() == 200 {
6139            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6140            let result = proto::json::ResponsePayload::new(&response)
6141                .deserialize::<GetDocumentVersionResponse, _>()?;
6142
6143            Ok(result)
6144        } else {
6145            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6146            Err(GetDocumentVersionError::from_response(response))
6147        }
6148    }
6149
6150    /// <p>Retrieves the metadata of the specified folder.</p>
6151    #[allow(unused_mut)]
6152    async fn get_folder(
6153        &self,
6154        input: GetFolderRequest,
6155    ) -> Result<GetFolderResponse, RusotoError<GetFolderError>> {
6156        let request_uri = format!("/api/v1/folders/{folder_id}", folder_id = input.folder_id);
6157
6158        let mut request = SignedRequest::new("GET", "workdocs", &self.region, &request_uri);
6159        request.set_content_type("application/x-amz-json-1.1".to_owned());
6160
6161        request.add_optional_header("Authentication", input.authentication_token.as_ref());
6162        let mut params = Params::new();
6163        if let Some(ref x) = input.include_custom_metadata {
6164            params.put("includeCustomMetadata", x);
6165        }
6166        request.set_params(params);
6167
6168        let mut response = self
6169            .client
6170            .sign_and_dispatch(request)
6171            .await
6172            .map_err(RusotoError::from)?;
6173        if response.status.as_u16() == 200 {
6174            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6175            let result = proto::json::ResponsePayload::new(&response)
6176                .deserialize::<GetFolderResponse, _>()?;
6177
6178            Ok(result)
6179        } else {
6180            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6181            Err(GetFolderError::from_response(response))
6182        }
6183    }
6184
6185    /// <p>Retrieves the path information (the hierarchy from the root folder) for the specified folder.</p> <p>By default, Amazon WorkDocs returns a maximum of 100 levels upwards from the requested folder and only includes the IDs of the parent folders in the path. You can limit the maximum number of levels. You can also request the parent folder names.</p>
6186    #[allow(unused_mut)]
6187    async fn get_folder_path(
6188        &self,
6189        input: GetFolderPathRequest,
6190    ) -> Result<GetFolderPathResponse, RusotoError<GetFolderPathError>> {
6191        let request_uri = format!(
6192            "/api/v1/folders/{folder_id}/path",
6193            folder_id = input.folder_id
6194        );
6195
6196        let mut request = SignedRequest::new("GET", "workdocs", &self.region, &request_uri);
6197        request.set_content_type("application/x-amz-json-1.1".to_owned());
6198
6199        request.add_optional_header("Authentication", input.authentication_token.as_ref());
6200        let mut params = Params::new();
6201        if let Some(ref x) = input.fields {
6202            params.put("fields", x);
6203        }
6204        if let Some(ref x) = input.limit {
6205            params.put("limit", x);
6206        }
6207        if let Some(ref x) = input.marker {
6208            params.put("marker", x);
6209        }
6210        request.set_params(params);
6211
6212        let mut response = self
6213            .client
6214            .sign_and_dispatch(request)
6215            .await
6216            .map_err(RusotoError::from)?;
6217        if response.status.as_u16() == 200 {
6218            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6219            let result = proto::json::ResponsePayload::new(&response)
6220                .deserialize::<GetFolderPathResponse, _>()?;
6221
6222            Ok(result)
6223        } else {
6224            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6225            Err(GetFolderPathError::from_response(response))
6226        }
6227    }
6228
6229    /// <p>Retrieves a collection of resources, including folders and documents. The only <code>CollectionType</code> supported is <code>SHARED_WITH_ME</code>.</p>
6230    #[allow(unused_mut)]
6231    async fn get_resources(
6232        &self,
6233        input: GetResourcesRequest,
6234    ) -> Result<GetResourcesResponse, RusotoError<GetResourcesError>> {
6235        let request_uri = "/api/v1/resources";
6236
6237        let mut request = SignedRequest::new("GET", "workdocs", &self.region, &request_uri);
6238        request.set_content_type("application/x-amz-json-1.1".to_owned());
6239
6240        request.add_optional_header("Authentication", input.authentication_token.as_ref());
6241        let mut params = Params::new();
6242        if let Some(ref x) = input.collection_type {
6243            params.put("collectionType", x);
6244        }
6245        if let Some(ref x) = input.limit {
6246            params.put("limit", x);
6247        }
6248        if let Some(ref x) = input.marker {
6249            params.put("marker", x);
6250        }
6251        if let Some(ref x) = input.user_id {
6252            params.put("userId", x);
6253        }
6254        request.set_params(params);
6255
6256        let mut response = self
6257            .client
6258            .sign_and_dispatch(request)
6259            .await
6260            .map_err(RusotoError::from)?;
6261        if response.status.as_u16() == 200 {
6262            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6263            let result = proto::json::ResponsePayload::new(&response)
6264                .deserialize::<GetResourcesResponse, _>()?;
6265
6266            Ok(result)
6267        } else {
6268            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6269            Err(GetResourcesError::from_response(response))
6270        }
6271    }
6272
6273    /// <p>Creates a new document object and version object.</p> <p>The client specifies the parent folder ID and name of the document to upload. The ID is optionally specified when creating a new version of an existing document. This is the first step to upload a document. Next, upload the document to the URL returned from the call, and then call <a>UpdateDocumentVersion</a>.</p> <p>To cancel the document upload, call <a>AbortDocumentVersionUpload</a>.</p>
6274    #[allow(unused_mut)]
6275    async fn initiate_document_version_upload(
6276        &self,
6277        input: InitiateDocumentVersionUploadRequest,
6278    ) -> Result<
6279        InitiateDocumentVersionUploadResponse,
6280        RusotoError<InitiateDocumentVersionUploadError>,
6281    > {
6282        let request_uri = "/api/v1/documents";
6283
6284        let mut request = SignedRequest::new("POST", "workdocs", &self.region, &request_uri);
6285        request.set_content_type("application/x-amz-json-1.1".to_owned());
6286
6287        let encoded = Some(serde_json::to_vec(&input).unwrap());
6288        request.set_payload(encoded);
6289        request.add_optional_header("Authentication", input.authentication_token.as_ref());
6290
6291        let mut response = self
6292            .client
6293            .sign_and_dispatch(request)
6294            .await
6295            .map_err(RusotoError::from)?;
6296        if response.status.as_u16() == 201 {
6297            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6298            let result = proto::json::ResponsePayload::new(&response)
6299                .deserialize::<InitiateDocumentVersionUploadResponse, _>()?;
6300
6301            Ok(result)
6302        } else {
6303            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6304            Err(InitiateDocumentVersionUploadError::from_response(response))
6305        }
6306    }
6307
6308    /// <p>Removes all the permissions from the specified resource.</p>
6309    #[allow(unused_mut)]
6310    async fn remove_all_resource_permissions(
6311        &self,
6312        input: RemoveAllResourcePermissionsRequest,
6313    ) -> Result<(), RusotoError<RemoveAllResourcePermissionsError>> {
6314        let request_uri = format!(
6315            "/api/v1/resources/{resource_id}/permissions",
6316            resource_id = input.resource_id
6317        );
6318
6319        let mut request = SignedRequest::new("DELETE", "workdocs", &self.region, &request_uri);
6320        request.set_content_type("application/x-amz-json-1.1".to_owned());
6321
6322        request.add_optional_header("Authentication", input.authentication_token.as_ref());
6323
6324        let mut response = self
6325            .client
6326            .sign_and_dispatch(request)
6327            .await
6328            .map_err(RusotoError::from)?;
6329        if response.status.as_u16() == 204 {
6330            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6331            let result = ::std::mem::drop(response);
6332
6333            Ok(result)
6334        } else {
6335            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6336            Err(RemoveAllResourcePermissionsError::from_response(response))
6337        }
6338    }
6339
6340    /// <p>Removes the permission for the specified principal from the specified resource.</p>
6341    #[allow(unused_mut)]
6342    async fn remove_resource_permission(
6343        &self,
6344        input: RemoveResourcePermissionRequest,
6345    ) -> Result<(), RusotoError<RemoveResourcePermissionError>> {
6346        let request_uri = format!(
6347            "/api/v1/resources/{resource_id}/permissions/{principal_id}",
6348            principal_id = input.principal_id,
6349            resource_id = input.resource_id
6350        );
6351
6352        let mut request = SignedRequest::new("DELETE", "workdocs", &self.region, &request_uri);
6353        request.set_content_type("application/x-amz-json-1.1".to_owned());
6354
6355        request.add_optional_header("Authentication", input.authentication_token.as_ref());
6356        let mut params = Params::new();
6357        if let Some(ref x) = input.principal_type {
6358            params.put("type", x);
6359        }
6360        request.set_params(params);
6361
6362        let mut response = self
6363            .client
6364            .sign_and_dispatch(request)
6365            .await
6366            .map_err(RusotoError::from)?;
6367        if response.status.as_u16() == 204 {
6368            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6369            let result = ::std::mem::drop(response);
6370
6371            Ok(result)
6372        } else {
6373            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6374            Err(RemoveResourcePermissionError::from_response(response))
6375        }
6376    }
6377
6378    /// <p>Updates the specified attributes of a document. The user must have access to both the document and its parent folder, if applicable.</p>
6379    #[allow(unused_mut)]
6380    async fn update_document(
6381        &self,
6382        input: UpdateDocumentRequest,
6383    ) -> Result<(), RusotoError<UpdateDocumentError>> {
6384        let request_uri = format!(
6385            "/api/v1/documents/{document_id}",
6386            document_id = input.document_id
6387        );
6388
6389        let mut request = SignedRequest::new("PATCH", "workdocs", &self.region, &request_uri);
6390        request.set_content_type("application/x-amz-json-1.1".to_owned());
6391
6392        let encoded = Some(serde_json::to_vec(&input).unwrap());
6393        request.set_payload(encoded);
6394        request.add_optional_header("Authentication", input.authentication_token.as_ref());
6395
6396        let mut response = self
6397            .client
6398            .sign_and_dispatch(request)
6399            .await
6400            .map_err(RusotoError::from)?;
6401        if response.status.as_u16() == 200 {
6402            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6403            let result = ::std::mem::drop(response);
6404
6405            Ok(result)
6406        } else {
6407            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6408            Err(UpdateDocumentError::from_response(response))
6409        }
6410    }
6411
6412    /// <p>Changes the status of the document version to ACTIVE. </p> <p>Amazon WorkDocs also sets its document container to ACTIVE. This is the last step in a document upload, after the client uploads the document to an S3-presigned URL returned by <a>InitiateDocumentVersionUpload</a>. </p>
6413    #[allow(unused_mut)]
6414    async fn update_document_version(
6415        &self,
6416        input: UpdateDocumentVersionRequest,
6417    ) -> Result<(), RusotoError<UpdateDocumentVersionError>> {
6418        let request_uri = format!(
6419            "/api/v1/documents/{document_id}/versions/{version_id}",
6420            document_id = input.document_id,
6421            version_id = input.version_id
6422        );
6423
6424        let mut request = SignedRequest::new("PATCH", "workdocs", &self.region, &request_uri);
6425        request.set_content_type("application/x-amz-json-1.1".to_owned());
6426
6427        let encoded = Some(serde_json::to_vec(&input).unwrap());
6428        request.set_payload(encoded);
6429        request.add_optional_header("Authentication", input.authentication_token.as_ref());
6430
6431        let mut response = self
6432            .client
6433            .sign_and_dispatch(request)
6434            .await
6435            .map_err(RusotoError::from)?;
6436        if response.status.as_u16() == 200 {
6437            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6438            let result = ::std::mem::drop(response);
6439
6440            Ok(result)
6441        } else {
6442            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6443            Err(UpdateDocumentVersionError::from_response(response))
6444        }
6445    }
6446
6447    /// <p>Updates the specified attributes of the specified folder. The user must have access to both the folder and its parent folder, if applicable.</p>
6448    #[allow(unused_mut)]
6449    async fn update_folder(
6450        &self,
6451        input: UpdateFolderRequest,
6452    ) -> Result<(), RusotoError<UpdateFolderError>> {
6453        let request_uri = format!("/api/v1/folders/{folder_id}", folder_id = input.folder_id);
6454
6455        let mut request = SignedRequest::new("PATCH", "workdocs", &self.region, &request_uri);
6456        request.set_content_type("application/x-amz-json-1.1".to_owned());
6457
6458        let encoded = Some(serde_json::to_vec(&input).unwrap());
6459        request.set_payload(encoded);
6460        request.add_optional_header("Authentication", input.authentication_token.as_ref());
6461
6462        let mut response = self
6463            .client
6464            .sign_and_dispatch(request)
6465            .await
6466            .map_err(RusotoError::from)?;
6467        if response.status.as_u16() == 200 {
6468            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6469            let result = ::std::mem::drop(response);
6470
6471            Ok(result)
6472        } else {
6473            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6474            Err(UpdateFolderError::from_response(response))
6475        }
6476    }
6477
6478    /// <p>Updates the specified attributes of the specified user, and grants or revokes administrative privileges to the Amazon WorkDocs site.</p>
6479    #[allow(unused_mut)]
6480    async fn update_user(
6481        &self,
6482        input: UpdateUserRequest,
6483    ) -> Result<UpdateUserResponse, RusotoError<UpdateUserError>> {
6484        let request_uri = format!("/api/v1/users/{user_id}", user_id = input.user_id);
6485
6486        let mut request = SignedRequest::new("PATCH", "workdocs", &self.region, &request_uri);
6487        request.set_content_type("application/x-amz-json-1.1".to_owned());
6488
6489        let encoded = Some(serde_json::to_vec(&input).unwrap());
6490        request.set_payload(encoded);
6491        request.add_optional_header("Authentication", input.authentication_token.as_ref());
6492
6493        let mut response = self
6494            .client
6495            .sign_and_dispatch(request)
6496            .await
6497            .map_err(RusotoError::from)?;
6498        if response.status.as_u16() == 200 {
6499            let mut response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6500            let result = proto::json::ResponsePayload::new(&response)
6501                .deserialize::<UpdateUserResponse, _>()?;
6502
6503            Ok(result)
6504        } else {
6505            let response = response.buffer().await.map_err(RusotoError::HttpDispatch)?;
6506            Err(UpdateUserError::from_response(response))
6507        }
6508    }
6509}