1#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3pub struct RefConflictLegacy {
4 #[deprecated]
5 #[prost(bytes = "vec", repeated, tag = "1")]
6 pub removes: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
7 #[deprecated]
8 #[prost(bytes = "vec", repeated, tag = "2")]
9 pub adds: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
10}
11#[derive(Clone, PartialEq, ::prost::Message)]
14pub struct RefConflict {
15 #[prost(message, repeated, tag = "1")]
16 pub removes: ::prost::alloc::vec::Vec<ref_conflict::Term>,
17 #[prost(message, repeated, tag = "2")]
18 pub adds: ::prost::alloc::vec::Vec<ref_conflict::Term>,
19}
20pub mod ref_conflict {
22 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
23 pub struct Term {
24 #[prost(bytes = "vec", optional, tag = "1")]
25 pub value: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
26 }
27}
28#[derive(Clone, PartialEq, ::prost::Message)]
30pub struct RefTarget {
31 #[prost(oneof = "ref_target::Value", tags = "1, 2, 3")]
33 pub value: ::core::option::Option<ref_target::Value>,
34}
35pub mod ref_target {
37 #[derive(Clone, PartialEq, ::prost::Oneof)]
39 pub enum Value {
40 #[deprecated]
41 #[prost(bytes, tag = "1")]
42 CommitId(::prost::alloc::vec::Vec<u8>),
43 #[deprecated]
44 #[prost(message, tag = "2")]
45 ConflictLegacy(super::RefConflictLegacy),
46 #[prost(message, tag = "3")]
47 Conflict(super::RefConflict),
48 }
49}
50#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
53pub struct RefTargetTerm {
54 #[prost(bytes = "vec", optional, tag = "1")]
55 pub value: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
56}
57#[derive(Clone, PartialEq, ::prost::Message)]
58pub struct RemoteBookmark {
59 #[prost(string, tag = "1")]
60 pub remote_name: ::prost::alloc::string::String,
61 #[prost(message, optional, tag = "2")]
62 pub target: ::core::option::Option<RefTarget>,
63 #[prost(enumeration = "RemoteRefState", optional, tag = "3")]
65 pub state: ::core::option::Option<i32>,
66}
67#[derive(Clone, PartialEq, ::prost::Message)]
68pub struct Bookmark {
69 #[prost(string, tag = "1")]
70 pub name: ::prost::alloc::string::String,
71 #[prost(message, optional, tag = "2")]
73 pub local_target: ::core::option::Option<RefTarget>,
74 #[deprecated]
76 #[prost(message, repeated, tag = "3")]
77 pub remote_bookmarks: ::prost::alloc::vec::Vec<RemoteBookmark>,
78}
79#[derive(Clone, PartialEq, ::prost::Message)]
80pub struct GitRef {
81 #[prost(string, tag = "1")]
82 pub name: ::prost::alloc::string::String,
83 #[deprecated]
87 #[prost(bytes = "vec", tag = "2")]
88 pub commit_id: ::prost::alloc::vec::Vec<u8>,
89 #[prost(message, optional, tag = "3")]
90 pub target: ::core::option::Option<RefTarget>,
91}
92#[derive(Clone, PartialEq, ::prost::Message)]
93pub struct RemoteRef {
94 #[prost(string, tag = "1")]
95 pub name: ::prost::alloc::string::String,
96 #[prost(message, repeated, tag = "2")]
97 pub target_terms: ::prost::alloc::vec::Vec<RefTargetTerm>,
98 #[prost(enumeration = "RemoteRefState", tag = "3")]
99 pub state: i32,
100}
101#[derive(Clone, PartialEq, ::prost::Message)]
102pub struct Tag {
103 #[prost(string, tag = "1")]
104 pub name: ::prost::alloc::string::String,
105 #[prost(message, optional, tag = "2")]
106 pub target: ::core::option::Option<RefTarget>,
107}
108#[derive(Clone, PartialEq, ::prost::Message)]
109pub struct View {
110 #[prost(bytes = "vec", repeated, tag = "1")]
111 pub head_ids: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
112 #[deprecated]
113 #[prost(bytes = "vec", tag = "2")]
114 pub wc_commit_id: ::prost::alloc::vec::Vec<u8>,
115 #[prost(map = "string, bytes", tag = "8")]
116 pub wc_commit_ids: ::std::collections::HashMap<
117 ::prost::alloc::string::String,
118 ::prost::alloc::vec::Vec<u8>,
119 >,
120 #[prost(message, repeated, tag = "5")]
122 pub bookmarks: ::prost::alloc::vec::Vec<Bookmark>,
123 #[prost(message, repeated, tag = "6")]
124 pub local_tags: ::prost::alloc::vec::Vec<Tag>,
125 #[prost(message, repeated, tag = "11")]
127 pub remote_views: ::prost::alloc::vec::Vec<RemoteView>,
128 #[prost(message, repeated, tag = "3")]
130 pub git_refs: ::prost::alloc::vec::Vec<GitRef>,
131 #[deprecated]
135 #[prost(bytes = "vec", tag = "7")]
136 pub git_head_legacy: ::prost::alloc::vec::Vec<u8>,
137 #[prost(message, optional, tag = "9")]
138 pub git_head: ::core::option::Option<RefTarget>,
139 #[prost(bool, tag = "12")]
141 pub has_git_refs_migrated_to_remote_tags: bool,
142}
143#[derive(Clone, PartialEq, ::prost::Message)]
144pub struct RemoteView {
145 #[prost(string, tag = "1")]
146 pub name: ::prost::alloc::string::String,
147 #[prost(message, repeated, tag = "2")]
148 pub bookmarks: ::prost::alloc::vec::Vec<RemoteRef>,
149 #[prost(message, repeated, tag = "3")]
150 pub tags: ::prost::alloc::vec::Vec<RemoteRef>,
151}
152#[derive(Clone, PartialEq, ::prost::Message)]
153pub struct Operation {
154 #[prost(bytes = "vec", tag = "1")]
155 pub view_id: ::prost::alloc::vec::Vec<u8>,
156 #[prost(bytes = "vec", repeated, tag = "2")]
157 pub parents: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
158 #[prost(message, optional, tag = "3")]
159 pub metadata: ::core::option::Option<OperationMetadata>,
160 #[prost(message, repeated, tag = "4")]
162 pub commit_predecessors: ::prost::alloc::vec::Vec<CommitPredecessors>,
163 #[prost(bool, tag = "5")]
165 pub stores_commit_predecessors: bool,
166}
167#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
169pub struct Timestamp {
170 #[prost(int64, tag = "1")]
171 pub millis_since_epoch: i64,
172 #[prost(int32, tag = "2")]
173 pub tz_offset: i32,
174}
175#[derive(Clone, PartialEq, ::prost::Message)]
176pub struct OperationMetadata {
177 #[prost(message, optional, tag = "1")]
178 pub start_time: ::core::option::Option<Timestamp>,
179 #[prost(message, optional, tag = "2")]
180 pub end_time: ::core::option::Option<Timestamp>,
181 #[prost(string, tag = "3")]
182 pub description: ::prost::alloc::string::String,
183 #[prost(string, tag = "4")]
184 pub hostname: ::prost::alloc::string::String,
185 #[prost(string, tag = "5")]
186 pub username: ::prost::alloc::string::String,
187 #[prost(bool, tag = "7")]
188 pub is_snapshot: bool,
189 #[prost(map = "string, string", tag = "6")]
190 pub tags: ::std::collections::HashMap<
191 ::prost::alloc::string::String,
192 ::prost::alloc::string::String,
193 >,
194}
195#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
196pub struct CommitPredecessors {
197 #[prost(bytes = "vec", tag = "1")]
198 pub commit_id: ::prost::alloc::vec::Vec<u8>,
199 #[prost(bytes = "vec", repeated, tag = "2")]
200 pub predecessor_ids: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
201}
202#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
203#[repr(i32)]
204pub enum RemoteRefState {
205 New = 0,
206 Tracked = 1,
207}
208impl RemoteRefState {
209 pub fn as_str_name(&self) -> &'static str {
214 match self {
215 Self::New => "New",
216 Self::Tracked => "Tracked",
217 }
218 }
219 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
221 match value {
222 "New" => Some(Self::New),
223 "Tracked" => Some(Self::Tracked),
224 _ => None,
225 }
226 }
227}