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 | |
| 201 | message AssigneeStatusUpdateProto { |
Joerg Zieren | 361ea4b | 2020-02-17 16:25:43 +0100 | [diff] [blame] | 202 | // Epoch millis. |
Joerg Zieren | d5fb743 | 2020-03-02 13:51:04 +0100 | [diff] [blame] | 203 | int64 timestamp_millis = 1; |
Gal Paikin | 2345703 | 2019-10-16 15:09:56 +0200 | [diff] [blame] | 204 | int32 updated_by = 2; |
| 205 | int32 current_assignee = 3; |
| 206 | bool has_current_assignee = 4; |
| 207 | } |
| 208 | repeated AssigneeStatusUpdateProto assignee_update = 22; |
Dave Borowitz | c15b8ef | 2018-05-18 08:11:22 -0400 | [diff] [blame] | 209 | |
Joerg Zieren | fdbea38 | 2020-03-06 13:44:25 +0100 | [diff] [blame] | 210 | // An update to the attention set of the change. See class AttentionSetUpdate |
| 211 | // for context. |
| 212 | message AttentionSetUpdateProto { |
Joerg Zieren | 361ea4b | 2020-02-17 16:25:43 +0100 | [diff] [blame] | 213 | // Epoch millis. |
Joerg Zieren | d5fb743 | 2020-03-02 13:51:04 +0100 | [diff] [blame] | 214 | int64 timestamp_millis = 1; |
Joerg Zieren | 361ea4b | 2020-02-17 16:25:43 +0100 | [diff] [blame] | 215 | int32 account = 2; |
Joerg Zieren | fdbea38 | 2020-03-06 13:44:25 +0100 | [diff] [blame] | 216 | // Maps to enum AttentionSetUpdate.Operation |
Joerg Zieren | 361ea4b | 2020-02-17 16:25:43 +0100 | [diff] [blame] | 217 | string operation = 3; |
| 218 | string reason = 4; |
| 219 | } |
Gal Paikin | 120baca | 2020-09-30 21:46:45 +0300 | [diff] [blame] | 220 | // Only includes the most recent attention set update for each user. |
Joerg Zieren | fdbea38 | 2020-03-06 13:44:25 +0100 | [diff] [blame] | 221 | repeated AttentionSetUpdateProto attention_set_update = 23; |
Gal Paikin | 120baca | 2020-09-30 21:46:45 +0300 | [diff] [blame] | 222 | |
| 223 | // Includes all attention set updates. |
| 224 | repeated AttentionSetUpdateProto all_attention_set_update = 24; |
Marija Savtchouk | d2b8215 | 2020-11-23 08:20:54 +0000 | [diff] [blame] | 225 | |
| 226 | // Epoch millis. |
| 227 | int64 merged_on_millis = 25; |
| 228 | bool has_merged_on = 26; |
Youssef Elghareeb | a7ad3e0 | 2021-07-01 13:20:16 +0200 | [diff] [blame] | 229 | |
| 230 | repeated SubmitRequirementResultProto submit_requirement_result = 27; |
Joerg Zieren | 361ea4b | 2020-02-17 16:25:43 +0100 | [diff] [blame] | 231 | } |
Dave Borowitz | c15b8ef | 2018-05-18 08:11:22 -0400 | [diff] [blame] | 232 | |
| 233 | // Serialized form of com.google.gerrit.server.query.change.ConflictKey |
| 234 | message ConflictKeyProto { |
| 235 | bytes commit = 1; |
| 236 | bytes other_commit = 2; |
| 237 | string submit_type = 3; |
| 238 | bool content_merge = 4; |
| 239 | } |
Dave Borowitz | b30a414 | 2018-07-23 15:28:22 -0700 | [diff] [blame] | 240 | |
| 241 | // Serialized form of com.google.gerrit.server.query.git.TagSetHolder. |
| 242 | // Next ID: 3 |
| 243 | message TagSetHolderProto { |
| 244 | string project_name = 1; |
| 245 | |
| 246 | // Next ID: 4 |
| 247 | message TagSetProto { |
| 248 | string project_name = 1; |
| 249 | |
| 250 | // Next ID: 3 |
| 251 | message CachedRefProto { |
| 252 | bytes id = 1; |
| 253 | int32 flag = 2; |
| 254 | } |
| 255 | map<string, CachedRefProto> ref = 2; |
| 256 | |
| 257 | // Next ID: 3 |
| 258 | message TagProto { |
| 259 | bytes id = 1; |
| 260 | bytes flags = 2; |
| 261 | } |
| 262 | repeated TagProto tag = 3; |
| 263 | } |
| 264 | TagSetProto tags = 2; |
| 265 | } |
Dave Borowitz | b20d23a8 | 2018-08-21 13:43:10 -0700 | [diff] [blame] | 266 | |
| 267 | // Serialized form of |
| 268 | // com.google.gerrit.server.account.externalids.AllExternalIds. |
| 269 | // Next ID: 2 |
| 270 | message AllExternalIdsProto { |
Thomas Draebing | 29595cd | 2021-03-24 15:23:35 +0100 | [diff] [blame] | 271 | // Next ID: 7 |
Dave Borowitz | b20d23a8 | 2018-08-21 13:43:10 -0700 | [diff] [blame] | 272 | message ExternalIdProto { |
| 273 | string key = 1; |
| 274 | int32 accountId = 2; |
| 275 | string email = 3; |
| 276 | string password = 4; |
| 277 | bytes blobId = 5; |
Thomas Draebing | 29595cd | 2021-03-24 15:23:35 +0100 | [diff] [blame] | 278 | bool isCaseInsensitive = 6; |
Dave Borowitz | b20d23a8 | 2018-08-21 13:43:10 -0700 | [diff] [blame] | 279 | } |
| 280 | repeated ExternalIdProto external_id = 1; |
| 281 | } |
Patrick Hiesel | a57c0d6 | 2019-02-19 09:09:22 +0100 | [diff] [blame] | 282 | |
Youssef Elghareeb | 2529724 | 2020-03-19 00:13:26 +0100 | [diff] [blame] | 283 | // Serialized form of a list of com.google.gerrit.entities.AccountGroup.UUID |
| 284 | // Next ID: 2 |
| 285 | message AllExternalGroupsProto { |
| 286 | message ExternalGroupProto { |
| 287 | string groupUuid = 1; |
| 288 | } |
| 289 | repeated ExternalGroupProto external_group = 1; |
| 290 | } |
| 291 | |
Gal Paikin | f74ee38 | 2021-03-22 16:00:25 +0100 | [diff] [blame] | 292 | // Serialized key for com.google.gerrit.server.account.GroupCacheImpl. |
| 293 | // Next ID: 3 |
| 294 | message GroupKeyProto { |
| 295 | string uuid = 1; |
| 296 | bytes revision = 2; |
| 297 | } |
| 298 | |
| 299 | |
| 300 | // Serialized form of com.google.gerrit.entities.InternalGroup. |
| 301 | // Next ID: 11 |
| 302 | message InternalGroupProto { |
| 303 | int32 id = 1; |
| 304 | string name = 2; |
| 305 | string description = 3; |
| 306 | string owner_group_uuid = 4; |
| 307 | bool is_visible_to_all = 5; |
| 308 | string group_uuid = 6; |
| 309 | int64 created_on = 7; |
| 310 | repeated int32 members_ids = 8; |
| 311 | repeated string subgroup_uuids = 9; |
| 312 | bytes ref_state = 10; |
| 313 | } |
| 314 | |
Patrick Hiesel | a57c0d6 | 2019-02-19 09:09:22 +0100 | [diff] [blame] | 315 | // Key for com.google.gerrit.server.git.PureRevertCache. |
| 316 | // Next ID: 4 |
| 317 | message PureRevertKeyProto { |
| 318 | string project = 1; |
| 319 | bytes claimed_original = 2; |
| 320 | bytes claimed_revert = 3; |
| 321 | } |
Patrick Hiesel | 4836e57 | 2020-03-05 15:23:29 +0100 | [diff] [blame] | 322 | |
Patrick Hiesel | e945da3 | 2020-03-26 17:22:23 +0100 | [diff] [blame] | 323 | // Key for com.google.gerrit.server.account.ProjectWatches. |
| 324 | // Next ID: 4 |
| 325 | message ProjectWatchProto { |
Patrick Hiesel | 4836e57 | 2020-03-05 15:23:29 +0100 | [diff] [blame] | 326 | string project = 1; |
| 327 | string filter = 2; |
Patrick Hiesel | e945da3 | 2020-03-26 17:22:23 +0100 | [diff] [blame] | 328 | repeated string notify_type = 3; |
Patrick Hiesel | 4836e57 | 2020-03-05 15:23:29 +0100 | [diff] [blame] | 329 | } |
Patrick Hiesel | 58d5129 | 2020-03-05 16:24:07 +0100 | [diff] [blame] | 330 | |
| 331 | // Serialized form of |
| 332 | // com.google.gerrit.entities.Account. |
| 333 | // Next ID: 9 |
| 334 | message AccountProto { |
| 335 | int32 id = 1; |
| 336 | int64 registered_on = 2; |
| 337 | string full_name = 3; |
| 338 | string display_name = 4; |
| 339 | string preferred_email = 5; |
| 340 | bool inactive = 6; |
| 341 | string status = 7; |
| 342 | string meta_id = 8; |
| 343 | } |
Patrick Hiesel | e945da3 | 2020-03-26 17:22:23 +0100 | [diff] [blame] | 344 | |
| 345 | // Serialized form of com.google.gerrit.server.account.CachedAccountDetails.Key. |
| 346 | // Next ID: 3 |
| 347 | message AccountKeyProto { |
| 348 | int32 account_id = 1; |
| 349 | bytes id = 2; |
| 350 | } |
| 351 | |
| 352 | // Serialized form of com.google.gerrit.server.account.CachedAccountDetails. |
| 353 | // Next ID: 4 |
| 354 | message AccountDetailsProto { |
| 355 | AccountProto account = 1; |
| 356 | repeated ProjectWatchProto project_watch_proto = 2; |
| 357 | string user_preferences = 3; |
| 358 | } |
Patrick Hiesel | ffd88ef | 2020-07-07 10:30:45 +0200 | [diff] [blame] | 359 | |
| 360 | // Serialized form of com.google.gerrit.entities.Project. |
| 361 | // Next ID: 11 |
| 362 | message ProjectProto { |
| 363 | string name = 1; |
| 364 | string description = 2; |
| 365 | map<string, string> boolean_configs = 3; |
| 366 | string submit_type = 4; // ENUM as String |
| 367 | string state = 5; // ENUM as String |
| 368 | string parent = 6; |
| 369 | string max_object_size_limit = 7; |
| 370 | string default_dashboard = 8; |
| 371 | string local_default_dashboard = 9; |
| 372 | string config_ref_state = 10; |
| 373 | } |
Patrick Hiesel | d80bf5a | 2020-07-10 13:55:39 +0200 | [diff] [blame] | 374 | |
| 375 | // Serialized form of com.google.gerrit.common.data.GroupReference. |
| 376 | // Next ID: 3 |
| 377 | message GroupReferenceProto { |
| 378 | string uuid = 1; |
| 379 | string name = 2; |
| 380 | } |
Patrick Hiesel | f557544 | 2020-07-10 14:25:51 +0200 | [diff] [blame] | 381 | |
| 382 | // Serialized form of com.google.gerrit.common.data.PermissionRule. |
| 383 | // Next ID: 6 |
| 384 | message PermissionRuleProto { |
| 385 | string action = 1; // ENUM as String |
| 386 | bool force = 2; |
| 387 | int32 min = 3; |
| 388 | int32 max = 4; |
| 389 | GroupReferenceProto group = 5; |
| 390 | } |
Patrick Hiesel | d2761e1 | 2020-07-13 09:10:11 +0200 | [diff] [blame] | 391 | |
| 392 | // Serialized form of com.google.gerrit.common.data.Permission. |
| 393 | // Next ID: 4 |
| 394 | message PermissionProto { |
| 395 | string name = 1; |
| 396 | bool exclusive_group = 2; |
| 397 | repeated PermissionRuleProto rules = 3; |
| 398 | } |
Patrick Hiesel | 4c74f00 | 2020-07-13 09:22:34 +0200 | [diff] [blame] | 399 | |
| 400 | // Serialized form of com.google.gerrit.common.data.AccessSection. |
| 401 | // Next ID: 3 |
| 402 | message AccessSectionProto { |
| 403 | string name = 1; |
| 404 | repeated PermissionProto permissions = 2; |
| 405 | } |
Patrick Hiesel | 9f8e23d | 2020-07-13 09:35:17 +0200 | [diff] [blame] | 406 | |
| 407 | // Serialized form of com.google.gerrit.server.git.BranchOrderSection. |
| 408 | // Next ID: 2 |
| 409 | message BranchOrderSectionProto { |
| 410 | repeated string branches_in_order = 1; |
| 411 | } |
Patrick Hiesel | 48434b1 | 2020-07-13 10:07:49 +0200 | [diff] [blame] | 412 | |
| 413 | // Serialized form of com.google.gerrit.common.data.ContributorAgreement. |
| 414 | // Next ID: 8 |
| 415 | message ContributorAgreementProto { |
| 416 | string name = 1; |
| 417 | string description = 2; |
| 418 | repeated PermissionRuleProto accepted = 3; |
| 419 | GroupReferenceProto auto_verify = 4; |
| 420 | string url = 5; |
| 421 | repeated string exclude_regular_expressions = 6; |
| 422 | repeated string match_regular_expressions = 7; |
| 423 | } |
Patrick Hiesel | 27ab5bd | 2020-07-13 13:34:39 +0200 | [diff] [blame] | 424 | |
| 425 | // Serialized form of com.google.gerrit.entities.Address. |
| 426 | // Next ID: 3 |
| 427 | message AddressProto { |
| 428 | string name = 1; |
| 429 | string email = 2; |
| 430 | } |
Patrick Hiesel | 9b15b9c | 2020-07-13 14:23:39 +0200 | [diff] [blame] | 431 | |
| 432 | // Serialized form of com.google.gerrit.entities.NotifyConfig. |
| 433 | // Next ID: 7 |
| 434 | message NotifyConfigProto { |
| 435 | string name = 1; |
| 436 | repeated string type = 2; // ENUM as String |
| 437 | string filter = 3; |
| 438 | string header = 4; // ENUM as String |
| 439 | repeated GroupReferenceProto groups = 5; |
| 440 | repeated AddressProto addresses = 6; |
| 441 | } |
Patrick Hiesel | 58d03c9 | 2020-07-14 16:27:17 +0200 | [diff] [blame] | 442 | |
| 443 | // Serialized form of com.google.gerrit.entities.LabelValue. |
| 444 | // Next ID: 3 |
| 445 | message LabelValueProto { |
| 446 | string text = 1; |
| 447 | int32 value = 2; |
| 448 | } |
Patrick Hiesel | 4938bda | 2020-07-15 14:44:23 +0200 | [diff] [blame] | 449 | |
| 450 | // Serialized form of com.google.gerrit.common.data.LabelType. |
Patrick Hiesel | c429ff3 | 2021-06-01 15:56:30 +0200 | [diff] [blame] | 451 | // Next ID: 21 |
Patrick Hiesel | 4938bda | 2020-07-15 14:44:23 +0200 | [diff] [blame] | 452 | message LabelTypeProto { |
| 453 | string name = 1; |
| 454 | string function = 2; // ENUM as String |
| 455 | bool copy_any_score = 3; |
| 456 | bool copy_min_score = 4; |
| 457 | bool copy_max_score = 5; |
| 458 | bool copy_all_scores_on_merge_first_parent_update = 6; |
| 459 | bool copy_all_scores_on_trivial_rebase = 7; |
| 460 | bool copy_all_scores_if_no_code_change = 8; |
| 461 | bool copy_all_scores_if_no_change = 9; |
| 462 | repeated int32 copy_values = 10; |
| 463 | bool allow_post_submit = 11; |
| 464 | bool ignore_self_approval = 12; |
| 465 | int32 default_value = 13; |
| 466 | repeated LabelValueProto values = 14; |
| 467 | int32 max_negative = 15; |
| 468 | int32 max_positive = 16; |
| 469 | bool can_override = 17; |
| 470 | repeated string ref_patterns = 18; |
Gal Paikin | bef260ec | 2021-01-19 11:55:19 +0100 | [diff] [blame] | 471 | bool copy_all_scores_if_list_of_files_did_not_change = 19; |
Patrick Hiesel | c429ff3 | 2021-06-01 15:56:30 +0200 | [diff] [blame] | 472 | string copy_condition = 20; |
Patrick Hiesel | 4938bda | 2020-07-15 14:44:23 +0200 | [diff] [blame] | 473 | } |
Patrick Hiesel | 7e579e3 | 2020-07-16 10:17:59 +0200 | [diff] [blame] | 474 | |
Youssef Elghareeb | d6879e2 | 2021-04-01 16:03:58 +0200 | [diff] [blame] | 475 | // Serialized form of com.google.gerrit.entities.SubmitRequirement. |
| 476 | // Next ID: 7 |
| 477 | message SubmitRequirementProto { |
| 478 | string name = 1; |
| 479 | string description = 2; |
| 480 | string applicability_expression = 3; |
Youssef Elghareeb | 61d8e16 | 2021-05-18 15:41:16 +0200 | [diff] [blame] | 481 | string submittability_expression = 4; |
Youssef Elghareeb | d6879e2 | 2021-04-01 16:03:58 +0200 | [diff] [blame] | 482 | string override_expression = 5; |
| 483 | bool allow_override_in_child_projects = 6; |
| 484 | } |
| 485 | |
Youssef Elghareeb | a7ad3e0 | 2021-07-01 13:20:16 +0200 | [diff] [blame] | 486 | // Serialized form of com.google.gerrit.entities.SubmitRequirementResult. |
Youssef Elghareeb | 024103e | 2021-09-06 14:41:04 +0200 | [diff] [blame] | 487 | // Next ID: 7 |
Youssef Elghareeb | a7ad3e0 | 2021-07-01 13:20:16 +0200 | [diff] [blame] | 488 | message SubmitRequirementResultProto { |
| 489 | SubmitRequirementProto submit_requirement = 1; |
| 490 | SubmitRequirementExpressionResultProto applicability_expression_result = 2; |
| 491 | SubmitRequirementExpressionResultProto submittability_expression_result = 3; |
| 492 | SubmitRequirementExpressionResultProto override_expression_result = 4; |
| 493 | |
| 494 | // Patchset commit ID at which the submit requirements are evaluated. |
| 495 | bytes commit = 5; |
Youssef Elghareeb | 024103e | 2021-09-06 14:41:04 +0200 | [diff] [blame] | 496 | |
| 497 | // Whether this result was created from a legacy submit record. |
| 498 | bool legacy = 6; |
Youssef Elghareeb | a7ad3e0 | 2021-07-01 13:20:16 +0200 | [diff] [blame] | 499 | } |
| 500 | |
| 501 | // Serialized form of com.google.gerrit.entities.SubmitRequirementExpressionResult. |
| 502 | // Next ID: 6 |
| 503 | message SubmitRequirementExpressionResultProto { |
| 504 | string expression = 1; |
| 505 | string status = 2; // enum as string |
| 506 | string error_message = 3; |
| 507 | repeated string passing_atoms = 4; |
| 508 | repeated string failing_atoms = 5; |
| 509 | } |
| 510 | |
Patrick Hiesel | 7e579e3 | 2020-07-16 10:17:59 +0200 | [diff] [blame] | 511 | // Serialized form of com.google.gerrit.server.project.ConfiguredMimeTypes. |
| 512 | // Next ID: 4 |
| 513 | message ConfiguredMimeTypeProto { |
| 514 | string type = 1; |
| 515 | string pattern = 2; |
| 516 | bool is_regular_expression = 3; |
| 517 | } |
Patrick Hiesel | 1c68405 | 2020-07-16 10:52:51 +0200 | [diff] [blame] | 518 | |
| 519 | // Serialized form of com.google.gerrit.common.data.SubscribeSection. |
| 520 | // Next ID: 4 |
| 521 | message SubscribeSectionProto { |
| 522 | string project_name = 1; |
| 523 | repeated string multi_match_ref_specs = 2; |
| 524 | repeated string matching_ref_specs = 3; |
| 525 | } |
Patrick Hiesel | 0a9b9db | 2020-07-16 12:49:49 +0200 | [diff] [blame] | 526 | |
| 527 | // Serialized form of com.google.gerrit.entities.StoredCommentLinkInfo. |
| 528 | // Next ID: 7 |
| 529 | message StoredCommentLinkInfoProto { |
| 530 | string name = 1; |
| 531 | string match = 2; |
| 532 | string link = 3; |
| 533 | string html = 4; |
| 534 | bool enabled = 5; |
| 535 | bool override_only = 6; |
| 536 | } |
Patrick Hiesel | 4ba64ae | 2020-07-16 16:48:50 +0200 | [diff] [blame] | 537 | |
| 538 | // Serialized form of com.google.gerrit.entities.CachedProjectConfigProto. |
Youssef Elghareeb | d6879e2 | 2021-04-01 16:03:58 +0200 | [diff] [blame] | 539 | // Next ID: 20 |
Patrick Hiesel | 4ba64ae | 2020-07-16 16:48:50 +0200 | [diff] [blame] | 540 | message CachedProjectConfigProto { |
| 541 | ProjectProto project = 1; |
| 542 | repeated GroupReferenceProto group_list = 2; |
| 543 | repeated PermissionRuleProto accounts_section = 3; |
| 544 | repeated AccessSectionProto access_sections = 4; |
| 545 | BranchOrderSectionProto branch_order_section = 5; |
| 546 | repeated ContributorAgreementProto contributor_agreements = 6; |
| 547 | repeated NotifyConfigProto notify_configs = 7; |
| 548 | repeated LabelTypeProto label_sections = 8; |
| 549 | repeated ConfiguredMimeTypeProto mime_types = 9; |
| 550 | repeated SubscribeSectionProto subscribe_sections = 10; |
| 551 | repeated StoredCommentLinkInfoProto comment_links = 11; |
| 552 | bytes rules_id = 12; |
| 553 | bytes revision = 13; |
| 554 | int64 max_object_size_limit = 14; |
| 555 | bool check_received_objects = 15; |
| 556 | map<string, ExtensionPanelSectionProto> extension_panels = 16; |
Patrick Hiesel | f9035cc | 2020-07-23 16:16:21 +0200 | [diff] [blame] | 557 | map<string, string> plugin_configs = 17; |
| 558 | map<string, string> project_level_configs = 18; |
Youssef Elghareeb | d6879e2 | 2021-04-01 16:03:58 +0200 | [diff] [blame] | 559 | repeated SubmitRequirementProto submit_requirement_sections = 19; |
Patrick Hiesel | 4ba64ae | 2020-07-16 16:48:50 +0200 | [diff] [blame] | 560 | |
| 561 | // Next ID: 2 |
| 562 | message ExtensionPanelSectionProto { |
| 563 | repeated string section = 1; |
| 564 | } |
| 565 | } |
Patrick Hiesel | c2c108c | 2020-07-23 09:54:22 +0200 | [diff] [blame] | 566 | |
| 567 | // Serialized key for com.google.gerrit.server.project.ProjectCacheImpl. |
| 568 | // Next ID: 4 |
| 569 | message ProjectCacheKeyProto { |
| 570 | string project = 1; |
| 571 | bytes revision = 2; |
| 572 | bytes global_config_revision = 3; // Hash of All-Projects-projects.config. This |
| 573 | // will only be populated for All-Projects. |
| 574 | } |
Youssef Elghareeb | 3d54930 | 2020-07-15 17:08:28 +0200 | [diff] [blame] | 575 | |
| 576 | // Serialized form of com.google.gerrit.server.comment.CommentContextCacheImpl.Key |
Youssef Elghareeb | 87b7450 | 2021-02-05 18:53:05 +0100 | [diff] [blame] | 577 | // Next ID: 7 |
Youssef Elghareeb | 3d54930 | 2020-07-15 17:08:28 +0200 | [diff] [blame] | 578 | message CommentContextKeyProto { |
| 579 | string project = 1; |
| 580 | string change_id = 2; |
| 581 | int32 patchset = 3; |
| 582 | string commentId = 4; |
| 583 | |
| 584 | // hashed with the murmur3_128 hash function |
| 585 | string path_hash = 5; |
Youssef Elghareeb | 87b7450 | 2021-02-05 18:53:05 +0100 | [diff] [blame] | 586 | |
| 587 | int32 context_padding = 6; |
Youssef Elghareeb | 3d54930 | 2020-07-15 17:08:28 +0200 | [diff] [blame] | 588 | } |
| 589 | |
| 590 | // Serialized form of a list of com.google.gerrit.extensions.common.ContextLineInfo |
Youssef Elghareeb | 27d6201 | 2021-02-23 18:21:46 +0100 | [diff] [blame] | 591 | // Next ID: 3 |
Youssef Elghareeb | 3d54930 | 2020-07-15 17:08:28 +0200 | [diff] [blame] | 592 | message AllCommentContextProto { |
| 593 | message CommentContextProto { |
| 594 | int32 line_number = 1; |
| 595 | string context_line = 2; |
| 596 | } |
| 597 | repeated CommentContextProto context = 1; |
Youssef Elghareeb | 27d6201 | 2021-02-23 18:21:46 +0100 | [diff] [blame] | 598 | string content_type = 2; |
Youssef Elghareeb | 3d54930 | 2020-07-15 17:08:28 +0200 | [diff] [blame] | 599 | } |
Youssef Elghareeb | c5cb2f7 | 2020-10-19 13:29:59 +0200 | [diff] [blame] | 600 | |
| 601 | // Serialized key for |
Youssef Elghareeb | 64778c3 | 2020-10-23 16:25:50 +0200 | [diff] [blame] | 602 | // com.google.gerrit.server.patch.gitdiff.GitModifiedFilesCacheKey |
Youssef Elghareeb | c5cb2f7 | 2020-10-19 13:29:59 +0200 | [diff] [blame] | 603 | // Next ID: 5 |
| 604 | message GitModifiedFilesKeyProto { |
| 605 | string project = 1; |
| 606 | bytes a_tree = 2; // SHA-1 hash of the left git tree ID in the diff |
| 607 | bytes b_tree = 3; // SHA-1 hash of the right git tree ID in the diff |
| 608 | int32 rename_score = 4; |
| 609 | } |
| 610 | |
Youssef Elghareeb | 64778c3 | 2020-10-23 16:25:50 +0200 | [diff] [blame] | 611 | // Serialized key for |
| 612 | // com.google.gerrit.server.patch.diff.ModifiedFilesCacheKey |
| 613 | // Next ID: 5 |
| 614 | message ModifiedFilesKeyProto { |
| 615 | string project = 1; |
| 616 | bytes a_commit = 2; // SHA-1 hash of the left commit ID in the diff |
| 617 | bytes b_commit = 3; // SHA-1 hash of the right commit ID in the diff |
| 618 | int32 rename_score = 4; |
| 619 | } |
| 620 | |
Youssef Elghareeb | c5cb2f7 | 2020-10-19 13:29:59 +0200 | [diff] [blame] | 621 | // Serialized form of com.google.gerrit.server.patch.gitdiff.ModifiedFile |
| 622 | // Next ID: 4 |
| 623 | message ModifiedFileProto { |
| 624 | string change_type = 1; // ENUM as string |
| 625 | string old_path = 2; |
| 626 | string new_path = 3; |
| 627 | } |
| 628 | |
| 629 | // Serialized form of a collection of |
| 630 | // com.google.gerrit.server.patch.gitdiff.ModifiedFile |
| 631 | // Next ID: 2 |
| 632 | message ModifiedFilesProto { |
| 633 | repeated ModifiedFileProto modifiedFile = 1; |
| 634 | } |
Youssef Elghareeb | 332d171 | 2020-10-22 19:13:54 +0200 | [diff] [blame] | 635 | |
| 636 | // Serialized form of a collection of |
| 637 | // com.google.gerrit.server.patch.gitfilediff.GitFileDiffCacheImpl.Key |
Youssef Elghareeb | 541ac10 | 2021-06-24 17:49:30 +0200 | [diff] [blame] | 638 | // Next ID: 9 |
Youssef Elghareeb | 332d171 | 2020-10-22 19:13:54 +0200 | [diff] [blame] | 639 | message GitFileDiffKeyProto { |
| 640 | string project = 1; |
| 641 | bytes a_tree = 2; |
| 642 | bytes b_tree = 3; |
| 643 | string file_path = 4; |
| 644 | int32 rename_score = 5; |
| 645 | string diff_algorithm = 6; // ENUM as string |
| 646 | string whitepsace = 7; // ENUM as string |
Youssef Elghareeb | 541ac10 | 2021-06-24 17:49:30 +0200 | [diff] [blame] | 647 | bool useTimeout = 8; |
Youssef Elghareeb | 332d171 | 2020-10-22 19:13:54 +0200 | [diff] [blame] | 648 | } |
| 649 | |
| 650 | // Serialized form of com.google.gerrit.server.patch.gitfilediff.GitFileDiff |
Youssef Elghareeb | 541ac10 | 2021-06-24 17:49:30 +0200 | [diff] [blame] | 651 | // Next ID: 12 |
Youssef Elghareeb | 332d171 | 2020-10-22 19:13:54 +0200 | [diff] [blame] | 652 | message GitFileDiffProto { |
| 653 | message Edit { |
| 654 | int32 begin_a = 1; |
| 655 | int32 end_a = 2; |
| 656 | int32 begin_b = 3; |
| 657 | int32 end_b = 4; |
| 658 | } |
| 659 | repeated Edit edits = 1; |
| 660 | string file_header = 2; |
| 661 | string old_path = 3; |
| 662 | string new_path = 4; |
| 663 | bytes old_id = 5; |
| 664 | bytes new_id = 6; |
| 665 | string old_mode = 7; // ENUM as string |
| 666 | string new_mode = 8; // ENUM as string |
| 667 | string change_type = 9; // ENUM as string |
| 668 | string patch_type = 10; // ENUM as string |
Youssef Elghareeb | 541ac10 | 2021-06-24 17:49:30 +0200 | [diff] [blame] | 669 | bool negative = 11; |
Youssef Elghareeb | 332d171 | 2020-10-22 19:13:54 +0200 | [diff] [blame] | 670 | } |
Youssef Elghareeb | 7a988d3 | 2020-11-19 23:43:13 +0100 | [diff] [blame] | 671 | |
| 672 | // Serialized form of |
| 673 | // com.google.gerrit.server.patch.fileDiff.FileDiffCacheKey |
Youssef Elghareeb | 541ac10 | 2021-06-24 17:49:30 +0200 | [diff] [blame] | 674 | // Next ID: 9 |
Youssef Elghareeb | 7a988d3 | 2020-11-19 23:43:13 +0100 | [diff] [blame] | 675 | message FileDiffKeyProto { |
| 676 | string project = 1; |
| 677 | bytes old_commit = 2; |
| 678 | bytes new_commit = 3; |
| 679 | string file_path = 4; |
| 680 | int32 rename_score = 5; |
| 681 | string diff_algorithm = 6; |
| 682 | string whitespace = 7; |
Youssef Elghareeb | 541ac10 | 2021-06-24 17:49:30 +0200 | [diff] [blame] | 683 | bool useTimeout = 8; |
Youssef Elghareeb | 7a988d3 | 2020-11-19 23:43:13 +0100 | [diff] [blame] | 684 | } |
| 685 | |
| 686 | // Serialized form of |
| 687 | // com.google.gerrit.server.patch.filediff.FileDiffOutput |
Youssef Elghareeb | 541ac10 | 2021-06-24 17:49:30 +0200 | [diff] [blame] | 688 | // Next ID: 13 |
Youssef Elghareeb | 7a988d3 | 2020-11-19 23:43:13 +0100 | [diff] [blame] | 689 | message FileDiffOutputProto { |
| 690 | // Next ID: 5 |
| 691 | message Edit { |
| 692 | int32 begin_a = 1; |
| 693 | int32 end_a = 2; |
| 694 | int32 begin_b = 3; |
| 695 | int32 end_b = 4; |
| 696 | } |
| 697 | // Serialized form of com.google.gerrit.server.patch.filediff.TaggedEdit |
| 698 | // Next ID: 3 |
| 699 | message TaggedEdit { |
| 700 | Edit edit = 1; |
| 701 | bool due_to_rebase = 2; |
| 702 | } |
Youssef Elghareeb | 3c2e9a6 | 2021-02-18 22:00:57 +0100 | [diff] [blame] | 703 | // Next ID: 3 |
| 704 | message ComparisonType { |
| 705 | int32 parent_num = 1; |
| 706 | bool auto_merge = 2; |
| 707 | } |
Youssef Elghareeb | 7a988d3 | 2020-11-19 23:43:13 +0100 | [diff] [blame] | 708 | string old_path = 1; |
| 709 | string new_path = 2; |
| 710 | string change_type = 3; |
| 711 | string patch_type = 4; |
| 712 | repeated string header_lines = 5; |
| 713 | int64 size = 6; |
| 714 | int64 size_delta = 7; |
| 715 | repeated TaggedEdit edits = 8; |
Youssef Elghareeb | 3c2e9a6 | 2021-02-18 22:00:57 +0100 | [diff] [blame] | 716 | bytes old_commit = 9; |
| 717 | bytes new_commit = 10; |
| 718 | ComparisonType comparison_type = 11; |
Youssef Elghareeb | 541ac10 | 2021-06-24 17:49:30 +0200 | [diff] [blame] | 719 | bool negative = 12; |
Youssef Elghareeb | 7a988d3 | 2020-11-19 23:43:13 +0100 | [diff] [blame] | 720 | } |
Patrick Hiesel | 1af89f5 | 2021-06-01 17:29:22 +0200 | [diff] [blame] | 721 | |
| 722 | // Serialized form of com.google.gerrit.server.approval.ApprovalCacheImpl.Key. |
| 723 | // Next ID: 5 |
| 724 | message PatchSetApprovalsKeyProto { |
| 725 | string project = 1; |
| 726 | int32 change_id = 2; |
| 727 | int32 patch_set_id = 3; |
| 728 | bytes id = 4; |
| 729 | } |
| 730 | |
| 731 | // Repeated version of PatchSetApprovalProto |
| 732 | // Next ID: 2 |
| 733 | message AllPatchSetApprovalsProto { |
| 734 | repeated devtools.gerritcodereview.PatchSetApproval approval = 1; |
| 735 | } |