1#[derive(Clone, PartialEq, ::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, ::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 #[prost(bytes, tag = "1")]
41 CommitId(::prost::alloc::vec::Vec<u8>),
42 #[prost(message, tag = "2")]
43 ConflictLegacy(super::RefConflictLegacy),
44 #[prost(message, tag = "3")]
45 Conflict(super::RefConflict),
46 }
47}
48#[derive(Clone, PartialEq, ::prost::Message)]
51pub struct RefTargetTerm {
52 #[prost(bytes = "vec", optional, tag = "1")]
53 pub value: ::core::option::Option<::prost::alloc::vec::Vec<u8>>,
54}
55#[derive(Clone, PartialEq, ::prost::Message)]
56pub struct RemoteBookmark {
57 #[prost(string, tag = "1")]
58 pub remote_name: ::prost::alloc::string::String,
59 #[prost(message, optional, tag = "2")]
60 pub target: ::core::option::Option<RefTarget>,
61 #[prost(enumeration = "RemoteRefState", optional, tag = "3")]
63 pub state: ::core::option::Option<i32>,
64}
65#[derive(Clone, PartialEq, ::prost::Message)]
66pub struct Bookmark {
67 #[prost(string, tag = "1")]
68 pub name: ::prost::alloc::string::String,
69 #[prost(message, optional, tag = "2")]
71 pub local_target: ::core::option::Option<RefTarget>,
72 #[deprecated]
74 #[prost(message, repeated, tag = "3")]
75 pub remote_bookmarks: ::prost::alloc::vec::Vec<RemoteBookmark>,
76}
77#[derive(Clone, PartialEq, ::prost::Message)]
78pub struct GitRef {
79 #[prost(string, tag = "1")]
80 pub name: ::prost::alloc::string::String,
81 #[deprecated]
85 #[prost(bytes = "vec", tag = "2")]
86 pub commit_id: ::prost::alloc::vec::Vec<u8>,
87 #[prost(message, optional, tag = "3")]
88 pub target: ::core::option::Option<RefTarget>,
89}
90#[derive(Clone, PartialEq, ::prost::Message)]
91pub struct RemoteRef {
92 #[prost(string, tag = "1")]
93 pub name: ::prost::alloc::string::String,
94 #[prost(message, repeated, tag = "2")]
95 pub target_terms: ::prost::alloc::vec::Vec<RefTargetTerm>,
96 #[prost(enumeration = "RemoteRefState", tag = "3")]
97 pub state: i32,
98}
99#[derive(Clone, PartialEq, ::prost::Message)]
100pub struct Tag {
101 #[prost(string, tag = "1")]
102 pub name: ::prost::alloc::string::String,
103 #[prost(message, optional, tag = "2")]
104 pub target: ::core::option::Option<RefTarget>,
105}
106#[derive(Clone, PartialEq, ::prost::Message)]
107pub struct View {
108 #[prost(bytes = "vec", repeated, tag = "1")]
109 pub head_ids: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
110 #[deprecated]
111 #[prost(bytes = "vec", tag = "2")]
112 pub wc_commit_id: ::prost::alloc::vec::Vec<u8>,
113 #[prost(map = "string, bytes", tag = "8")]
114 pub wc_commit_ids: ::std::collections::HashMap<
115 ::prost::alloc::string::String,
116 ::prost::alloc::vec::Vec<u8>,
117 >,
118 #[prost(message, repeated, tag = "5")]
120 pub bookmarks: ::prost::alloc::vec::Vec<Bookmark>,
121 #[prost(message, repeated, tag = "6")]
122 pub local_tags: ::prost::alloc::vec::Vec<Tag>,
123 #[prost(message, repeated, tag = "11")]
125 pub remote_views: ::prost::alloc::vec::Vec<RemoteView>,
126 #[prost(message, repeated, tag = "3")]
128 pub git_refs: ::prost::alloc::vec::Vec<GitRef>,
129 #[deprecated]
133 #[prost(bytes = "vec", tag = "7")]
134 pub git_head_legacy: ::prost::alloc::vec::Vec<u8>,
135 #[prost(message, optional, tag = "9")]
136 pub git_head: ::core::option::Option<RefTarget>,
137 #[prost(bool, tag = "12")]
139 pub has_git_refs_migrated_to_remote_tags: bool,
140}
141#[derive(Clone, PartialEq, ::prost::Message)]
142pub struct RemoteView {
143 #[prost(string, tag = "1")]
144 pub name: ::prost::alloc::string::String,
145 #[prost(message, repeated, tag = "2")]
146 pub bookmarks: ::prost::alloc::vec::Vec<RemoteRef>,
147 #[prost(message, repeated, tag = "3")]
148 pub tags: ::prost::alloc::vec::Vec<RemoteRef>,
149}
150#[derive(Clone, PartialEq, ::prost::Message)]
151pub struct Operation {
152 #[prost(bytes = "vec", tag = "1")]
153 pub view_id: ::prost::alloc::vec::Vec<u8>,
154 #[prost(bytes = "vec", repeated, tag = "2")]
155 pub parents: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
156 #[prost(message, optional, tag = "3")]
157 pub metadata: ::core::option::Option<OperationMetadata>,
158 #[prost(message, repeated, tag = "4")]
160 pub commit_predecessors: ::prost::alloc::vec::Vec<CommitPredecessors>,
161 #[prost(bool, tag = "5")]
163 pub stores_commit_predecessors: bool,
164}
165#[derive(Clone, Copy, PartialEq, ::prost::Message)]
167pub struct Timestamp {
168 #[prost(int64, tag = "1")]
169 pub millis_since_epoch: i64,
170 #[prost(int32, tag = "2")]
171 pub tz_offset: i32,
172}
173#[derive(Clone, PartialEq, ::prost::Message)]
174pub struct OperationMetadata {
175 #[prost(message, optional, tag = "1")]
176 pub start_time: ::core::option::Option<Timestamp>,
177 #[prost(message, optional, tag = "2")]
178 pub end_time: ::core::option::Option<Timestamp>,
179 #[prost(string, tag = "3")]
180 pub description: ::prost::alloc::string::String,
181 #[prost(string, tag = "4")]
182 pub hostname: ::prost::alloc::string::String,
183 #[prost(string, tag = "5")]
184 pub username: ::prost::alloc::string::String,
185 #[prost(bool, tag = "7")]
186 pub is_snapshot: bool,
187 #[prost(map = "string, string", tag = "6")]
188 pub tags: ::std::collections::HashMap<
189 ::prost::alloc::string::String,
190 ::prost::alloc::string::String,
191 >,
192}
193#[derive(Clone, PartialEq, ::prost::Message)]
194pub struct CommitPredecessors {
195 #[prost(bytes = "vec", tag = "1")]
196 pub commit_id: ::prost::alloc::vec::Vec<u8>,
197 #[prost(bytes = "vec", repeated, tag = "2")]
198 pub predecessor_ids: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
199}
200#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
201#[repr(i32)]
202pub enum RemoteRefState {
203 New = 0,
204 Tracked = 1,
205}
206impl RemoteRefState {
207 pub fn as_str_name(&self) -> &'static str {
212 match self {
213 Self::New => "New",
214 Self::Tracked => "Tracked",
215 }
216 }
217 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
219 match value {
220 "New" => Some(Self::New),
221 "Tracked" => Some(Self::Tracked),
222 _ => None,
223 }
224 }
225}