Project import generated by Copybara.
GitOrigin-RevId: d9e9e3fb4e31372ec1fb43b178994ca78fa8fe70
diff --git a/api/v3/api_proto/permissions.proto b/api/v3/api_proto/permissions.proto
new file mode 100644
index 0000000..9efba1f
--- /dev/null
+++ b/api/v3/api_proto/permissions.proto
@@ -0,0 +1,61 @@
+// Copyright 2020 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style
+// license that can be found in the LICENSE file.
+
+syntax = "proto3";
+
+package monorail.v3;
+
+option go_package = "api/v3/api_proto";
+
+import "google/api/field_behavior.proto";
+import "api/v3/api_proto/permission_objects.proto";
+
+// ***DO NOT CALL rpcs IN THIS SERVICE.***
+// This service is for Monorail's frontend only.
+
+// Permissions service includes all methods needed for fetching permissions.
+service Permissions {
+ // status: DO NOT USE
+ // Returns the requester's permissions for the given resource.
+ //
+ // Raises:
+ // PERMISSION_DENIED if the given resource does not exist and/or the
+ // requester does not have permission to view the resource's name space.
+ // NOT_FOUND if the given resource does not exist.
+ rpc GetPermissionSet (GetPermissionSetRequest) returns (PermissionSet) {}
+
+ // status: DO NOT USE
+ // Returns the requester's permissions for all the given resources.
+ //
+ // Raises:
+ // PERMISSION_DENIED if any of the given resources do not exist and/or the
+ // requester does not have permission to view one of the resource's
+ // name space.
+ // NOT_FOUND if one of the given resources do not exist.
+ rpc BatchGetPermissionSets (BatchGetPermissionSetsRequest) returns (BatchGetPermissionSetsResponse) {}
+}
+
+
+// Request message for the GetPermissionSet emthod.
+// Next available tag: 2
+message GetPermissionSetRequest {
+ // The resource name of the resource permissions to retrieve.
+ string name = 1 [ (google.api.field_behavior) = REQUIRED ];
+}
+
+
+// Request message for the BatchGetPermissionSets method.
+// Next available tag: 2
+message BatchGetPermissionSetsRequest {
+ // The resource names of the resource permissions to retrieve.
+ repeated string names = 1 [ (google.api.field_behavior) = REQUIRED ];
+}
+
+
+// Response message for the BatchGetPermissionSets method.
+// Next available tag: 2
+message BatchGetPermissionSetsResponse {
+ // The Permissions, one for each of the given resources.
+ repeated PermissionSet permission_sets = 1;
+}