1#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
3pub struct GraphSyncRef {
4 #[prost(enumeration = "RefType", tag = "1")]
5 pub r#type: i32,
6 #[prost(bytes = "vec", tag = "2")]
7 pub value: ::prost::alloc::vec::Vec<u8>,
8 #[prost(string, tag = "3")]
9 pub name: ::prost::alloc::string::String,
10}
11#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
12pub struct GraphSyncActor {
13 #[prost(enumeration = "GraphSyncActorType", tag = "1")]
14 pub r#type: i32,
15 #[prost(bytes = "vec", tag = "2")]
16 pub id: ::prost::alloc::vec::Vec<u8>,
17 #[prost(string, tag = "3")]
18 pub name: ::prost::alloc::string::String,
19 #[prost(bytes = "vec", tag = "4")]
20 pub effective_user_id: ::prost::alloc::vec::Vec<u8>,
21}
22#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
23pub struct GraphSyncData {
24 #[prost(enumeration = "GraphSyncDataType", tag = "1")]
25 pub r#type: i32,
26 #[prost(message, optional, tag = "2")]
27 pub r#ref: ::core::option::Option<GraphSyncRef>,
28 #[prost(message, optional, tag = "3")]
29 pub parent_ref: ::core::option::Option<GraphSyncRef>,
30 #[prost(bytes = "vec", tag = "4")]
31 pub content: ::prost::alloc::vec::Vec<u8>,
32 #[prost(string, tag = "5")]
33 pub path: ::prost::alloc::string::String,
34}
35#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
36pub struct GraphSyncDataPlus {
37 #[prost(message, optional, tag = "1")]
38 pub data: ::core::option::Option<GraphSyncData>,
39 #[prost(int64, tag = "2")]
40 pub timestamp: i64,
41 #[prost(message, optional, tag = "3")]
42 pub actor: ::core::option::Option<GraphSyncActor>,
43}
44#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
45pub struct GraphSyncQuery {
46 #[prost(bytes = "vec", tag = "1")]
47 pub stream_id: ::prost::alloc::vec::Vec<u8>,
48 #[prost(bytes = "vec", tag = "2")]
49 pub origin: ::prost::alloc::vec::Vec<u8>,
50 #[prost(int64, tag = "3")]
51 pub sync_point: i64,
52 #[prost(int32, tag = "4")]
53 pub max_count: i32,
54}
55#[derive(Clone, PartialEq, ::prost::Message)]
56pub struct GraphSyncResult {
57 #[prost(bytes = "vec", tag = "2")]
58 pub stream_id: ::prost::alloc::vec::Vec<u8>,
59 #[prost(int64, tag = "3")]
60 pub sync_point: i64,
61 #[prost(message, repeated, tag = "4")]
62 pub data: ::prost::alloc::vec::Vec<GraphSyncDataPlus>,
63 #[prost(bool, tag = "5")]
64 pub has_more: bool,
65}
66#[derive(Clone, PartialEq, ::prost::Message)]
67pub struct GraphSyncMultiQuery {
68 #[prost(message, repeated, tag = "1")]
69 pub queries: ::prost::alloc::vec::Vec<GraphSyncQuery>,
70}
71#[derive(Clone, PartialEq, ::prost::Message)]
72pub struct GraphSyncMultiResult {
73 #[prost(message, repeated, tag = "1")]
74 pub results: ::prost::alloc::vec::Vec<GraphSyncResult>,
75}
76#[derive(Clone, PartialEq, ::prost::Message)]
77pub struct GraphSyncAddDataRequest {
78 #[prost(message, optional, tag = "1")]
79 pub origin: ::core::option::Option<GraphSyncRef>,
80 #[prost(message, repeated, tag = "2")]
81 pub data: ::prost::alloc::vec::Vec<GraphSyncData>,
82}
83#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
84pub struct GraphSyncLeafsQuery {
85 #[prost(bytes = "vec", repeated, tag = "2")]
86 pub vertices: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
87}
88#[derive(Clone, PartialEq, ::prost::Message)]
89pub struct GraphSyncRefsResult {
90 #[prost(message, repeated, tag = "1")]
91 pub refs: ::prost::alloc::vec::Vec<GraphSyncRef>,
92}
93#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
94#[repr(i32)]
95pub enum RefType {
96 RftGeneral = 0,
97 RftUser = 1,
98 RftDevice = 2,
99 RftRec = 3,
100 RftFolder = 4,
101 RftTeam = 5,
102 RftEnterprise = 6,
103 RftPamDirectory = 7,
104 RftPamMachine = 8,
105 RftPamDatabase = 9,
106 RftPamUser = 10,
107 RftPamNetwork = 11,
108 RftPamBrowser = 12,
109 RftConnection = 13,
110 RftWorkflow = 14,
111 RftNotification = 15,
112 RftUserInfo = 16,
113 RftTeamInfo = 17,
114 RftRole = 18,
115}
116impl RefType {
117 pub fn as_str_name(&self) -> &'static str {
122 match self {
123 Self::RftGeneral => "RFT_GENERAL",
124 Self::RftUser => "RFT_USER",
125 Self::RftDevice => "RFT_DEVICE",
126 Self::RftRec => "RFT_REC",
127 Self::RftFolder => "RFT_FOLDER",
128 Self::RftTeam => "RFT_TEAM",
129 Self::RftEnterprise => "RFT_ENTERPRISE",
130 Self::RftPamDirectory => "RFT_PAM_DIRECTORY",
131 Self::RftPamMachine => "RFT_PAM_MACHINE",
132 Self::RftPamDatabase => "RFT_PAM_DATABASE",
133 Self::RftPamUser => "RFT_PAM_USER",
134 Self::RftPamNetwork => "RFT_PAM_NETWORK",
135 Self::RftPamBrowser => "RFT_PAM_BROWSER",
136 Self::RftConnection => "RFT_CONNECTION",
137 Self::RftWorkflow => "RFT_WORKFLOW",
138 Self::RftNotification => "RFT_NOTIFICATION",
139 Self::RftUserInfo => "RFT_USER_INFO",
140 Self::RftTeamInfo => "RFT_TEAM_INFO",
141 Self::RftRole => "RFT_ROLE",
142 }
143 }
144 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
146 match value {
147 "RFT_GENERAL" => Some(Self::RftGeneral),
148 "RFT_USER" => Some(Self::RftUser),
149 "RFT_DEVICE" => Some(Self::RftDevice),
150 "RFT_REC" => Some(Self::RftRec),
151 "RFT_FOLDER" => Some(Self::RftFolder),
152 "RFT_TEAM" => Some(Self::RftTeam),
153 "RFT_ENTERPRISE" => Some(Self::RftEnterprise),
154 "RFT_PAM_DIRECTORY" => Some(Self::RftPamDirectory),
155 "RFT_PAM_MACHINE" => Some(Self::RftPamMachine),
156 "RFT_PAM_DATABASE" => Some(Self::RftPamDatabase),
157 "RFT_PAM_USER" => Some(Self::RftPamUser),
158 "RFT_PAM_NETWORK" => Some(Self::RftPamNetwork),
159 "RFT_PAM_BROWSER" => Some(Self::RftPamBrowser),
160 "RFT_CONNECTION" => Some(Self::RftConnection),
161 "RFT_WORKFLOW" => Some(Self::RftWorkflow),
162 "RFT_NOTIFICATION" => Some(Self::RftNotification),
163 "RFT_USER_INFO" => Some(Self::RftUserInfo),
164 "RFT_TEAM_INFO" => Some(Self::RftTeamInfo),
165 "RFT_ROLE" => Some(Self::RftRole),
166 _ => None,
167 }
168 }
169}
170#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
171#[repr(i32)]
172pub enum GraphSyncDataType {
173 GseData = 0,
174 GseKey = 1,
175 GseLink = 2,
176 GseAcl = 3,
177 GseDeletion = 4,
178}
179impl GraphSyncDataType {
180 pub fn as_str_name(&self) -> &'static str {
185 match self {
186 Self::GseData => "GSE_DATA",
187 Self::GseKey => "GSE_KEY",
188 Self::GseLink => "GSE_LINK",
189 Self::GseAcl => "GSE_ACL",
190 Self::GseDeletion => "GSE_DELETION",
191 }
192 }
193 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
195 match value {
196 "GSE_DATA" => Some(Self::GseData),
197 "GSE_KEY" => Some(Self::GseKey),
198 "GSE_LINK" => Some(Self::GseLink),
199 "GSE_ACL" => Some(Self::GseAcl),
200 "GSE_DELETION" => Some(Self::GseDeletion),
201 _ => None,
202 }
203 }
204}
205#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
206#[repr(i32)]
207pub enum GraphSyncActorType {
208 GsaUser = 0,
209 GsaService = 1,
210 GsaPamGateway = 2,
211}
212impl GraphSyncActorType {
213 pub fn as_str_name(&self) -> &'static str {
218 match self {
219 Self::GsaUser => "GSA_USER",
220 Self::GsaService => "GSA_SERVICE",
221 Self::GsaPamGateway => "GSA_PAM_GATEWAY",
222 }
223 }
224 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
226 match value {
227 "GSA_USER" => Some(Self::GsaUser),
228 "GSA_SERVICE" => Some(Self::GsaService),
229 "GSA_PAM_GATEWAY" => Some(Self::GsaPamGateway),
230 _ => None,
231 }
232 }
233}