go.chromium.org/luci@v0.0.0-20240309015107-7cdc2e660f33/analysis/internal/bugs/monorail/api_proto/feature_objects.proto (about)

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