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 GitHead {
94 #[prost(string, tag = "1")]
95 pub name: ::prost::alloc::string::String,
96 #[prost(message, optional, tag = "2")]
97 pub target: ::core::option::Option<RefTarget>,
98}
99#[derive(Clone, PartialEq, ::prost::Message)]
100pub struct RemoteRef {
101 #[prost(string, tag = "1")]
102 pub name: ::prost::alloc::string::String,
103 #[prost(message, repeated, tag = "2")]
104 pub target_terms: ::prost::alloc::vec::Vec<RefTargetTerm>,
105 #[prost(enumeration = "RemoteRefState", tag = "3")]
106 pub state: i32,
107}
108#[derive(Clone, PartialEq, ::prost::Message)]
109pub struct Tag {
110 #[prost(string, tag = "1")]
111 pub name: ::prost::alloc::string::String,
112 #[prost(message, optional, tag = "2")]
113 pub target: ::core::option::Option<RefTarget>,
114}
115#[derive(Clone, PartialEq, ::prost::Message)]
116pub struct View {
117 #[prost(bytes = "vec", repeated, tag = "1")]
118 pub head_ids: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
119 #[deprecated]
120 #[prost(bytes = "vec", tag = "2")]
121 pub wc_commit_id: ::prost::alloc::vec::Vec<u8>,
122 #[prost(map = "string, bytes", tag = "8")]
123 pub wc_commit_ids: ::std::collections::HashMap<
124 ::prost::alloc::string::String,
125 ::prost::alloc::vec::Vec<u8>,
126 >,
127 #[prost(message, repeated, tag = "5")]
129 pub bookmarks: ::prost::alloc::vec::Vec<Bookmark>,
130 #[prost(message, repeated, tag = "6")]
131 pub local_tags: ::prost::alloc::vec::Vec<Tag>,
132 #[prost(message, repeated, tag = "11")]
134 pub remote_views: ::prost::alloc::vec::Vec<RemoteView>,
135 #[prost(message, repeated, tag = "3")]
137 pub git_refs: ::prost::alloc::vec::Vec<GitRef>,
138 #[deprecated]
142 #[prost(bytes = "vec", tag = "7")]
143 pub git_head_legacy: ::prost::alloc::vec::Vec<u8>,
144 #[deprecated]
145 #[prost(message, optional, tag = "9")]
146 pub git_head: ::core::option::Option<RefTarget>,
147 #[prost(bool, tag = "12")]
149 pub has_git_refs_migrated_to_remote_tags: bool,
150 #[prost(message, repeated, tag = "13")]
152 pub git_heads: ::prost::alloc::vec::Vec<GitHead>,
153}
154#[derive(Clone, PartialEq, ::prost::Message)]
155pub struct RemoteView {
156 #[prost(string, tag = "1")]
157 pub name: ::prost::alloc::string::String,
158 #[prost(message, repeated, tag = "2")]
159 pub bookmarks: ::prost::alloc::vec::Vec<RemoteRef>,
160 #[prost(message, repeated, tag = "3")]
161 pub tags: ::prost::alloc::vec::Vec<RemoteRef>,
162}
163#[derive(Clone, PartialEq, ::prost::Message)]
164pub struct Operation {
165 #[prost(bytes = "vec", tag = "1")]
166 pub view_id: ::prost::alloc::vec::Vec<u8>,
167 #[prost(bytes = "vec", repeated, tag = "2")]
168 pub parents: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
169 #[prost(message, optional, tag = "3")]
170 pub metadata: ::core::option::Option<OperationMetadata>,
171 #[prost(message, repeated, tag = "4")]
173 pub commit_predecessors: ::prost::alloc::vec::Vec<CommitPredecessors>,
174 #[prost(bool, tag = "5")]
176 pub stores_commit_predecessors: bool,
177}
178#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
180pub struct Timestamp {
181 #[prost(int64, tag = "1")]
182 pub millis_since_epoch: i64,
183 #[prost(int32, tag = "2")]
184 pub tz_offset: i32,
185}
186#[derive(Clone, PartialEq, ::prost::Message)]
187pub struct OperationMetadata {
188 #[prost(message, optional, tag = "1")]
189 pub start_time: ::core::option::Option<Timestamp>,
190 #[prost(message, optional, tag = "2")]
191 pub end_time: ::core::option::Option<Timestamp>,
192 #[prost(string, tag = "3")]
193 pub description: ::prost::alloc::string::String,
194 #[prost(string, tag = "4")]
195 pub hostname: ::prost::alloc::string::String,
196 #[prost(string, tag = "5")]
197 pub username: ::prost::alloc::string::String,
198 #[prost(bool, tag = "7")]
199 pub is_snapshot: bool,
200 #[prost(string, optional, tag = "8")]
201 pub workspace_name: ::core::option::Option<::prost::alloc::string::String>,
202 #[prost(map = "string, string", tag = "6")]
203 pub attributes: ::std::collections::HashMap<
204 ::prost::alloc::string::String,
205 ::prost::alloc::string::String,
206 >,
207}
208#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
209pub struct CommitPredecessors {
210 #[prost(bytes = "vec", tag = "1")]
211 pub commit_id: ::prost::alloc::vec::Vec<u8>,
212 #[prost(bytes = "vec", repeated, tag = "2")]
213 pub predecessor_ids: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
214}
215#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
216#[repr(i32)]
217pub enum RemoteRefState {
218 New = 0,
219 Tracked = 1,
220}
221impl RemoteRefState {
222 pub fn as_str_name(&self) -> &'static str {
227 match self {
228 Self::New => "New",
229 Self::Tracked => "Tracked",
230 }
231 }
232 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
234 match value {
235 "New" => Some(Self::New),
236 "Tracked" => Some(Self::Tracked),
237 _ => None,
238 }
239 }
240}