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