Alice Kober-Sotzek | 09cdbd9 | 2018-12-05 17:16:21 +0100 | [diff] [blame] | 1 | // Copyright (C) 2018 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | syntax = "proto2"; |
| 16 | |
Alice Kober-Sotzek | 342b836 | 2018-12-05 17:42:47 +0100 | [diff] [blame] | 17 | package devtools.gerritcodereview; |
| 18 | |
Alice Kober-Sotzek | 5af77ef | 2018-12-14 16:48:58 +0100 | [diff] [blame] | 19 | option java_package = "com.google.gerrit.proto"; |
Alice Kober-Sotzek | 09cdbd9 | 2018-12-05 17:16:21 +0100 | [diff] [blame] | 20 | |
David Ostrovsky | b03a6e9 | 2019-05-26 14:11:47 +0200 | [diff] [blame] | 21 | // Serialized form of com.google.gerrit.entities.Change.Id. |
Alice Kober-Sotzek | 342b836 | 2018-12-05 17:42:47 +0100 | [diff] [blame] | 22 | // Next ID: 2 |
Alice Kober-Sotzek | 09cdbd9 | 2018-12-05 17:16:21 +0100 | [diff] [blame] | 23 | message Change_Id { |
Alice Kober-Sotzek | 342b836 | 2018-12-05 17:42:47 +0100 | [diff] [blame] | 24 | required int32 id = 1; |
Alice Kober-Sotzek | 09cdbd9 | 2018-12-05 17:16:21 +0100 | [diff] [blame] | 25 | } |
| 26 | |
David Ostrovsky | b03a6e9 | 2019-05-26 14:11:47 +0200 | [diff] [blame] | 27 | // Serialized form of com.google.gerrit.entities.Change.Key. |
Alice Kober-Sotzek | 342b836 | 2018-12-05 17:42:47 +0100 | [diff] [blame] | 28 | // Next ID: 2 |
Alice Kober-Sotzek | 09cdbd9 | 2018-12-05 17:16:21 +0100 | [diff] [blame] | 29 | message Change_Key { |
Alice Kober-Sotzek | 342b836 | 2018-12-05 17:42:47 +0100 | [diff] [blame] | 30 | optional string id = 1; |
Alice Kober-Sotzek | 09cdbd9 | 2018-12-05 17:16:21 +0100 | [diff] [blame] | 31 | } |
| 32 | |
David Ostrovsky | b03a6e9 | 2019-05-26 14:11:47 +0200 | [diff] [blame] | 33 | // Serialized form of com.google.gerrit.entities.Change. |
Luca Milanesio | ef806d3 | 2024-04-06 09:16:24 -0700 | [diff] [blame] | 34 | // Next ID: 26 |
Alice Kober-Sotzek | 09cdbd9 | 2018-12-05 17:16:21 +0100 | [diff] [blame] | 35 | message Change { |
Alice Kober-Sotzek | 342b836 | 2018-12-05 17:42:47 +0100 | [diff] [blame] | 36 | required Change_Id change_id = 1; |
| 37 | optional Change_Key change_key = 2; |
Alice Kober-Sotzek | 342b836 | 2018-12-05 17:42:47 +0100 | [diff] [blame] | 38 | optional fixed64 created_on = 4; |
| 39 | optional fixed64 last_updated_on = 5; |
| 40 | optional Account_Id owner_account_id = 7; |
| 41 | optional Branch_NameKey dest = 8; |
| 42 | optional uint32 status = 10; |
| 43 | optional int32 current_patch_set_id = 12; |
| 44 | optional string subject = 13; |
| 45 | optional string topic = 14; |
| 46 | optional string original_subject = 17; |
| 47 | optional string submission_id = 18; |
Alice Kober-Sotzek | 342b836 | 2018-12-05 17:42:47 +0100 | [diff] [blame] | 48 | optional bool is_private = 20; |
| 49 | optional bool work_in_progress = 21; |
| 50 | optional bool review_started = 22; |
| 51 | optional Change_Id revert_of = 23; |
Kaushik Lingarkar | 4a711ed | 2019-11-12 13:53:29 -0800 | [diff] [blame] | 52 | optional PatchSet_Id cherry_pick_of = 24; |
Luca Milanesio | ef806d3 | 2024-04-06 09:16:24 -0700 | [diff] [blame] | 53 | optional string server_id = 25; |
Alice Kober-Sotzek | 342b836 | 2018-12-05 17:42:47 +0100 | [diff] [blame] | 54 | |
| 55 | // Deleted fields, should not be reused: |
Patrick Hiesel | bd700ed | 2021-05-25 09:03:59 +0200 | [diff] [blame] | 56 | reserved 3; // row_version |
Dave Borowitz | 2839aa6 | 2018-12-13 14:46:03 -0800 | [diff] [blame] | 57 | reserved 6; // sortkey |
| 58 | reserved 9; // open |
| 59 | reserved 11; // nbrPatchSets |
| 60 | reserved 15; // lastSha1MergeTested |
| 61 | reserved 16; // mergeable |
Kamil Musin | 2a9ff78 | 2023-02-06 13:54:07 +0100 | [diff] [blame] | 62 | reserved 19; // assignee |
Dave Borowitz | 2839aa6 | 2018-12-13 14:46:03 -0800 | [diff] [blame] | 63 | reserved 101; // note_db_state |
Alice Kober-Sotzek | 09cdbd9 | 2018-12-05 17:16:21 +0100 | [diff] [blame] | 64 | } |
| 65 | |
Myriam Anis | beae81f | 2024-03-13 14:31:42 +0000 | [diff] [blame] | 66 | // Serialized form of com.google.gerrit.extensions.common.ChangeInput. |
| 67 | // Next ID: 19 |
| 68 | message ChangeInput { |
| 69 | optional string project = 1; |
| 70 | optional string branch = 2; |
| 71 | optional string subject = 3; |
| 72 | optional string topic = 4; |
| 73 | optional ChangeStatus status = 5; |
| 74 | optional bool is_private = 6; |
| 75 | optional bool work_in_progress = 7; |
| 76 | optional string base_change = 8; |
| 77 | optional string base_commit = 9; |
| 78 | optional bool new_branch = 10; |
| 79 | map<string, string> validation_options = 11; |
| 80 | map<string, string> custom_keyed_values = 12; |
| 81 | optional MergeInput merge = 13; |
| 82 | optional ApplyPatchInput patch = 14; |
| 83 | optional AccountInput author = 15; |
| 84 | repeated ListChangesOption response_format_options = 16; |
| 85 | optional NotifyHandling notify = 17 [default = ALL]; |
| 86 | // The key is the string representation of the RecipientType enum. |
| 87 | // We use a string here because proto does not allow enum keys in maps. |
| 88 | map<string, NotifyInfo> notify_details = 18; |
| 89 | } |
| 90 | |
David Ostrovsky | b03a6e9 | 2019-05-26 14:11:47 +0200 | [diff] [blame] | 91 | // Serialized form of com.google.gerrit.enities.ChangeMessage. |
Alice Kober-Sotzek | 97d3e42 | 2018-12-05 17:49:11 +0100 | [diff] [blame] | 92 | // Next ID: 3 |
| 93 | message ChangeMessage_Key { |
| 94 | required Change_Id change_id = 1; |
| 95 | required string uuid = 2; |
| 96 | } |
| 97 | |
David Ostrovsky | b03a6e9 | 2019-05-26 14:11:47 +0200 | [diff] [blame] | 98 | // Serialized form of com.google.gerrit.entities.ChangeMessage. |
Alice Kober-Sotzek | 97d3e42 | 2018-12-05 17:49:11 +0100 | [diff] [blame] | 99 | // Next ID: 8 |
| 100 | message ChangeMessage { |
| 101 | required ChangeMessage_Key key = 1; |
| 102 | optional Account_Id author_id = 2; |
| 103 | optional fixed64 written_on = 3; |
| 104 | optional string message = 4; |
| 105 | optional PatchSet_Id patchset = 5; |
| 106 | optional string tag = 6; |
| 107 | optional Account_Id real_author = 7; |
| 108 | } |
| 109 | |
Myriam Anis | beae81f | 2024-03-13 14:31:42 +0000 | [diff] [blame] | 110 | // Serialized form of com.google.gerrit.extensions.client.ChangeStatus. |
| 111 | // Next ID: 3 |
| 112 | enum ChangeStatus { |
| 113 | NEW = 0; |
| 114 | MERGED = 1; |
| 115 | ABANDONED = 2; |
| 116 | } |
| 117 | |
| 118 | // Serialized form of com.google.gerrit.extensions.common.MergeInput. |
| 119 | // Next ID: 5 |
| 120 | message MergeInput { |
| 121 | optional string source = 1; |
| 122 | optional string source_branch = 2; |
| 123 | optional string strategy = 3; |
| 124 | optional bool allow_conflicts = 4; |
| 125 | } |
| 126 | |
| 127 | // Serialized form of com.google.gerrit.extensions.api.changes.ApplyPatchInput. |
Patrick Hiesel | ace0e4c | 2024-05-16 16:37:29 +0200 | [diff] [blame] | 128 | // Next ID: 3 |
Myriam Anis | beae81f | 2024-03-13 14:31:42 +0000 | [diff] [blame] | 129 | message ApplyPatchInput { |
| 130 | optional string patch = 1; |
Patrick Hiesel | ace0e4c | 2024-05-16 16:37:29 +0200 | [diff] [blame] | 131 | optional bool allow_conflicts = 2; |
Myriam Anis | beae81f | 2024-03-13 14:31:42 +0000 | [diff] [blame] | 132 | } |
| 133 | |
| 134 | // Serialized form of com.google.gerrit.extensions.api.accounts.AccountInput. |
| 135 | // Next ID: 8 |
| 136 | message AccountInput { |
| 137 | optional string username = 1; |
| 138 | optional string name = 2; |
| 139 | optional string display_name = 3; |
| 140 | optional string email = 4; |
| 141 | optional string ssh_key = 5; |
| 142 | optional string http_password = 6; |
| 143 | repeated string groups = 7; |
| 144 | } |
| 145 | |
| 146 | // Serialized form of com.google.gerrit.extensions.client.ListChangesOption. |
| 147 | // Next ID: 28 |
| 148 | enum ListChangesOption { |
| 149 | LABELS = 0; |
| 150 | CURRENT_REVISION = 1; |
| 151 | ALL_REVISIONS = 2; |
| 152 | CURRENT_COMMIT = 3; |
| 153 | ALL_COMMITS = 4; |
| 154 | CURRENT_FILES = 5; |
| 155 | ALL_FILES = 6; |
| 156 | DETAILED_ACCOUNTS = 7; |
| 157 | DETAILED_LABELS = 8; |
| 158 | MESSAGES = 9; |
| 159 | CURRENT_ACTIONS = 10; |
| 160 | REVIEWED = 11; |
| 161 | DRAFT_COMMENTS = 12; |
| 162 | DOWNLOAD_COMMANDS = 13; |
| 163 | WEB_LINKS = 14; |
| 164 | CHECK = 15; |
| 165 | CHANGE_ACTIONS = 16; |
| 166 | COMMIT_FOOTERS = 17; |
| 167 | PUSH_CERTIFICATES = 18; |
| 168 | REVIEWER_UPDATES = 19; |
| 169 | SUBMITTABLE = 20; |
| 170 | TRACKING_IDS = 21; |
| 171 | SKIP_MERGEABLE = 22; |
| 172 | SKIP_DIFFSTAT = 23; |
| 173 | SUBMIT_REQUIREMENTS = 24; |
| 174 | CUSTOM_KEYED_VALUES = 25; |
| 175 | STAR = 26; |
| 176 | PARENTS = 27; |
| 177 | } |
| 178 | |
| 179 | // Serialized form of com.google.gerrit.extensions.api.changes.NotifyHandling. |
| 180 | // Next ID: 4 |
| 181 | enum NotifyHandling { |
| 182 | NONE = 0; |
| 183 | OWNER = 1; |
| 184 | OWNER_REVIEWERS = 2; |
| 185 | ALL = 3; |
| 186 | } |
| 187 | |
| 188 | // Serialized form of com.google.gerrit.extensions.api.changes.RecipientType. |
| 189 | // Next ID: 3 |
| 190 | enum RecipientType { |
| 191 | TO = 0; |
| 192 | CC = 1; |
| 193 | BCC = 2; |
| 194 | } |
| 195 | |
| 196 | // Serialized form of com.google.gerrit.extensions.api.changes.NotifyInfo. |
| 197 | // Next ID: 2 |
| 198 | message NotifyInfo { |
| 199 | repeated string accounts = 1; |
| 200 | } |
| 201 | |
David Ostrovsky | b03a6e9 | 2019-05-26 14:11:47 +0200 | [diff] [blame] | 202 | // Serialized form of com.google.gerrit.entities.PatchSet.Id. |
Alice Kober-Sotzek | 97d3e42 | 2018-12-05 17:49:11 +0100 | [diff] [blame] | 203 | // Next ID: 3 |
| 204 | message PatchSet_Id { |
| 205 | required Change_Id change_id = 1; |
Dave Borowitz | 766a93d | 2019-04-19 08:44:05 -0700 | [diff] [blame] | 206 | required int32 id = 2; |
Alice Kober-Sotzek | 97d3e42 | 2018-12-05 17:49:11 +0100 | [diff] [blame] | 207 | } |
| 208 | |
David Ostrovsky | b03a6e9 | 2019-05-26 14:11:47 +0200 | [diff] [blame] | 209 | // Serialized form of com.google.gerrit.entities.PatchSet. |
Youssef Elghareeb | 4c11544 | 2023-06-15 18:16:42 +0200 | [diff] [blame] | 210 | // Next ID: 12 |
Alice Kober-Sotzek | 97d3e42 | 2018-12-05 17:49:11 +0100 | [diff] [blame] | 211 | message PatchSet { |
| 212 | required PatchSet_Id id = 1; |
Dave Borowitz | 20a984f | 2019-04-23 14:19:25 -0700 | [diff] [blame] | 213 | optional ObjectId commitId = 2; |
Alice Kober-Sotzek | 97d3e42 | 2018-12-05 17:49:11 +0100 | [diff] [blame] | 214 | optional Account_Id uploader_account_id = 3; |
| 215 | optional fixed64 created_on = 4; |
| 216 | optional string groups = 6; |
| 217 | optional string push_certificate = 8; |
| 218 | optional string description = 9; |
Edwin Kempin | ccc9da0 | 2023-01-23 17:57:15 +0100 | [diff] [blame] | 219 | optional Account_Id real_uploader_account_id = 10; |
Youssef Elghareeb | 4c11544 | 2023-06-15 18:16:42 +0200 | [diff] [blame] | 220 | optional string branch = 11; |
Alice Kober-Sotzek | 97d3e42 | 2018-12-05 17:49:11 +0100 | [diff] [blame] | 221 | |
| 222 | // Deleted fields, should not be reused: |
| 223 | reserved 5; // draft |
| 224 | reserved 7; // pushCertficate |
| 225 | } |
| 226 | |
David Ostrovsky | b03a6e9 | 2019-05-26 14:11:47 +0200 | [diff] [blame] | 227 | // Serialized form of com.google.gerrit.entities.Account.Id. |
Alice Kober-Sotzek | 97d3e42 | 2018-12-05 17:49:11 +0100 | [diff] [blame] | 228 | // Next ID: 2 |
| 229 | message Account_Id { |
| 230 | required int32 id = 1; |
| 231 | } |
| 232 | |
David Ostrovsky | b03a6e9 | 2019-05-26 14:11:47 +0200 | [diff] [blame] | 233 | // Serialized form of com.google.gerrit.entities.LabelId. |
Alice Kober-Sotzek | 97d3e42 | 2018-12-05 17:49:11 +0100 | [diff] [blame] | 234 | // Next ID: 2 |
| 235 | message LabelId { |
| 236 | required string id = 1; |
| 237 | } |
| 238 | |
David Ostrovsky | b03a6e9 | 2019-05-26 14:11:47 +0200 | [diff] [blame] | 239 | // Serialized form of com.google.gerrit.entities.PatchSetApproval.Key. |
Alice Kober-Sotzek | 97d3e42 | 2018-12-05 17:49:11 +0100 | [diff] [blame] | 240 | // Next ID: 4 |
| 241 | message PatchSetApproval_Key { |
| 242 | required PatchSet_Id patch_set_id = 1; |
| 243 | required Account_Id account_id = 2; |
Dave Borowitz | c144e78 | 2019-04-17 12:53:07 -0700 | [diff] [blame] | 244 | required LabelId label_id = 3; |
Alice Kober-Sotzek | 97d3e42 | 2018-12-05 17:49:11 +0100 | [diff] [blame] | 245 | } |
| 246 | |
David Ostrovsky | b03a6e9 | 2019-05-26 14:11:47 +0200 | [diff] [blame] | 247 | // Serialized form of com.google.gerrit.entities.PatchSetApproval. |
Marija Savtchouk | d528320 | 2021-11-26 12:14:04 +0000 | [diff] [blame] | 248 | // Next ID: 11 |
Alice Kober-Sotzek | 09cdbd9 | 2018-12-05 17:16:21 +0100 | [diff] [blame] | 249 | message PatchSetApproval { |
Alice Kober-Sotzek | 342b836 | 2018-12-05 17:42:47 +0100 | [diff] [blame] | 250 | required PatchSetApproval_Key key = 1; |
| 251 | optional int32 value = 2; |
| 252 | optional fixed64 granted = 3; |
| 253 | optional string tag = 6; |
| 254 | optional Account_Id real_account_id = 7; |
| 255 | optional bool post_submit = 8; |
Gal Paikin | 5381c5f | 2021-09-06 17:35:48 +0200 | [diff] [blame] | 256 | optional bool copied = 9; |
Marija Savtchouk | d528320 | 2021-11-26 12:14:04 +0000 | [diff] [blame] | 257 | optional string uuid = 10; |
Alice Kober-Sotzek | 342b836 | 2018-12-05 17:42:47 +0100 | [diff] [blame] | 258 | |
| 259 | // Deleted fields, should not be reused: |
| 260 | reserved 4; // changeOpen |
| 261 | reserved 5; // changeSortKey |
Alice Kober-Sotzek | 09cdbd9 | 2018-12-05 17:16:21 +0100 | [diff] [blame] | 262 | } |
| 263 | |
David Ostrovsky | b03a6e9 | 2019-05-26 14:11:47 +0200 | [diff] [blame] | 264 | // Serialized form of com.google.gerrit.entities.Project.NameKey. |
Alice Kober-Sotzek | 97d3e42 | 2018-12-05 17:49:11 +0100 | [diff] [blame] | 265 | // Next ID: 2 |
| 266 | message Project_NameKey { |
| 267 | optional string name = 1; |
| 268 | } |
| 269 | |
David Ostrovsky | b03a6e9 | 2019-05-26 14:11:47 +0200 | [diff] [blame] | 270 | // Serialized form of com.google.gerrit.entities.Branch.NameKey. |
Alice Kober-Sotzek | 97d3e42 | 2018-12-05 17:49:11 +0100 | [diff] [blame] | 271 | // Next ID: 3 |
| 272 | message Branch_NameKey { |
Dave Borowitz | ac3b3d6 | 2019-04-17 15:53:44 -0700 | [diff] [blame] | 273 | optional Project_NameKey project = 1; |
| 274 | optional string branch = 2; |
Alice Kober-Sotzek | 97d3e42 | 2018-12-05 17:49:11 +0100 | [diff] [blame] | 275 | } |
| 276 | |
Dave Borowitz | 20a984f | 2019-04-23 14:19:25 -0700 | [diff] [blame] | 277 | // Serialized form of org.eclipse.jgit.lib.ObjectId. |
Alice Kober-Sotzek | 97d3e42 | 2018-12-05 17:49:11 +0100 | [diff] [blame] | 278 | // Next ID: 2 |
Dave Borowitz | 20a984f | 2019-04-23 14:19:25 -0700 | [diff] [blame] | 279 | message ObjectId { |
| 280 | // Hex string representation of the ID. |
Nitzan Gur-Furman | 6ac80d5 | 2024-05-08 12:15:03 +0000 | [diff] [blame] | 281 | optional string name = 1 [default="0000000000000000000000000000000000000000"]; |
Alice Kober-Sotzek | 97d3e42 | 2018-12-05 17:49:11 +0100 | [diff] [blame] | 282 | } |
Youssef Elghareeb | 875bc6f | 2023-09-07 14:37:34 +0200 | [diff] [blame] | 283 | |
| 284 | // Serialized form of a continuation token used for pagination. |
| 285 | // Next ID: 2 |
| 286 | message PaginationToken { |
| 287 | optional string next_page_token = 1; |
| 288 | } |
Nitzan Gur-Furman | 6158132 | 2023-09-15 09:59:29 +0200 | [diff] [blame] | 289 | |
| 290 | // Proto representation of the User preferences classes |
| 291 | // Next ID: 4 |
| 292 | message UserPreferences { |
Nitzan Gur-Furman | ea2936d | 2024-05-15 11:43:42 +0000 | [diff] [blame] | 293 | // Next ID: 26 |
Nitzan Gur-Furman | 6158132 | 2023-09-15 09:59:29 +0200 | [diff] [blame] | 294 | message GeneralPreferencesInfo { |
| 295 | // Number of changes to show in a screen. |
| 296 | optional int32 changes_per_page = 1 [default = 25]; |
| 297 | |
| 298 | // Type of download URL the user prefers to use. */ |
| 299 | optional string download_scheme = 2; |
| 300 | |
| 301 | enum Theme { |
| 302 | AUTO = 0; |
| 303 | DARK = 1; |
| 304 | LIGHT = 2; |
| 305 | } |
| 306 | optional Theme theme = 3; |
| 307 | |
| 308 | enum DateFormat { |
| 309 | STD = 0; |
| 310 | US = 1; |
| 311 | ISO = 2; |
| 312 | EURO = 3; |
| 313 | UK = 4; |
| 314 | } |
| 315 | optional DateFormat date_format = 4; |
| 316 | |
| 317 | enum TimeFormat { |
| 318 | HHMM_12 = 0; |
| 319 | HHMM_24 = 1; |
| 320 | } |
| 321 | optional TimeFormat time_format = 5; |
| 322 | |
| 323 | optional bool expand_inline_diffs = 6; |
| 324 | optional bool relative_date_in_change_table = 20; |
| 325 | |
| 326 | enum DiffView { |
| 327 | SIDE_BY_SIDE = 0; |
| 328 | UNIFIED_DIFF = 1; |
| 329 | } |
| 330 | optional DiffView diff_view = 21; |
| 331 | |
| 332 | optional bool size_bar_in_change_table = 22 [default = true]; |
| 333 | optional bool legacycid_in_change_table = 7; |
| 334 | optional bool mute_common_path_prefixes = 8 [default = true]; |
| 335 | optional bool signed_off_by = 9; |
| 336 | |
| 337 | enum EmailStrategy { |
| 338 | ENABLED = 0; |
| 339 | CC_ON_OWN_COMMENTS = 1; |
| 340 | ATTENTION_SET_ONLY = 2; |
| 341 | DISABLED = 3; |
| 342 | } |
| 343 | optional EmailStrategy email_strategy = 10; |
| 344 | |
| 345 | enum EmailFormat { |
| 346 | PLAINTEXT = 0; |
| 347 | HTML_PLAINTEXT = 1; |
| 348 | } |
| 349 | optional EmailFormat email_format = 11 [default = HTML_PLAINTEXT]; |
| 350 | |
| 351 | enum DefaultBase { |
| 352 | AUTO_MERGE = 0; |
| 353 | FIRST_PARENT = 1; |
| 354 | } |
| 355 | optional DefaultBase default_base_for_merges = 12 [default = FIRST_PARENT]; |
| 356 | |
| 357 | optional bool publish_comments_on_push = 13; |
| 358 | optional bool disable_keyboard_shortcuts = 14; |
| 359 | optional bool disable_token_highlighting = 15; |
| 360 | optional bool work_in_progress_by_default = 16; |
| 361 | |
| 362 | message MenuItem { |
| 363 | optional string url = 1; |
| 364 | optional string name = 2; |
| 365 | optional string target = 3; |
| 366 | optional string id = 4; |
| 367 | } |
| 368 | repeated MenuItem my_menu_items = 17; |
| 369 | |
| 370 | repeated string change_table = 18; |
| 371 | optional bool allow_browser_notifications = 19 [default = true]; |
Nitzan Gur-Furman | ea2936d | 2024-05-15 11:43:42 +0000 | [diff] [blame] | 372 | optional bool allow_suggest_code_while_commenting = 24 [default = true]; |
| 373 | optional bool allow_autocompleting_comments = 25 [default = true]; |
Frank Borden | a12b3d4 | 2023-10-17 14:55:17 +0200 | [diff] [blame] | 374 | optional string diff_page_sidebar = 23 [default = "NONE"]; |
Nitzan Gur-Furman | 6158132 | 2023-09-15 09:59:29 +0200 | [diff] [blame] | 375 | } |
| 376 | optional GeneralPreferencesInfo general_preferences_info = 1; |
| 377 | |
| 378 | // Next ID: 25 |
| 379 | message DiffPreferencesInfo { |
| 380 | optional int32 context = 1 [default = 10]; |
| 381 | optional int32 tab_size = 2 [default = 8]; |
| 382 | optional int32 font_size = 3 [default = 12]; |
| 383 | optional int32 line_length = 4 [default = 100]; |
| 384 | optional int32 cursor_blink_rate = 5; |
| 385 | optional bool expand_all_comments = 6; |
| 386 | optional bool intraline_difference = 7 [default = true]; |
| 387 | optional bool manual_review = 8; |
| 388 | optional bool show_line_endings = 9 [default = true]; |
| 389 | optional bool show_tabs = 10 [default = true]; |
| 390 | optional bool show_whitespace_errors = 11 [default = true]; |
| 391 | optional bool syntax_highlighting = 12 [default = true]; |
| 392 | optional bool hide_top_menu = 13; |
| 393 | optional bool auto_hide_diff_table_header = 14 [default = true]; |
| 394 | optional bool hide_line_numbers = 15; |
| 395 | optional bool render_entire_file = 16; |
| 396 | optional bool hide_empty_pane = 17; |
| 397 | optional bool match_brackets = 18; |
| 398 | optional bool line_wrapping = 19; |
| 399 | |
| 400 | enum Whitespace { |
| 401 | IGNORE_NONE = 0; |
| 402 | IGNORE_TRAILING = 1; |
| 403 | IGNORE_LEADING_AND_TRAILING = 2; |
| 404 | IGNORE_ALL = 3; |
| 405 | } |
| 406 | optional Whitespace ignore_whitespace = 20; |
| 407 | |
| 408 | optional bool retain_header = 21; |
| 409 | optional bool skip_deleted = 22; |
| 410 | optional bool skip_unchanged = 23; |
| 411 | optional bool skip_uncommented = 24; |
| 412 | } |
| 413 | optional DiffPreferencesInfo diff_preferences_info = 2; |
| 414 | |
| 415 | // Next ID: 15 |
| 416 | message EditPreferencesInfo { |
| 417 | optional int32 tab_size = 1 [default = 8]; |
| 418 | optional int32 line_length = 2 [default = 100]; |
| 419 | optional int32 indent_unit = 3 [default = 2]; |
| 420 | optional int32 cursor_blink_rate = 4; |
| 421 | optional bool hide_top_menu = 5; |
| 422 | optional bool show_tabs = 6 [default = true]; |
| 423 | optional bool show_whitespace_errors = 7; |
| 424 | optional bool syntax_highlighting = 8 [default = true]; |
| 425 | optional bool hide_line_numbers = 9; |
| 426 | optional bool match_brackets = 10 [default = true]; |
| 427 | optional bool line_wrapping = 11; |
| 428 | optional bool indent_with_tabs = 12; |
| 429 | optional bool auto_close_brackets = 13; |
| 430 | optional bool show_base = 14; |
| 431 | } |
| 432 | optional EditPreferencesInfo edit_preferences_info = 3; |
| 433 | } |
Nitzan Gur-Furman | 31c5301 | 2023-11-20 23:02:59 +0100 | [diff] [blame] | 434 | |
| 435 | // Next Id: 13 |
| 436 | message HumanComment { |
| 437 | // Required. Note that the equivalent Java struct does not contain the change |
| 438 | // ID, so we keep the same format here. |
| 439 | optional int32 patchset_id = 1; |
| 440 | optional ObjectId dest_commit_id = 2; |
| 441 | // Required. |
| 442 | optional Account_Id account_id = 3; |
| 443 | optional Account_Id real_author = 4; |
| 444 | |
| 445 | // Next Id: 5 |
| 446 | message InFilePosition { |
| 447 | optional string file_path = 1; |
| 448 | enum Side { |
| 449 | // Should match the logic in |
| 450 | // http://google3/third_party/java_src/gerritcodereview/gerrit/java/com/google/gerrit/extensions/client/Side.java?rcl=579772037&l=24 |
| 451 | PARENT = 0; |
| 452 | REVISION = 1; |
| 453 | } |
| 454 | // Default should match |
| 455 | // http://google3/third_party/java_src/gerritcodereview/gerrit/Documentation/rest-api-changes.txt?l=7423 |
| 456 | optional Side side = 2 [default = REVISION]; |
| 457 | message Range { |
| 458 | // 1-based |
Nitzan Gur-Furman | 6ac80d5 | 2024-05-08 12:15:03 +0000 | [diff] [blame] | 459 | optional int32 start_line = 1 [default = 1]; |
Nitzan Gur-Furman | 31c5301 | 2023-11-20 23:02:59 +0100 | [diff] [blame] | 460 | // 0-based |
| 461 | optional int32 start_char = 2; |
| 462 | // 1-based |
Nitzan Gur-Furman | 6ac80d5 | 2024-05-08 12:15:03 +0000 | [diff] [blame] | 463 | optional int32 end_line = 3 [default = 1]; |
Nitzan Gur-Furman | 31c5301 | 2023-11-20 23:02:59 +0100 | [diff] [blame] | 464 | // 0-based |
| 465 | optional int32 end_char = 4; |
| 466 | } |
| 467 | // If neither range nor line number set, the comment is on the file level. It is possible |
| 468 | // (though not required) for both values to be set. in this case, it is expected that the line |
| 469 | // number is identical to the range's end line. |
| 470 | optional Range position_range = 3; |
| 471 | // 1-based |
Nitzan Gur-Furman | 6ac80d5 | 2024-05-08 12:15:03 +0000 | [diff] [blame] | 472 | optional int32 line_number = 4 [default = 1]; |
Nitzan Gur-Furman | 31c5301 | 2023-11-20 23:02:59 +0100 | [diff] [blame] | 473 | } |
| 474 | |
| 475 | // If not set, the comment is on the patchset level. |
| 476 | optional InFilePosition in_file_position = 5; |
| 477 | |
| 478 | // Required. |
| 479 | optional string comment_text = 6; |
| 480 | // Might be set by the user while creating the draft. |
| 481 | // See http://go/gerrit-rest-api-change#comment-info. |
| 482 | optional string tag = 7; |
| 483 | optional bool unresolved = 8 [default = false]; |
| 484 | |
| 485 | // Required. |
| 486 | optional string comment_uuid = 9; |
| 487 | // Required. |
| 488 | optional string parent_comment_uuid = 10; |
| 489 | |
| 490 | // Required. Epoch millis. |
| 491 | optional fixed64 written_on_millis = 11; |
| 492 | // Required. |
| 493 | optional string server_id = 12; |
Nitzan Gur-Furman | 6ac80d5 | 2024-05-08 12:15:03 +0000 | [diff] [blame] | 494 | } |