| // Copyright 2020 The Chromium Authors |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| // This file defines protobufs for features and related business |
| // objects, e.g., hotlists. |
| |
| syntax = "proto3"; |
| |
| package monorail.v3; |
| |
| option go_package = "infra/monorailv2/api/v3/api_proto"; |
| |
| import "google/api/field_behavior.proto"; |
| import "google/api/resource.proto"; |
| import "google/protobuf/timestamp.proto"; |
| import "api/v3/api_proto/issue_objects.proto"; |
| |
| // A user-owned list of Issues. |
| // Next available tag: 9 |
| message Hotlist { |
| option (google.api.resource) = { |
| type: "api.crbug.com/Hotlist" |
| pattern: "hotlists/{hotlist_id}" |
| }; |
| |
| // Resource name of the hotlist. |
| string name = 1; |
| // `display_name` must follow pattern found at `framework_bizobj.RE_HOTLIST_NAME_PATTERN`. |
| string display_name = 2 [ (google.api.field_behavior) = REQUIRED ]; |
| // Resource name of the hotlist owner. |
| // Owners can update hotlist settings, editors, owner, and HotlistItems. |
| // TODO(monorail:7023): field_behavior may be changed in the future. |
| string owner = 3 [ |
| (google.api.resource_reference) = {type: "api.crbug.com/User"}, |
| (google.api.field_behavior) = REQUIRED ]; |
| // Resource names of the hotlist editors. |
| // Editors can update hotlist HotlistItems. |
| repeated string editors = 4 [ (google.api.resource_reference) = {type: "api.crbug.com/User"} ]; |
| // Summary of the hotlist. |
| string summary = 5 [ (google.api.field_behavior) = REQUIRED ]; |
| // More detailed description of the purpose of the hotlist. |
| string description = 6 [ (google.api.field_behavior) = REQUIRED ]; |
| // Ordered list of default columns shown on hotlist's issues list view. |
| repeated IssuesListColumn default_columns = 7; |
| |
| // Privacy level of a Hotlist. |
| // Next available tag: 2 |
| enum HotlistPrivacy { |
| // This value is unused. |
| HOTLIST_PRIVACY_UNSPECIFIED = 0; |
| // Only the owner and editors of the hotlist can view the hotlist. |
| PRIVATE = 1; |
| // Anyone on the web can view the hotlist. |
| PUBLIC = 2; |
| } |
| HotlistPrivacy hotlist_privacy = 8; |
| } |
| |
| |
| // Represents the the position of an Issue in a Hotlist. |
| // Next available tag: 7 |
| message HotlistItem { |
| option (google.api.resource) = { |
| type: "api.crbug.com/HotlistItem" |
| pattern: "hotlists/{hotlist_id}/items/{item_id}" |
| }; |
| |
| // Resource name of the HotlistItem. |
| string name = 1; |
| // The Issue associated with this item. |
| string issue = 2 [ |
| (google.api.resource_reference) = {type: "api.crbug.com/Issue"}, |
| (google.api.field_behavior) = IMMUTABLE ]; |
| // Represents the item's position in the Hotlist in decreasing priority order. |
| // Values will be from 1 to N (the size of the hotlist), each item having a unique rank. |
| // Changes to rank must be made in `RerankHotlistItems`. |
| uint32 rank = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; |
| // Resource name of the adder of HotlistItem. |
| string adder = 4 [ |
| (google.api.resource_reference) = {type: "api.crbug.com/User"}, |
| (google.api.field_behavior) = OUTPUT_ONLY ]; |
| // The time this HotlistItem was added to the hotlist. |
| google.protobuf.Timestamp create_time = 5 [ (google.api.field_behavior) = OUTPUT_ONLY ]; |
| // User-provided additional details about this item. |
| string note = 6; |
| } |