blob: 9d51732c65c399f1667082bfb3a8b9e176968d92 [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
6// This file defines small protobufs that are included as parts of
7// multiple services or *_objects.proto PBs.
8//
9// "Ref" objects contain enough information for a UI to display
10// something to the user, and identifying info so that the client can
11// request more info from the server.
12
13syntax = "proto3";
14
15package monorail;
16
Adrià Vilanova Martínezde942802022-07-15 14:06:55 +020017option go_package = "infra/monorailv2/api/api_proto;monorail";
Copybara854996b2021-09-07 19:36:02 +000018
19// Next available tag: 3
20message ComponentRef {
21 string path = 1;
22 bool is_derived = 2;
23}
24
25
26// Next available tag: 9
27enum FieldType {
28 NO_TYPE = 0;
29 ENUM_TYPE = 1;
30 INT_TYPE = 2;
31 STR_TYPE = 3;
32 USER_TYPE = 4;
33 DATE_TYPE = 5;
34 BOOL_TYPE = 6;
35 URL_TYPE = 7;
36 APPROVAL_TYPE = 8;
37}
38
39
40// Next available tag: 5
41message FieldRef {
42 // TODO(crbug.com/monorail/4062): Don't use field IDs to identify fields.
43 uint64 field_id = 1;
44 string field_name = 2;
45 FieldType type = 3;
46 string approval_name = 4;
47}
48
49
50// Next available tag: 3
51message LabelRef {
52 string label = 1;
53 bool is_derived = 2;
54}
55
56
57// Next available tag: 4
58message StatusRef {
59 string status = 1;
60 bool means_open = 2;
61 bool is_derived = 3;
62}
63
64
65// Next available tag: 4
66message IssueRef {
67 string project_name = 1;
68 uint32 local_id = 2;
69 string ext_identifier = 3; // For referencing external issues, e.g. b/1234.
70}
71
72
73// Next available tag: 4
74message UserRef {
75 uint64 user_id = 1;
76 string display_name = 2; // email, or obscured like "usern...@example.com".
77 bool is_derived = 3;
78}
79
80
81// Next available tag: 4
82message HotlistRef {
83 // TODO(4131): Don't use hotlist IDs to identify hotlists.
84 uint64 hotlist_id = 1;
85 string name = 2;
86 UserRef owner = 3;
87}
88
89
90// Next available tag: 3
91message ValueAndWhy {
92 string value = 1;
93 string why = 2;
94}
95
96
97// Next available tag: 3
98message Pagination {
99 uint32 max_items = 1;
100 uint32 start = 2;
101}
102
103
104// Next available tag: 5
105message SavedQuery {
106 uint64 query_id = 1;
107 string name = 2;
108 string query = 3;
109 repeated string project_names = 4;
110}