blob: d2851d382f8832919ab4700af1cb586f1042fb64 [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
Alice Kober-Sotzek342b8362018-12-05 17:42:47 +010021// Serialized form of com.google.gerrit.reviewdb.client.Change.Id.
22// 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
Alice Kober-Sotzek342b8362018-12-05 17:42:47 +010027// Serialized form of com.google.gerrit.reviewdb.client.Change.Key.
28// 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
Alice Kober-Sotzek342b8362018-12-05 17:42:47 +010033// Serialized form of com.google.gerrit.reviewdb.client.Change.
34// Next ID: 24
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;
38 optional int32 row_version = 3;
39 optional fixed64 created_on = 4;
40 optional fixed64 last_updated_on = 5;
41 optional Account_Id owner_account_id = 7;
42 optional Branch_NameKey dest = 8;
43 optional uint32 status = 10;
44 optional int32 current_patch_set_id = 12;
45 optional string subject = 13;
46 optional string topic = 14;
47 optional string original_subject = 17;
48 optional string submission_id = 18;
49 optional Account_Id assignee = 19;
50 optional bool is_private = 20;
51 optional bool work_in_progress = 21;
52 optional bool review_started = 22;
53 optional Change_Id revert_of = 23;
Alice Kober-Sotzek342b8362018-12-05 17:42:47 +010054
55 // Deleted fields, should not be reused:
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
61 reserved 101; // note_db_state
Alice Kober-Sotzek09cdbd92018-12-05 17:16:21 +010062}
63
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +010064// Serialized form of com.google.gerrit.reviewdb.client.ChangeMessage.
65// Next ID: 3
66message ChangeMessage_Key {
67 required Change_Id change_id = 1;
68 required string uuid = 2;
69}
70
71// Serialized form of com.google.gerrit.reviewdb.client.ChangeMessage.
72// Next ID: 8
73message ChangeMessage {
74 required ChangeMessage_Key key = 1;
75 optional Account_Id author_id = 2;
76 optional fixed64 written_on = 3;
77 optional string message = 4;
78 optional PatchSet_Id patchset = 5;
79 optional string tag = 6;
80 optional Account_Id real_author = 7;
81}
82
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +010083// Serialized form of com.google.gerrit.reviewdb.client.PatchSet.Id.
84// Next ID: 3
85message PatchSet_Id {
86 required Change_Id change_id = 1;
87 required int32 patch_set_id = 2;
88}
89
90// Serialized form of com.google.gerrit.reviewdb.client.PatchSet.
91// Next ID: 10
92message PatchSet {
93 required PatchSet_Id id = 1;
94 optional RevId revision = 2;
95 optional Account_Id uploader_account_id = 3;
96 optional fixed64 created_on = 4;
97 optional string groups = 6;
98 optional string push_certificate = 8;
99 optional string description = 9;
100
101 // Deleted fields, should not be reused:
102 reserved 5; // draft
103 reserved 7; // pushCertficate
104}
105
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100106// Serialized form of com.google.gerrit.reviewdb.client.Account.Id.
107// Next ID: 2
108message Account_Id {
109 required int32 id = 1;
110}
111
112// Serialized form of com.google.gerrit.reviewdb.client.LabelId.
113// Next ID: 2
114message LabelId {
115 required string id = 1;
116}
117
118// Serialized form of com.google.gerrit.reviewdb.client.PatchSetApproval.Key.
119// Next ID: 4
120message PatchSetApproval_Key {
121 required PatchSet_Id patch_set_id = 1;
122 required Account_Id account_id = 2;
123 required LabelId category_id = 3;
124}
125
Alice Kober-Sotzek342b8362018-12-05 17:42:47 +0100126// Serialized form of com.google.gerrit.reviewdb.client.PatchSetApproval.
127// Next ID: 9
Alice Kober-Sotzek09cdbd92018-12-05 17:16:21 +0100128message PatchSetApproval {
Alice Kober-Sotzek342b8362018-12-05 17:42:47 +0100129 required PatchSetApproval_Key key = 1;
130 optional int32 value = 2;
131 optional fixed64 granted = 3;
132 optional string tag = 6;
133 optional Account_Id real_account_id = 7;
134 optional bool post_submit = 8;
135
136 // Deleted fields, should not be reused:
137 reserved 4; // changeOpen
138 reserved 5; // changeSortKey
Alice Kober-Sotzek09cdbd92018-12-05 17:16:21 +0100139}
140
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100141// Serialized form of com.google.gerrit.reviewdb.client.Project.NameKey.
142// Next ID: 2
143message Project_NameKey {
144 optional string name = 1;
145}
146
147// Serialized form of com.google.gerrit.reviewdb.client.Branch.NameKey.
148// Next ID: 3
149message Branch_NameKey {
150 optional Project_NameKey project_name = 1;
151 optional string branch_name = 2;
152}
153
Alice Kober-Sotzek97d3e422018-12-05 17:49:11 +0100154// Serialized form of com.google.gerrit.reviewdb.client.RevId.
155// Next ID: 2
156message RevId {
157 optional string id = 1;
158}