Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 1 | // 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 | |
| 13 | syntax = "proto3"; |
| 14 | |
| 15 | package monorail; |
| 16 | |
Adrià Vilanova MartÃnez | de94280 | 2022-07-15 14:06:55 +0200 | [diff] [blame] | 17 | option go_package = "infra/monorailv2/api/api_proto;monorail"; |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 18 | |
| 19 | // Next available tag: 3 |
| 20 | message ComponentRef { |
| 21 | string path = 1; |
| 22 | bool is_derived = 2; |
| 23 | } |
| 24 | |
| 25 | |
| 26 | // Next available tag: 9 |
| 27 | enum 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 |
| 41 | message 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 |
| 51 | message LabelRef { |
| 52 | string label = 1; |
| 53 | bool is_derived = 2; |
| 54 | } |
| 55 | |
| 56 | |
| 57 | // Next available tag: 4 |
| 58 | message StatusRef { |
| 59 | string status = 1; |
| 60 | bool means_open = 2; |
| 61 | bool is_derived = 3; |
| 62 | } |
| 63 | |
| 64 | |
| 65 | // Next available tag: 4 |
| 66 | message 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 |
| 74 | message 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 |
| 82 | message 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 |
| 91 | message ValueAndWhy { |
| 92 | string value = 1; |
| 93 | string why = 2; |
| 94 | } |
| 95 | |
| 96 | |
| 97 | // Next available tag: 3 |
| 98 | message Pagination { |
| 99 | uint32 max_items = 1; |
| 100 | uint32 start = 2; |
| 101 | } |
| 102 | |
| 103 | |
| 104 | // Next available tag: 5 |
| 105 | message SavedQuery { |
| 106 | uint64 query_id = 1; |
| 107 | string name = 2; |
| 108 | string query = 3; |
| 109 | repeated string project_names = 4; |
| 110 | } |