blob: 0458ca0e0b9e2589cc1e32ca3e3e93e8c0a0bf90 [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.
Youssef Elghareeb4c115442023-06-15 18:16:42 +020092// Next ID: 12
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +010093message 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;
Youssef Elghareeb4c115442023-06-15 18:16:42 +0200102 optional string branch = 11;
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100103
104 // Deleted fields, should not be reused:
105 reserved 5; // draft
106 reserved 7; // pushCertficate
107}
108
David Ostrovskyb03a6e92019-05-26 14:11:47 +0200109// Serialized form of com.google.gerrit.entities.Account.Id.
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100110// Next ID: 2
111message Account_Id {
112 required int32 id = 1;
113}
114
David Ostrovskyb03a6e92019-05-26 14:11:47 +0200115// Serialized form of com.google.gerrit.entities.LabelId.
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100116// Next ID: 2
117message LabelId {
118 required string id = 1;
119}
120
David Ostrovskyb03a6e92019-05-26 14:11:47 +0200121// Serialized form of com.google.gerrit.entities.PatchSetApproval.Key.
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100122// Next ID: 4
123message PatchSetApproval_Key {
124 required PatchSet_Id patch_set_id = 1;
125 required Account_Id account_id = 2;
Dave Borowitzc144e782019-04-17 12:53:07 -0700126 required LabelId label_id = 3;
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100127}
128
David Ostrovskyb03a6e92019-05-26 14:11:47 +0200129// Serialized form of com.google.gerrit.entities.PatchSetApproval.
Marija Savtchoukd5283202021-11-26 12:14:04 +0000130// Next ID: 11
Alice Kober-Sotzek09cdbd92018-12-05 17:16:21 +0100131message PatchSetApproval {
Alice Kober-Sotzek342b8362018-12-05 17:42:47 +0100132 required PatchSetApproval_Key key = 1;
133 optional int32 value = 2;
134 optional fixed64 granted = 3;
135 optional string tag = 6;
136 optional Account_Id real_account_id = 7;
137 optional bool post_submit = 8;
Gal Paikin5381c5f2021-09-06 17:35:48 +0200138 optional bool copied = 9;
Marija Savtchoukd5283202021-11-26 12:14:04 +0000139 optional string uuid = 10;
Alice Kober-Sotzek342b8362018-12-05 17:42:47 +0100140
141 // Deleted fields, should not be reused:
142 reserved 4; // changeOpen
143 reserved 5; // changeSortKey
Alice Kober-Sotzek09cdbd92018-12-05 17:16:21 +0100144}
145
David Ostrovskyb03a6e92019-05-26 14:11:47 +0200146// Serialized form of com.google.gerrit.entities.Project.NameKey.
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100147// Next ID: 2
148message Project_NameKey {
149 optional string name = 1;
150}
151
David Ostrovskyb03a6e92019-05-26 14:11:47 +0200152// Serialized form of com.google.gerrit.entities.Branch.NameKey.
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100153// Next ID: 3
154message Branch_NameKey {
Dave Borowitzac3b3d62019-04-17 15:53:44 -0700155 optional Project_NameKey project = 1;
156 optional string branch = 2;
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100157}
158
Dave Borowitz20a984f2019-04-23 14:19:25 -0700159// Serialized form of org.eclipse.jgit.lib.ObjectId.
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100160// Next ID: 2
Dave Borowitz20a984f2019-04-23 14:19:25 -0700161message ObjectId {
162 // Hex string representation of the ID.
163 optional string name = 1;
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100164}