forked from aws/aws-sdk-go-v2
-
Notifications
You must be signed in to change notification settings - Fork 0
/
api.go
8522 lines (6964 loc) · 256 KB
/
api.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package workdocs
import (
"fmt"
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
"github.com/aws/aws-sdk-go-v2/private/protocol"
"github.com/aws/aws-sdk-go-v2/private/protocol/restjson"
)
const opAbortDocumentVersionUpload = "AbortDocumentVersionUpload"
// AbortDocumentVersionUploadRequest is a API request type for the AbortDocumentVersionUpload API operation.
type AbortDocumentVersionUploadRequest struct {
*aws.Request
Input *AbortDocumentVersionUploadInput
}
// Send marshals and sends the AbortDocumentVersionUpload API request.
func (r AbortDocumentVersionUploadRequest) Send() (*AbortDocumentVersionUploadOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*AbortDocumentVersionUploadOutput), nil
}
// AbortDocumentVersionUploadRequest returns a request value for making API operation for
// Amazon WorkDocs.
//
// Aborts the upload of the specified document version that was previously initiated
// by InitiateDocumentVersionUpload. The client should make this call only when
// it no longer intends to upload the document version, or fails to do so.
//
// // Example sending a request using the AbortDocumentVersionUploadRequest method.
// req := client.AbortDocumentVersionUploadRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/AbortDocumentVersionUpload
func (c *WorkDocs) AbortDocumentVersionUploadRequest(input *AbortDocumentVersionUploadInput) AbortDocumentVersionUploadRequest {
op := &aws.Operation{
Name: opAbortDocumentVersionUpload,
HTTPMethod: "DELETE",
HTTPPath: "/api/v1/documents/{DocumentId}/versions/{VersionId}",
}
if input == nil {
input = &AbortDocumentVersionUploadInput{}
}
output := &AbortDocumentVersionUploadOutput{}
req := c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output.responseMetadata = aws.Response{Request: req}
return AbortDocumentVersionUploadRequest{Request: req, Input: input}
}
const opActivateUser = "ActivateUser"
// ActivateUserRequest is a API request type for the ActivateUser API operation.
type ActivateUserRequest struct {
*aws.Request
Input *ActivateUserInput
}
// Send marshals and sends the ActivateUser API request.
func (r ActivateUserRequest) Send() (*ActivateUserOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*ActivateUserOutput), nil
}
// ActivateUserRequest returns a request value for making API operation for
// Amazon WorkDocs.
//
// Activates the specified user. Only active users can access Amazon WorkDocs.
//
// // Example sending a request using the ActivateUserRequest method.
// req := client.ActivateUserRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/ActivateUser
func (c *WorkDocs) ActivateUserRequest(input *ActivateUserInput) ActivateUserRequest {
op := &aws.Operation{
Name: opActivateUser,
HTTPMethod: "POST",
HTTPPath: "/api/v1/users/{UserId}/activation",
}
if input == nil {
input = &ActivateUserInput{}
}
output := &ActivateUserOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return ActivateUserRequest{Request: req, Input: input}
}
const opAddResourcePermissions = "AddResourcePermissions"
// AddResourcePermissionsRequest is a API request type for the AddResourcePermissions API operation.
type AddResourcePermissionsRequest struct {
*aws.Request
Input *AddResourcePermissionsInput
}
// Send marshals and sends the AddResourcePermissions API request.
func (r AddResourcePermissionsRequest) Send() (*AddResourcePermissionsOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*AddResourcePermissionsOutput), nil
}
// AddResourcePermissionsRequest returns a request value for making API operation for
// Amazon WorkDocs.
//
// Creates a set of permissions for the specified folder or document. The resource
// permissions are overwritten if the principals already have different permissions.
//
// // Example sending a request using the AddResourcePermissionsRequest method.
// req := client.AddResourcePermissionsRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/AddResourcePermissions
func (c *WorkDocs) AddResourcePermissionsRequest(input *AddResourcePermissionsInput) AddResourcePermissionsRequest {
op := &aws.Operation{
Name: opAddResourcePermissions,
HTTPMethod: "POST",
HTTPPath: "/api/v1/resources/{ResourceId}/permissions",
}
if input == nil {
input = &AddResourcePermissionsInput{}
}
output := &AddResourcePermissionsOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return AddResourcePermissionsRequest{Request: req, Input: input}
}
const opCreateComment = "CreateComment"
// CreateCommentRequest is a API request type for the CreateComment API operation.
type CreateCommentRequest struct {
*aws.Request
Input *CreateCommentInput
}
// Send marshals and sends the CreateComment API request.
func (r CreateCommentRequest) Send() (*CreateCommentOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateCommentOutput), nil
}
// CreateCommentRequest returns a request value for making API operation for
// Amazon WorkDocs.
//
// Adds a new comment to the specified document version.
//
// // Example sending a request using the CreateCommentRequest method.
// req := client.CreateCommentRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateComment
func (c *WorkDocs) CreateCommentRequest(input *CreateCommentInput) CreateCommentRequest {
op := &aws.Operation{
Name: opCreateComment,
HTTPMethod: "POST",
HTTPPath: "/api/v1/documents/{DocumentId}/versions/{VersionId}/comment",
}
if input == nil {
input = &CreateCommentInput{}
}
output := &CreateCommentOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateCommentRequest{Request: req, Input: input}
}
const opCreateCustomMetadata = "CreateCustomMetadata"
// CreateCustomMetadataRequest is a API request type for the CreateCustomMetadata API operation.
type CreateCustomMetadataRequest struct {
*aws.Request
Input *CreateCustomMetadataInput
}
// Send marshals and sends the CreateCustomMetadata API request.
func (r CreateCustomMetadataRequest) Send() (*CreateCustomMetadataOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateCustomMetadataOutput), nil
}
// CreateCustomMetadataRequest returns a request value for making API operation for
// Amazon WorkDocs.
//
// Adds one or more custom properties to the specified resource (a folder, document,
// or version).
//
// // Example sending a request using the CreateCustomMetadataRequest method.
// req := client.CreateCustomMetadataRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateCustomMetadata
func (c *WorkDocs) CreateCustomMetadataRequest(input *CreateCustomMetadataInput) CreateCustomMetadataRequest {
op := &aws.Operation{
Name: opCreateCustomMetadata,
HTTPMethod: "PUT",
HTTPPath: "/api/v1/resources/{ResourceId}/customMetadata",
}
if input == nil {
input = &CreateCustomMetadataInput{}
}
output := &CreateCustomMetadataOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateCustomMetadataRequest{Request: req, Input: input}
}
const opCreateFolder = "CreateFolder"
// CreateFolderRequest is a API request type for the CreateFolder API operation.
type CreateFolderRequest struct {
*aws.Request
Input *CreateFolderInput
}
// Send marshals and sends the CreateFolder API request.
func (r CreateFolderRequest) Send() (*CreateFolderOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateFolderOutput), nil
}
// CreateFolderRequest returns a request value for making API operation for
// Amazon WorkDocs.
//
// Creates a folder with the specified name and parent folder.
//
// // Example sending a request using the CreateFolderRequest method.
// req := client.CreateFolderRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateFolder
func (c *WorkDocs) CreateFolderRequest(input *CreateFolderInput) CreateFolderRequest {
op := &aws.Operation{
Name: opCreateFolder,
HTTPMethod: "POST",
HTTPPath: "/api/v1/folders",
}
if input == nil {
input = &CreateFolderInput{}
}
output := &CreateFolderOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateFolderRequest{Request: req, Input: input}
}
const opCreateLabels = "CreateLabels"
// CreateLabelsRequest is a API request type for the CreateLabels API operation.
type CreateLabelsRequest struct {
*aws.Request
Input *CreateLabelsInput
}
// Send marshals and sends the CreateLabels API request.
func (r CreateLabelsRequest) Send() (*CreateLabelsOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateLabelsOutput), nil
}
// CreateLabelsRequest returns a request value for making API operation for
// Amazon WorkDocs.
//
// Adds the specified list of labels to the given resource (a document or folder)
//
// // Example sending a request using the CreateLabelsRequest method.
// req := client.CreateLabelsRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateLabels
func (c *WorkDocs) CreateLabelsRequest(input *CreateLabelsInput) CreateLabelsRequest {
op := &aws.Operation{
Name: opCreateLabels,
HTTPMethod: "PUT",
HTTPPath: "/api/v1/resources/{ResourceId}/labels",
}
if input == nil {
input = &CreateLabelsInput{}
}
output := &CreateLabelsOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateLabelsRequest{Request: req, Input: input}
}
const opCreateNotificationSubscription = "CreateNotificationSubscription"
// CreateNotificationSubscriptionRequest is a API request type for the CreateNotificationSubscription API operation.
type CreateNotificationSubscriptionRequest struct {
*aws.Request
Input *CreateNotificationSubscriptionInput
}
// Send marshals and sends the CreateNotificationSubscription API request.
func (r CreateNotificationSubscriptionRequest) Send() (*CreateNotificationSubscriptionOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateNotificationSubscriptionOutput), nil
}
// CreateNotificationSubscriptionRequest returns a request value for making API operation for
// Amazon WorkDocs.
//
// Configure WorkDocs to use Amazon SNS notifications.
//
// The endpoint receives a confirmation message, and must confirm the subscription.
// For more information, see Confirm the Subscription (http://docs.aws.amazon.com/sns/latest/dg/SendMessageToHttp.html#SendMessageToHttp.confirm)
// in the Amazon Simple Notification Service Developer Guide.
//
// // Example sending a request using the CreateNotificationSubscriptionRequest method.
// req := client.CreateNotificationSubscriptionRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateNotificationSubscription
func (c *WorkDocs) CreateNotificationSubscriptionRequest(input *CreateNotificationSubscriptionInput) CreateNotificationSubscriptionRequest {
op := &aws.Operation{
Name: opCreateNotificationSubscription,
HTTPMethod: "POST",
HTTPPath: "/api/v1/organizations/{OrganizationId}/subscriptions",
}
if input == nil {
input = &CreateNotificationSubscriptionInput{}
}
output := &CreateNotificationSubscriptionOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateNotificationSubscriptionRequest{Request: req, Input: input}
}
const opCreateUser = "CreateUser"
// CreateUserRequest is a API request type for the CreateUser API operation.
type CreateUserRequest struct {
*aws.Request
Input *CreateUserInput
}
// Send marshals and sends the CreateUser API request.
func (r CreateUserRequest) Send() (*CreateUserOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*CreateUserOutput), nil
}
// CreateUserRequest returns a request value for making API operation for
// Amazon WorkDocs.
//
// 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.
//
// // Example sending a request using the CreateUserRequest method.
// req := client.CreateUserRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/CreateUser
func (c *WorkDocs) CreateUserRequest(input *CreateUserInput) CreateUserRequest {
op := &aws.Operation{
Name: opCreateUser,
HTTPMethod: "POST",
HTTPPath: "/api/v1/users",
}
if input == nil {
input = &CreateUserInput{}
}
output := &CreateUserOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return CreateUserRequest{Request: req, Input: input}
}
const opDeactivateUser = "DeactivateUser"
// DeactivateUserRequest is a API request type for the DeactivateUser API operation.
type DeactivateUserRequest struct {
*aws.Request
Input *DeactivateUserInput
}
// Send marshals and sends the DeactivateUser API request.
func (r DeactivateUserRequest) Send() (*DeactivateUserOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeactivateUserOutput), nil
}
// DeactivateUserRequest returns a request value for making API operation for
// Amazon WorkDocs.
//
// Deactivates the specified user, which revokes the user's access to Amazon
// WorkDocs.
//
// // Example sending a request using the DeactivateUserRequest method.
// req := client.DeactivateUserRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeactivateUser
func (c *WorkDocs) DeactivateUserRequest(input *DeactivateUserInput) DeactivateUserRequest {
op := &aws.Operation{
Name: opDeactivateUser,
HTTPMethod: "DELETE",
HTTPPath: "/api/v1/users/{UserId}/activation",
}
if input == nil {
input = &DeactivateUserInput{}
}
output := &DeactivateUserOutput{}
req := c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output.responseMetadata = aws.Response{Request: req}
return DeactivateUserRequest{Request: req, Input: input}
}
const opDeleteComment = "DeleteComment"
// DeleteCommentRequest is a API request type for the DeleteComment API operation.
type DeleteCommentRequest struct {
*aws.Request
Input *DeleteCommentInput
}
// Send marshals and sends the DeleteComment API request.
func (r DeleteCommentRequest) Send() (*DeleteCommentOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteCommentOutput), nil
}
// DeleteCommentRequest returns a request value for making API operation for
// Amazon WorkDocs.
//
// Deletes the specified comment from the document version.
//
// // Example sending a request using the DeleteCommentRequest method.
// req := client.DeleteCommentRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteComment
func (c *WorkDocs) DeleteCommentRequest(input *DeleteCommentInput) DeleteCommentRequest {
op := &aws.Operation{
Name: opDeleteComment,
HTTPMethod: "DELETE",
HTTPPath: "/api/v1/documents/{DocumentId}/versions/{VersionId}/comment/{CommentId}",
}
if input == nil {
input = &DeleteCommentInput{}
}
output := &DeleteCommentOutput{}
req := c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output.responseMetadata = aws.Response{Request: req}
return DeleteCommentRequest{Request: req, Input: input}
}
const opDeleteCustomMetadata = "DeleteCustomMetadata"
// DeleteCustomMetadataRequest is a API request type for the DeleteCustomMetadata API operation.
type DeleteCustomMetadataRequest struct {
*aws.Request
Input *DeleteCustomMetadataInput
}
// Send marshals and sends the DeleteCustomMetadata API request.
func (r DeleteCustomMetadataRequest) Send() (*DeleteCustomMetadataOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteCustomMetadataOutput), nil
}
// DeleteCustomMetadataRequest returns a request value for making API operation for
// Amazon WorkDocs.
//
// Deletes custom metadata from the specified resource.
//
// // Example sending a request using the DeleteCustomMetadataRequest method.
// req := client.DeleteCustomMetadataRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteCustomMetadata
func (c *WorkDocs) DeleteCustomMetadataRequest(input *DeleteCustomMetadataInput) DeleteCustomMetadataRequest {
op := &aws.Operation{
Name: opDeleteCustomMetadata,
HTTPMethod: "DELETE",
HTTPPath: "/api/v1/resources/{ResourceId}/customMetadata",
}
if input == nil {
input = &DeleteCustomMetadataInput{}
}
output := &DeleteCustomMetadataOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DeleteCustomMetadataRequest{Request: req, Input: input}
}
const opDeleteDocument = "DeleteDocument"
// DeleteDocumentRequest is a API request type for the DeleteDocument API operation.
type DeleteDocumentRequest struct {
*aws.Request
Input *DeleteDocumentInput
}
// Send marshals and sends the DeleteDocument API request.
func (r DeleteDocumentRequest) Send() (*DeleteDocumentOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteDocumentOutput), nil
}
// DeleteDocumentRequest returns a request value for making API operation for
// Amazon WorkDocs.
//
// Permanently deletes the specified document and its associated metadata.
//
// // Example sending a request using the DeleteDocumentRequest method.
// req := client.DeleteDocumentRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteDocument
func (c *WorkDocs) DeleteDocumentRequest(input *DeleteDocumentInput) DeleteDocumentRequest {
op := &aws.Operation{
Name: opDeleteDocument,
HTTPMethod: "DELETE",
HTTPPath: "/api/v1/documents/{DocumentId}",
}
if input == nil {
input = &DeleteDocumentInput{}
}
output := &DeleteDocumentOutput{}
req := c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output.responseMetadata = aws.Response{Request: req}
return DeleteDocumentRequest{Request: req, Input: input}
}
const opDeleteFolder = "DeleteFolder"
// DeleteFolderRequest is a API request type for the DeleteFolder API operation.
type DeleteFolderRequest struct {
*aws.Request
Input *DeleteFolderInput
}
// Send marshals and sends the DeleteFolder API request.
func (r DeleteFolderRequest) Send() (*DeleteFolderOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteFolderOutput), nil
}
// DeleteFolderRequest returns a request value for making API operation for
// Amazon WorkDocs.
//
// Permanently deletes the specified folder and its contents.
//
// // Example sending a request using the DeleteFolderRequest method.
// req := client.DeleteFolderRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteFolder
func (c *WorkDocs) DeleteFolderRequest(input *DeleteFolderInput) DeleteFolderRequest {
op := &aws.Operation{
Name: opDeleteFolder,
HTTPMethod: "DELETE",
HTTPPath: "/api/v1/folders/{FolderId}",
}
if input == nil {
input = &DeleteFolderInput{}
}
output := &DeleteFolderOutput{}
req := c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output.responseMetadata = aws.Response{Request: req}
return DeleteFolderRequest{Request: req, Input: input}
}
const opDeleteFolderContents = "DeleteFolderContents"
// DeleteFolderContentsRequest is a API request type for the DeleteFolderContents API operation.
type DeleteFolderContentsRequest struct {
*aws.Request
Input *DeleteFolderContentsInput
}
// Send marshals and sends the DeleteFolderContents API request.
func (r DeleteFolderContentsRequest) Send() (*DeleteFolderContentsOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteFolderContentsOutput), nil
}
// DeleteFolderContentsRequest returns a request value for making API operation for
// Amazon WorkDocs.
//
// Deletes the contents of the specified folder.
//
// // Example sending a request using the DeleteFolderContentsRequest method.
// req := client.DeleteFolderContentsRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteFolderContents
func (c *WorkDocs) DeleteFolderContentsRequest(input *DeleteFolderContentsInput) DeleteFolderContentsRequest {
op := &aws.Operation{
Name: opDeleteFolderContents,
HTTPMethod: "DELETE",
HTTPPath: "/api/v1/folders/{FolderId}/contents",
}
if input == nil {
input = &DeleteFolderContentsInput{}
}
output := &DeleteFolderContentsOutput{}
req := c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output.responseMetadata = aws.Response{Request: req}
return DeleteFolderContentsRequest{Request: req, Input: input}
}
const opDeleteLabels = "DeleteLabels"
// DeleteLabelsRequest is a API request type for the DeleteLabels API operation.
type DeleteLabelsRequest struct {
*aws.Request
Input *DeleteLabelsInput
}
// Send marshals and sends the DeleteLabels API request.
func (r DeleteLabelsRequest) Send() (*DeleteLabelsOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteLabelsOutput), nil
}
// DeleteLabelsRequest returns a request value for making API operation for
// Amazon WorkDocs.
//
// Deletes the specified list of labels from a resource.
//
// // Example sending a request using the DeleteLabelsRequest method.
// req := client.DeleteLabelsRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteLabels
func (c *WorkDocs) DeleteLabelsRequest(input *DeleteLabelsInput) DeleteLabelsRequest {
op := &aws.Operation{
Name: opDeleteLabels,
HTTPMethod: "DELETE",
HTTPPath: "/api/v1/resources/{ResourceId}/labels",
}
if input == nil {
input = &DeleteLabelsInput{}
}
output := &DeleteLabelsOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DeleteLabelsRequest{Request: req, Input: input}
}
const opDeleteNotificationSubscription = "DeleteNotificationSubscription"
// DeleteNotificationSubscriptionRequest is a API request type for the DeleteNotificationSubscription API operation.
type DeleteNotificationSubscriptionRequest struct {
*aws.Request
Input *DeleteNotificationSubscriptionInput
}
// Send marshals and sends the DeleteNotificationSubscription API request.
func (r DeleteNotificationSubscriptionRequest) Send() (*DeleteNotificationSubscriptionOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteNotificationSubscriptionOutput), nil
}
// DeleteNotificationSubscriptionRequest returns a request value for making API operation for
// Amazon WorkDocs.
//
// Deletes the specified subscription from the specified organization.
//
// // Example sending a request using the DeleteNotificationSubscriptionRequest method.
// req := client.DeleteNotificationSubscriptionRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteNotificationSubscription
func (c *WorkDocs) DeleteNotificationSubscriptionRequest(input *DeleteNotificationSubscriptionInput) DeleteNotificationSubscriptionRequest {
op := &aws.Operation{
Name: opDeleteNotificationSubscription,
HTTPMethod: "DELETE",
HTTPPath: "/api/v1/organizations/{OrganizationId}/subscriptions/{SubscriptionId}",
}
if input == nil {
input = &DeleteNotificationSubscriptionInput{}
}
output := &DeleteNotificationSubscriptionOutput{}
req := c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output.responseMetadata = aws.Response{Request: req}
return DeleteNotificationSubscriptionRequest{Request: req, Input: input}
}
const opDeleteUser = "DeleteUser"
// DeleteUserRequest is a API request type for the DeleteUser API operation.
type DeleteUserRequest struct {
*aws.Request
Input *DeleteUserInput
}
// Send marshals and sends the DeleteUser API request.
func (r DeleteUserRequest) Send() (*DeleteUserOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DeleteUserOutput), nil
}
// DeleteUserRequest returns a request value for making API operation for
// Amazon WorkDocs.
//
// Deletes the specified user from a Simple AD or Microsoft AD directory.
//
// // Example sending a request using the DeleteUserRequest method.
// req := client.DeleteUserRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DeleteUser
func (c *WorkDocs) DeleteUserRequest(input *DeleteUserInput) DeleteUserRequest {
op := &aws.Operation{
Name: opDeleteUser,
HTTPMethod: "DELETE",
HTTPPath: "/api/v1/users/{UserId}",
}
if input == nil {
input = &DeleteUserInput{}
}
output := &DeleteUserOutput{}
req := c.newRequest(op, input, output)
req.Handlers.Unmarshal.Remove(restjson.UnmarshalHandler)
req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler)
output.responseMetadata = aws.Response{Request: req}
return DeleteUserRequest{Request: req, Input: input}
}
const opDescribeActivities = "DescribeActivities"
// DescribeActivitiesRequest is a API request type for the DescribeActivities API operation.
type DescribeActivitiesRequest struct {
*aws.Request
Input *DescribeActivitiesInput
}
// Send marshals and sends the DescribeActivities API request.
func (r DescribeActivitiesRequest) Send() (*DescribeActivitiesOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DescribeActivitiesOutput), nil
}
// DescribeActivitiesRequest returns a request value for making API operation for
// Amazon WorkDocs.
//
// Describes the user activities in a specified time period.
//
// // Example sending a request using the DescribeActivitiesRequest method.
// req := client.DescribeActivitiesRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/workdocs-2016-05-01/DescribeActivities
func (c *WorkDocs) DescribeActivitiesRequest(input *DescribeActivitiesInput) DescribeActivitiesRequest {
op := &aws.Operation{
Name: opDescribeActivities,
HTTPMethod: "GET",
HTTPPath: "/api/v1/activities",
}
if input == nil {
input = &DescribeActivitiesInput{}
}
output := &DescribeActivitiesOutput{}
req := c.newRequest(op, input, output)
output.responseMetadata = aws.Response{Request: req}
return DescribeActivitiesRequest{Request: req, Input: input}
}
const opDescribeComments = "DescribeComments"
// DescribeCommentsRequest is a API request type for the DescribeComments API operation.
type DescribeCommentsRequest struct {
*aws.Request
Input *DescribeCommentsInput
}
// Send marshals and sends the DescribeComments API request.
func (r DescribeCommentsRequest) Send() (*DescribeCommentsOutput, error) {
err := r.Request.Send()
if err != nil {
return nil, err
}
return r.Request.Data.(*DescribeCommentsOutput), nil
}
// DescribeCommentsRequest returns a request value for making API operation for
// Amazon WorkDocs.
//
// List all the comments for the specified document version.
//
// // Example sending a request using the DescribeCommentsRequest method.
// req := client.DescribeCommentsRequest(params)
// resp, err := req.Send()
// if err == nil {
// fmt.Println(resp)
// }