blob: 3fe38631a254166e7db30056fd13d69c1afac119 [file] [log] [blame]
Adrià Vilanova Martínezf19ea432024-01-23 20:20:52 +01001// 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.
Copybara854996b2021-09-07 19:36:02 +00004
5// This file defines small protobufs that are included as parts of
6// multiple services or *_objects.proto PBs.
7//
8// "Ref" objects contain enough information for a UI to display
9// something to the user, and identifying info so that the client can
10// request more info from the server.
11
12syntax = "proto3";
13
14package monorail;
15
Adrià Vilanova Martínezde942802022-07-15 14:06:55 +020016option go_package = "infra/monorailv2/api/api_proto;monorail";
Copybara854996b2021-09-07 19:36:02 +000017
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}