1use serde::{Deserialize, Serialize};
5#[derive(Clone, PartialEq, ::prost::Message)]
7pub struct ConfigMetas {
8 #[prost(message, repeated, tag = "1")]
9 pub roots: ::prost::alloc::vec::Vec<TopMeta>,
10 #[prost(message, optional, tag = "2")]
11 pub timestamp: ::core::option::Option<TopMeta>,
12 #[prost(message, optional, tag = "3")]
13 pub snapshot: ::core::option::Option<TopMeta>,
14 #[prost(message, optional, tag = "4")]
15 pub top_targets: ::core::option::Option<TopMeta>,
16 #[prost(message, repeated, tag = "5")]
17 pub delegated_targets: ::prost::alloc::vec::Vec<DelegatedMeta>,
18}
19#[derive(Clone, PartialEq, ::prost::Message)]
20pub struct DirectorMetas {
21 #[prost(message, repeated, tag = "1")]
22 pub roots: ::prost::alloc::vec::Vec<TopMeta>,
23 #[prost(message, optional, tag = "2")]
24 pub timestamp: ::core::option::Option<TopMeta>,
25 #[prost(message, optional, tag = "3")]
26 pub snapshot: ::core::option::Option<TopMeta>,
27 #[prost(message, optional, tag = "4")]
28 pub targets: ::core::option::Option<TopMeta>,
29}
30#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
31pub struct DelegatedMeta {
32 #[prost(uint64, tag = "1")]
33 pub version: u64,
34 #[prost(string, tag = "2")]
35 pub role: ::prost::alloc::string::String,
36 #[prost(bytes = "vec", tag = "3")]
37 pub raw: ::prost::alloc::vec::Vec<u8>,
38}
39#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
40pub struct TopMeta {
41 #[prost(uint64, tag = "1")]
42 pub version: u64,
43 #[prost(bytes = "vec", tag = "2")]
44 pub raw: ::prost::alloc::vec::Vec<u8>,
45}
46#[derive(Deserialize, Serialize)]
47#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
48pub struct File {
49 #[prost(string, tag = "1")]
50 pub path: ::prost::alloc::string::String,
51 #[prost(bytes = "vec", tag = "2")]
52 #[serde(with = "serde_bytes")]
53 pub raw: ::prost::alloc::vec::Vec<u8>,
54}
55#[derive(Clone, PartialEq, ::prost::Message)]
56pub struct LatestConfigsRequest {
57 #[prost(string, tag = "1")]
58 pub hostname: ::prost::alloc::string::String,
59 #[prost(string, tag = "2")]
60 pub agent_version: ::prost::alloc::string::String,
61 #[prost(uint64, tag = "3")]
63 pub current_config_snapshot_version: u64,
64 #[prost(uint64, tag = "9")]
65 pub current_config_root_version: u64,
66 #[prost(uint64, tag = "8")]
67 pub current_director_root_version: u64,
68 #[prost(string, repeated, tag = "4")]
69 pub products: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
70 #[prost(string, repeated, tag = "5")]
71 pub new_products: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
72 #[prost(message, repeated, tag = "6")]
73 pub active_clients: ::prost::alloc::vec::Vec<Client>,
74 #[prost(bytes = "vec", tag = "10")]
75 pub backend_client_state: ::prost::alloc::vec::Vec<u8>,
76 #[prost(bool, tag = "11")]
77 pub has_error: bool,
78 #[prost(string, tag = "12")]
79 pub error: ::prost::alloc::string::String,
80 #[prost(string, tag = "13")]
81 pub trace_agent_env: ::prost::alloc::string::String,
82 #[prost(string, tag = "14")]
83 pub org_uuid: ::prost::alloc::string::String,
84 #[prost(string, repeated, tag = "15")]
85 pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
86 #[prost(string, tag = "16")]
87 pub agent_uuid: ::prost::alloc::string::String,
88}
89#[derive(Clone, PartialEq, ::prost::Message)]
90pub struct LatestConfigsResponse {
91 #[prost(message, optional, tag = "1")]
92 pub config_metas: ::core::option::Option<ConfigMetas>,
93 #[prost(message, optional, tag = "2")]
94 pub director_metas: ::core::option::Option<DirectorMetas>,
95 #[prost(message, repeated, tag = "3")]
96 pub target_files: ::prost::alloc::vec::Vec<File>,
97}
98#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
99pub struct OrgDataResponse {
100 #[prost(string, tag = "1")]
101 pub uuid: ::prost::alloc::string::String,
102}
103#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
104pub struct OrgStatusResponse {
105 #[prost(bool, tag = "1")]
106 pub enabled: bool,
107 #[prost(bool, tag = "2")]
108 pub authorized: bool,
109}
110#[derive(Deserialize, Serialize)]
111#[derive(Clone, PartialEq, ::prost::Message)]
112pub struct Client {
113 #[prost(message, optional, tag = "1")]
114 pub state: ::core::option::Option<ClientState>,
115 #[prost(string, tag = "2")]
116 pub id: ::prost::alloc::string::String,
117 #[prost(string, repeated, tag = "3")]
118 pub products: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
119 #[prost(bool, tag = "6")]
120 pub is_tracer: bool,
121 #[prost(message, optional, tag = "7")]
122 pub client_tracer: ::core::option::Option<ClientTracer>,
123 #[prost(bool, tag = "8")]
124 pub is_agent: bool,
125 #[prost(message, optional, tag = "9")]
126 #[serde(skip_serializing_if = "Option::is_none")]
127 pub client_agent: ::core::option::Option<ClientAgent>,
128 #[prost(uint64, tag = "10")]
129 pub last_seen: u64,
130 #[prost(bytes = "vec", tag = "11")]
131 pub capabilities: ::prost::alloc::vec::Vec<u8>,
132 #[prost(bool, tag = "14")]
133 pub is_updater: bool,
134 #[prost(message, optional, tag = "15")]
135 pub client_updater: ::core::option::Option<ClientUpdater>,
136}
137#[derive(Deserialize, Serialize)]
138#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
139pub struct ClientTracer {
140 #[prost(string, tag = "1")]
141 pub runtime_id: ::prost::alloc::string::String,
142 #[prost(string, tag = "2")]
143 pub language: ::prost::alloc::string::String,
144 #[prost(string, tag = "3")]
145 pub tracer_version: ::prost::alloc::string::String,
146 #[prost(string, tag = "4")]
147 pub service: ::prost::alloc::string::String,
148 #[prost(string, repeated, tag = "8")]
149 pub extra_services: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
150 #[prost(string, tag = "5")]
151 pub env: ::prost::alloc::string::String,
152 #[prost(string, tag = "6")]
153 pub app_version: ::prost::alloc::string::String,
154 #[prost(string, repeated, tag = "7")]
155 pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
156 #[prost(string, repeated, tag = "9")]
157 pub process_tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
158 #[prost(string, repeated, tag = "10")]
159 pub container_tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
160}
161#[derive(Deserialize, Serialize)]
162#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
163pub struct ClientAgent {
164 #[prost(string, tag = "1")]
165 pub name: ::prost::alloc::string::String,
166 #[prost(string, tag = "2")]
167 pub version: ::prost::alloc::string::String,
168 #[prost(string, tag = "3")]
169 pub cluster_name: ::prost::alloc::string::String,
170 #[prost(string, tag = "4")]
171 pub cluster_id: ::prost::alloc::string::String,
172 #[prost(string, repeated, tag = "5")]
173 pub cws_workloads: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
174}
175#[derive(Deserialize, Serialize)]
176#[derive(Clone, PartialEq, ::prost::Message)]
177pub struct ClientUpdater {
178 #[prost(string, repeated, tag = "1")]
179 pub tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
180 #[prost(message, repeated, tag = "2")]
181 pub packages: ::prost::alloc::vec::Vec<PackageState>,
182 #[prost(uint64, tag = "3")]
183 pub available_disk_space: u64,
184 #[prost(string, tag = "4")]
185 pub secrets_pub_key: ::prost::alloc::string::String,
186}
187#[derive(Deserialize, Serialize)]
188#[derive(Clone, PartialEq, ::prost::Message)]
189pub struct PackageState {
190 #[prost(string, tag = "1")]
191 pub package: ::prost::alloc::string::String,
192 #[prost(string, tag = "2")]
193 pub stable_version: ::prost::alloc::string::String,
194 #[prost(string, tag = "3")]
195 pub experiment_version: ::prost::alloc::string::String,
196 #[prost(message, optional, tag = "4")]
197 pub task: ::core::option::Option<PackageStateTask>,
198 #[prost(string, tag = "11")]
199 pub stable_config_version: ::prost::alloc::string::String,
200 #[prost(string, tag = "12")]
201 pub experiment_config_version: ::prost::alloc::string::String,
202 #[prost(string, tag = "13")]
203 pub running_version: ::prost::alloc::string::String,
204 #[prost(string, tag = "14")]
205 pub running_config_version: ::prost::alloc::string::String,
206 #[prost(uint64, tag = "15")]
207 pub heartbeat_timestamp: u64,
208 #[prost(float, tag = "16")]
209 pub completion: f32,
210}
211#[derive(Deserialize, Serialize)]
212#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
213pub struct PackageStateTask {
214 #[prost(string, tag = "1")]
215 pub id: ::prost::alloc::string::String,
216 #[prost(enumeration = "TaskState", tag = "2")]
217 pub state: i32,
218 #[prost(message, optional, tag = "3")]
219 pub error: ::core::option::Option<TaskError>,
220}
221#[derive(Deserialize, Serialize)]
222#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
223pub struct TaskError {
224 #[prost(uint64, tag = "1")]
225 pub code: u64,
226 #[prost(string, tag = "2")]
227 pub message: ::prost::alloc::string::String,
228}
229#[derive(Deserialize, Serialize)]
230#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
231pub struct ConfigState {
232 #[prost(string, tag = "1")]
233 pub id: ::prost::alloc::string::String,
234 #[prost(uint64, tag = "2")]
235 pub version: u64,
236 #[prost(string, tag = "3")]
237 pub product: ::prost::alloc::string::String,
238 #[prost(uint64, tag = "4")]
239 pub apply_state: u64,
240 #[prost(string, tag = "5")]
241 pub apply_error: ::prost::alloc::string::String,
242}
243#[derive(Deserialize, Serialize)]
244#[derive(Clone, PartialEq, ::prost::Message)]
245pub struct ClientState {
246 #[prost(uint64, tag = "1")]
247 pub root_version: u64,
248 #[prost(uint64, tag = "2")]
249 pub targets_version: u64,
250 #[prost(message, repeated, tag = "3")]
251 pub config_states: ::prost::alloc::vec::Vec<ConfigState>,
252 #[prost(bool, tag = "4")]
253 pub has_error: bool,
254 #[prost(string, tag = "5")]
255 pub error: ::prost::alloc::string::String,
256 #[prost(bytes = "vec", tag = "6")]
257 pub backend_client_state: ::prost::alloc::vec::Vec<u8>,
258}
259#[derive(Deserialize, Serialize)]
260#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
261pub struct TargetFileHash {
262 #[prost(string, tag = "1")]
263 pub algorithm: ::prost::alloc::string::String,
264 #[prost(string, tag = "3")]
265 pub hash: ::prost::alloc::string::String,
266}
267#[derive(Deserialize, Serialize)]
268#[derive(Clone, PartialEq, ::prost::Message)]
269pub struct TargetFileMeta {
270 #[prost(string, tag = "1")]
271 pub path: ::prost::alloc::string::String,
272 #[prost(int64, tag = "2")]
273 pub length: i64,
274 #[prost(message, repeated, tag = "3")]
275 pub hashes: ::prost::alloc::vec::Vec<TargetFileHash>,
276}
277#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
280pub struct ConfigSubscriptionRequest {
281 #[prost(string, tag = "1")]
283 pub runtime_id: ::prost::alloc::string::String,
284 #[prost(enumeration = "config_subscription_request::Action", tag = "2")]
287 pub action: i32,
288 #[prost(enumeration = "ConfigSubscriptionProducts", tag = "3")]
291 pub products: i32,
292}
293pub mod config_subscription_request {
295 #[derive(
296 Clone,
297 Copy,
298 Debug,
299 PartialEq,
300 Eq,
301 Hash,
302 PartialOrd,
303 Ord,
304 ::prost::Enumeration
305 )]
306 #[repr(i32)]
307 pub enum Action {
308 Invalid = 0,
309 Track = 1,
310 Untrack = 2,
311 }
312 impl Action {
313 pub fn as_str_name(&self) -> &'static str {
318 match self {
319 Self::Invalid => "INVALID",
320 Self::Track => "TRACK",
321 Self::Untrack => "UNTRACK",
322 }
323 }
324 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
326 match value {
327 "INVALID" => Some(Self::Invalid),
328 "TRACK" => Some(Self::Track),
329 "UNTRACK" => Some(Self::Untrack),
330 _ => None,
331 }
332 }
333 }
334}
335#[derive(Clone, PartialEq, ::prost::Message)]
338pub struct ConfigSubscriptionResponse {
339 #[prost(message, optional, tag = "1")]
341 pub client: ::core::option::Option<Client>,
342 #[prost(string, repeated, tag = "2")]
348 pub matched_configs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
349 #[prost(message, repeated, tag = "3")]
351 pub target_files: ::prost::alloc::vec::Vec<File>,
352}
353#[derive(Deserialize, Serialize)]
354#[derive(Clone, PartialEq, ::prost::Message)]
355pub struct ClientGetConfigsRequest {
356 #[prost(message, optional, tag = "1")]
357 pub client: ::core::option::Option<Client>,
358 #[prost(message, repeated, tag = "2")]
359 pub cached_target_files: ::prost::alloc::vec::Vec<TargetFileMeta>,
360}
361#[derive(Deserialize, Serialize)]
362#[derive(Clone, PartialEq, ::prost::Message)]
363pub struct ClientGetConfigsResponse {
364 #[prost(bytes = "vec", repeated, tag = "1")]
365 #[serde(with = "crate::serde")]
366 #[serde(default)]
367 pub roots: ::prost::alloc::vec::Vec<::prost::alloc::vec::Vec<u8>>,
368 #[prost(bytes = "vec", tag = "2")]
369 #[serde(with = "serde_bytes")]
370 #[serde(default)]
371 pub targets: ::prost::alloc::vec::Vec<u8>,
372 #[prost(message, repeated, tag = "3")]
373 #[serde(default)]
374 pub target_files: ::prost::alloc::vec::Vec<File>,
375 #[prost(string, repeated, tag = "4")]
376 #[serde(default)]
377 pub client_configs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
378 #[prost(enumeration = "ConfigStatus", tag = "5")]
379 #[serde(default)]
380 pub config_status: i32,
381}
382#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
383pub struct FileMetaState {
384 #[prost(uint64, tag = "1")]
385 pub version: u64,
386 #[prost(string, tag = "2")]
387 pub hash: ::prost::alloc::string::String,
388}
389#[derive(Clone, PartialEq, ::prost::Message)]
390pub struct GetStateConfigResponse {
391 #[prost(map = "string, message", tag = "1")]
392 pub config_state: ::std::collections::HashMap<
393 ::prost::alloc::string::String,
394 FileMetaState,
395 >,
396 #[prost(map = "string, message", tag = "2")]
397 pub director_state: ::std::collections::HashMap<
398 ::prost::alloc::string::String,
399 FileMetaState,
400 >,
401 #[prost(map = "string, string", tag = "3")]
402 pub target_filenames: ::std::collections::HashMap<
403 ::prost::alloc::string::String,
404 ::prost::alloc::string::String,
405 >,
406 #[prost(message, repeated, tag = "4")]
407 pub active_clients: ::prost::alloc::vec::Vec<Client>,
408 #[prost(message, repeated, tag = "5")]
409 pub config_subscription_states: ::prost::alloc::vec::Vec<ConfigSubscriptionState>,
410}
411#[derive(Clone, PartialEq, ::prost::Message)]
413pub struct ConfigSubscriptionState {
414 #[prost(uint64, tag = "1")]
416 pub subscription_id: u64,
417 #[prost(message, repeated, tag = "2")]
420 pub tracked_clients: ::prost::alloc::vec::Vec<
421 config_subscription_state::TrackedClient,
422 >,
423}
424pub mod config_subscription_state {
426 #[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
427 pub struct TrackedClient {
428 #[prost(string, tag = "1")]
429 pub runtime_id: ::prost::alloc::string::String,
430 #[prost(bool, tag = "2")]
431 pub seen_any: bool,
432 #[prost(enumeration = "super::ConfigSubscriptionProducts", tag = "3")]
433 pub products: i32,
434 }
435}
436#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
437pub struct ResetStateConfigResponse {}
438#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
439pub struct TracerPredicateV1 {
440 #[prost(string, tag = "1")]
441 pub client_id: ::prost::alloc::string::String,
442 #[prost(string, tag = "2")]
443 pub service: ::prost::alloc::string::String,
444 #[prost(string, tag = "3")]
445 pub environment: ::prost::alloc::string::String,
446 #[prost(string, tag = "4")]
447 pub app_version: ::prost::alloc::string::String,
448 #[prost(string, tag = "5")]
449 pub tracer_version: ::prost::alloc::string::String,
450 #[prost(string, tag = "6")]
451 pub language: ::prost::alloc::string::String,
452 #[prost(string, tag = "7")]
453 pub runtime_id: ::prost::alloc::string::String,
454}
455#[derive(Clone, PartialEq, ::prost::Message)]
456pub struct TracerPredicates {
457 #[prost(message, repeated, tag = "1")]
458 pub tracer_predicates_v1: ::prost::alloc::vec::Vec<TracerPredicateV1>,
459}
460#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
461#[repr(i32)]
462pub enum TaskState {
463 Idle = 0,
464 Running = 1,
465 Done = 2,
466 InvalidState = 3,
467 Error = 4,
468}
469impl TaskState {
470 pub fn as_str_name(&self) -> &'static str {
475 match self {
476 Self::Idle => "IDLE",
477 Self::Running => "RUNNING",
478 Self::Done => "DONE",
479 Self::InvalidState => "INVALID_STATE",
480 Self::Error => "ERROR",
481 }
482 }
483 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
485 match value {
486 "IDLE" => Some(Self::Idle),
487 "RUNNING" => Some(Self::Running),
488 "DONE" => Some(Self::Done),
489 "INVALID_STATE" => Some(Self::InvalidState),
490 "ERROR" => Some(Self::Error),
491 _ => None,
492 }
493 }
494}
495#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
498#[repr(i32)]
499pub enum ConfigSubscriptionProducts {
500 Invalid = 0,
501 LiveDebugging = 1,
504}
505impl ConfigSubscriptionProducts {
506 pub fn as_str_name(&self) -> &'static str {
511 match self {
512 Self::Invalid => "INVALID",
513 Self::LiveDebugging => "LIVE_DEBUGGING",
514 }
515 }
516 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
518 match value {
519 "INVALID" => Some(Self::Invalid),
520 "LIVE_DEBUGGING" => Some(Self::LiveDebugging),
521 _ => None,
522 }
523 }
524}
525#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
526#[repr(i32)]
527pub enum ConfigStatus {
528 Ok = 0,
529 Expired = 1,
530}
531impl ConfigStatus {
532 pub fn as_str_name(&self) -> &'static str {
537 match self {
538 Self::Ok => "CONFIG_STATUS_OK",
539 Self::Expired => "CONFIG_STATUS_EXPIRED",
540 }
541 }
542 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
544 match value {
545 "CONFIG_STATUS_OK" => Some(Self::Ok),
546 "CONFIG_STATUS_EXPIRED" => Some(Self::Expired),
547 _ => None,
548 }
549 }
550}