blob: 0ff07500385758af96b0e2c90bb14a013d0ea605 [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
17
18// Next available tag: 3
19message ComponentRef {
20 string path = 1;
21 bool is_derived = 2;
22}
23
24
25// Next available tag: 9
26enum FieldType {
27 NO_TYPE = 0;
28 ENUM_TYPE = 1;
29 INT_TYPE = 2;
30 STR_TYPE = 3;
31 USER_TYPE = 4;
32 DATE_TYPE = 5;
33 BOOL_TYPE = 6;
34 URL_TYPE = 7;
35 APPROVAL_TYPE = 8;
36}
37
38
39// Next available tag: 5
40message FieldRef {
41 // TODO(crbug.com/monorail/4062): Don't use field IDs to identify fields.
42 uint64 field_id = 1;
43 string field_name = 2;
44 FieldType type = 3;
45 string approval_name = 4;
46}
47
48
49// Next available tag: 3
50message LabelRef {
51 string label = 1;
52 bool is_derived = 2;
53}
54
55
56// Next available tag: 4
57message StatusRef {
58 string status = 1;
59 bool means_open = 2;
60 bool is_derived = 3;
61}
62
63
64// Next available tag: 4
65message IssueRef {
66 string project_name = 1;
67 uint32 local_id = 2;
68 string ext_identifier = 3; // For referencing external issues, e.g. b/1234.
69}
70
71
72// Next available tag: 4
73message UserRef {
74 uint64 user_id = 1;
75 string display_name = 2; // email, or obscured like "usern...@example.com".
76 bool is_derived = 3;
77}
78
79
80// Next available tag: 4
81message HotlistRef {
82 // TODO(4131): Don't use hotlist IDs to identify hotlists.
83 uint64 hotlist_id = 1;
84 string name = 2;
85 UserRef owner = 3;
86}
87
88
89// Next available tag: 3
90message ValueAndWhy {
91 string value = 1;
92 string why = 2;
93}
94
95
96// Next available tag: 3
97message Pagination {
98 uint32 max_items = 1;
99 uint32 start = 2;
100}
101
102
103// Next available tag: 5
104message SavedQuery {
105 uint64 query_id = 1;
106 string name = 2;
107 string query = 3;
108 repeated string project_names = 4;
109}