Debian Codegraph @

googleapis/apps/drive/labels/v2beta/label_permission.pb.go

raw symbols SCIP
1 // Copyright 2025 Google LLC
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14
15 // Code generated by protoc-gen-go. DO NOT EDIT.
16 // versions:
17 // protoc-gen-go v1.26.0
18 // protoc v4.24.4
19 // source: google/apps/drive/labels/v2beta/label_permission.proto
20
21 package labels
22
23 import (
24 reflect "reflect"
25 sync "sync"
26
27 _ "google.golang.org/genproto/googleapis/api/annotations"
28 protoreflect "google.golang.org/protobuf/reflect/protoreflect"
29 protoimpl "google.golang.org/protobuf/runtime/protoimpl"
30 )
31
32 const (
33 // Verify that this generated code is sufficiently up-to-date.
34 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion)
35 // Verify that runtime/protoimpl is sufficiently up-to-date.
36 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
37 )
38
39 // Roles are concentric with subsequent role.
40 type LabelPermission_LabelRole int32
41
42 const (
43 // Unknown role.
44 LabelPermission_LABEL_ROLE_UNSPECIFIED LabelPermission_LabelRole = 0
45 // A reader can read the label and associated metadata applied to Drive
46 // items.
47 LabelPermission_READER LabelPermission_LabelRole = 1
48 // An applier can write associated metadata on Drive items in which they
49 // also have write access to. Implies `READER`.
50 LabelPermission_APPLIER LabelPermission_LabelRole = 2
51 // An organizer can pin this label in shared drives they manage
52 // and add new appliers to the label.
53 LabelPermission_ORGANIZER LabelPermission_LabelRole = 3
54 // Editors can make any update including deleting the label which
55 // also deletes the associated Drive item metadata. Implies `APPLIER`.
56 LabelPermission_EDITOR LabelPermission_LabelRole = 4
57 )
58
59 // Enum value maps for LabelPermission_LabelRole.
60 var (
61 LabelPermission_LabelRole_name = map[int32]string{
62 0: "LABEL_ROLE_UNSPECIFIED",
63 1: "READER",
64 2: "APPLIER",
65 3: "ORGANIZER",
66 4: "EDITOR",
67 }
68 LabelPermission_LabelRole_value = map[string]int32{
69 "LABEL_ROLE_UNSPECIFIED": 0,
70 "READER": 1,
71 "APPLIER": 2,
72 "ORGANIZER": 3,
73 "EDITOR": 4,
74 }
75 )
76
77 func (x LabelPermission_LabelRole) Enum() *LabelPermission_LabelRole {
78 p := new(LabelPermission_LabelRole)
79 *p = x
80 return p
81 }
82
83 func (x LabelPermission_LabelRole) String() string {
84 return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x))
85 }
86
87 func (LabelPermission_LabelRole) Descriptor() protoreflect.EnumDescriptor {
88 return file_google_apps_drive_labels_v2beta_label_permission_proto_enumTypes[0].Descriptor()
89 }
90
91 func (LabelPermission_LabelRole) Type() protoreflect.EnumType {
92 return &file_google_apps_drive_labels_v2beta_label_permission_proto_enumTypes[0]
93 }
94
95 func (x LabelPermission_LabelRole) Number() protoreflect.EnumNumber {
96 return protoreflect.EnumNumber(x)
97 }
98
99 // Deprecated: Use LabelPermission_LabelRole.Descriptor instead.
100 func (LabelPermission_LabelRole) EnumDescriptor() ([]byte, []int) {
101 return file_google_apps_drive_labels_v2beta_label_permission_proto_rawDescGZIP(), []int{0, 0}
102 }
103
104 // The permission that applies to a principal (user, group, audience) on a
105 // label.
106 type LabelPermission struct {
107 state protoimpl.MessageState
108 sizeCache protoimpl.SizeCache
109 unknownFields protoimpl.UnknownFields
110
111 // The principal this permission applies to. Must be either an email, user,
112 // group, or audience.
113 // Example:
114 // * people/12345
115 // * groups/45678
116 // * audiences/default
117 //
118 // Types that are assignable to Principal:
119 //
120 // *LabelPermission_Person
121 // *LabelPermission_Group
122 // *LabelPermission_Audience
123 Principal isLabelPermission_Principal `protobuf_oneof:"principal"`
124 // Resource name of this permission.
125 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
126 // Specifies the email address for a user or group pricinpal. Not populated
127 // for audience principals. User and Group permissions may only be inserted
128 // using email address. On update requests, if email address is specified,
129 // no principal should be specified.
130 Email string `protobuf:"bytes,2,opt,name=email,proto3" json:"email,omitempty"`
131 // The role the principal should have.
132 Role LabelPermission_LabelRole `protobuf:"varint,6,opt,name=role,proto3,enum=google.apps.drive.labels.v2beta.LabelPermission_LabelRole" json:"role,omitempty"`
133 }
134
135 func (x *LabelPermission) Reset() {
136 *x = LabelPermission{}
137 if protoimpl.UnsafeEnabled {
138 mi := &file_google_apps_drive_labels_v2beta_label_permission_proto_msgTypes[0]
139 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
140 ms.StoreMessageInfo(mi)
141 }
142 }
143
144 func (x *LabelPermission) String() string {
145 return protoimpl.X.MessageStringOf(x)
146 }
147
148 func (*LabelPermission) ProtoMessage() {}
149
150 func (x *LabelPermission) ProtoReflect() protoreflect.Message {
151 mi := &file_google_apps_drive_labels_v2beta_label_permission_proto_msgTypes[0]
152 if protoimpl.UnsafeEnabled && x != nil {
153 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
154 if ms.LoadMessageInfo() == nil {
155 ms.StoreMessageInfo(mi)
156 }
157 return ms
158 }
159 return mi.MessageOf(x)
160 }
161
162 // Deprecated: Use LabelPermission.ProtoReflect.Descriptor instead.
163 func (*LabelPermission) Descriptor() ([]byte, []int) {
164 return file_google_apps_drive_labels_v2beta_label_permission_proto_rawDescGZIP(), []int{0}
165 }
166
167 func (m *LabelPermission) GetPrincipal() isLabelPermission_Principal {
168 if m != nil {
169 return m.Principal
170 }
171 return nil
172 }
173
174 func (x *LabelPermission) GetPerson() string {
175 if x, ok := x.GetPrincipal().(*LabelPermission_Person); ok {
176 return x.Person
177 }
178 return ""
179 }
180
181 func (x *LabelPermission) GetGroup() string {
182 if x, ok := x.GetPrincipal().(*LabelPermission_Group); ok {
183 return x.Group
184 }
185 return ""
186 }
187
188 func (x *LabelPermission) GetAudience() string {
189 if x, ok := x.GetPrincipal().(*LabelPermission_Audience); ok {
190 return x.Audience
191 }
192 return ""
193 }
194
195 func (x *LabelPermission) GetName() string {
196 if x != nil {
197 return x.Name
198 }
199 return ""
200 }
201
202 func (x *LabelPermission) GetEmail() string {
203 if x != nil {
204 return x.Email
205 }
206 return ""
207 }
208
209 func (x *LabelPermission) GetRole() LabelPermission_LabelRole {
210 if x != nil {
211 return x.Role
212 }
213 return LabelPermission_LABEL_ROLE_UNSPECIFIED
214 }
215
216 type isLabelPermission_Principal interface {
217 isLabelPermission_Principal()
218 }
219
220 type LabelPermission_Person struct {
221 // Person resource name.
222 Person string `protobuf:"bytes,3,opt,name=person,proto3,oneof"`
223 }
224
225 type LabelPermission_Group struct {
226 // Group resource name.
227 Group string `protobuf:"bytes,4,opt,name=group,proto3,oneof"`
228 }
229
230 type LabelPermission_Audience struct {
231 // Audience to grant a role to. The magic value of `audiences/default` may
232 // be used to apply the role to the default audience in the context of the
233 // organization that owns the Label.
234 Audience string `protobuf:"bytes,5,opt,name=audience,proto3,oneof"`
235 }
236
237 func (*LabelPermission_Person) isLabelPermission_Principal() {}
238
239 func (*LabelPermission_Group) isLabelPermission_Principal() {}
240
241 func (*LabelPermission_Audience) isLabelPermission_Principal() {}
242
243 var File_google_apps_drive_labels_v2beta_label_permission_proto protoreflect.FileDescriptor
244
245 var file_google_apps_drive_labels_v2beta_label_permission_proto_rawDesc = []byte{
246 0x0a, 0x36, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x70, 0x73, 0x2f, 0x64, 0x72,
247 0x69, 0x76, 0x65, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74,
248 0x61, 0x2f, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x5f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69,
249 0x6f, 0x6e, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65,
250 0x2e, 0x61, 0x70, 0x70, 0x73, 0x2e, 0x64, 0x72, 0x69, 0x76, 0x65, 0x2e, 0x6c, 0x61, 0x62, 0x65,
251 0x6c, 0x73, 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x1a, 0x19, 0x67, 0x6f, 0x6f, 0x67, 0x6c,
252 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x65, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x2e, 0x70,
253 0x72, 0x6f, 0x74, 0x6f, 0x22, 0xe4, 0x03, 0x0a, 0x0f, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x50, 0x65,
254 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x3b, 0x0a, 0x06, 0x70, 0x65, 0x72, 0x73,
255 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x42, 0x21, 0xfa, 0x41, 0x1e, 0x0a, 0x1c, 0x70,
256 0x65, 0x6f, 0x70, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73,
257 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x06, 0x70,
258 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x38, 0x0a, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x18, 0x04,
259 0x20, 0x01, 0x28, 0x09, 0x42, 0x20, 0xfa, 0x41, 0x1d, 0x0a, 0x1b, 0x67, 0x72, 0x6f, 0x75, 0x70,
260 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e, 0x63, 0x6f, 0x6d,
261 0x2f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x48, 0x00, 0x52, 0x05, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x12,
262 0x1c, 0x0a, 0x08, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28,
263 0x09, 0x48, 0x00, 0x52, 0x08, 0x61, 0x75, 0x64, 0x69, 0x65, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a,
264 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
265 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
266 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69, 0x6c, 0x12, 0x4e, 0x0a, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x18,
267 0x06, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x3a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61,
268 0x70, 0x70, 0x73, 0x2e, 0x64, 0x72, 0x69, 0x76, 0x65, 0x2e, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73,
269 0x2e, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x50, 0x65, 0x72,
270 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x2e, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x52, 0x6f, 0x6c,
271 0x65, 0x52, 0x04, 0x72, 0x6f, 0x6c, 0x65, 0x22, 0x5b, 0x0a, 0x09, 0x4c, 0x61, 0x62, 0x65, 0x6c,
272 0x52, 0x6f, 0x6c, 0x65, 0x12, 0x1a, 0x0a, 0x16, 0x4c, 0x41, 0x42, 0x45, 0x4c, 0x5f, 0x52, 0x4f,
273 0x4c, 0x45, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00,
274 0x12, 0x0a, 0x0a, 0x06, 0x52, 0x45, 0x41, 0x44, 0x45, 0x52, 0x10, 0x01, 0x12, 0x0b, 0x0a, 0x07,
275 0x41, 0x50, 0x50, 0x4c, 0x49, 0x45, 0x52, 0x10, 0x02, 0x12, 0x0d, 0x0a, 0x09, 0x4f, 0x52, 0x47,
276 0x41, 0x4e, 0x49, 0x5a, 0x45, 0x52, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x45, 0x44, 0x49, 0x54,
277 0x4f, 0x52, 0x10, 0x04, 0x3a, 0x58, 0xea, 0x41, 0x55, 0x0a, 0x2a, 0x64, 0x72, 0x69, 0x76, 0x65,
278 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69,
279 0x73, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x50, 0x65, 0x72, 0x6d, 0x69,
280 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x27, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x2f, 0x7b, 0x6c,
281 0x61, 0x62, 0x65, 0x6c, 0x7d, 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e,
282 0x73, 0x2f, 0x7b, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x7d, 0x42, 0x0b,
283 0x0a, 0x09, 0x70, 0x72, 0x69, 0x6e, 0x63, 0x69, 0x70, 0x61, 0x6c, 0x42, 0xbb, 0x01, 0x0a, 0x23,
284 0x63, 0x6f, 0x6d, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x61, 0x70, 0x70, 0x73, 0x2e,
285 0x64, 0x72, 0x69, 0x76, 0x65, 0x2e, 0x6c, 0x61, 0x62, 0x65, 0x6c, 0x73, 0x2e, 0x76, 0x32, 0x62,
286 0x65, 0x74, 0x61, 0x42, 0x14, 0x4c, 0x61, 0x62, 0x65, 0x6c, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73,
287 0x73, 0x69, 0x6f, 0x6e, 0x50, 0x72, 0x6f, 0x74, 0x6f, 0x50, 0x01, 0x5a, 0x45, 0x67, 0x6f, 0x6f,
288 0x67, 0x6c, 0x65, 0x2e, 0x67, 0x6f, 0x6c, 0x61, 0x6e, 0x67, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x67,
289 0x65, 0x6e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70,
290 0x69, 0x73, 0x2f, 0x61, 0x70, 0x70, 0x73, 0x2f, 0x64, 0x72, 0x69, 0x76, 0x65, 0x2f, 0x6c, 0x61,
291 0x62, 0x65, 0x6c, 0x73, 0x2f, 0x76, 0x32, 0x62, 0x65, 0x74, 0x61, 0x3b, 0x6c, 0x61, 0x62, 0x65,
292 0x6c, 0x73, 0xa2, 0x02, 0x04, 0x44, 0x4c, 0x42, 0x4c, 0xea, 0x41, 0x2d, 0x0a, 0x1b, 0x67, 0x72,
293 0x6f, 0x75, 0x70, 0x73, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x61, 0x70, 0x69, 0x73, 0x2e,
294 0x63, 0x6f, 0x6d, 0x2f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x12, 0x0e, 0x67, 0x72, 0x6f, 0x75, 0x70,
295 0x73, 0x2f, 0x7b, 0x67, 0x72, 0x6f, 0x75, 0x70, 0x7d, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
296 0x33,
297 }
298
299 var (
300 file_google_apps_drive_labels_v2beta_label_permission_proto_rawDescOnce sync.Once
301 file_google_apps_drive_labels_v2beta_label_permission_proto_rawDescData = file_google_apps_drive_labels_v2beta_label_permission_proto_rawDesc
302 )
303
304 func file_google_apps_drive_labels_v2beta_label_permission_proto_rawDescGZIP() []byte {
305 file_google_apps_drive_labels_v2beta_label_permission_proto_rawDescOnce.Do(func() {
306 file_google_apps_drive_labels_v2beta_label_permission_proto_rawDescData = protoimpl.X.CompressGZIP(file_google_apps_drive_labels_v2beta_label_permission_proto_rawDescData)
307 })
308 return file_google_apps_drive_labels_v2beta_label_permission_proto_rawDescData
309 }
310
311 var file_google_apps_drive_labels_v2beta_label_permission_proto_enumTypes = make([]protoimpl.EnumInfo, 1)
312 var file_google_apps_drive_labels_v2beta_label_permission_proto_msgTypes = make([]protoimpl.MessageInfo, 1)
313 var file_google_apps_drive_labels_v2beta_label_permission_proto_goTypes = []interface{}{
314 (LabelPermission_LabelRole)(0), // 0: google.apps.drive.labels.v2beta.LabelPermission.LabelRole
315 (*LabelPermission)(nil), // 1: google.apps.drive.labels.v2beta.LabelPermission
316 }
317 var file_google_apps_drive_labels_v2beta_label_permission_proto_depIdxs = []int32{
318 0, // 0: google.apps.drive.labels.v2beta.LabelPermission.role:type_name -> google.apps.drive.labels.v2beta.LabelPermission.LabelRole
319 1, // [1:1] is the sub-list for method output_type
320 1, // [1:1] is the sub-list for method input_type
321 1, // [1:1] is the sub-list for extension type_name
322 1, // [1:1] is the sub-list for extension extendee
323 0, // [0:1] is the sub-list for field type_name
324 }
325
326 func init() { file_google_apps_drive_labels_v2beta_label_permission_proto_init() }
327 func file_google_apps_drive_labels_v2beta_label_permission_proto_init() {
328 if File_google_apps_drive_labels_v2beta_label_permission_proto != nil {
329 return
330 }
331 if !protoimpl.UnsafeEnabled {
332 file_google_apps_drive_labels_v2beta_label_permission_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
333 switch v := v.(*LabelPermission); i {
334 case 0:
335 return &v.state
336 case 1:
337 return &v.sizeCache
338 case 2:
339 return &v.unknownFields
340 default:
341 return nil
342 }
343 }
344 }
345 file_google_apps_drive_labels_v2beta_label_permission_proto_msgTypes[0].OneofWrappers = []interface{}{
346 (*LabelPermission_Person)(nil),
347 (*LabelPermission_Group)(nil),
348 (*LabelPermission_Audience)(nil),
349 }
350 type x struct{}
351 out := protoimpl.TypeBuilder{
352 File: protoimpl.DescBuilder{
353 GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
354 RawDescriptor: file_google_apps_drive_labels_v2beta_label_permission_proto_rawDesc,
355 NumEnums: 1,
356 NumMessages: 1,
357 NumExtensions: 0,
358 NumServices: 0,
359 },
360 GoTypes: file_google_apps_drive_labels_v2beta_label_permission_proto_goTypes,
361 DependencyIndexes: file_google_apps_drive_labels_v2beta_label_permission_proto_depIdxs,
362 EnumInfos: file_google_apps_drive_labels_v2beta_label_permission_proto_enumTypes,
363 MessageInfos: file_google_apps_drive_labels_v2beta_label_permission_proto_msgTypes,
364 }.Build()
365 File_google_apps_drive_labels_v2beta_label_permission_proto = out.File
366 file_google_apps_drive_labels_v2beta_label_permission_proto_rawDesc = nil
367 file_google_apps_drive_labels_v2beta_label_permission_proto_goTypes = nil
368 file_google_apps_drive_labels_v2beta_label_permission_proto_depIdxs = nil
369 }