blob: 41719137bb650d268fc99601f9ecf399a011ce93 [file] [log] [blame]
Copybara854996b2021-09-07 19:36:02 +00001// 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
6syntax = "proto3";
7
8
9package monorail;
10
Adrià Vilanova Martínezde942802022-07-15 14:06:55 +020011option go_package = "infra/monorailv2/api/api_proto;monorail";
12
Copybara854996b2021-09-07 19:36:02 +000013import "api/api_proto/common.proto";
14import "api/api_proto/project_objects.proto";
15
16
17service 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
37message ListProjectsRequest {
38 int32 page_size = 1;
39 string page_token = 2;
40}
41
42
43// Next available tag: 3
44message ListProjectsResponse {
45 repeated Project projects = 1;
46 string next_page_token = 2;
47}
48
49
50// Next available tag: 3
51message ListProjectTemplatesRequest {
52 string project_name = 2;
53}
54
55
56// Next available tag: 2
57message ListProjectTemplatesResponse {
58 repeated TemplateDef templates = 1;
59}
60
61
62// Next available tag: 3
63message GetConfigRequest {
64 string project_name = 2;
65}
66
67// Next available tag: 3
68message GetPresentationConfigRequest {
69 string project_name = 2;
70}
71
72
73// Next available tag: 3
74message GetCustomPermissionsRequest {
75 string project_name = 2;
76}
77
78
79// Next available tag: 2
80message GetCustomPermissionsResponse {
81 repeated string permissions = 1;
82}
83
84
85// Next available tag: 3
86message GetVisibleMembersRequest {
87 string project_name = 2;
88}
89
90
91// Next available tag: 3
92message GetVisibleMembersResponse {
93 repeated UserRef user_refs = 1;
94 repeated UserRef group_refs = 2;
95}
96
97
98// Next available tag: 3
99message GetLabelOptionsRequest {
100 string project_name = 2;
101}
102
103
104// Next available tag: 3
105message GetLabelOptionsResponse {
106 repeated LabelDef label_options = 1;
107 repeated string exclusive_label_prefixes = 2;
108}
109
110
111// Next available tag: 3
112message ListStatusesRequest {
113 string project_name = 2;
114}
115
116
117// Next available tag: 4
118message 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
126message ListComponentsRequest {
127 string project_name = 2;
128 bool include_admin_info = 3;
129}
130
131
132// Next available tag: 2
133message ListComponentsResponse {
134 repeated ComponentDef component_defs = 1;
135}
136
137
138// Next available tag: 5
139message 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
147message ListFieldsResponse {
148 repeated FieldDef field_defs = 1;
149}
150
151
152// Next available tag: 3
153message GetProjectStarCountRequest {
154 string project_name = 2;
155}
156
157
158// Next available tag: 2
159message GetProjectStarCountResponse {
160 uint32 star_count = 1;
161}
162
163
164// Next available tag: 3
165message StarProjectRequest {
166 string project_name = 2;
167 bool starred = 3;
168}
169
170
171// Next available tag: 2
172message StarProjectResponse {
173 uint32 star_count = 1;
174}
175
176
177// Next available tag: 3
178message CheckProjectNameRequest {
179 string project_name = 2;
180}
181
182
183// Next available tag: 1
184message CheckProjectNameResponse {
185 string error = 1;
186}
187
188
189// Next available tag: 5
190message CheckComponentNameRequest {
191 string project_name = 2;
192 string parent_path = 3;
193 string component_name = 4;
194}
195
196
197// Next available tag: 2
198message CheckComponentNameResponse {
199 string error = 1;
200}
201
202
203// Next available tag: 4
204message CheckFieldNameRequest {
205 string project_name = 2;
206 string field_name = 3;
207}
208
209
210// Next available tag: 2
211message CheckFieldNameResponse {
212 string error = 1;
213}