blob: 191cca7551706a8d50cb8e7fdfd48b5c4c204f11 [file] [log] [blame]
Alice Kober-Sotzek09cdbd92018-12-05 17:16:21 +01001// 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
15syntax = "proto2";
16
Alice Kober-Sotzek342b8362018-12-05 17:42:47 +010017package devtools.gerritcodereview;
18
Alice Kober-Sotzek5af77ef2018-12-14 16:48:58 +010019option java_package = "com.google.gerrit.proto";
Alice Kober-Sotzek09cdbd92018-12-05 17:16:21 +010020
David Ostrovskyb03a6e92019-05-26 14:11:47 +020021// Serialized form of com.google.gerrit.entities.Change.Id.
Alice Kober-Sotzek342b8362018-12-05 17:42:47 +010022// Next ID: 2
Alice Kober-Sotzek09cdbd92018-12-05 17:16:21 +010023message Change_Id {
Alice Kober-Sotzek342b8362018-12-05 17:42:47 +010024 required int32 id = 1;
Alice Kober-Sotzek09cdbd92018-12-05 17:16:21 +010025}
26
David Ostrovskyb03a6e92019-05-26 14:11:47 +020027// Serialized form of com.google.gerrit.entities.Change.Key.
Alice Kober-Sotzek342b8362018-12-05 17:42:47 +010028// Next ID: 2
Alice Kober-Sotzek09cdbd92018-12-05 17:16:21 +010029message Change_Key {
Alice Kober-Sotzek342b8362018-12-05 17:42:47 +010030 optional string id = 1;
Alice Kober-Sotzek09cdbd92018-12-05 17:16:21 +010031}
32
David Ostrovskyb03a6e92019-05-26 14:11:47 +020033// Serialized form of com.google.gerrit.entities.Change.
Kaushik Lingarkar4a711ed2019-11-12 13:53:29 -080034// Next ID: 25
Alice Kober-Sotzek09cdbd92018-12-05 17:16:21 +010035message Change {
Alice Kober-Sotzek342b8362018-12-05 17:42:47 +010036 required Change_Id change_id = 1;
37 optional Change_Key change_key = 2;
Alice Kober-Sotzek342b8362018-12-05 17:42:47 +010038 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;
48 optional Account_Id assignee = 19;
49 optional bool is_private = 20;
50 optional bool work_in_progress = 21;
51 optional bool review_started = 22;
52 optional Change_Id revert_of = 23;
Kaushik Lingarkar4a711ed2019-11-12 13:53:29 -080053 optional PatchSet_Id cherry_pick_of = 24;
Alice Kober-Sotzek342b8362018-12-05 17:42:47 +010054
55 // Deleted fields, should not be reused:
Patrick Hieselbd700ed2021-05-25 09:03:59 +020056 reserved 3; // row_version
Dave Borowitz2839aa62018-12-13 14:46:03 -080057 reserved 6; // sortkey
58 reserved 9; // open
59 reserved 11; // nbrPatchSets
60 reserved 15; // lastSha1MergeTested
61 reserved 16; // mergeable
62 reserved 101; // note_db_state
Alice Kober-Sotzek09cdbd92018-12-05 17:16:21 +010063}
64
David Ostrovskyb03a6e92019-05-26 14:11:47 +020065// Serialized form of com.google.gerrit.enities.ChangeMessage.
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +010066// Next ID: 3
67message ChangeMessage_Key {
68 required Change_Id change_id = 1;
69 required string uuid = 2;
70}
71
David Ostrovskyb03a6e92019-05-26 14:11:47 +020072// Serialized form of com.google.gerrit.entities.ChangeMessage.
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +010073// Next ID: 8
74message ChangeMessage {
75 required ChangeMessage_Key key = 1;
76 optional Account_Id author_id = 2;
77 optional fixed64 written_on = 3;
78 optional string message = 4;
79 optional PatchSet_Id patchset = 5;
80 optional string tag = 6;
81 optional Account_Id real_author = 7;
82}
83
David Ostrovskyb03a6e92019-05-26 14:11:47 +020084// Serialized form of com.google.gerrit.entities.PatchSet.Id.
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +010085// Next ID: 3
86message PatchSet_Id {
87 required Change_Id change_id = 1;
Dave Borowitz766a93d2019-04-19 08:44:05 -070088 required int32 id = 2;
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +010089}
90
David Ostrovskyb03a6e92019-05-26 14:11:47 +020091// Serialized form of com.google.gerrit.entities.PatchSet.
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +010092// Next ID: 10
93message PatchSet {
94 required PatchSet_Id id = 1;
Dave Borowitz20a984f2019-04-23 14:19:25 -070095 optional ObjectId commitId = 2;
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +010096 optional Account_Id uploader_account_id = 3;
97 optional fixed64 created_on = 4;
98 optional string groups = 6;
99 optional string push_certificate = 8;
100 optional string description = 9;
101
102 // Deleted fields, should not be reused:
103 reserved 5; // draft
104 reserved 7; // pushCertficate
105}
106
David Ostrovskyb03a6e92019-05-26 14:11:47 +0200107// Serialized form of com.google.gerrit.entities.Account.Id.
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100108// Next ID: 2
109message Account_Id {
110 required int32 id = 1;
111}
112
David Ostrovskyb03a6e92019-05-26 14:11:47 +0200113// Serialized form of com.google.gerrit.entities.LabelId.
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100114// Next ID: 2
115message LabelId {
116 required string id = 1;
117}
118
David Ostrovskyb03a6e92019-05-26 14:11:47 +0200119// Serialized form of com.google.gerrit.entities.PatchSetApproval.Key.
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100120// Next ID: 4
121message PatchSetApproval_Key {
122 required PatchSet_Id patch_set_id = 1;
123 required Account_Id account_id = 2;
Dave Borowitzc144e782019-04-17 12:53:07 -0700124 required LabelId label_id = 3;
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100125}
126
David Ostrovskyb03a6e92019-05-26 14:11:47 +0200127// Serialized form of com.google.gerrit.entities.PatchSetApproval.
Marija Savtchoukd5283202021-11-26 12:14:04 +0000128// Next ID: 11
Alice Kober-Sotzek09cdbd92018-12-05 17:16:21 +0100129message PatchSetApproval {
Alice Kober-Sotzek342b8362018-12-05 17:42:47 +0100130 required PatchSetApproval_Key key = 1;
131 optional int32 value = 2;
132 optional fixed64 granted = 3;
133 optional string tag = 6;
134 optional Account_Id real_account_id = 7;
135 optional bool post_submit = 8;
Gal Paikin5381c5f2021-09-06 17:35:48 +0200136 optional bool copied = 9;
Marija Savtchoukd5283202021-11-26 12:14:04 +0000137 optional string uuid = 10;
Alice Kober-Sotzek342b8362018-12-05 17:42:47 +0100138
139 // Deleted fields, should not be reused:
140 reserved 4; // changeOpen
141 reserved 5; // changeSortKey
Alice Kober-Sotzek09cdbd92018-12-05 17:16:21 +0100142}
143
David Ostrovskyb03a6e92019-05-26 14:11:47 +0200144// Serialized form of com.google.gerrit.entities.Project.NameKey.
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100145// Next ID: 2
146message Project_NameKey {
147 optional string name = 1;
148}
149
David Ostrovskyb03a6e92019-05-26 14:11:47 +0200150// Serialized form of com.google.gerrit.entities.Branch.NameKey.
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100151// Next ID: 3
152message Branch_NameKey {
Dave Borowitzac3b3d62019-04-17 15:53:44 -0700153 optional Project_NameKey project = 1;
154 optional string branch = 2;
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100155}
156
Dave Borowitz20a984f2019-04-23 14:19:25 -0700157// Serialized form of org.eclipse.jgit.lib.ObjectId.
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100158// Next ID: 2
Dave Borowitz20a984f2019-04-23 14:19:25 -0700159message ObjectId {
160 // Hex string representation of the ID.
161 optional string name = 1;
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100162}