go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/analysis/internal/bugs/monorail/api_proto/permissions.pb.go (about) 1 // Copyright 2020 The Chromium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 // Code generated by protoc-gen-go. DO NOT EDIT. 6 // versions: 7 // protoc-gen-go v1.31.0 8 // protoc v3.21.7 9 // source: go.chromium.org/luci/analysis/internal/bugs/monorail/api_proto/permissions.proto 10 11 package api_proto 12 13 import prpc "go.chromium.org/luci/grpc/prpc" 14 15 import ( 16 context "context" 17 _ "google.golang.org/genproto/googleapis/api/annotations" 18 grpc "google.golang.org/grpc" 19 codes "google.golang.org/grpc/codes" 20 status "google.golang.org/grpc/status" 21 protoreflect "google.golang.org/protobuf/reflect/protoreflect" 22 protoimpl "google.golang.org/protobuf/runtime/protoimpl" 23 reflect "reflect" 24 sync "sync" 25 ) 26 27 const ( 28 // Verify that this generated code is sufficiently up-to-date. 29 _ = protoimpl.EnforceVersion(20 - protoimpl.MinVersion) 30 // Verify that runtime/protoimpl is sufficiently up-to-date. 31 _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) 32 ) 33 34 // Request message for the GetPermissionSet emthod. 35 // Next available tag: 2 36 type GetPermissionSetRequest struct { 37 state protoimpl.MessageState 38 sizeCache protoimpl.SizeCache 39 unknownFields protoimpl.UnknownFields 40 41 // The resource name of the resource permissions to retrieve. 42 Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` 43 } 44 45 func (x *GetPermissionSetRequest) Reset() { 46 *x = GetPermissionSetRequest{} 47 if protoimpl.UnsafeEnabled { 48 mi := &file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_msgTypes[0] 49 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 50 ms.StoreMessageInfo(mi) 51 } 52 } 53 54 func (x *GetPermissionSetRequest) String() string { 55 return protoimpl.X.MessageStringOf(x) 56 } 57 58 func (*GetPermissionSetRequest) ProtoMessage() {} 59 60 func (x *GetPermissionSetRequest) ProtoReflect() protoreflect.Message { 61 mi := &file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_msgTypes[0] 62 if protoimpl.UnsafeEnabled && x != nil { 63 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 64 if ms.LoadMessageInfo() == nil { 65 ms.StoreMessageInfo(mi) 66 } 67 return ms 68 } 69 return mi.MessageOf(x) 70 } 71 72 // Deprecated: Use GetPermissionSetRequest.ProtoReflect.Descriptor instead. 73 func (*GetPermissionSetRequest) Descriptor() ([]byte, []int) { 74 return file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_rawDescGZIP(), []int{0} 75 } 76 77 func (x *GetPermissionSetRequest) GetName() string { 78 if x != nil { 79 return x.Name 80 } 81 return "" 82 } 83 84 // Request message for the BatchGetPermissionSets method. 85 // Next available tag: 2 86 type BatchGetPermissionSetsRequest struct { 87 state protoimpl.MessageState 88 sizeCache protoimpl.SizeCache 89 unknownFields protoimpl.UnknownFields 90 91 // The resource names of the resource permissions to retrieve. 92 Names []string `protobuf:"bytes,1,rep,name=names,proto3" json:"names,omitempty"` 93 } 94 95 func (x *BatchGetPermissionSetsRequest) Reset() { 96 *x = BatchGetPermissionSetsRequest{} 97 if protoimpl.UnsafeEnabled { 98 mi := &file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_msgTypes[1] 99 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 100 ms.StoreMessageInfo(mi) 101 } 102 } 103 104 func (x *BatchGetPermissionSetsRequest) String() string { 105 return protoimpl.X.MessageStringOf(x) 106 } 107 108 func (*BatchGetPermissionSetsRequest) ProtoMessage() {} 109 110 func (x *BatchGetPermissionSetsRequest) ProtoReflect() protoreflect.Message { 111 mi := &file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_msgTypes[1] 112 if protoimpl.UnsafeEnabled && x != nil { 113 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 114 if ms.LoadMessageInfo() == nil { 115 ms.StoreMessageInfo(mi) 116 } 117 return ms 118 } 119 return mi.MessageOf(x) 120 } 121 122 // Deprecated: Use BatchGetPermissionSetsRequest.ProtoReflect.Descriptor instead. 123 func (*BatchGetPermissionSetsRequest) Descriptor() ([]byte, []int) { 124 return file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_rawDescGZIP(), []int{1} 125 } 126 127 func (x *BatchGetPermissionSetsRequest) GetNames() []string { 128 if x != nil { 129 return x.Names 130 } 131 return nil 132 } 133 134 // Response message for the BatchGetPermissionSets method. 135 // Next available tag: 2 136 type BatchGetPermissionSetsResponse struct { 137 state protoimpl.MessageState 138 sizeCache protoimpl.SizeCache 139 unknownFields protoimpl.UnknownFields 140 141 // The Permissions, one for each of the given resources. 142 PermissionSets []*PermissionSet `protobuf:"bytes,1,rep,name=permission_sets,json=permissionSets,proto3" json:"permission_sets,omitempty"` 143 } 144 145 func (x *BatchGetPermissionSetsResponse) Reset() { 146 *x = BatchGetPermissionSetsResponse{} 147 if protoimpl.UnsafeEnabled { 148 mi := &file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_msgTypes[2] 149 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 150 ms.StoreMessageInfo(mi) 151 } 152 } 153 154 func (x *BatchGetPermissionSetsResponse) String() string { 155 return protoimpl.X.MessageStringOf(x) 156 } 157 158 func (*BatchGetPermissionSetsResponse) ProtoMessage() {} 159 160 func (x *BatchGetPermissionSetsResponse) ProtoReflect() protoreflect.Message { 161 mi := &file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_msgTypes[2] 162 if protoimpl.UnsafeEnabled && x != nil { 163 ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) 164 if ms.LoadMessageInfo() == nil { 165 ms.StoreMessageInfo(mi) 166 } 167 return ms 168 } 169 return mi.MessageOf(x) 170 } 171 172 // Deprecated: Use BatchGetPermissionSetsResponse.ProtoReflect.Descriptor instead. 173 func (*BatchGetPermissionSetsResponse) Descriptor() ([]byte, []int) { 174 return file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_rawDescGZIP(), []int{2} 175 } 176 177 func (x *BatchGetPermissionSetsResponse) GetPermissionSets() []*PermissionSet { 178 if x != nil { 179 return x.PermissionSets 180 } 181 return nil 182 } 183 184 var File_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto protoreflect.FileDescriptor 185 186 var file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_rawDesc = []byte{ 187 0x0a, 0x50, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 188 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x2f, 189 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x62, 0x75, 0x67, 0x73, 0x2f, 0x6d, 0x6f, 190 0x6e, 0x6f, 0x72, 0x61, 0x69, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 191 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x2e, 0x70, 0x72, 0x6f, 192 0x74, 0x6f, 0x12, 0x0b, 0x6d, 0x6f, 0x6e, 0x6f, 0x72, 0x61, 0x69, 0x6c, 0x2e, 0x76, 0x33, 0x1a, 193 0x1f, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x66, 0x69, 0x65, 0x6c, 194 0x64, 0x5f, 0x62, 0x65, 0x68, 0x61, 0x76, 0x69, 0x6f, 0x72, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 195 0x1a, 0x57, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 196 0x67, 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x2f, 197 0x69, 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x62, 0x75, 0x67, 0x73, 0x2f, 0x6d, 0x6f, 198 0x6e, 0x6f, 0x72, 0x61, 0x69, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 199 0x2f, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x6f, 0x62, 0x6a, 0x65, 200 0x63, 0x74, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x22, 0x32, 0x0a, 0x17, 0x47, 0x65, 0x74, 201 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 202 0x75, 0x65, 0x73, 0x74, 0x12, 0x17, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 203 0x28, 0x09, 0x42, 0x03, 0xe0, 0x41, 0x02, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x3a, 0x0a, 204 0x1d, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 205 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x19, 206 0x0a, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x42, 0x03, 0xe0, 207 0x41, 0x02, 0x52, 0x05, 0x6e, 0x61, 0x6d, 0x65, 0x73, 0x22, 0x65, 0x0a, 0x1e, 0x42, 0x61, 0x74, 208 0x63, 0x68, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 209 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x43, 0x0a, 0x0f, 0x70, 210 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x5f, 0x73, 0x65, 0x74, 0x73, 0x18, 0x01, 211 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x6d, 0x6f, 0x6e, 0x6f, 0x72, 0x61, 0x69, 0x6c, 0x2e, 212 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 213 0x52, 0x0e, 0x70, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 214 0x32, 0xda, 0x01, 0x0a, 0x0b, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x73, 215 0x12, 0x56, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 216 0x6e, 0x53, 0x65, 0x74, 0x12, 0x24, 0x2e, 0x6d, 0x6f, 0x6e, 0x6f, 0x72, 0x61, 0x69, 0x6c, 0x2e, 217 0x76, 0x33, 0x2e, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 218 0x53, 0x65, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1a, 0x2e, 0x6d, 0x6f, 0x6e, 219 0x6f, 0x72, 0x61, 0x69, 0x6c, 0x2e, 0x76, 0x33, 0x2e, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 220 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x22, 0x00, 0x12, 0x73, 0x0a, 0x16, 0x42, 0x61, 0x74, 0x63, 221 0x68, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 0x65, 222 0x74, 0x73, 0x12, 0x2a, 0x2e, 0x6d, 0x6f, 0x6e, 0x6f, 0x72, 0x61, 0x69, 0x6c, 0x2e, 0x76, 0x33, 223 0x2e, 0x42, 0x61, 0x74, 0x63, 0x68, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 224 0x69, 0x6f, 0x6e, 0x53, 0x65, 0x74, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x2b, 225 0x2e, 0x6d, 0x6f, 0x6e, 0x6f, 0x72, 0x61, 0x69, 0x6c, 0x2e, 0x76, 0x33, 0x2e, 0x42, 0x61, 0x74, 226 0x63, 0x68, 0x47, 0x65, 0x74, 0x50, 0x65, 0x72, 0x6d, 0x69, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x53, 227 0x65, 0x74, 0x73, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x42, 0x40, 0x5a, 228 0x3e, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 229 0x2f, 0x6c, 0x75, 0x63, 0x69, 0x2f, 0x61, 0x6e, 0x61, 0x6c, 0x79, 0x73, 0x69, 0x73, 0x2f, 0x69, 230 0x6e, 0x74, 0x65, 0x72, 0x6e, 0x61, 0x6c, 0x2f, 0x62, 0x75, 0x67, 0x73, 0x2f, 0x6d, 0x6f, 0x6e, 231 0x6f, 0x72, 0x61, 0x69, 0x6c, 0x2f, 0x61, 0x70, 0x69, 0x5f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 232 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, 233 } 234 235 var ( 236 file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_rawDescOnce sync.Once 237 file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_rawDescData = file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_rawDesc 238 ) 239 240 func file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_rawDescGZIP() []byte { 241 file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_rawDescOnce.Do(func() { 242 file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_rawDescData = protoimpl.X.CompressGZIP(file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_rawDescData) 243 }) 244 return file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_rawDescData 245 } 246 247 var file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_msgTypes = make([]protoimpl.MessageInfo, 3) 248 var file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_goTypes = []interface{}{ 249 (*GetPermissionSetRequest)(nil), // 0: monorail.v3.GetPermissionSetRequest 250 (*BatchGetPermissionSetsRequest)(nil), // 1: monorail.v3.BatchGetPermissionSetsRequest 251 (*BatchGetPermissionSetsResponse)(nil), // 2: monorail.v3.BatchGetPermissionSetsResponse 252 (*PermissionSet)(nil), // 3: monorail.v3.PermissionSet 253 } 254 var file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_depIdxs = []int32{ 255 3, // 0: monorail.v3.BatchGetPermissionSetsResponse.permission_sets:type_name -> monorail.v3.PermissionSet 256 0, // 1: monorail.v3.Permissions.GetPermissionSet:input_type -> monorail.v3.GetPermissionSetRequest 257 1, // 2: monorail.v3.Permissions.BatchGetPermissionSets:input_type -> monorail.v3.BatchGetPermissionSetsRequest 258 3, // 3: monorail.v3.Permissions.GetPermissionSet:output_type -> monorail.v3.PermissionSet 259 2, // 4: monorail.v3.Permissions.BatchGetPermissionSets:output_type -> monorail.v3.BatchGetPermissionSetsResponse 260 3, // [3:5] is the sub-list for method output_type 261 1, // [1:3] is the sub-list for method input_type 262 1, // [1:1] is the sub-list for extension type_name 263 1, // [1:1] is the sub-list for extension extendee 264 0, // [0:1] is the sub-list for field type_name 265 } 266 267 func init() { 268 file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_init() 269 } 270 func file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_init() { 271 if File_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto != nil { 272 return 273 } 274 file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permission_objects_proto_init() 275 if !protoimpl.UnsafeEnabled { 276 file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { 277 switch v := v.(*GetPermissionSetRequest); i { 278 case 0: 279 return &v.state 280 case 1: 281 return &v.sizeCache 282 case 2: 283 return &v.unknownFields 284 default: 285 return nil 286 } 287 } 288 file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} { 289 switch v := v.(*BatchGetPermissionSetsRequest); i { 290 case 0: 291 return &v.state 292 case 1: 293 return &v.sizeCache 294 case 2: 295 return &v.unknownFields 296 default: 297 return nil 298 } 299 } 300 file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} { 301 switch v := v.(*BatchGetPermissionSetsResponse); i { 302 case 0: 303 return &v.state 304 case 1: 305 return &v.sizeCache 306 case 2: 307 return &v.unknownFields 308 default: 309 return nil 310 } 311 } 312 } 313 type x struct{} 314 out := protoimpl.TypeBuilder{ 315 File: protoimpl.DescBuilder{ 316 GoPackagePath: reflect.TypeOf(x{}).PkgPath(), 317 RawDescriptor: file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_rawDesc, 318 NumEnums: 0, 319 NumMessages: 3, 320 NumExtensions: 0, 321 NumServices: 1, 322 }, 323 GoTypes: file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_goTypes, 324 DependencyIndexes: file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_depIdxs, 325 MessageInfos: file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_msgTypes, 326 }.Build() 327 File_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto = out.File 328 file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_rawDesc = nil 329 file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_goTypes = nil 330 file_go_chromium_org_luci_analysis_internal_bugs_monorail_api_proto_permissions_proto_depIdxs = nil 331 } 332 333 // Reference imports to suppress errors if they are not otherwise used. 334 var _ context.Context 335 var _ grpc.ClientConnInterface 336 337 // This is a compile-time assertion to ensure that this generated file 338 // is compatible with the grpc package it is being compiled against. 339 const _ = grpc.SupportPackageIsVersion6 340 341 // PermissionsClient is the client API for Permissions service. 342 // 343 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream. 344 type PermissionsClient interface { 345 // status: DO NOT USE 346 // Returns the requester's permissions for the given resource. 347 // 348 // Raises: 349 // 350 // PERMISSION_DENIED if the given resource does not exist and/or the 351 // requester does not have permission to view the resource's name space. 352 // NOT_FOUND if the given resource does not exist. 353 GetPermissionSet(ctx context.Context, in *GetPermissionSetRequest, opts ...grpc.CallOption) (*PermissionSet, error) 354 // status: DO NOT USE 355 // Returns the requester's permissions for all the given resources. 356 // 357 // Raises: 358 // 359 // PERMISSION_DENIED if any of the given resources do not exist and/or the 360 // requester does not have permission to view one of the resource's 361 // name space. 362 // 363 // NOT_FOUND if one of the given resources do not exist. 364 BatchGetPermissionSets(ctx context.Context, in *BatchGetPermissionSetsRequest, opts ...grpc.CallOption) (*BatchGetPermissionSetsResponse, error) 365 } 366 type permissionsPRPCClient struct { 367 client *prpc.Client 368 } 369 370 func NewPermissionsPRPCClient(client *prpc.Client) PermissionsClient { 371 return &permissionsPRPCClient{client} 372 } 373 374 func (c *permissionsPRPCClient) GetPermissionSet(ctx context.Context, in *GetPermissionSetRequest, opts ...grpc.CallOption) (*PermissionSet, error) { 375 out := new(PermissionSet) 376 err := c.client.Call(ctx, "monorail.v3.Permissions", "GetPermissionSet", in, out, opts...) 377 if err != nil { 378 return nil, err 379 } 380 return out, nil 381 } 382 383 func (c *permissionsPRPCClient) BatchGetPermissionSets(ctx context.Context, in *BatchGetPermissionSetsRequest, opts ...grpc.CallOption) (*BatchGetPermissionSetsResponse, error) { 384 out := new(BatchGetPermissionSetsResponse) 385 err := c.client.Call(ctx, "monorail.v3.Permissions", "BatchGetPermissionSets", in, out, opts...) 386 if err != nil { 387 return nil, err 388 } 389 return out, nil 390 } 391 392 type permissionsClient struct { 393 cc grpc.ClientConnInterface 394 } 395 396 func NewPermissionsClient(cc grpc.ClientConnInterface) PermissionsClient { 397 return &permissionsClient{cc} 398 } 399 400 func (c *permissionsClient) GetPermissionSet(ctx context.Context, in *GetPermissionSetRequest, opts ...grpc.CallOption) (*PermissionSet, error) { 401 out := new(PermissionSet) 402 err := c.cc.Invoke(ctx, "/monorail.v3.Permissions/GetPermissionSet", in, out, opts...) 403 if err != nil { 404 return nil, err 405 } 406 return out, nil 407 } 408 409 func (c *permissionsClient) BatchGetPermissionSets(ctx context.Context, in *BatchGetPermissionSetsRequest, opts ...grpc.CallOption) (*BatchGetPermissionSetsResponse, error) { 410 out := new(BatchGetPermissionSetsResponse) 411 err := c.cc.Invoke(ctx, "/monorail.v3.Permissions/BatchGetPermissionSets", in, out, opts...) 412 if err != nil { 413 return nil, err 414 } 415 return out, nil 416 } 417 418 // PermissionsServer is the server API for Permissions service. 419 type PermissionsServer interface { 420 // status: DO NOT USE 421 // Returns the requester's permissions for the given resource. 422 // 423 // Raises: 424 // 425 // PERMISSION_DENIED if the given resource does not exist and/or the 426 // requester does not have permission to view the resource's name space. 427 // NOT_FOUND if the given resource does not exist. 428 GetPermissionSet(context.Context, *GetPermissionSetRequest) (*PermissionSet, error) 429 // status: DO NOT USE 430 // Returns the requester's permissions for all the given resources. 431 // 432 // Raises: 433 // 434 // PERMISSION_DENIED if any of the given resources do not exist and/or the 435 // requester does not have permission to view one of the resource's 436 // name space. 437 // 438 // NOT_FOUND if one of the given resources do not exist. 439 BatchGetPermissionSets(context.Context, *BatchGetPermissionSetsRequest) (*BatchGetPermissionSetsResponse, error) 440 } 441 442 // UnimplementedPermissionsServer can be embedded to have forward compatible implementations. 443 type UnimplementedPermissionsServer struct { 444 } 445 446 func (*UnimplementedPermissionsServer) GetPermissionSet(context.Context, *GetPermissionSetRequest) (*PermissionSet, error) { 447 return nil, status.Errorf(codes.Unimplemented, "method GetPermissionSet not implemented") 448 } 449 func (*UnimplementedPermissionsServer) BatchGetPermissionSets(context.Context, *BatchGetPermissionSetsRequest) (*BatchGetPermissionSetsResponse, error) { 450 return nil, status.Errorf(codes.Unimplemented, "method BatchGetPermissionSets not implemented") 451 } 452 453 func RegisterPermissionsServer(s prpc.Registrar, srv PermissionsServer) { 454 s.RegisterService(&_Permissions_serviceDesc, srv) 455 } 456 457 func _Permissions_GetPermissionSet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 458 in := new(GetPermissionSetRequest) 459 if err := dec(in); err != nil { 460 return nil, err 461 } 462 if interceptor == nil { 463 return srv.(PermissionsServer).GetPermissionSet(ctx, in) 464 } 465 info := &grpc.UnaryServerInfo{ 466 Server: srv, 467 FullMethod: "/monorail.v3.Permissions/GetPermissionSet", 468 } 469 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 470 return srv.(PermissionsServer).GetPermissionSet(ctx, req.(*GetPermissionSetRequest)) 471 } 472 return interceptor(ctx, in, info, handler) 473 } 474 475 func _Permissions_BatchGetPermissionSets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { 476 in := new(BatchGetPermissionSetsRequest) 477 if err := dec(in); err != nil { 478 return nil, err 479 } 480 if interceptor == nil { 481 return srv.(PermissionsServer).BatchGetPermissionSets(ctx, in) 482 } 483 info := &grpc.UnaryServerInfo{ 484 Server: srv, 485 FullMethod: "/monorail.v3.Permissions/BatchGetPermissionSets", 486 } 487 handler := func(ctx context.Context, req interface{}) (interface{}, error) { 488 return srv.(PermissionsServer).BatchGetPermissionSets(ctx, req.(*BatchGetPermissionSetsRequest)) 489 } 490 return interceptor(ctx, in, info, handler) 491 } 492 493 var _Permissions_serviceDesc = grpc.ServiceDesc{ 494 ServiceName: "monorail.v3.Permissions", 495 HandlerType: (*PermissionsServer)(nil), 496 Methods: []grpc.MethodDesc{ 497 { 498 MethodName: "GetPermissionSet", 499 Handler: _Permissions_GetPermissionSet_Handler, 500 }, 501 { 502 MethodName: "BatchGetPermissionSets", 503 Handler: _Permissions_BatchGetPermissionSets_Handler, 504 }, 505 }, 506 Streams: []grpc.StreamDesc{}, 507 Metadata: "go.chromium.org/luci/analysis/internal/bugs/monorail/api_proto/permissions.proto", 508 }