blob: f89e0f05c499afc809ef6aab3d5efe43d378fb24 [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;
Alice Kober-Sotzek342b8362018-12-05 17:42:47 +010048 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 Lingarkar4a711ed2019-11-12 13:53:29 -080052 optional PatchSet_Id cherry_pick_of = 24;
Alice Kober-Sotzek342b8362018-12-05 17:42:47 +010053
54 // Deleted fields, should not be reused:
Patrick Hieselbd700ed2021-05-25 09:03:59 +020055 reserved 3; // row_version
Dave Borowitz2839aa62018-12-13 14:46:03 -080056 reserved 6; // sortkey
57 reserved 9; // open
58 reserved 11; // nbrPatchSets
59 reserved 15; // lastSha1MergeTested
60 reserved 16; // mergeable
Kamil Musin2a9ff782023-02-06 13:54:07 +010061 reserved 19; // assignee
Dave Borowitz2839aa62018-12-13 14:46:03 -080062 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;
Edwin Kempinccc9da02023-01-23 17:57:15 +0100101 optional Account_Id real_uploader_account_id = 10;
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100102
103 // Deleted fields, should not be reused:
104 reserved 5; // draft
105 reserved 7; // pushCertficate
106}
107
David Ostrovskyb03a6e92019-05-26 14:11:47 +0200108// Serialized form of com.google.gerrit.entities.Account.Id.
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100109// Next ID: 2
110message Account_Id {
111 required int32 id = 1;
112}
113
David Ostrovskyb03a6e92019-05-26 14:11:47 +0200114// Serialized form of com.google.gerrit.entities.LabelId.
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100115// Next ID: 2
116message LabelId {
117 required string id = 1;
118}
119
David Ostrovskyb03a6e92019-05-26 14:11:47 +0200120// Serialized form of com.google.gerrit.entities.PatchSetApproval.Key.
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100121// Next ID: 4
122message PatchSetApproval_Key {
123 required PatchSet_Id patch_set_id = 1;
124 required Account_Id account_id = 2;
Dave Borowitzc144e782019-04-17 12:53:07 -0700125 required LabelId label_id = 3;
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100126}
127
David Ostrovskyb03a6e92019-05-26 14:11:47 +0200128// Serialized form of com.google.gerrit.entities.PatchSetApproval.
Marija Savtchoukd5283202021-11-26 12:14:04 +0000129// Next ID: 11
Alice Kober-Sotzek09cdbd92018-12-05 17:16:21 +0100130message PatchSetApproval {
Alice Kober-Sotzek342b8362018-12-05 17:42:47 +0100131 required PatchSetApproval_Key key = 1;
132 optional int32 value = 2;
133 optional fixed64 granted = 3;
134 optional string tag = 6;
135 optional Account_Id real_account_id = 7;
136 optional bool post_submit = 8;
Gal Paikin5381c5f2021-09-06 17:35:48 +0200137 optional bool copied = 9;
Marija Savtchoukd5283202021-11-26 12:14:04 +0000138 optional string uuid = 10;
Alice Kober-Sotzek342b8362018-12-05 17:42:47 +0100139
140 // Deleted fields, should not be reused:
141 reserved 4; // changeOpen
142 reserved 5; // changeSortKey
Alice Kober-Sotzek09cdbd92018-12-05 17:16:21 +0100143}
144
David Ostrovskyb03a6e92019-05-26 14:11:47 +0200145// Serialized form of com.google.gerrit.entities.Project.NameKey.
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100146// Next ID: 2
147message Project_NameKey {
148 optional string name = 1;
149}
150
David Ostrovskyb03a6e92019-05-26 14:11:47 +0200151// Serialized form of com.google.gerrit.entities.Branch.NameKey.
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100152// Next ID: 3
153message Branch_NameKey {
Dave Borowitzac3b3d62019-04-17 15:53:44 -0700154 optional Project_NameKey project = 1;
155 optional string branch = 2;
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100156}
157
Dave Borowitz20a984f2019-04-23 14:19:25 -0700158// Serialized form of org.eclipse.jgit.lib.ObjectId.
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100159// Next ID: 2
Dave Borowitz20a984f2019-04-23 14:19:25 -0700160message ObjectId {
161 // Hex string representation of the ID.
162 optional string name = 1;
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100163}