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