-
Notifications
You must be signed in to change notification settings - Fork 20
/
folders.pb.go
1263 lines (1158 loc) · 54.1 KB
/
folders.pb.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 protoc-gen-go. DO NOT EDIT.
// source: google/cloud/resourcemanager/v2/folders.proto
/*
Package resourcemanager is a generated protocol buffer package.
It is generated from these files:
google/cloud/resourcemanager/v2/folders.proto
It has these top-level messages:
Folder
ListFoldersRequest
ListFoldersResponse
SearchFoldersRequest
SearchFoldersResponse
GetFolderRequest
CreateFolderRequest
MoveFolderRequest
UpdateFolderRequest
DeleteFolderRequest
UndeleteFolderRequest
FolderOperation
*/
package resourcemanager
import proto "github.com/golang/protobuf/proto"
import fmt "fmt"
import math "math"
import _ "google.golang.org/genproto/googleapis/api/annotations"
import google_iam_v11 "google.golang.org/genproto/googleapis/iam/v1"
import google_iam_v1 "google.golang.org/genproto/googleapis/iam/v1"
import google_longrunning "google.golang.org/genproto/googleapis/longrunning"
import google_protobuf3 "google.golang.org/genproto/protobuf/field_mask"
import google_protobuf4 "github.com/golang/protobuf/ptypes/timestamp"
import (
context "golang.org/x/net/context"
grpc "google.golang.org/grpc"
)
// Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal
var _ = fmt.Errorf
var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
// Folder lifecycle states.
type Folder_LifecycleState int32
const (
// Unspecified state.
Folder_LIFECYCLE_STATE_UNSPECIFIED Folder_LifecycleState = 0
// The normal and active state.
Folder_ACTIVE Folder_LifecycleState = 1
// The folder has been marked for deletion by the user.
Folder_DELETE_REQUESTED Folder_LifecycleState = 2
)
var Folder_LifecycleState_name = map[int32]string{
0: "LIFECYCLE_STATE_UNSPECIFIED",
1: "ACTIVE",
2: "DELETE_REQUESTED",
}
var Folder_LifecycleState_value = map[string]int32{
"LIFECYCLE_STATE_UNSPECIFIED": 0,
"ACTIVE": 1,
"DELETE_REQUESTED": 2,
}
func (x Folder_LifecycleState) String() string {
return proto.EnumName(Folder_LifecycleState_name, int32(x))
}
func (Folder_LifecycleState) EnumDescriptor() ([]byte, []int) { return fileDescriptor0, []int{0, 0} }
// The type of operation that failed.
type FolderOperation_OperationType int32
const (
// Operation type not specified.
FolderOperation_OPERATION_TYPE_UNSPECIFIED FolderOperation_OperationType = 0
// A create folder operation.
FolderOperation_CREATE FolderOperation_OperationType = 1
// A move folder operation.
FolderOperation_MOVE FolderOperation_OperationType = 2
)
var FolderOperation_OperationType_name = map[int32]string{
0: "OPERATION_TYPE_UNSPECIFIED",
1: "CREATE",
2: "MOVE",
}
var FolderOperation_OperationType_value = map[string]int32{
"OPERATION_TYPE_UNSPECIFIED": 0,
"CREATE": 1,
"MOVE": 2,
}
func (x FolderOperation_OperationType) String() string {
return proto.EnumName(FolderOperation_OperationType_name, int32(x))
}
func (FolderOperation_OperationType) EnumDescriptor() ([]byte, []int) {
return fileDescriptor0, []int{11, 0}
}
// A Folder in an Organization's resource hierarchy, used to
// organize that Organization's resources.
type Folder struct {
// Output only. The resource name of the Folder.
// Its format is `folders/{folder_id}`, for example: "folders/1234".
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// The Folder’s parent's resource name.
// Updates to the folder's parent must be performed via [MoveFolders].
Parent string `protobuf:"bytes,2,opt,name=parent" json:"parent,omitempty"`
// The folder’s display name.
// A folder’s display name must be unique amongst its siblings, e.g.
// no two folders with the same parent can share the same display name.
// The display name must start and end with a letter or digit, may contain
// letters, digits, spaces, hyphens and underscores and can be no longer
// than 30 characters. This is captured by the regular expression:
// [\p{L}\p{N}]({\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?.
DisplayName string `protobuf:"bytes,3,opt,name=display_name,json=displayName" json:"display_name,omitempty"`
// Output only. The lifecycle state of the folder.
// Updates to the lifecycle_state must be performed via
// [DeleteFolder] and [UndeleteFolder].
LifecycleState Folder_LifecycleState `protobuf:"varint,4,opt,name=lifecycle_state,json=lifecycleState,enum=google.cloud.resourcemanager.v2.Folder_LifecycleState" json:"lifecycle_state,omitempty"`
// Output only. Timestamp when the Folder was created. Assigned by the server.
CreateTime *google_protobuf4.Timestamp `protobuf:"bytes,5,opt,name=create_time,json=createTime" json:"create_time,omitempty"`
// Output only. Timestamp when the Folder was last modified.
UpdateTime *google_protobuf4.Timestamp `protobuf:"bytes,6,opt,name=update_time,json=updateTime" json:"update_time,omitempty"`
}
func (m *Folder) Reset() { *m = Folder{} }
func (m *Folder) String() string { return proto.CompactTextString(m) }
func (*Folder) ProtoMessage() {}
func (*Folder) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *Folder) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *Folder) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *Folder) GetDisplayName() string {
if m != nil {
return m.DisplayName
}
return ""
}
func (m *Folder) GetLifecycleState() Folder_LifecycleState {
if m != nil {
return m.LifecycleState
}
return Folder_LIFECYCLE_STATE_UNSPECIFIED
}
func (m *Folder) GetCreateTime() *google_protobuf4.Timestamp {
if m != nil {
return m.CreateTime
}
return nil
}
func (m *Folder) GetUpdateTime() *google_protobuf4.Timestamp {
if m != nil {
return m.UpdateTime
}
return nil
}
// The ListFolders request message.
type ListFoldersRequest struct {
// The resource name of the Organization or Folder whose Folders are
// being listed.
// Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
// Access to this method is controlled by checking the
// `resourcemanager.folders.list` permission on the `parent`.
Parent string `protobuf:"bytes,1,opt,name=parent" json:"parent,omitempty"`
// The maximum number of Folders to return in the response.
// This field is optional.
PageSize int32 `protobuf:"varint,2,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
// A pagination token returned from a previous call to `ListFolders`
// that indicates where this listing should continue from.
// This field is optional.
PageToken string `protobuf:"bytes,3,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
// Controls whether Folders in the [DELETE_REQUESTED} state should
// be returned.
ShowDeleted bool `protobuf:"varint,4,opt,name=show_deleted,json=showDeleted" json:"show_deleted,omitempty"`
}
func (m *ListFoldersRequest) Reset() { *m = ListFoldersRequest{} }
func (m *ListFoldersRequest) String() string { return proto.CompactTextString(m) }
func (*ListFoldersRequest) ProtoMessage() {}
func (*ListFoldersRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
func (m *ListFoldersRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *ListFoldersRequest) GetPageSize() int32 {
if m != nil {
return m.PageSize
}
return 0
}
func (m *ListFoldersRequest) GetPageToken() string {
if m != nil {
return m.PageToken
}
return ""
}
func (m *ListFoldersRequest) GetShowDeleted() bool {
if m != nil {
return m.ShowDeleted
}
return false
}
// The ListFolders response message.
type ListFoldersResponse struct {
// A possibly paginated list of Folders that are direct descendants of
// the specified parent resource.
Folders []*Folder `protobuf:"bytes,1,rep,name=folders" json:"folders,omitempty"`
// A pagination token returned from a previous call to `ListFolders`
// that indicates from where listing should continue.
// This field is optional.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
}
func (m *ListFoldersResponse) Reset() { *m = ListFoldersResponse{} }
func (m *ListFoldersResponse) String() string { return proto.CompactTextString(m) }
func (*ListFoldersResponse) ProtoMessage() {}
func (*ListFoldersResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *ListFoldersResponse) GetFolders() []*Folder {
if m != nil {
return m.Folders
}
return nil
}
func (m *ListFoldersResponse) GetNextPageToken() string {
if m != nil {
return m.NextPageToken
}
return ""
}
// The request message for searching folders.
type SearchFoldersRequest struct {
// The maximum number of folders to return in the response.
// This field is optional.
PageSize int32 `protobuf:"varint,1,opt,name=page_size,json=pageSize" json:"page_size,omitempty"`
// A pagination token returned from a previous call to `SearchFolders`
// that indicates from where search should continue.
// This field is optional.
PageToken string `protobuf:"bytes,2,opt,name=page_token,json=pageToken" json:"page_token,omitempty"`
// Search criteria used to select the Folders to return.
// If no search criteria is specified then all accessible folders will be
// returned.
//
// Query expressions can be used to restrict results based upon displayName,
// lifecycleState and parent, where the operators `=`, `NOT`, `AND` and `OR`
// can be used along with the suffix wildcard symbol `*`.
//
// Some example queries are:
// |Query|Description|
// |------|-----------|
// |displayName=Test*|Folders whose display name starts with "Test".|
// |lifecycleState=ACTIVE|Folders whose lifecycleState is ACTIVE.|
// |parent=folders/123|Folders whose parent is "folders/123".|
// |parent=folders/123 AND lifecycleState=ACTIVE|Active folders whose
// parent is "folders/123".|
Query string `protobuf:"bytes,3,opt,name=query" json:"query,omitempty"`
}
func (m *SearchFoldersRequest) Reset() { *m = SearchFoldersRequest{} }
func (m *SearchFoldersRequest) String() string { return proto.CompactTextString(m) }
func (*SearchFoldersRequest) ProtoMessage() {}
func (*SearchFoldersRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
func (m *SearchFoldersRequest) GetPageSize() int32 {
if m != nil {
return m.PageSize
}
return 0
}
func (m *SearchFoldersRequest) GetPageToken() string {
if m != nil {
return m.PageToken
}
return ""
}
func (m *SearchFoldersRequest) GetQuery() string {
if m != nil {
return m.Query
}
return ""
}
// The response message for searching folders.
type SearchFoldersResponse struct {
// A possibly paginated folder search results.
// the specified parent resource.
Folders []*Folder `protobuf:"bytes,1,rep,name=folders" json:"folders,omitempty"`
// A pagination token returned from a previous call to `SearchFolders`
// that indicates from where searching should continue.
// This field is optional.
NextPageToken string `protobuf:"bytes,2,opt,name=next_page_token,json=nextPageToken" json:"next_page_token,omitempty"`
}
func (m *SearchFoldersResponse) Reset() { *m = SearchFoldersResponse{} }
func (m *SearchFoldersResponse) String() string { return proto.CompactTextString(m) }
func (*SearchFoldersResponse) ProtoMessage() {}
func (*SearchFoldersResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
func (m *SearchFoldersResponse) GetFolders() []*Folder {
if m != nil {
return m.Folders
}
return nil
}
func (m *SearchFoldersResponse) GetNextPageToken() string {
if m != nil {
return m.NextPageToken
}
return ""
}
// The GetFolder request message.
type GetFolderRequest struct {
// The resource name of the Folder to retrieve.
// Must be of the form `folders/{folder_id}`.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
func (m *GetFolderRequest) Reset() { *m = GetFolderRequest{} }
func (m *GetFolderRequest) String() string { return proto.CompactTextString(m) }
func (*GetFolderRequest) ProtoMessage() {}
func (*GetFolderRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *GetFolderRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// The CreateFolder request message.
type CreateFolderRequest struct {
// The resource name of the new Folder's parent.
// Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
Parent string `protobuf:"bytes,1,opt,name=parent" json:"parent,omitempty"`
// The Folder being created, only the display name will be consulted.
// All other fields will be ignored.
Folder *Folder `protobuf:"bytes,2,opt,name=folder" json:"folder,omitempty"`
}
func (m *CreateFolderRequest) Reset() { *m = CreateFolderRequest{} }
func (m *CreateFolderRequest) String() string { return proto.CompactTextString(m) }
func (*CreateFolderRequest) ProtoMessage() {}
func (*CreateFolderRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
func (m *CreateFolderRequest) GetParent() string {
if m != nil {
return m.Parent
}
return ""
}
func (m *CreateFolderRequest) GetFolder() *Folder {
if m != nil {
return m.Folder
}
return nil
}
// The MoveFolder request message.
type MoveFolderRequest struct {
// The resource name of the Folder to move.
// Must be of the form folders/{folder_id}
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// The resource name of the Folder or Organization to reparent
// the folder under.
// Must be of the form `folders/{folder_id}` or `organizations/{org_id}`.
DestinationParent string `protobuf:"bytes,2,opt,name=destination_parent,json=destinationParent" json:"destination_parent,omitempty"`
}
func (m *MoveFolderRequest) Reset() { *m = MoveFolderRequest{} }
func (m *MoveFolderRequest) String() string { return proto.CompactTextString(m) }
func (*MoveFolderRequest) ProtoMessage() {}
func (*MoveFolderRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (m *MoveFolderRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *MoveFolderRequest) GetDestinationParent() string {
if m != nil {
return m.DestinationParent
}
return ""
}
// The request message for updating a folder's display name.
type UpdateFolderRequest struct {
// The new definition of the Folder. It must include a
// a `name` and `display_name` field. The other fields
// will be ignored.
Folder *Folder `protobuf:"bytes,1,opt,name=folder" json:"folder,omitempty"`
// Fields to be updated.
// Only the `display_name` can be updated.
UpdateMask *google_protobuf3.FieldMask `protobuf:"bytes,2,opt,name=update_mask,json=updateMask" json:"update_mask,omitempty"`
}
func (m *UpdateFolderRequest) Reset() { *m = UpdateFolderRequest{} }
func (m *UpdateFolderRequest) String() string { return proto.CompactTextString(m) }
func (*UpdateFolderRequest) ProtoMessage() {}
func (*UpdateFolderRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
func (m *UpdateFolderRequest) GetFolder() *Folder {
if m != nil {
return m.Folder
}
return nil
}
func (m *UpdateFolderRequest) GetUpdateMask() *google_protobuf3.FieldMask {
if m != nil {
return m.UpdateMask
}
return nil
}
// The DeleteFolder request message.
type DeleteFolderRequest struct {
// the resource name of the Folder to be deleted.
// Must be of the form `folders/{folder_id}`.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
// Instructs DeleteFolderAction to delete a folder even when the folder is not
// empty.
RecursiveDelete bool `protobuf:"varint,2,opt,name=recursive_delete,json=recursiveDelete" json:"recursive_delete,omitempty"`
}
func (m *DeleteFolderRequest) Reset() { *m = DeleteFolderRequest{} }
func (m *DeleteFolderRequest) String() string { return proto.CompactTextString(m) }
func (*DeleteFolderRequest) ProtoMessage() {}
func (*DeleteFolderRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
func (m *DeleteFolderRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
func (m *DeleteFolderRequest) GetRecursiveDelete() bool {
if m != nil {
return m.RecursiveDelete
}
return false
}
// The UndeleteFolder request message.
type UndeleteFolderRequest struct {
// The resource name of the Folder to undelete.
// Must be of the form `folders/{folder_id}`.
Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"`
}
func (m *UndeleteFolderRequest) Reset() { *m = UndeleteFolderRequest{} }
func (m *UndeleteFolderRequest) String() string { return proto.CompactTextString(m) }
func (*UndeleteFolderRequest) ProtoMessage() {}
func (*UndeleteFolderRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
func (m *UndeleteFolderRequest) GetName() string {
if m != nil {
return m.Name
}
return ""
}
// Metadata describing a long running folder operation
type FolderOperation struct {
// The display name of the folder.
DisplayName string `protobuf:"bytes,1,opt,name=display_name,json=displayName" json:"display_name,omitempty"`
// The type of this operation.
OperationType FolderOperation_OperationType `protobuf:"varint,2,opt,name=operation_type,json=operationType,enum=google.cloud.resourcemanager.v2.FolderOperation_OperationType" json:"operation_type,omitempty"`
// The resource name of the folder's parent.
// Only applicable when the operation_type is MOVE.
SourceParent string `protobuf:"bytes,3,opt,name=source_parent,json=sourceParent" json:"source_parent,omitempty"`
// The resource name of the folder or organization we are either creating
// the folder under or moving the folder to.
DestinationParent string `protobuf:"bytes,4,opt,name=destination_parent,json=destinationParent" json:"destination_parent,omitempty"`
}
func (m *FolderOperation) Reset() { *m = FolderOperation{} }
func (m *FolderOperation) String() string { return proto.CompactTextString(m) }
func (*FolderOperation) ProtoMessage() {}
func (*FolderOperation) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
func (m *FolderOperation) GetDisplayName() string {
if m != nil {
return m.DisplayName
}
return ""
}
func (m *FolderOperation) GetOperationType() FolderOperation_OperationType {
if m != nil {
return m.OperationType
}
return FolderOperation_OPERATION_TYPE_UNSPECIFIED
}
func (m *FolderOperation) GetSourceParent() string {
if m != nil {
return m.SourceParent
}
return ""
}
func (m *FolderOperation) GetDestinationParent() string {
if m != nil {
return m.DestinationParent
}
return ""
}
func init() {
proto.RegisterType((*Folder)(nil), "google.cloud.resourcemanager.v2.Folder")
proto.RegisterType((*ListFoldersRequest)(nil), "google.cloud.resourcemanager.v2.ListFoldersRequest")
proto.RegisterType((*ListFoldersResponse)(nil), "google.cloud.resourcemanager.v2.ListFoldersResponse")
proto.RegisterType((*SearchFoldersRequest)(nil), "google.cloud.resourcemanager.v2.SearchFoldersRequest")
proto.RegisterType((*SearchFoldersResponse)(nil), "google.cloud.resourcemanager.v2.SearchFoldersResponse")
proto.RegisterType((*GetFolderRequest)(nil), "google.cloud.resourcemanager.v2.GetFolderRequest")
proto.RegisterType((*CreateFolderRequest)(nil), "google.cloud.resourcemanager.v2.CreateFolderRequest")
proto.RegisterType((*MoveFolderRequest)(nil), "google.cloud.resourcemanager.v2.MoveFolderRequest")
proto.RegisterType((*UpdateFolderRequest)(nil), "google.cloud.resourcemanager.v2.UpdateFolderRequest")
proto.RegisterType((*DeleteFolderRequest)(nil), "google.cloud.resourcemanager.v2.DeleteFolderRequest")
proto.RegisterType((*UndeleteFolderRequest)(nil), "google.cloud.resourcemanager.v2.UndeleteFolderRequest")
proto.RegisterType((*FolderOperation)(nil), "google.cloud.resourcemanager.v2.FolderOperation")
proto.RegisterEnum("google.cloud.resourcemanager.v2.Folder_LifecycleState", Folder_LifecycleState_name, Folder_LifecycleState_value)
proto.RegisterEnum("google.cloud.resourcemanager.v2.FolderOperation_OperationType", FolderOperation_OperationType_name, FolderOperation_OperationType_value)
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for Folders service
type FoldersClient interface {
// Lists the Folders that are direct descendants of supplied parent resource.
// List provides a strongly consistent view of the Folders underneath
// the specified parent resource.
// List returns Folders sorted based upon the (ascending) lexical ordering
// of their display_name.
// The caller must have `resourcemanager.folders.list` permission on the
// identified parent.
ListFolders(ctx context.Context, in *ListFoldersRequest, opts ...grpc.CallOption) (*ListFoldersResponse, error)
// Search for folders that match specific filter criteria.
// Search provides an eventually consistent view of the folders a user has
// access to which meet the specified filter criteria.
//
// This will only return folders on which the caller has the
// permission `resourcemanager.folders.get`.
SearchFolders(ctx context.Context, in *SearchFoldersRequest, opts ...grpc.CallOption) (*SearchFoldersResponse, error)
// Retrieves a Folder identified by the supplied resource name.
// Valid Folder resource names have the format `folders/{folder_id}`
// (for example, `folders/1234`).
// The caller must have `resourcemanager.folders.get` permission on the
// identified folder.
GetFolder(ctx context.Context, in *GetFolderRequest, opts ...grpc.CallOption) (*Folder, error)
// Creates a Folder in the resource hierarchy.
// Returns an Operation which can be used to track the progress of the
// folder creation workflow.
// Upon success the Operation.response field will be populated with the
// created Folder.
//
// In order to succeed, the addition of this new Folder must not violate
// the Folder naming, height or fanout constraints.
// + The Folder's display_name must be distinct from all other Folder's that
// share its parent.
// + The addition of the Folder must not cause the active Folder hierarchy
// to exceed a height of 4. Note, the full active + deleted Folder hierarchy
// is allowed to reach a height of 8; this provides additional headroom when
// moving folders that contain deleted folders.
// + The addition of the Folder must not cause the total number of Folders
// under its parent to exceed 100.
//
// If the operation fails due to a folder constraint violation,
// a PreconditionFailure explaining the violation will be returned.
// If the failure occurs synchronously then the PreconditionFailure
// will be returned via the Status.details field and if it occurs
// asynchronously then the PreconditionFailure will be returned
// via the the Operation.error field.
//
// The caller must have `resourcemanager.folders.create` permission on the
// identified parent.
CreateFolder(ctx context.Context, in *CreateFolderRequest, opts ...grpc.CallOption) (*google_longrunning.Operation, error)
// Updates a Folder, changing its display_name.
// Changes to the folder display_name will be rejected if they violate either
// the display_name formatting rules or naming constraints described in
// the [CreateFolder] documentation.
// + The Folder's display name must start and end with a letter or digit,
// may contain letters, digits, spaces, hyphens and underscores and can be
// no longer than 30 characters. This is captured by the regular expression:
// [\p{L}\p{N}]({\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?.
// The caller must have `resourcemanager.folders.update` permission on the
// identified folder.
//
// If the update fails due to the unique name constraint then a
// PreconditionFailure explaining this violation will be returned
// in the Status.details field.
UpdateFolder(ctx context.Context, in *UpdateFolderRequest, opts ...grpc.CallOption) (*Folder, error)
// Moves a Folder under a new resource parent.
// Returns an Operation which can be used to track the progress of the
// folder move workflow.
// Upon success the Operation.response field will be populated with the
// moved Folder.
// Upon failure, a FolderOperationError categorizing the failure cause will
// be returned - if the failure occurs synchronously then the
// FolderOperationError will be returned via the Status.details field
// and if it occurs asynchronously then the FolderOperation will be returned
// via the the Operation.error field.
// In addition, the Operation.metadata field will be populated with a
// FolderOperation message as an aid to stateless clients.
// Folder moves will be rejected if they violate either the naming, height
// or fanout constraints described in the [CreateFolder] documentation.
// The caller must have `resourcemanager.folders.move` permission on the
// folder's current and proposed new parent.
MoveFolder(ctx context.Context, in *MoveFolderRequest, opts ...grpc.CallOption) (*google_longrunning.Operation, error)
// Requests deletion of a Folder. The Folder is moved into the
// [DELETE_REQUESTED] state immediately, and is deleted approximately 30 days
// later. This method may only be called on an empty Folder in the [ACTIVE]
// state, where a Folder is empty if it doesn't contain any Folders or
// Projects in the [ACTIVE] state.
// The caller must have `resourcemanager.folders.delete` permission on the
// identified folder.
DeleteFolder(ctx context.Context, in *DeleteFolderRequest, opts ...grpc.CallOption) (*Folder, error)
// Cancels the deletion request for a Folder. This method may only be
// called on a Folder in the [DELETE_REQUESTED] state.
// In order to succeed, the Folder's parent must be in the [ACTIVE] state.
// In addition, reintroducing the folder into the tree must not violate
// folder naming, height and fanout constraints described in the
// [CreateFolder] documentation.
// The caller must have `resourcemanager.folders.undelete` permission on the
// identified folder.
UndeleteFolder(ctx context.Context, in *UndeleteFolderRequest, opts ...grpc.CallOption) (*Folder, error)
// Gets the access control policy for a Folder. The returned policy may be
// empty if no such policy or resource exists. The `resource` field should
// be the Folder's resource name, e.g. "folders/1234".
// The caller must have `resourcemanager.folders.getIamPolicy` permission
// on the identified folder.
GetIamPolicy(ctx context.Context, in *google_iam_v11.GetIamPolicyRequest, opts ...grpc.CallOption) (*google_iam_v1.Policy, error)
// Sets the access control policy on a Folder, replacing any existing policy.
// The `resource` field should be the Folder's resource name, e.g.
// "folders/1234".
// The caller must have `resourcemanager.folders.setIamPolicy` permission
// on the identified folder.
SetIamPolicy(ctx context.Context, in *google_iam_v11.SetIamPolicyRequest, opts ...grpc.CallOption) (*google_iam_v1.Policy, error)
// Returns permissions that a caller has on the specified Folder.
// The `resource` field should be the Folder's resource name,
// e.g. "folders/1234".
//
// There are no permissions required for making this API call.
TestIamPermissions(ctx context.Context, in *google_iam_v11.TestIamPermissionsRequest, opts ...grpc.CallOption) (*google_iam_v11.TestIamPermissionsResponse, error)
}
type foldersClient struct {
cc *grpc.ClientConn
}
func NewFoldersClient(cc *grpc.ClientConn) FoldersClient {
return &foldersClient{cc}
}
func (c *foldersClient) ListFolders(ctx context.Context, in *ListFoldersRequest, opts ...grpc.CallOption) (*ListFoldersResponse, error) {
out := new(ListFoldersResponse)
err := grpc.Invoke(ctx, "/google.cloud.resourcemanager.v2.Folders/ListFolders", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *foldersClient) SearchFolders(ctx context.Context, in *SearchFoldersRequest, opts ...grpc.CallOption) (*SearchFoldersResponse, error) {
out := new(SearchFoldersResponse)
err := grpc.Invoke(ctx, "/google.cloud.resourcemanager.v2.Folders/SearchFolders", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *foldersClient) GetFolder(ctx context.Context, in *GetFolderRequest, opts ...grpc.CallOption) (*Folder, error) {
out := new(Folder)
err := grpc.Invoke(ctx, "/google.cloud.resourcemanager.v2.Folders/GetFolder", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *foldersClient) CreateFolder(ctx context.Context, in *CreateFolderRequest, opts ...grpc.CallOption) (*google_longrunning.Operation, error) {
out := new(google_longrunning.Operation)
err := grpc.Invoke(ctx, "/google.cloud.resourcemanager.v2.Folders/CreateFolder", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *foldersClient) UpdateFolder(ctx context.Context, in *UpdateFolderRequest, opts ...grpc.CallOption) (*Folder, error) {
out := new(Folder)
err := grpc.Invoke(ctx, "/google.cloud.resourcemanager.v2.Folders/UpdateFolder", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *foldersClient) MoveFolder(ctx context.Context, in *MoveFolderRequest, opts ...grpc.CallOption) (*google_longrunning.Operation, error) {
out := new(google_longrunning.Operation)
err := grpc.Invoke(ctx, "/google.cloud.resourcemanager.v2.Folders/MoveFolder", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *foldersClient) DeleteFolder(ctx context.Context, in *DeleteFolderRequest, opts ...grpc.CallOption) (*Folder, error) {
out := new(Folder)
err := grpc.Invoke(ctx, "/google.cloud.resourcemanager.v2.Folders/DeleteFolder", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *foldersClient) UndeleteFolder(ctx context.Context, in *UndeleteFolderRequest, opts ...grpc.CallOption) (*Folder, error) {
out := new(Folder)
err := grpc.Invoke(ctx, "/google.cloud.resourcemanager.v2.Folders/UndeleteFolder", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *foldersClient) GetIamPolicy(ctx context.Context, in *google_iam_v11.GetIamPolicyRequest, opts ...grpc.CallOption) (*google_iam_v1.Policy, error) {
out := new(google_iam_v1.Policy)
err := grpc.Invoke(ctx, "/google.cloud.resourcemanager.v2.Folders/GetIamPolicy", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *foldersClient) SetIamPolicy(ctx context.Context, in *google_iam_v11.SetIamPolicyRequest, opts ...grpc.CallOption) (*google_iam_v1.Policy, error) {
out := new(google_iam_v1.Policy)
err := grpc.Invoke(ctx, "/google.cloud.resourcemanager.v2.Folders/SetIamPolicy", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
func (c *foldersClient) TestIamPermissions(ctx context.Context, in *google_iam_v11.TestIamPermissionsRequest, opts ...grpc.CallOption) (*google_iam_v11.TestIamPermissionsResponse, error) {
out := new(google_iam_v11.TestIamPermissionsResponse)
err := grpc.Invoke(ctx, "/google.cloud.resourcemanager.v2.Folders/TestIamPermissions", in, out, c.cc, opts...)
if err != nil {
return nil, err
}
return out, nil
}
// Server API for Folders service
type FoldersServer interface {
// Lists the Folders that are direct descendants of supplied parent resource.
// List provides a strongly consistent view of the Folders underneath
// the specified parent resource.
// List returns Folders sorted based upon the (ascending) lexical ordering
// of their display_name.
// The caller must have `resourcemanager.folders.list` permission on the
// identified parent.
ListFolders(context.Context, *ListFoldersRequest) (*ListFoldersResponse, error)
// Search for folders that match specific filter criteria.
// Search provides an eventually consistent view of the folders a user has
// access to which meet the specified filter criteria.
//
// This will only return folders on which the caller has the
// permission `resourcemanager.folders.get`.
SearchFolders(context.Context, *SearchFoldersRequest) (*SearchFoldersResponse, error)
// Retrieves a Folder identified by the supplied resource name.
// Valid Folder resource names have the format `folders/{folder_id}`
// (for example, `folders/1234`).
// The caller must have `resourcemanager.folders.get` permission on the
// identified folder.
GetFolder(context.Context, *GetFolderRequest) (*Folder, error)
// Creates a Folder in the resource hierarchy.
// Returns an Operation which can be used to track the progress of the
// folder creation workflow.
// Upon success the Operation.response field will be populated with the
// created Folder.
//
// In order to succeed, the addition of this new Folder must not violate
// the Folder naming, height or fanout constraints.
// + The Folder's display_name must be distinct from all other Folder's that
// share its parent.
// + The addition of the Folder must not cause the active Folder hierarchy
// to exceed a height of 4. Note, the full active + deleted Folder hierarchy
// is allowed to reach a height of 8; this provides additional headroom when
// moving folders that contain deleted folders.
// + The addition of the Folder must not cause the total number of Folders
// under its parent to exceed 100.
//
// If the operation fails due to a folder constraint violation,
// a PreconditionFailure explaining the violation will be returned.
// If the failure occurs synchronously then the PreconditionFailure
// will be returned via the Status.details field and if it occurs
// asynchronously then the PreconditionFailure will be returned
// via the the Operation.error field.
//
// The caller must have `resourcemanager.folders.create` permission on the
// identified parent.
CreateFolder(context.Context, *CreateFolderRequest) (*google_longrunning.Operation, error)
// Updates a Folder, changing its display_name.
// Changes to the folder display_name will be rejected if they violate either
// the display_name formatting rules or naming constraints described in
// the [CreateFolder] documentation.
// + The Folder's display name must start and end with a letter or digit,
// may contain letters, digits, spaces, hyphens and underscores and can be
// no longer than 30 characters. This is captured by the regular expression:
// [\p{L}\p{N}]({\p{L}\p{N}_- ]{0,28}[\p{L}\p{N}])?.
// The caller must have `resourcemanager.folders.update` permission on the
// identified folder.
//
// If the update fails due to the unique name constraint then a
// PreconditionFailure explaining this violation will be returned
// in the Status.details field.
UpdateFolder(context.Context, *UpdateFolderRequest) (*Folder, error)
// Moves a Folder under a new resource parent.
// Returns an Operation which can be used to track the progress of the
// folder move workflow.
// Upon success the Operation.response field will be populated with the
// moved Folder.
// Upon failure, a FolderOperationError categorizing the failure cause will
// be returned - if the failure occurs synchronously then the
// FolderOperationError will be returned via the Status.details field
// and if it occurs asynchronously then the FolderOperation will be returned
// via the the Operation.error field.
// In addition, the Operation.metadata field will be populated with a
// FolderOperation message as an aid to stateless clients.
// Folder moves will be rejected if they violate either the naming, height
// or fanout constraints described in the [CreateFolder] documentation.
// The caller must have `resourcemanager.folders.move` permission on the
// folder's current and proposed new parent.
MoveFolder(context.Context, *MoveFolderRequest) (*google_longrunning.Operation, error)
// Requests deletion of a Folder. The Folder is moved into the
// [DELETE_REQUESTED] state immediately, and is deleted approximately 30 days
// later. This method may only be called on an empty Folder in the [ACTIVE]
// state, where a Folder is empty if it doesn't contain any Folders or
// Projects in the [ACTIVE] state.
// The caller must have `resourcemanager.folders.delete` permission on the
// identified folder.
DeleteFolder(context.Context, *DeleteFolderRequest) (*Folder, error)
// Cancels the deletion request for a Folder. This method may only be
// called on a Folder in the [DELETE_REQUESTED] state.
// In order to succeed, the Folder's parent must be in the [ACTIVE] state.
// In addition, reintroducing the folder into the tree must not violate
// folder naming, height and fanout constraints described in the
// [CreateFolder] documentation.
// The caller must have `resourcemanager.folders.undelete` permission on the
// identified folder.
UndeleteFolder(context.Context, *UndeleteFolderRequest) (*Folder, error)
// Gets the access control policy for a Folder. The returned policy may be
// empty if no such policy or resource exists. The `resource` field should
// be the Folder's resource name, e.g. "folders/1234".
// The caller must have `resourcemanager.folders.getIamPolicy` permission
// on the identified folder.
GetIamPolicy(context.Context, *google_iam_v11.GetIamPolicyRequest) (*google_iam_v1.Policy, error)
// Sets the access control policy on a Folder, replacing any existing policy.
// The `resource` field should be the Folder's resource name, e.g.
// "folders/1234".
// The caller must have `resourcemanager.folders.setIamPolicy` permission
// on the identified folder.
SetIamPolicy(context.Context, *google_iam_v11.SetIamPolicyRequest) (*google_iam_v1.Policy, error)
// Returns permissions that a caller has on the specified Folder.
// The `resource` field should be the Folder's resource name,
// e.g. "folders/1234".
//
// There are no permissions required for making this API call.
TestIamPermissions(context.Context, *google_iam_v11.TestIamPermissionsRequest) (*google_iam_v11.TestIamPermissionsResponse, error)
}
func RegisterFoldersServer(s *grpc.Server, srv FoldersServer) {
s.RegisterService(&_Folders_serviceDesc, srv)
}
func _Folders_ListFolders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(ListFoldersRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FoldersServer).ListFolders(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.resourcemanager.v2.Folders/ListFolders",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FoldersServer).ListFolders(ctx, req.(*ListFoldersRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Folders_SearchFolders_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(SearchFoldersRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FoldersServer).SearchFolders(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.resourcemanager.v2.Folders/SearchFolders",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FoldersServer).SearchFolders(ctx, req.(*SearchFoldersRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Folders_GetFolder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(GetFolderRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FoldersServer).GetFolder(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.resourcemanager.v2.Folders/GetFolder",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FoldersServer).GetFolder(ctx, req.(*GetFolderRequest))
}
return interceptor(ctx, in, info, handler)
}
func _Folders_CreateFolder_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
in := new(CreateFolderRequest)
if err := dec(in); err != nil {
return nil, err
}
if interceptor == nil {
return srv.(FoldersServer).CreateFolder(ctx, in)
}
info := &grpc.UnaryServerInfo{
Server: srv,
FullMethod: "/google.cloud.resourcemanager.v2.Folders/CreateFolder",
}
handler := func(ctx context.Context, req interface{}) (interface{}, error) {
return srv.(FoldersServer).CreateFolder(ctx, req.(*CreateFolderRequest))
}
return interceptor(ctx, in, info, handler)
}