Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 1 | // Copyright 2018 The Chromium Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style |
| 3 | // license that can be found in the LICENSE file or at |
| 4 | // https://developers.google.com/open-source/licenses/bsd |
| 5 | |
| 6 | syntax = "proto3"; |
| 7 | |
| 8 | |
| 9 | package monorail; |
| 10 | |
| 11 | import "api/api_proto/common.proto"; |
| 12 | import "api/api_proto/project_objects.proto"; |
| 13 | |
| 14 | |
| 15 | service Projects { |
| 16 | rpc ListProjects (ListProjectsRequest) returns (ListProjectsResponse) {} |
| 17 | rpc ListProjectTemplates (ListProjectTemplatesRequest) returns (ListProjectTemplatesResponse) {} |
| 18 | rpc GetConfig (GetConfigRequest) returns (Config) {} |
| 19 | rpc GetPresentationConfig (GetPresentationConfigRequest) returns (PresentationConfig) {} |
| 20 | rpc GetCustomPermissions (GetCustomPermissionsRequest) returns (GetCustomPermissionsResponse) {} |
| 21 | rpc GetVisibleMembers (GetVisibleMembersRequest) returns (GetVisibleMembersResponse) {} |
| 22 | rpc GetLabelOptions (GetLabelOptionsRequest) returns (GetLabelOptionsResponse) {} |
| 23 | rpc ListStatuses (ListStatusesRequest) returns (ListStatusesResponse) {} |
| 24 | rpc ListComponents (ListComponentsRequest) returns (ListComponentsResponse) {} |
| 25 | rpc ListFields (ListFieldsRequest) returns (ListFieldsResponse) {} |
| 26 | rpc GetProjectStarCount (GetProjectStarCountRequest) returns (GetProjectStarCountResponse) {} |
| 27 | rpc StarProject (StarProjectRequest) returns (StarProjectResponse) {} |
| 28 | rpc CheckProjectName (CheckProjectNameRequest) returns (CheckProjectNameResponse) {} |
| 29 | rpc CheckComponentName (CheckComponentNameRequest) returns (CheckComponentNameResponse) {} |
| 30 | rpc CheckFieldName (CheckFieldNameRequest) returns (CheckFieldNameResponse) {} |
| 31 | } |
| 32 | |
| 33 | |
| 34 | // Next available tag: 3 |
| 35 | message ListProjectsRequest { |
| 36 | int32 page_size = 1; |
| 37 | string page_token = 2; |
| 38 | } |
| 39 | |
| 40 | |
| 41 | // Next available tag: 3 |
| 42 | message ListProjectsResponse { |
| 43 | repeated Project projects = 1; |
| 44 | string next_page_token = 2; |
| 45 | } |
| 46 | |
| 47 | |
| 48 | // Next available tag: 3 |
| 49 | message ListProjectTemplatesRequest { |
| 50 | string project_name = 2; |
| 51 | } |
| 52 | |
| 53 | |
| 54 | // Next available tag: 2 |
| 55 | message ListProjectTemplatesResponse { |
| 56 | repeated TemplateDef templates = 1; |
| 57 | } |
| 58 | |
| 59 | |
| 60 | // Next available tag: 3 |
| 61 | message GetConfigRequest { |
| 62 | string project_name = 2; |
| 63 | } |
| 64 | |
| 65 | // Next available tag: 3 |
| 66 | message GetPresentationConfigRequest { |
| 67 | string project_name = 2; |
| 68 | } |
| 69 | |
| 70 | |
| 71 | // Next available tag: 3 |
| 72 | message GetCustomPermissionsRequest { |
| 73 | string project_name = 2; |
| 74 | } |
| 75 | |
| 76 | |
| 77 | // Next available tag: 2 |
| 78 | message GetCustomPermissionsResponse { |
| 79 | repeated string permissions = 1; |
| 80 | } |
| 81 | |
| 82 | |
| 83 | // Next available tag: 3 |
| 84 | message GetVisibleMembersRequest { |
| 85 | string project_name = 2; |
| 86 | } |
| 87 | |
| 88 | |
| 89 | // Next available tag: 3 |
| 90 | message GetVisibleMembersResponse { |
| 91 | repeated UserRef user_refs = 1; |
| 92 | repeated UserRef group_refs = 2; |
| 93 | } |
| 94 | |
| 95 | |
| 96 | // Next available tag: 3 |
| 97 | message GetLabelOptionsRequest { |
| 98 | string project_name = 2; |
| 99 | } |
| 100 | |
| 101 | |
| 102 | // Next available tag: 3 |
| 103 | message GetLabelOptionsResponse { |
| 104 | repeated LabelDef label_options = 1; |
| 105 | repeated string exclusive_label_prefixes = 2; |
| 106 | } |
| 107 | |
| 108 | |
| 109 | // Next available tag: 3 |
| 110 | message ListStatusesRequest { |
| 111 | string project_name = 2; |
| 112 | } |
| 113 | |
| 114 | |
| 115 | // Next available tag: 4 |
| 116 | message ListStatusesResponse { |
| 117 | repeated StatusDef status_defs = 1; |
| 118 | repeated StatusRef statuses_offer_merge = 2; |
| 119 | bool restrict_to_known = 3; |
| 120 | } |
| 121 | |
| 122 | |
| 123 | // Next available tag: 4 |
| 124 | message ListComponentsRequest { |
| 125 | string project_name = 2; |
| 126 | bool include_admin_info = 3; |
| 127 | } |
| 128 | |
| 129 | |
| 130 | // Next available tag: 2 |
| 131 | message ListComponentsResponse { |
| 132 | repeated ComponentDef component_defs = 1; |
| 133 | } |
| 134 | |
| 135 | |
| 136 | // Next available tag: 5 |
| 137 | message ListFieldsRequest { |
| 138 | string project_name = 2; |
| 139 | bool include_admin_info = 3; |
| 140 | bool include_user_choices = 4; |
| 141 | } |
| 142 | |
| 143 | |
| 144 | // Next available tag: 2 |
| 145 | message ListFieldsResponse { |
| 146 | repeated FieldDef field_defs = 1; |
| 147 | } |
| 148 | |
| 149 | |
| 150 | // Next available tag: 3 |
| 151 | message GetProjectStarCountRequest { |
| 152 | string project_name = 2; |
| 153 | } |
| 154 | |
| 155 | |
| 156 | // Next available tag: 2 |
| 157 | message GetProjectStarCountResponse { |
| 158 | uint32 star_count = 1; |
| 159 | } |
| 160 | |
| 161 | |
| 162 | // Next available tag: 3 |
| 163 | message StarProjectRequest { |
| 164 | string project_name = 2; |
| 165 | bool starred = 3; |
| 166 | } |
| 167 | |
| 168 | |
| 169 | // Next available tag: 2 |
| 170 | message StarProjectResponse { |
| 171 | uint32 star_count = 1; |
| 172 | } |
| 173 | |
| 174 | |
| 175 | // Next available tag: 3 |
| 176 | message CheckProjectNameRequest { |
| 177 | string project_name = 2; |
| 178 | } |
| 179 | |
| 180 | |
| 181 | // Next available tag: 1 |
| 182 | message CheckProjectNameResponse { |
| 183 | string error = 1; |
| 184 | } |
| 185 | |
| 186 | |
| 187 | // Next available tag: 5 |
| 188 | message CheckComponentNameRequest { |
| 189 | string project_name = 2; |
| 190 | string parent_path = 3; |
| 191 | string component_name = 4; |
| 192 | } |
| 193 | |
| 194 | |
| 195 | // Next available tag: 2 |
| 196 | message CheckComponentNameResponse { |
| 197 | string error = 1; |
| 198 | } |
| 199 | |
| 200 | |
| 201 | // Next available tag: 4 |
| 202 | message CheckFieldNameRequest { |
| 203 | string project_name = 2; |
| 204 | string field_name = 3; |
| 205 | } |
| 206 | |
| 207 | |
| 208 | // Next available tag: 2 |
| 209 | message CheckFieldNameResponse { |
| 210 | string error = 1; |
| 211 | } |