Dave Borowitz | 11f0c64 | 2018-04-21 12:04:24 -0400 | [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 = "proto3"; |
| 16 | |
| 17 | package gerrit.cache; |
| 18 | |
| 19 | option java_package = "com.google.gerrit.server.cache.proto"; |
| 20 | |
Han-Wen Nienhuys | bcd3edf | 2021-02-04 15:04:45 +0100 | [diff] [blame] | 21 | import "proto/entities.proto"; |
| 22 | |
| 23 | // Serialized form of com.google.gerrit.server.change.ChangeKindCacheImpl.Key. |
Dave Borowitz | 11f0c64 | 2018-04-21 12:04:24 -0400 | [diff] [blame] | 24 | // Next ID: 4 |
| 25 | message ChangeKindKeyProto { |
| 26 | bytes prior = 1; |
| 27 | bytes next = 2; |
| 28 | string strategy_name = 3; |
| 29 | } |
Dave Borowitz | e62a111 | 2018-05-01 09:27:46 -0400 | [diff] [blame] | 30 | |
| 31 | // Serialized form of |
| 32 | // com.google.gerrit.server.change.MergeabilityCacheImpl.EntryKey. |
| 33 | // Next ID: 5 |
| 34 | message MergeabilityKeyProto { |
| 35 | bytes commit = 1; |
| 36 | bytes into = 2; |
| 37 | string submit_type = 3; |
| 38 | string merge_strategy = 4; |
| 39 | } |
Dave Borowitz | e6930d7 | 2018-05-01 10:22:02 -0400 | [diff] [blame] | 40 | |
| 41 | // Serialized form of com.google.gerrit.extensions.auth.oauth.OAuthToken. |
| 42 | // Next ID: 6 |
| 43 | message OAuthTokenProto { |
| 44 | string token = 1; |
| 45 | string secret = 2; |
| 46 | string raw = 3; |
Joerg Zieren | d5fb743 | 2020-03-02 13:51:04 +0100 | [diff] [blame] | 47 | // Epoch millis. |
| 48 | int64 expires_at_millis = 4; |
Dave Borowitz | 12df29f | 2018-05-15 16:37:02 -0700 | [diff] [blame] | 49 | string provider_id = 5; |
Dave Borowitz | e6930d7 | 2018-05-01 10:22:02 -0400 | [diff] [blame] | 50 | } |
Dave Borowitz | bab4586 | 2018-05-01 12:31:48 -0400 | [diff] [blame] | 51 | |
| 52 | |
| 53 | // Serialized form of com.google.gerrit.server.notedb.ChangeNotesCache.Key. |
| 54 | // Next ID: 4 |
| 55 | message ChangeNotesKeyProto { |
| 56 | string project = 1; |
| 57 | int32 change_id = 2; |
| 58 | bytes id = 3; |
| 59 | } |
| 60 | |
| 61 | // Serialized from of com.google.gerrit.server.notedb.ChangeNotesState. |
| 62 | // |
| 63 | // Note on embedded protos: this is just for storing in a cache, so some formats |
| 64 | // were chosen ease of coding the initial implementation. In particular, where |
| 65 | // there already exists another serialization mechanism in Gerrit for |
| 66 | // serializing a particular field, we use that rather than defining a new proto |
Alice Kober-Sotzek | 14db531 | 2018-12-14 16:06:41 +0100 | [diff] [blame] | 67 | // type. This includes types that can be serialized to proto using |
| 68 | // ProtoConverters as well as NoteDb and indexed types that are serialized using |
| 69 | // JSON. We can always revisit this decision later; it just requires bumping the |
| 70 | // cache version. |
Dave Borowitz | bab4586 | 2018-05-01 12:31:48 -0400 | [diff] [blame] | 71 | // |
| 72 | // Note on nullability: there are a lot of nullable fields in ChangeNotesState |
| 73 | // and its dependencies. It's likely we could make some of them non-nullable, |
| 74 | // but each one of those would be a potentially significant amount of cleanup, |
| 75 | // and there's no guarantee we'd be able to eliminate all of them. (For a less |
| 76 | // complex class, it's likely the cleanup would be more feasible.) |
| 77 | // |
| 78 | // Instead, we just take the tedious yet simple approach of having a "has_foo" |
| 79 | // field for each nullable field "foo", indicating whether or not foo is null. |
| 80 | // |
Youssef Elghareeb | a7ad3e0 | 2021-07-01 13:20:16 +0200 | [diff] [blame] | 81 | // Next ID: 28 |
Dave Borowitz | bab4586 | 2018-05-01 12:31:48 -0400 | [diff] [blame] | 82 | message ChangeNotesStateProto { |
| 83 | // Effectively required, even though the corresponding ChangeNotesState field |
| 84 | // is optional, since the field is only absent when NoteDb is disabled, in |
| 85 | // which case attempting to use the ChangeNotesCache is programmer error. |
| 86 | bytes meta_id = 1; |
| 87 | |
| 88 | int32 change_id = 2; |
| 89 | |
Kaushik Lingarkar | 4a711ed | 2019-11-12 13:53:29 -0800 | [diff] [blame] | 90 | // Next ID: 26 |
Dave Borowitz | bab4586 | 2018-05-01 12:31:48 -0400 | [diff] [blame] | 91 | message ChangeColumnsProto { |
| 92 | string change_key = 1; |
| 93 | |
Joerg Zieren | d5fb743 | 2020-03-02 13:51:04 +0100 | [diff] [blame] | 94 | // Epoch millis. |
| 95 | int64 created_on_millis = 2; |
Dave Borowitz | bab4586 | 2018-05-01 12:31:48 -0400 | [diff] [blame] | 96 | |
Joerg Zieren | d5fb743 | 2020-03-02 13:51:04 +0100 | [diff] [blame] | 97 | // Epoch millis. |
| 98 | int64 last_updated_on_millis = 3; |
Dave Borowitz | bab4586 | 2018-05-01 12:31:48 -0400 | [diff] [blame] | 99 | |
| 100 | int32 owner = 4; |
| 101 | |
| 102 | string branch = 5; |
| 103 | |
| 104 | int32 current_patch_set_id = 6; |
| 105 | bool has_current_patch_set_id = 7; |
| 106 | |
| 107 | string subject = 8; |
| 108 | |
| 109 | string topic = 9; |
| 110 | bool has_topic = 10; |
| 111 | |
| 112 | string original_subject = 11; |
| 113 | bool has_original_subject = 12; |
| 114 | |
| 115 | string submission_id = 13; |
| 116 | bool has_submission_id = 14; |
| 117 | |
Gal Paikin | 2345703 | 2019-10-16 15:09:56 +0200 | [diff] [blame] | 118 | reserved 15; // assignee |
| 119 | reserved 16; // has_assignee |
Dave Borowitz | bab4586 | 2018-05-01 12:31:48 -0400 | [diff] [blame] | 120 | |
| 121 | string status = 17; |
| 122 | bool has_status = 18; |
| 123 | |
| 124 | bool is_private = 19; |
| 125 | |
| 126 | bool work_in_progress = 20; |
| 127 | |
| 128 | bool review_started = 21; |
| 129 | |
| 130 | int32 revert_of = 22; |
| 131 | bool has_revert_of = 23; |
Kaushik Lingarkar | 4a711ed | 2019-11-12 13:53:29 -0800 | [diff] [blame] | 132 | |
| 133 | string cherry_pick_of = 24; |
| 134 | bool has_cherry_pick_of = 25; |
Dave Borowitz | bab4586 | 2018-05-01 12:31:48 -0400 | [diff] [blame] | 135 | } |
| 136 | // Effectively required, even though the corresponding ChangeNotesState field |
| 137 | // is optional, since the field is only absent when NoteDb is disabled, in |
| 138 | // which case attempting to use the ChangeNotesCache is programmer error. |
| 139 | ChangeColumnsProto columns = 3; |
| 140 | |
Joerg Zieren | 361ea4b | 2020-02-17 16:25:43 +0100 | [diff] [blame] | 141 | reserved 4; // past_assignee |
Dave Borowitz | bab4586 | 2018-05-01 12:31:48 -0400 | [diff] [blame] | 142 | |
| 143 | repeated string hashtag = 5; |
| 144 | |
Han-Wen Nienhuys | bcd3edf | 2021-02-04 15:04:45 +0100 | [diff] [blame] | 145 | repeated devtools.gerritcodereview.PatchSet patch_set = 6; |
Dave Borowitz | bab4586 | 2018-05-01 12:31:48 -0400 | [diff] [blame] | 146 | |
Han-Wen Nienhuys | bcd3edf | 2021-02-04 15:04:45 +0100 | [diff] [blame] | 147 | repeated devtools.gerritcodereview.PatchSetApproval approval = 7; |
Dave Borowitz | bab4586 | 2018-05-01 12:31:48 -0400 | [diff] [blame] | 148 | |
| 149 | // Next ID: 4 |
| 150 | message ReviewerSetEntryProto { |
| 151 | string state = 1; |
| 152 | int32 account_id = 2; |
Joerg Zieren | d5fb743 | 2020-03-02 13:51:04 +0100 | [diff] [blame] | 153 | // Epoch millis. |
| 154 | int64 timestamp_millis = 3; |
Dave Borowitz | bab4586 | 2018-05-01 12:31:48 -0400 | [diff] [blame] | 155 | } |
| 156 | repeated ReviewerSetEntryProto reviewer = 8; |
| 157 | |
| 158 | // Next ID: 4 |
| 159 | message ReviewerByEmailSetEntryProto { |
| 160 | string state = 1; |
| 161 | string address = 2; |
Joerg Zieren | d5fb743 | 2020-03-02 13:51:04 +0100 | [diff] [blame] | 162 | // Epoch millis. |
| 163 | int64 timestamp_millis = 3; |
Dave Borowitz | bab4586 | 2018-05-01 12:31:48 -0400 | [diff] [blame] | 164 | } |
| 165 | repeated ReviewerByEmailSetEntryProto reviewer_by_email = 9; |
| 166 | |
| 167 | repeated ReviewerSetEntryProto pending_reviewer = 10; |
| 168 | |
| 169 | repeated ReviewerByEmailSetEntryProto pending_reviewer_by_email = 11; |
| 170 | |
| 171 | repeated int32 past_reviewer = 12; |
| 172 | |
| 173 | // Next ID: 5 |
| 174 | message ReviewerStatusUpdateProto { |
Joerg Zieren | 361ea4b | 2020-02-17 16:25:43 +0100 | [diff] [blame] | 175 | // Epoch millis. |
Joerg Zieren | d5fb743 | 2020-03-02 13:51:04 +0100 | [diff] [blame] | 176 | int64 timestamp_millis = 1; |
Dave Borowitz | bab4586 | 2018-05-01 12:31:48 -0400 | [diff] [blame] | 177 | int32 updated_by = 2; |
| 178 | int32 reviewer = 3; |
| 179 | string state = 4; |
| 180 | } |
| 181 | repeated ReviewerStatusUpdateProto reviewer_update = 13; |
| 182 | |
| 183 | // JSON produced from |
| 184 | // com.google.gerrit.server.index.change.ChangeField.StoredSubmitRecord. |
| 185 | repeated string submit_record = 14; |
| 186 | |
Han-Wen Nienhuys | bcd3edf | 2021-02-04 15:04:45 +0100 | [diff] [blame] | 187 | repeated devtools.gerritcodereview.ChangeMessage change_message = 15; |
Dave Borowitz | bab4586 | 2018-05-01 12:31:48 -0400 | [diff] [blame] | 188 | |
David Ostrovsky | b03a6e9 | 2019-05-26 14:11:47 +0200 | [diff] [blame] | 189 | // JSON produced from com.google.gerrit.entities.Comment. |
Dave Borowitz | bab4586 | 2018-05-01 12:31:48 -0400 | [diff] [blame] | 190 | repeated string published_comment = 16; |
| 191 | |
Dave Borowitz | fb2b323 | 2018-12-13 14:30:48 -0800 | [diff] [blame] | 192 | reserved 17; // read_only_until |
| 193 | reserved 18; // has_read_only_until |
Dave Borowitz | 10edb7c | 2019-04-15 14:33:22 -0700 | [diff] [blame] | 194 | |
| 195 | // Number of updates to the change's meta ref. |
| 196 | int32 update_count = 19; |
David Ostrovsky | f8367a8 | 2019-08-03 17:05:19 +0200 | [diff] [blame] | 197 | |
| 198 | string server_id = 20; |
| 199 | bool has_server_id = 21; |
Gal Paikin | 2345703 | 2019-10-16 15:09:56 +0200 | [diff] [blame] | 200 | |
Kamil Musin | fd7f8b9 | 2023-02-06 11:51:29 +0100 | [diff] [blame] | 201 | reserved 22; // assignee_update; |
Dave Borowitz | c15b8ef | 2018-05-18 08:11:22 -0400 | [diff] [blame] | 202 | |
Joerg Zieren | fdbea38 | 2020-03-06 13:44:25 +0100 | [diff] [blame] | 203 | // An update to the attention set of the change. See class AttentionSetUpdate |
| 204 | // for context. |
| 205 | message AttentionSetUpdateProto { |
Joerg Zieren | 361ea4b | 2020-02-17 16:25:43 +0100 | [diff] [blame] | 206 | // Epoch millis. |
Joerg Zieren | d5fb743 | 2020-03-02 13:51:04 +0100 | [diff] [blame] | 207 | int64 timestamp_millis = 1; |
Joerg Zieren | 361ea4b | 2020-02-17 16:25:43 +0100 | [diff] [blame] | 208 | int32 account = 2; |
Joerg Zieren | fdbea38 | 2020-03-06 13:44:25 +0100 | [diff] [blame] | 209 | // Maps to enum AttentionSetUpdate.Operation |
Joerg Zieren | 361ea4b | 2020-02-17 16:25:43 +0100 | [diff] [blame] | 210 | string operation = 3; |
| 211 | string reason = 4; |
| 212 | } |
Gal Paikin | 120baca | 2020-09-30 21:46:45 +0300 | [diff] [blame] | 213 | // Only includes the most recent attention set update for each user. |
Joerg Zieren | fdbea38 | 2020-03-06 13:44:25 +0100 | [diff] [blame] | 214 | repeated AttentionSetUpdateProto attention_set_update = 23; |
Gal Paikin | 120baca | 2020-09-30 21:46:45 +0300 | [diff] [blame] | 215 | |
| 216 | // Includes all attention set updates. |
| 217 | repeated AttentionSetUpdateProto all_attention_set_update = 24; |
Marija Savtchouk | d2b8215 | 2020-11-23 08:20:54 +0000 | [diff] [blame] | 218 | |
| 219 | // Epoch millis. |
| 220 | int64 merged_on_millis = 25; |
| 221 | bool has_merged_on = 26; |
Youssef Elghareeb | a7ad3e0 | 2021-07-01 13:20:16 +0200 | [diff] [blame] | 222 | |
| 223 | repeated SubmitRequirementResultProto submit_requirement_result = 27; |
Joerg Zieren | 361ea4b | 2020-02-17 16:25:43 +0100 | [diff] [blame] | 224 | } |
Dave Borowitz | c15b8ef | 2018-05-18 08:11:22 -0400 | [diff] [blame] | 225 | |
| 226 | // Serialized form of com.google.gerrit.server.query.change.ConflictKey |
| 227 | message ConflictKeyProto { |
| 228 | bytes commit = 1; |
| 229 | bytes other_commit = 2; |
| 230 | string submit_type = 3; |
| 231 | bool content_merge = 4; |
| 232 | } |
Dave Borowitz | b30a414 | 2018-07-23 15:28:22 -0700 | [diff] [blame] | 233 | |
| 234 | // Serialized form of com.google.gerrit.server.query.git.TagSetHolder. |
| 235 | // Next ID: 3 |
| 236 | message TagSetHolderProto { |
| 237 | string project_name = 1; |
| 238 | |
| 239 | // Next ID: 4 |
| 240 | message TagSetProto { |
| 241 | string project_name = 1; |
| 242 | |
| 243 | // Next ID: 3 |
| 244 | message CachedRefProto { |
| 245 | bytes id = 1; |
| 246 | int32 flag = 2; |
| 247 | } |
| 248 | map<string, CachedRefProto> ref = 2; |
| 249 | |
| 250 | // Next ID: 3 |
| 251 | message TagProto { |
| 252 | bytes id = 1; |
| 253 | bytes flags = 2; |
| 254 | } |
| 255 | repeated TagProto tag = 3; |
| 256 | } |
| 257 | TagSetProto tags = 2; |
| 258 | } |
Dave Borowitz | b20d23a8 | 2018-08-21 13:43:10 -0700 | [diff] [blame] | 259 | |
| 260 | // Serialized form of |
| 261 | // com.google.gerrit.server.account.externalids.AllExternalIds. |
| 262 | // Next ID: 2 |
| 263 | message AllExternalIdsProto { |
Thomas Draebing | 29595cd | 2021-03-24 15:23:35 +0100 | [diff] [blame] | 264 | // Next ID: 7 |
Dave Borowitz | b20d23a8 | 2018-08-21 13:43:10 -0700 | [diff] [blame] | 265 | message ExternalIdProto { |
| 266 | string key = 1; |
| 267 | int32 accountId = 2; |
| 268 | string email = 3; |
| 269 | string password = 4; |
| 270 | bytes blobId = 5; |
Thomas Draebing | 29595cd | 2021-03-24 15:23:35 +0100 | [diff] [blame] | 271 | bool isCaseInsensitive = 6; |
Dave Borowitz | b20d23a8 | 2018-08-21 13:43:10 -0700 | [diff] [blame] | 272 | } |
| 273 | repeated ExternalIdProto external_id = 1; |
| 274 | } |
Patrick Hiesel | a57c0d6 | 2019-02-19 09:09:22 +0100 | [diff] [blame] | 275 | |
Youssef Elghareeb | 2529724 | 2020-03-19 00:13:26 +0100 | [diff] [blame] | 276 | // Serialized form of a list of com.google.gerrit.entities.AccountGroup.UUID |
| 277 | // Next ID: 2 |
| 278 | message AllExternalGroupsProto { |
| 279 | message ExternalGroupProto { |
| 280 | string groupUuid = 1; |
| 281 | } |
| 282 | repeated ExternalGroupProto external_group = 1; |
| 283 | } |
| 284 | |
Gal Paikin | f74ee38 | 2021-03-22 16:00:25 +0100 | [diff] [blame] | 285 | // Serialized key for com.google.gerrit.server.account.GroupCacheImpl. |
| 286 | // Next ID: 3 |
| 287 | message GroupKeyProto { |
| 288 | string uuid = 1; |
| 289 | bytes revision = 2; |
| 290 | } |
| 291 | |
| 292 | |
| 293 | // Serialized form of com.google.gerrit.entities.InternalGroup. |
| 294 | // Next ID: 11 |
| 295 | message InternalGroupProto { |
| 296 | int32 id = 1; |
| 297 | string name = 2; |
| 298 | string description = 3; |
| 299 | string owner_group_uuid = 4; |
| 300 | bool is_visible_to_all = 5; |
| 301 | string group_uuid = 6; |
| 302 | int64 created_on = 7; |
| 303 | repeated int32 members_ids = 8; |
| 304 | repeated string subgroup_uuids = 9; |
| 305 | bytes ref_state = 10; |
| 306 | } |
| 307 | |
Patrick Hiesel | a57c0d6 | 2019-02-19 09:09:22 +0100 | [diff] [blame] | 308 | // Key for com.google.gerrit.server.git.PureRevertCache. |
| 309 | // Next ID: 4 |
| 310 | message PureRevertKeyProto { |
| 311 | string project = 1; |
| 312 | bytes claimed_original = 2; |
| 313 | bytes claimed_revert = 3; |
| 314 | } |
Patrick Hiesel | 4836e57 | 2020-03-05 15:23:29 +0100 | [diff] [blame] | 315 | |
Patrick Hiesel | e945da3 | 2020-03-26 17:22:23 +0100 | [diff] [blame] | 316 | // Key for com.google.gerrit.server.account.ProjectWatches. |
| 317 | // Next ID: 4 |
| 318 | message ProjectWatchProto { |
Patrick Hiesel | 4836e57 | 2020-03-05 15:23:29 +0100 | [diff] [blame] | 319 | string project = 1; |
| 320 | string filter = 2; |
Patrick Hiesel | e945da3 | 2020-03-26 17:22:23 +0100 | [diff] [blame] | 321 | repeated string notify_type = 3; |
Patrick Hiesel | 4836e57 | 2020-03-05 15:23:29 +0100 | [diff] [blame] | 322 | } |
Patrick Hiesel | 58d5129 | 2020-03-05 16:24:07 +0100 | [diff] [blame] | 323 | |
| 324 | // Serialized form of |
| 325 | // com.google.gerrit.entities.Account. |
| 326 | // Next ID: 9 |
| 327 | message AccountProto { |
| 328 | int32 id = 1; |
| 329 | int64 registered_on = 2; |
| 330 | string full_name = 3; |
| 331 | string display_name = 4; |
| 332 | string preferred_email = 5; |
| 333 | bool inactive = 6; |
| 334 | string status = 7; |
| 335 | string meta_id = 8; |
| 336 | } |
Patrick Hiesel | e945da3 | 2020-03-26 17:22:23 +0100 | [diff] [blame] | 337 | |
| 338 | // Serialized form of com.google.gerrit.server.account.CachedAccountDetails.Key. |
| 339 | // Next ID: 3 |
| 340 | message AccountKeyProto { |
| 341 | int32 account_id = 1; |
| 342 | bytes id = 2; |
| 343 | } |
| 344 | |
| 345 | // Serialized form of com.google.gerrit.server.account.CachedAccountDetails. |
| 346 | // Next ID: 4 |
| 347 | message AccountDetailsProto { |
| 348 | AccountProto account = 1; |
| 349 | repeated ProjectWatchProto project_watch_proto = 2; |
| 350 | string user_preferences = 3; |
| 351 | } |
Patrick Hiesel | ffd88ef | 2020-07-07 10:30:45 +0200 | [diff] [blame] | 352 | |
| 353 | // Serialized form of com.google.gerrit.entities.Project. |
| 354 | // Next ID: 11 |
| 355 | message ProjectProto { |
| 356 | string name = 1; |
| 357 | string description = 2; |
| 358 | map<string, string> boolean_configs = 3; |
| 359 | string submit_type = 4; // ENUM as String |
| 360 | string state = 5; // ENUM as String |
| 361 | string parent = 6; |
| 362 | string max_object_size_limit = 7; |
| 363 | string default_dashboard = 8; |
| 364 | string local_default_dashboard = 9; |
| 365 | string config_ref_state = 10; |
| 366 | } |
Patrick Hiesel | d80bf5a | 2020-07-10 13:55:39 +0200 | [diff] [blame] | 367 | |
| 368 | // Serialized form of com.google.gerrit.common.data.GroupReference. |
| 369 | // Next ID: 3 |
| 370 | message GroupReferenceProto { |
| 371 | string uuid = 1; |
| 372 | string name = 2; |
| 373 | } |
Patrick Hiesel | f557544 | 2020-07-10 14:25:51 +0200 | [diff] [blame] | 374 | |
| 375 | // Serialized form of com.google.gerrit.common.data.PermissionRule. |
| 376 | // Next ID: 6 |
| 377 | message PermissionRuleProto { |
| 378 | string action = 1; // ENUM as String |
| 379 | bool force = 2; |
| 380 | int32 min = 3; |
| 381 | int32 max = 4; |
| 382 | GroupReferenceProto group = 5; |
| 383 | } |
Patrick Hiesel | d2761e1 | 2020-07-13 09:10:11 +0200 | [diff] [blame] | 384 | |
| 385 | // Serialized form of com.google.gerrit.common.data.Permission. |
| 386 | // Next ID: 4 |
| 387 | message PermissionProto { |
| 388 | string name = 1; |
| 389 | bool exclusive_group = 2; |
| 390 | repeated PermissionRuleProto rules = 3; |
| 391 | } |
Patrick Hiesel | 4c74f00 | 2020-07-13 09:22:34 +0200 | [diff] [blame] | 392 | |
| 393 | // Serialized form of com.google.gerrit.common.data.AccessSection. |
| 394 | // Next ID: 3 |
| 395 | message AccessSectionProto { |
| 396 | string name = 1; |
| 397 | repeated PermissionProto permissions = 2; |
| 398 | } |
Patrick Hiesel | 9f8e23d | 2020-07-13 09:35:17 +0200 | [diff] [blame] | 399 | |
| 400 | // Serialized form of com.google.gerrit.server.git.BranchOrderSection. |
| 401 | // Next ID: 2 |
| 402 | message BranchOrderSectionProto { |
| 403 | repeated string branches_in_order = 1; |
| 404 | } |
Patrick Hiesel | 48434b1 | 2020-07-13 10:07:49 +0200 | [diff] [blame] | 405 | |
| 406 | // Serialized form of com.google.gerrit.common.data.ContributorAgreement. |
| 407 | // Next ID: 8 |
| 408 | message ContributorAgreementProto { |
| 409 | string name = 1; |
| 410 | string description = 2; |
| 411 | repeated PermissionRuleProto accepted = 3; |
| 412 | GroupReferenceProto auto_verify = 4; |
| 413 | string url = 5; |
| 414 | repeated string exclude_regular_expressions = 6; |
| 415 | repeated string match_regular_expressions = 7; |
| 416 | } |
Patrick Hiesel | 27ab5bd | 2020-07-13 13:34:39 +0200 | [diff] [blame] | 417 | |
| 418 | // Serialized form of com.google.gerrit.entities.Address. |
| 419 | // Next ID: 3 |
| 420 | message AddressProto { |
| 421 | string name = 1; |
| 422 | string email = 2; |
| 423 | } |
Patrick Hiesel | 9b15b9c | 2020-07-13 14:23:39 +0200 | [diff] [blame] | 424 | |
| 425 | // Serialized form of com.google.gerrit.entities.NotifyConfig. |
| 426 | // Next ID: 7 |
| 427 | message NotifyConfigProto { |
| 428 | string name = 1; |
| 429 | repeated string type = 2; // ENUM as String |
| 430 | string filter = 3; |
| 431 | string header = 4; // ENUM as String |
| 432 | repeated GroupReferenceProto groups = 5; |
| 433 | repeated AddressProto addresses = 6; |
| 434 | } |
Patrick Hiesel | 58d03c9 | 2020-07-14 16:27:17 +0200 | [diff] [blame] | 435 | |
| 436 | // Serialized form of com.google.gerrit.entities.LabelValue. |
| 437 | // Next ID: 3 |
| 438 | message LabelValueProto { |
| 439 | string text = 1; |
| 440 | int32 value = 2; |
| 441 | } |
Patrick Hiesel | 4938bda | 2020-07-15 14:44:23 +0200 | [diff] [blame] | 442 | |
| 443 | // Serialized form of com.google.gerrit.common.data.LabelType. |
Youssef Elghareeb | 261691a | 2021-11-17 13:01:08 +0100 | [diff] [blame] | 444 | // Next ID: 22 |
Patrick Hiesel | 4938bda | 2020-07-15 14:44:23 +0200 | [diff] [blame] | 445 | message LabelTypeProto { |
| 446 | string name = 1; |
| 447 | string function = 2; // ENUM as String |
Edwin Kempin | f98c6b8 | 2022-04-05 14:11:39 +0200 | [diff] [blame] | 448 | reserved 3; // copy_any_score |
| 449 | reserved 4; // copy_min_score |
| 450 | reserved 5; // copy_max_score |
| 451 | reserved 6; // copy_all_scores_on_merge_first_parent_update |
| 452 | reserved 7; // copy_all_scores_on_trivial_rebase |
| 453 | reserved 8; // copy_all_scores_if_no_code_change |
| 454 | reserved 9; // copy_all_scores_if_no_change |
| 455 | reserved 10; // copy_values |
Patrick Hiesel | 4938bda | 2020-07-15 14:44:23 +0200 | [diff] [blame] | 456 | bool allow_post_submit = 11; |
| 457 | bool ignore_self_approval = 12; |
| 458 | int32 default_value = 13; |
| 459 | repeated LabelValueProto values = 14; |
| 460 | int32 max_negative = 15; |
| 461 | int32 max_positive = 16; |
| 462 | bool can_override = 17; |
| 463 | repeated string ref_patterns = 18; |
Edwin Kempin | f98c6b8 | 2022-04-05 14:11:39 +0200 | [diff] [blame] | 464 | reserved 19; // copy_all_scores_if_list_of_files_did_not_change |
Patrick Hiesel | c429ff3 | 2021-06-01 15:56:30 +0200 | [diff] [blame] | 465 | string copy_condition = 20; |
Youssef Elghareeb | 261691a | 2021-11-17 13:01:08 +0100 | [diff] [blame] | 466 | string description = 21; |
Patrick Hiesel | 4938bda | 2020-07-15 14:44:23 +0200 | [diff] [blame] | 467 | } |
Patrick Hiesel | 7e579e3 | 2020-07-16 10:17:59 +0200 | [diff] [blame] | 468 | |
Youssef Elghareeb | d6879e2 | 2021-04-01 16:03:58 +0200 | [diff] [blame] | 469 | // Serialized form of com.google.gerrit.entities.SubmitRequirement. |
| 470 | // Next ID: 7 |
| 471 | message SubmitRequirementProto { |
| 472 | string name = 1; |
| 473 | string description = 2; |
| 474 | string applicability_expression = 3; |
Youssef Elghareeb | 61d8e16 | 2021-05-18 15:41:16 +0200 | [diff] [blame] | 475 | string submittability_expression = 4; |
Youssef Elghareeb | d6879e2 | 2021-04-01 16:03:58 +0200 | [diff] [blame] | 476 | string override_expression = 5; |
| 477 | bool allow_override_in_child_projects = 6; |
| 478 | } |
| 479 | |
Youssef Elghareeb | a7ad3e0 | 2021-07-01 13:20:16 +0200 | [diff] [blame] | 480 | // Serialized form of com.google.gerrit.entities.SubmitRequirementResult. |
Marija Savtchouk | c3affd1 | 2022-05-24 16:31:58 +0100 | [diff] [blame] | 481 | // Next ID: 9 |
Youssef Elghareeb | a7ad3e0 | 2021-07-01 13:20:16 +0200 | [diff] [blame] | 482 | message SubmitRequirementResultProto { |
| 483 | SubmitRequirementProto submit_requirement = 1; |
| 484 | SubmitRequirementExpressionResultProto applicability_expression_result = 2; |
| 485 | SubmitRequirementExpressionResultProto submittability_expression_result = 3; |
| 486 | SubmitRequirementExpressionResultProto override_expression_result = 4; |
| 487 | |
| 488 | // Patchset commit ID at which the submit requirements are evaluated. |
| 489 | bytes commit = 5; |
Youssef Elghareeb | 024103e | 2021-09-06 14:41:04 +0200 | [diff] [blame] | 490 | |
| 491 | // Whether this result was created from a legacy submit record. |
| 492 | bool legacy = 6; |
Youssef Elghareeb | f592ed1 | 2021-11-26 15:52:06 +0100 | [diff] [blame] | 493 | |
| 494 | // Whether the submit requirement was bypassed during submission (i.e. by |
| 495 | // performing a push with the %submit option). |
| 496 | bool forced = 7; |
Marija Savtchouk | c3affd1 | 2022-05-24 16:31:58 +0100 | [diff] [blame] | 497 | // Whether this submit requirement result should be filtered out when returned |
| 498 | // from REST API. |
| 499 | bool hidden = 8; |
Youssef Elghareeb | a7ad3e0 | 2021-07-01 13:20:16 +0200 | [diff] [blame] | 500 | } |
| 501 | |
| 502 | // Serialized form of com.google.gerrit.entities.SubmitRequirementExpressionResult. |
| 503 | // Next ID: 6 |
| 504 | message SubmitRequirementExpressionResultProto { |
| 505 | string expression = 1; |
| 506 | string status = 2; // enum as string |
| 507 | string error_message = 3; |
| 508 | repeated string passing_atoms = 4; |
| 509 | repeated string failing_atoms = 5; |
| 510 | } |
| 511 | |
Patrick Hiesel | 7e579e3 | 2020-07-16 10:17:59 +0200 | [diff] [blame] | 512 | // Serialized form of com.google.gerrit.server.project.ConfiguredMimeTypes. |
| 513 | // Next ID: 4 |
| 514 | message ConfiguredMimeTypeProto { |
| 515 | string type = 1; |
| 516 | string pattern = 2; |
| 517 | bool is_regular_expression = 3; |
| 518 | } |
Patrick Hiesel | 1c68405 | 2020-07-16 10:52:51 +0200 | [diff] [blame] | 519 | |
| 520 | // Serialized form of com.google.gerrit.common.data.SubscribeSection. |
| 521 | // Next ID: 4 |
| 522 | message SubscribeSectionProto { |
| 523 | string project_name = 1; |
| 524 | repeated string multi_match_ref_specs = 2; |
| 525 | repeated string matching_ref_specs = 3; |
| 526 | } |
Patrick Hiesel | 0a9b9db | 2020-07-16 12:49:49 +0200 | [diff] [blame] | 527 | |
| 528 | // Serialized form of com.google.gerrit.entities.StoredCommentLinkInfo. |
Kamil Musin | 9148ba6 | 2022-09-15 14:21:34 +0200 | [diff] [blame] | 529 | // Next ID: 10 |
Patrick Hiesel | 0a9b9db | 2020-07-16 12:49:49 +0200 | [diff] [blame] | 530 | message StoredCommentLinkInfoProto { |
Kamil Musin | 734db9a | 2022-11-11 11:19:25 +0100 | [diff] [blame] | 531 | reserved 4; // html |
| 532 | |
Patrick Hiesel | 0a9b9db | 2020-07-16 12:49:49 +0200 | [diff] [blame] | 533 | string name = 1; |
| 534 | string match = 2; |
Patrick Hiesel | 0a9b9db | 2020-07-16 12:49:49 +0200 | [diff] [blame] | 535 | bool enabled = 5; |
| 536 | bool override_only = 6; |
Kamil Musin | 9148ba6 | 2022-09-15 14:21:34 +0200 | [diff] [blame] | 537 | string link = 3; |
| 538 | string prefix = 7; |
| 539 | string suffix = 8; |
| 540 | string text = 9; |
Patrick Hiesel | 0a9b9db | 2020-07-16 12:49:49 +0200 | [diff] [blame] | 541 | } |
Patrick Hiesel | 4ba64ae | 2020-07-16 16:48:50 +0200 | [diff] [blame] | 542 | |
| 543 | // Serialized form of com.google.gerrit.entities.CachedProjectConfigProto. |
Youssef Elghareeb | d6879e2 | 2021-04-01 16:03:58 +0200 | [diff] [blame] | 544 | // Next ID: 20 |
Patrick Hiesel | 4ba64ae | 2020-07-16 16:48:50 +0200 | [diff] [blame] | 545 | message CachedProjectConfigProto { |
| 546 | ProjectProto project = 1; |
| 547 | repeated GroupReferenceProto group_list = 2; |
| 548 | repeated PermissionRuleProto accounts_section = 3; |
| 549 | repeated AccessSectionProto access_sections = 4; |
| 550 | BranchOrderSectionProto branch_order_section = 5; |
| 551 | repeated ContributorAgreementProto contributor_agreements = 6; |
| 552 | repeated NotifyConfigProto notify_configs = 7; |
| 553 | repeated LabelTypeProto label_sections = 8; |
| 554 | repeated ConfiguredMimeTypeProto mime_types = 9; |
| 555 | repeated SubscribeSectionProto subscribe_sections = 10; |
| 556 | repeated StoredCommentLinkInfoProto comment_links = 11; |
| 557 | bytes rules_id = 12; |
| 558 | bytes revision = 13; |
| 559 | int64 max_object_size_limit = 14; |
| 560 | bool check_received_objects = 15; |
| 561 | map<string, ExtensionPanelSectionProto> extension_panels = 16; |
Patrick Hiesel | f9035cc | 2020-07-23 16:16:21 +0200 | [diff] [blame] | 562 | map<string, string> plugin_configs = 17; |
| 563 | map<string, string> project_level_configs = 18; |
Youssef Elghareeb | d6879e2 | 2021-04-01 16:03:58 +0200 | [diff] [blame] | 564 | repeated SubmitRequirementProto submit_requirement_sections = 19; |
Patrick Hiesel | 4ba64ae | 2020-07-16 16:48:50 +0200 | [diff] [blame] | 565 | |
| 566 | // Next ID: 2 |
| 567 | message ExtensionPanelSectionProto { |
| 568 | repeated string section = 1; |
| 569 | } |
| 570 | } |
Patrick Hiesel | c2c108c | 2020-07-23 09:54:22 +0200 | [diff] [blame] | 571 | |
| 572 | // Serialized key for com.google.gerrit.server.project.ProjectCacheImpl. |
| 573 | // Next ID: 4 |
| 574 | message ProjectCacheKeyProto { |
| 575 | string project = 1; |
| 576 | bytes revision = 2; |
| 577 | bytes global_config_revision = 3; // Hash of All-Projects-projects.config. This |
| 578 | // will only be populated for All-Projects. |
| 579 | } |
Youssef Elghareeb | 3d54930 | 2020-07-15 17:08:28 +0200 | [diff] [blame] | 580 | |
| 581 | // Serialized form of com.google.gerrit.server.comment.CommentContextCacheImpl.Key |
Youssef Elghareeb | 87b7450 | 2021-02-05 18:53:05 +0100 | [diff] [blame] | 582 | // Next ID: 7 |
Youssef Elghareeb | 3d54930 | 2020-07-15 17:08:28 +0200 | [diff] [blame] | 583 | message CommentContextKeyProto { |
| 584 | string project = 1; |
| 585 | string change_id = 2; |
| 586 | int32 patchset = 3; |
| 587 | string commentId = 4; |
| 588 | |
| 589 | // hashed with the murmur3_128 hash function |
| 590 | string path_hash = 5; |
Youssef Elghareeb | 87b7450 | 2021-02-05 18:53:05 +0100 | [diff] [blame] | 591 | |
| 592 | int32 context_padding = 6; |
Youssef Elghareeb | 3d54930 | 2020-07-15 17:08:28 +0200 | [diff] [blame] | 593 | } |
| 594 | |
| 595 | // Serialized form of a list of com.google.gerrit.extensions.common.ContextLineInfo |
Youssef Elghareeb | 27d6201 | 2021-02-23 18:21:46 +0100 | [diff] [blame] | 596 | // Next ID: 3 |
Youssef Elghareeb | 3d54930 | 2020-07-15 17:08:28 +0200 | [diff] [blame] | 597 | message AllCommentContextProto { |
| 598 | message CommentContextProto { |
| 599 | int32 line_number = 1; |
| 600 | string context_line = 2; |
| 601 | } |
| 602 | repeated CommentContextProto context = 1; |
Youssef Elghareeb | 27d6201 | 2021-02-23 18:21:46 +0100 | [diff] [blame] | 603 | string content_type = 2; |
Youssef Elghareeb | 3d54930 | 2020-07-15 17:08:28 +0200 | [diff] [blame] | 604 | } |
Youssef Elghareeb | c5cb2f7 | 2020-10-19 13:29:59 +0200 | [diff] [blame] | 605 | |
| 606 | // Serialized key for |
Youssef Elghareeb | 64778c3 | 2020-10-23 16:25:50 +0200 | [diff] [blame] | 607 | // com.google.gerrit.server.patch.gitdiff.GitModifiedFilesCacheKey |
Youssef Elghareeb | c5cb2f7 | 2020-10-19 13:29:59 +0200 | [diff] [blame] | 608 | // Next ID: 5 |
| 609 | message GitModifiedFilesKeyProto { |
| 610 | string project = 1; |
| 611 | bytes a_tree = 2; // SHA-1 hash of the left git tree ID in the diff |
| 612 | bytes b_tree = 3; // SHA-1 hash of the right git tree ID in the diff |
| 613 | int32 rename_score = 4; |
| 614 | } |
| 615 | |
Youssef Elghareeb | 64778c3 | 2020-10-23 16:25:50 +0200 | [diff] [blame] | 616 | // Serialized key for |
| 617 | // com.google.gerrit.server.patch.diff.ModifiedFilesCacheKey |
| 618 | // Next ID: 5 |
| 619 | message ModifiedFilesKeyProto { |
| 620 | string project = 1; |
| 621 | bytes a_commit = 2; // SHA-1 hash of the left commit ID in the diff |
| 622 | bytes b_commit = 3; // SHA-1 hash of the right commit ID in the diff |
| 623 | int32 rename_score = 4; |
| 624 | } |
| 625 | |
Youssef Elghareeb | c5cb2f7 | 2020-10-19 13:29:59 +0200 | [diff] [blame] | 626 | // Serialized form of com.google.gerrit.server.patch.gitdiff.ModifiedFile |
| 627 | // Next ID: 4 |
| 628 | message ModifiedFileProto { |
| 629 | string change_type = 1; // ENUM as string |
| 630 | string old_path = 2; |
| 631 | string new_path = 3; |
| 632 | } |
| 633 | |
| 634 | // Serialized form of a collection of |
| 635 | // com.google.gerrit.server.patch.gitdiff.ModifiedFile |
| 636 | // Next ID: 2 |
| 637 | message ModifiedFilesProto { |
| 638 | repeated ModifiedFileProto modifiedFile = 1; |
| 639 | } |
Youssef Elghareeb | 332d171 | 2020-10-22 19:13:54 +0200 | [diff] [blame] | 640 | |
| 641 | // Serialized form of a collection of |
| 642 | // com.google.gerrit.server.patch.gitfilediff.GitFileDiffCacheImpl.Key |
Youssef Elghareeb | 541ac10 | 2021-06-24 17:49:30 +0200 | [diff] [blame] | 643 | // Next ID: 9 |
Youssef Elghareeb | 332d171 | 2020-10-22 19:13:54 +0200 | [diff] [blame] | 644 | message GitFileDiffKeyProto { |
| 645 | string project = 1; |
| 646 | bytes a_tree = 2; |
| 647 | bytes b_tree = 3; |
| 648 | string file_path = 4; |
| 649 | int32 rename_score = 5; |
| 650 | string diff_algorithm = 6; // ENUM as string |
| 651 | string whitepsace = 7; // ENUM as string |
Youssef Elghareeb | 541ac10 | 2021-06-24 17:49:30 +0200 | [diff] [blame] | 652 | bool useTimeout = 8; |
Youssef Elghareeb | 332d171 | 2020-10-22 19:13:54 +0200 | [diff] [blame] | 653 | } |
| 654 | |
| 655 | // Serialized form of com.google.gerrit.server.patch.gitfilediff.GitFileDiff |
Youssef Elghareeb | 541ac10 | 2021-06-24 17:49:30 +0200 | [diff] [blame] | 656 | // Next ID: 12 |
Youssef Elghareeb | 332d171 | 2020-10-22 19:13:54 +0200 | [diff] [blame] | 657 | message GitFileDiffProto { |
| 658 | message Edit { |
| 659 | int32 begin_a = 1; |
| 660 | int32 end_a = 2; |
| 661 | int32 begin_b = 3; |
| 662 | int32 end_b = 4; |
| 663 | } |
| 664 | repeated Edit edits = 1; |
| 665 | string file_header = 2; |
| 666 | string old_path = 3; |
| 667 | string new_path = 4; |
| 668 | bytes old_id = 5; |
| 669 | bytes new_id = 6; |
| 670 | string old_mode = 7; // ENUM as string |
| 671 | string new_mode = 8; // ENUM as string |
| 672 | string change_type = 9; // ENUM as string |
| 673 | string patch_type = 10; // ENUM as string |
Youssef Elghareeb | 541ac10 | 2021-06-24 17:49:30 +0200 | [diff] [blame] | 674 | bool negative = 11; |
Youssef Elghareeb | 332d171 | 2020-10-22 19:13:54 +0200 | [diff] [blame] | 675 | } |
Youssef Elghareeb | 7a988d3 | 2020-11-19 23:43:13 +0100 | [diff] [blame] | 676 | |
| 677 | // Serialized form of |
| 678 | // com.google.gerrit.server.patch.fileDiff.FileDiffCacheKey |
Youssef Elghareeb | 541ac10 | 2021-06-24 17:49:30 +0200 | [diff] [blame] | 679 | // Next ID: 9 |
Youssef Elghareeb | 7a988d3 | 2020-11-19 23:43:13 +0100 | [diff] [blame] | 680 | message FileDiffKeyProto { |
| 681 | string project = 1; |
| 682 | bytes old_commit = 2; |
| 683 | bytes new_commit = 3; |
| 684 | string file_path = 4; |
| 685 | int32 rename_score = 5; |
| 686 | string diff_algorithm = 6; |
| 687 | string whitespace = 7; |
Youssef Elghareeb | 541ac10 | 2021-06-24 17:49:30 +0200 | [diff] [blame] | 688 | bool useTimeout = 8; |
Youssef Elghareeb | 7a988d3 | 2020-11-19 23:43:13 +0100 | [diff] [blame] | 689 | } |
| 690 | |
| 691 | // Serialized form of |
| 692 | // com.google.gerrit.server.patch.filediff.FileDiffOutput |
Youssef Elghareeb | 1ae12c0 | 2022-06-28 13:49:18 +0200 | [diff] [blame] | 693 | // Next ID: 15 |
Youssef Elghareeb | 7a988d3 | 2020-11-19 23:43:13 +0100 | [diff] [blame] | 694 | message FileDiffOutputProto { |
| 695 | // Next ID: 5 |
| 696 | message Edit { |
| 697 | int32 begin_a = 1; |
| 698 | int32 end_a = 2; |
| 699 | int32 begin_b = 3; |
| 700 | int32 end_b = 4; |
| 701 | } |
| 702 | // Serialized form of com.google.gerrit.server.patch.filediff.TaggedEdit |
| 703 | // Next ID: 3 |
| 704 | message TaggedEdit { |
| 705 | Edit edit = 1; |
| 706 | bool due_to_rebase = 2; |
| 707 | } |
Youssef Elghareeb | 3c2e9a6 | 2021-02-18 22:00:57 +0100 | [diff] [blame] | 708 | // Next ID: 3 |
| 709 | message ComparisonType { |
| 710 | int32 parent_num = 1; |
| 711 | bool auto_merge = 2; |
| 712 | } |
Youssef Elghareeb | 7a988d3 | 2020-11-19 23:43:13 +0100 | [diff] [blame] | 713 | string old_path = 1; |
| 714 | string new_path = 2; |
| 715 | string change_type = 3; |
| 716 | string patch_type = 4; |
| 717 | repeated string header_lines = 5; |
| 718 | int64 size = 6; |
| 719 | int64 size_delta = 7; |
| 720 | repeated TaggedEdit edits = 8; |
Youssef Elghareeb | 3c2e9a6 | 2021-02-18 22:00:57 +0100 | [diff] [blame] | 721 | bytes old_commit = 9; |
| 722 | bytes new_commit = 10; |
| 723 | ComparisonType comparison_type = 11; |
Youssef Elghareeb | 541ac10 | 2021-06-24 17:49:30 +0200 | [diff] [blame] | 724 | bool negative = 12; |
Youssef Elghareeb | 1ae12c0 | 2022-06-28 13:49:18 +0200 | [diff] [blame] | 725 | string old_mode = 13; // ENUM as string |
| 726 | string new_mode = 14; // ENUM as string |
Youssef Elghareeb | 7a988d3 | 2020-11-19 23:43:13 +0100 | [diff] [blame] | 727 | } |