blob: 56248dd0e42787b95283f995a84099271e3827ec [file] [log] [blame]
// Copyright 2018 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
syntax = "proto3";
package monorail;
option go_package = "infra/monorailv2/api/api_proto;monorail";
import "api/api_proto/common.proto";
import "api/api_proto/project_objects.proto";
service Projects {
rpc ListProjects (ListProjectsRequest) returns (ListProjectsResponse) {}
rpc ListProjectTemplates (ListProjectTemplatesRequest) returns (ListProjectTemplatesResponse) {}
rpc GetConfig (GetConfigRequest) returns (Config) {}
rpc GetPresentationConfig (GetPresentationConfigRequest) returns (PresentationConfig) {}
rpc GetCustomPermissions (GetCustomPermissionsRequest) returns (GetCustomPermissionsResponse) {}
rpc GetVisibleMembers (GetVisibleMembersRequest) returns (GetVisibleMembersResponse) {}
rpc GetLabelOptions (GetLabelOptionsRequest) returns (GetLabelOptionsResponse) {}
rpc ListStatuses (ListStatusesRequest) returns (ListStatusesResponse) {}
rpc ListComponents (ListComponentsRequest) returns (ListComponentsResponse) {}
rpc ListFields (ListFieldsRequest) returns (ListFieldsResponse) {}
rpc GetProjectStarCount (GetProjectStarCountRequest) returns (GetProjectStarCountResponse) {}
rpc StarProject (StarProjectRequest) returns (StarProjectResponse) {}
rpc CheckProjectName (CheckProjectNameRequest) returns (CheckProjectNameResponse) {}
rpc CheckComponentName (CheckComponentNameRequest) returns (CheckComponentNameResponse) {}
rpc CheckFieldName (CheckFieldNameRequest) returns (CheckFieldNameResponse) {}
}
// Next available tag: 3
message ListProjectsRequest {
int32 page_size = 1;
string page_token = 2;
}
// Next available tag: 3
message ListProjectsResponse {
repeated Project projects = 1;
string next_page_token = 2;
}
// Next available tag: 3
message ListProjectTemplatesRequest {
string project_name = 2;
}
// Next available tag: 2
message ListProjectTemplatesResponse {
repeated TemplateDef templates = 1;
}
// Next available tag: 3
message GetConfigRequest {
string project_name = 2;
}
// Next available tag: 3
message GetPresentationConfigRequest {
string project_name = 2;
}
// Next available tag: 3
message GetCustomPermissionsRequest {
string project_name = 2;
}
// Next available tag: 2
message GetCustomPermissionsResponse {
repeated string permissions = 1;
}
// Next available tag: 3
message GetVisibleMembersRequest {
string project_name = 2;
}
// Next available tag: 3
message GetVisibleMembersResponse {
repeated UserRef user_refs = 1;
repeated UserRef group_refs = 2;
}
// Next available tag: 3
message GetLabelOptionsRequest {
string project_name = 2;
}
// Next available tag: 3
message GetLabelOptionsResponse {
repeated LabelDef label_options = 1;
repeated string exclusive_label_prefixes = 2;
}
// Next available tag: 3
message ListStatusesRequest {
string project_name = 2;
}
// Next available tag: 4
message ListStatusesResponse {
repeated StatusDef status_defs = 1;
repeated StatusRef statuses_offer_merge = 2;
bool restrict_to_known = 3;
}
// Next available tag: 4
message ListComponentsRequest {
string project_name = 2;
bool include_admin_info = 3;
}
// Next available tag: 2
message ListComponentsResponse {
repeated ComponentDef component_defs = 1;
}
// Next available tag: 5
message ListFieldsRequest {
string project_name = 2;
bool include_admin_info = 3;
bool include_user_choices = 4;
}
// Next available tag: 2
message ListFieldsResponse {
repeated FieldDef field_defs = 1;
}
// Next available tag: 3
message GetProjectStarCountRequest {
string project_name = 2;
}
// Next available tag: 2
message GetProjectStarCountResponse {
uint32 star_count = 1;
}
// Next available tag: 3
message StarProjectRequest {
string project_name = 2;
bool starred = 3;
}
// Next available tag: 2
message StarProjectResponse {
uint32 star_count = 1;
}
// Next available tag: 3
message CheckProjectNameRequest {
string project_name = 2;
}
// Next available tag: 1
message CheckProjectNameResponse {
string error = 1;
}
// Next available tag: 5
message CheckComponentNameRequest {
string project_name = 2;
string parent_path = 3;
string component_name = 4;
}
// Next available tag: 2
message CheckComponentNameResponse {
string error = 1;
}
// Next available tag: 4
message CheckFieldNameRequest {
string project_name = 2;
string field_name = 3;
}
// Next available tag: 2
message CheckFieldNameResponse {
string error = 1;
}