blob: 3b2b3b865d83c360435360bb88e5e82076d96d9e [file] [log] [blame]
Copybara854996b2021-09-07 19:36:02 +00001// Copyright 2020 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 protobufs for features and related business
7// objects, e.g., hotlists.
8
9syntax = "proto3";
10
11package monorail.v3;
12
Adrià Vilanova Martínezac4a6442022-05-15 19:05:13 +020013option go_package = "infra/monorailv2/api/v3/api_proto";
Copybara854996b2021-09-07 19:36:02 +000014
15import "google/api/field_behavior.proto";
16import "google/api/resource.proto";
17import "google/protobuf/timestamp.proto";
18import "api/v3/api_proto/issue_objects.proto";
19
20// A user-owned list of Issues.
21// Next available tag: 9
22message Hotlist {
23 option (google.api.resource) = {
24 type: "api.crbug.com/Hotlist"
25 pattern: "hotlists/{hotlist_id}"
26 };
27
28 // Resource name of the hotlist.
29 string name = 1;
30 // `display_name` must follow pattern found at `framework_bizobj.RE_HOTLIST_NAME_PATTERN`.
31 string display_name = 2 [ (google.api.field_behavior) = REQUIRED ];
32 // Resource name of the hotlist owner.
33 // Owners can update hotlist settings, editors, owner, and HotlistItems.
34 // TODO(monorail:7023): field_behavior may be changed in the future.
35 string owner = 3 [
36 (google.api.resource_reference) = {type: "api.crbug.com/User"},
37 (google.api.field_behavior) = REQUIRED ];
38 // Resource names of the hotlist editors.
39 // Editors can update hotlist HotlistItems.
40 repeated string editors = 4 [ (google.api.resource_reference) = {type: "api.crbug.com/User"} ];
41 // Summary of the hotlist.
42 string summary = 5 [ (google.api.field_behavior) = REQUIRED ];
43 // More detailed description of the purpose of the hotlist.
44 string description = 6 [ (google.api.field_behavior) = REQUIRED ];
45 // Ordered list of default columns shown on hotlist's issues list view.
46 repeated IssuesListColumn default_columns = 7;
47
48 // Privacy level of a Hotlist.
49 // Next available tag: 2
50 enum HotlistPrivacy {
51 // This value is unused.
52 HOTLIST_PRIVACY_UNSPECIFIED = 0;
53 // Only the owner and editors of the hotlist can view the hotlist.
54 PRIVATE = 1;
55 // Anyone on the web can view the hotlist.
56 PUBLIC = 2;
57 }
58 HotlistPrivacy hotlist_privacy = 8;
59}
60
61
62// Represents the the position of an Issue in a Hotlist.
63// Next available tag: 7
64message HotlistItem {
65 option (google.api.resource) = {
66 type: "api.crbug.com/HotlistItem"
67 pattern: "hotlists/{hotlist_id}/items/{item_id}"
68 };
69
70 // Resource name of the HotlistItem.
71 string name = 1;
72 // The Issue associated with this item.
73 string issue = 2 [
74 (google.api.resource_reference) = {type: "api.crbug.com/Issue"},
75 (google.api.field_behavior) = IMMUTABLE ];
76 // Represents the item's position in the Hotlist in decreasing priority order.
77 // Values will be from 1 to N (the size of the hotlist), each item having a unique rank.
78 // Changes to rank must be made in `RerankHotlistItems`.
79 uint32 rank = 3 [(google.api.field_behavior) = OUTPUT_ONLY];
80 // Resource name of the adder of HotlistItem.
81 string adder = 4 [
82 (google.api.resource_reference) = {type: "api.crbug.com/User"},
83 (google.api.field_behavior) = OUTPUT_ONLY ];
84 // The time this HotlistItem was added to the hotlist.
85 google.protobuf.Timestamp create_time = 5 [ (google.api.field_behavior) = OUTPUT_ONLY ];
86 // User-provided additional details about this item.
87 string note = 6;
88}