Adrià Vilanova Martínez | f19ea43 | 2024-01-23 20:20:52 +0100 | [diff] [blame] | 1 | // 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. |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 4 | |
| 5 | // This file defines protobufs for issues and related business |
| 6 | // objects, e.g., field values, comments, and attachments. |
| 7 | |
| 8 | syntax = "proto3"; |
| 9 | |
| 10 | package monorail; |
| 11 | |
Adrià Vilanova Martínez | de94280 | 2022-07-15 14:06:55 +0200 | [diff] [blame] | 12 | option go_package = "infra/monorailv2/api/api_proto;monorail"; |
| 13 | |
Copybara | 854996b | 2021-09-07 19:36:02 +0000 | [diff] [blame] | 14 | import "api/api_proto/common.proto"; |
| 15 | import "api/api_proto/issue_objects.proto"; |
| 16 | |
| 17 | |
| 18 | // Next available tag: 4 |
| 19 | message Project { |
| 20 | string name = 1; |
| 21 | string summary = 2; |
| 22 | string description = 3; |
| 23 | } |
| 24 | |
| 25 | |
| 26 | // Next available tag: 6 |
| 27 | message StatusDef { |
| 28 | string status = 1; |
| 29 | bool means_open = 2; |
| 30 | uint32 rank = 3; |
| 31 | string docstring = 4; |
| 32 | bool deprecated = 5; |
| 33 | } |
| 34 | |
| 35 | |
| 36 | // Next available tag: 5 |
| 37 | message LabelDef { |
| 38 | string label = 1; |
| 39 | string docstring = 3; |
| 40 | bool deprecated = 4; |
| 41 | } |
| 42 | |
| 43 | |
| 44 | // Next available tag: 11 |
| 45 | message ComponentDef { |
| 46 | string path = 1; |
| 47 | string docstring = 2; |
| 48 | repeated UserRef admin_refs = 3; |
| 49 | repeated UserRef cc_refs = 4; |
| 50 | bool deprecated = 5; |
| 51 | fixed32 created = 6; |
| 52 | UserRef creator_ref = 7; |
| 53 | fixed32 modified = 8; |
| 54 | UserRef modifier_ref = 9; |
| 55 | repeated LabelRef label_refs = 10; |
| 56 | } |
| 57 | |
| 58 | |
| 59 | // Next available tag: 9 |
| 60 | message FieldDef { |
| 61 | FieldRef field_ref = 1; |
| 62 | string applicable_type = 2; |
| 63 | // TODO(jrobbins): applicable_predicate |
| 64 | bool is_required = 3; |
| 65 | bool is_niche = 4; |
| 66 | bool is_multivalued = 5; |
| 67 | string docstring = 6; |
| 68 | repeated UserRef admin_refs = 7; |
| 69 | // TODO(jrobbins): validation, permission granting, and notification options. |
| 70 | bool is_phase_field = 8; |
| 71 | repeated UserRef user_choices = 9; |
| 72 | repeated LabelDef enum_choices = 10; |
| 73 | } |
| 74 | |
| 75 | |
| 76 | // Next available tag: 3 |
| 77 | message FieldOptions { |
| 78 | FieldRef field_ref = 1; |
| 79 | repeated UserRef user_refs = 2; |
| 80 | } |
| 81 | |
| 82 | |
| 83 | // Next available tag: 4 |
| 84 | message ApprovalDef { |
| 85 | FieldRef field_ref = 1; |
| 86 | repeated UserRef approver_refs = 2; |
| 87 | string survey = 3; |
| 88 | } |
| 89 | |
| 90 | |
| 91 | // Next available tag: 11 |
| 92 | message Config { |
| 93 | string project_name = 1; |
| 94 | repeated StatusDef status_defs = 2; |
| 95 | repeated StatusRef statuses_offer_merge = 3; |
| 96 | repeated LabelDef label_defs = 4; |
| 97 | repeated string exclusive_label_prefixes = 5; |
| 98 | repeated ComponentDef component_defs = 6; |
| 99 | repeated FieldDef field_defs = 7; |
| 100 | repeated ApprovalDef approval_defs = 8; |
| 101 | bool restrict_to_known = 9; |
| 102 | } |
| 103 | |
| 104 | |
| 105 | // Next available tag: 11 |
| 106 | message PresentationConfig { |
| 107 | string project_thumbnail_url = 1; |
| 108 | string project_summary = 2; |
| 109 | string custom_issue_entry_url = 3; |
| 110 | string default_query = 4; |
| 111 | repeated SavedQuery saved_queries = 5; |
| 112 | string revision_url_format = 6; |
| 113 | string default_col_spec = 7; |
| 114 | string default_sort_spec = 8; |
| 115 | string default_x_attr = 9; |
| 116 | string default_y_attr = 10; |
| 117 | } |
| 118 | |
| 119 | |
| 120 | // Next available tag: 16 |
| 121 | message TemplateDef { |
| 122 | string template_name = 1; |
| 123 | string content = 2; |
| 124 | string summary = 3; |
| 125 | bool summary_must_be_edited = 4; |
| 126 | UserRef owner_ref = 5; |
| 127 | StatusRef status_ref = 6; |
| 128 | repeated LabelRef label_refs = 7; |
| 129 | bool members_only = 8; |
| 130 | bool owner_defaults_to_member = 9; |
| 131 | repeated UserRef admin_refs = 10; |
| 132 | repeated FieldValue field_values = 11; |
| 133 | repeated ComponentRef component_refs = 12; |
| 134 | bool component_required = 13; |
| 135 | repeated Approval approval_values = 14; |
| 136 | repeated PhaseDef phases = 15; |
| 137 | } |