arcbox-protocol 0.4.9

Protocol definitions for ArcBox (ttrpc/protobuf)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
// This file is @generated by prost-build.
/// Empty response / request.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct Empty {}
/// Network configuration for a sandbox.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct NetworkSpec {
    /// Network mode: "tap" (default, TAP + IP pool) or "none" (no network).
    #[prost(string, tag = "1")]
    pub mode: ::prost::alloc::string::String,
}
/// A single bind mount into the sandbox.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Mount {
    /// Source path on the host.
    #[prost(string, tag = "1")]
    pub source: ::prost::alloc::string::String,
    /// Target path inside the sandbox.
    #[prost(string, tag = "2")]
    pub target: ::prost::alloc::string::String,
    /// Mount read-only.
    #[prost(bool, tag = "3")]
    pub readonly: bool,
}
/// CPU and memory resource limits.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct ResourceLimits {
    /// Number of vCPUs (0 = daemon default).
    #[prost(uint32, tag = "1")]
    pub vcpus: u32,
    /// Memory in MiB (0 = daemon default).
    #[prost(uint64, tag = "2")]
    pub memory_mib: u64,
}
/// Terminal size for TTY resize events.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, Copy, PartialEq, ::prost::Message)]
pub struct TerminalSize {
    /// Terminal width in columns.
    #[prost(uint32, tag = "1")]
    pub width: u32,
    /// Terminal height in rows.
    #[prost(uint32, tag = "2")]
    pub height: u32,
}
/// Request to create a sandbox.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSandboxRequest {
    /// Caller-supplied unique ID for idempotent creation.
    /// If empty the daemon generates a UUID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Arbitrary key-value metadata (used for filtering in List / Events).
    #[prost(map = "string, string", tag = "2")]
    pub labels:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// --- VM image ---
    /// Kernel image path (empty = daemon default).
    #[prost(string, tag = "3")]
    pub kernel: ::prost::alloc::string::String,
    /// Root filesystem image path (empty = daemon default).
    #[prost(string, tag = "4")]
    pub rootfs: ::prost::alloc::string::String,
    /// Kernel command-line arguments (empty = daemon default).
    #[prost(string, tag = "5")]
    pub boot_args: ::prost::alloc::string::String,
    /// --- Resources ---
    #[prost(message, optional, tag = "6")]
    pub limits: ::core::option::Option<ResourceLimits>,
    /// --- Initial workload (optional) ---
    /// OCI image reference. When set, the agent pulls and runs this image
    /// inside the sandbox. Empty = use rootfs directly.
    #[prost(string, tag = "7")]
    pub image: ::prost::alloc::string::String,
    /// Initial command launched automatically after boot.
    /// Empty = sandbox enters "ready" without running anything.
    /// When this process exits the sandbox transitions back to "ready"
    /// (NOT destroyed) and continues accepting Run calls.
    #[prost(string, repeated, tag = "8")]
    pub cmd: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Environment variables for the initial command.
    #[prost(map = "string, string", tag = "9")]
    pub env:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// Working directory for the initial command.
    #[prost(string, tag = "10")]
    pub working_dir: ::prost::alloc::string::String,
    /// User to run the initial command as.
    #[prost(string, tag = "11")]
    pub user: ::prost::alloc::string::String,
    /// --- Filesystem ---
    #[prost(message, repeated, tag = "12")]
    pub mounts: ::prost::alloc::vec::Vec<Mount>,
    /// --- Network ---
    #[prost(message, optional, tag = "13")]
    pub network: ::core::option::Option<NetworkSpec>,
    /// --- Lifecycle ---
    /// Sandbox auto-destruction timeout in seconds (0 = no limit).
    /// The timer starts from the moment the sandbox is created and is not
    /// reset by workload activity.
    #[prost(uint32, tag = "14")]
    pub ttl_seconds: u32,
    /// --- Provisioning ---
    /// SSH public key injected via MMDS (empty = no SSH).
    #[prost(string, optional, tag = "15")]
    pub ssh_public_key: ::core::option::Option<::prost::alloc::string::String>,
}
/// Response to CreateSandbox.
/// Returned immediately; the sandbox may still be booting (state "starting").
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreateSandboxResponse {
    /// Assigned or caller-supplied sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// IP address pre-allocated for the sandbox (empty if mode = "none").
    /// Available even while state is "starting".
    #[prost(string, tag = "2")]
    pub ip_address: ::prost::alloc::string::String,
    /// State at time of response: always "starting".
    #[prost(string, tag = "3")]
    pub state: ::prost::alloc::string::String,
}
/// Request to run a command inside a ready sandbox.
/// The sandbox must be in "ready" or "idle" state; if it is "running" the call
/// returns FAILED_PRECONDITION.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RunRequest {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Command and arguments.
    #[prost(string, repeated, tag = "2")]
    pub cmd: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Environment variable overrides.
    #[prost(map = "string, string", tag = "3")]
    pub env:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// Working directory (empty = rootfs default).
    #[prost(string, tag = "4")]
    pub working_dir: ::prost::alloc::string::String,
    /// User to run as (empty = rootfs default).
    #[prost(string, tag = "5")]
    pub user: ::prost::alloc::string::String,
    /// Allocate a pseudo-TTY.
    #[prost(bool, tag = "6")]
    pub tty: bool,
    /// Kill the command after this many seconds (0 = no timeout).
    #[prost(uint32, tag = "7")]
    pub timeout_seconds: u32,
}
/// A single chunk of streaming output from Run.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RunOutput {
    /// Stream name: "stdout" | "stderr" | "exit".
    #[prost(string, tag = "1")]
    pub stream: ::prost::alloc::string::String,
    /// Raw output bytes (empty when stream == "exit").
    #[prost(bytes = "vec", tag = "2")]
    pub data: ::prost::alloc::vec::Vec<u8>,
    /// Process exit code. Only valid on the final message (done == true).
    #[prost(int32, tag = "3")]
    pub exit_code: i32,
    /// True on the last message of the stream.
    #[prost(bool, tag = "4")]
    pub done: bool,
}
/// A single message sent by the client during an Exec session.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecInput {
    #[prost(oneof = "exec_input::Payload", tags = "1, 2, 3")]
    pub payload: ::core::option::Option<exec_input::Payload>,
}
/// Nested message and enum types in `ExecInput`.
pub mod exec_input {
    #[derive(serde::Serialize, serde::Deserialize)]
    #[serde(rename_all = "camelCase")]
    #[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Payload {
        /// Must be the first message in the stream. Carries command parameters.
        #[prost(message, tag = "1")]
        Init(super::ExecRequest),
        /// Subsequent messages: raw bytes forwarded to the process stdin.
        #[prost(bytes, tag = "2")]
        Stdin(::prost::alloc::vec::Vec<u8>),
        /// Resize the pseudo-TTY. Only valid when ExecRequest.tty == true.
        #[prost(message, tag = "3")]
        Resize(super::TerminalSize),
    }
}
/// Parameters for starting an exec session. Sent as ExecInput{init: ...}.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecRequest {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Command and arguments.
    #[prost(string, repeated, tag = "2")]
    pub cmd: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    /// Environment variable overrides.
    #[prost(map = "string, string", tag = "3")]
    pub env:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// Working directory.
    #[prost(string, tag = "4")]
    pub working_dir: ::prost::alloc::string::String,
    /// User to run as.
    #[prost(string, tag = "5")]
    pub user: ::prost::alloc::string::String,
    /// Allocate a pseudo-TTY.
    #[prost(bool, tag = "6")]
    pub tty: bool,
    /// Initial terminal size (required when tty == true).
    #[prost(message, optional, tag = "7")]
    pub tty_size: ::core::option::Option<TerminalSize>,
    /// Kill the command after this many seconds (0 = no timeout).
    #[prost(uint32, tag = "8")]
    pub timeout_seconds: u32,
}
/// A single chunk of streaming output from Exec.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ExecOutput {
    /// Stream name: "stdout" | "stderr" | "exit".
    #[prost(string, tag = "1")]
    pub stream: ::prost::alloc::string::String,
    /// Raw output bytes (empty when stream == "exit").
    #[prost(bytes = "vec", tag = "2")]
    pub data: ::prost::alloc::vec::Vec<u8>,
    /// Process exit code. Only valid on the final message (done == true).
    #[prost(int32, tag = "3")]
    pub exit_code: i32,
    /// True on the last message of the stream.
    #[prost(bool, tag = "4")]
    pub done: bool,
}
/// Request to stop a sandbox gracefully.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StopSandboxRequest {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Seconds to wait for any active workload to exit before force-killing
    /// the VM (0 = daemon default of 30 s).
    #[prost(uint32, tag = "2")]
    pub timeout_seconds: u32,
}
/// Request to forcibly remove a sandbox.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RemoveSandboxRequest {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Force removal even if the sandbox is in "running" state.
    #[prost(bool, tag = "2")]
    pub force: bool,
}
/// Request to inspect a sandbox.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct InspectSandboxRequest {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
}
/// Full sandbox state.
///
/// State machine:
///
///    starting ──► ready ──► running ──► ready   (cmd/Run exited, sandbox alive)
///                   │          │
///                   └──────────┴──► stopping ──► stopped
///                                        │
///                                     failed
///
/// "idle" is an alias for "ready" used in event payloads to signal that a
/// previously running workload has just finished.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SandboxInfo {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// State: starting | ready | running | stopping | stopped | failed.
    #[prost(string, tag = "2")]
    pub state: ::prost::alloc::string::String,
    /// User-supplied labels.
    #[prost(map = "string, string", tag = "3")]
    pub labels:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// Effective resource limits.
    #[prost(message, optional, tag = "4")]
    pub limits: ::core::option::Option<ResourceLimits>,
    /// Network information.
    #[prost(message, optional, tag = "5")]
    pub network: ::core::option::Option<SandboxNetwork>,
    /// Creation timestamp (Unix seconds).
    #[prost(int64, tag = "6")]
    pub created_at: i64,
    /// Timestamp when the sandbox first became ready (Unix seconds, 0 if not yet).
    #[prost(int64, tag = "7")]
    pub ready_at: i64,
    /// Timestamp when the last workload exited (Unix seconds, 0 if none has run).
    #[prost(int64, tag = "8")]
    pub last_exited_at: i64,
    /// Exit code of the last workload (only meaningful when last_exited_at > 0).
    #[prost(int32, tag = "9")]
    pub last_exit_code: i32,
    /// Human-readable error message (only set when state == "failed").
    #[prost(string, tag = "10")]
    pub error: ::prost::alloc::string::String,
}
/// Network details of a sandbox.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SandboxNetwork {
    /// Assigned IP address.
    #[prost(string, tag = "1")]
    pub ip_address: ::prost::alloc::string::String,
    /// Gateway address.
    #[prost(string, tag = "2")]
    pub gateway: ::prost::alloc::string::String,
    /// TAP interface name on the host.
    #[prost(string, tag = "3")]
    pub tap_name: ::prost::alloc::string::String,
}
/// Request to list sandboxes.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSandboxesRequest {
    /// Filter by state (empty = all states).
    #[prost(string, tag = "1")]
    pub state: ::prost::alloc::string::String,
    /// Filter by labels (all key-value pairs must match).
    #[prost(map = "string, string", tag = "2")]
    pub labels:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
}
/// Response to ListSandboxes.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSandboxesResponse {
    #[prost(message, repeated, tag = "1")]
    pub sandboxes: ::prost::alloc::vec::Vec<SandboxSummary>,
}
/// Lightweight sandbox summary for List.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SandboxSummary {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// State.
    #[prost(string, tag = "2")]
    pub state: ::prost::alloc::string::String,
    /// Labels.
    #[prost(map = "string, string", tag = "3")]
    pub labels:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// IP address.
    #[prost(string, tag = "4")]
    pub ip_address: ::prost::alloc::string::String,
    /// Creation timestamp (Unix seconds).
    #[prost(int64, tag = "5")]
    pub created_at: i64,
}
/// Request to subscribe to sandbox lifecycle events.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SandboxEventsRequest {
    /// Filter by sandbox ID (empty = all sandboxes).
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Filter by event action (empty = all actions).
    #[prost(string, tag = "2")]
    pub action: ::prost::alloc::string::String,
}
/// A sandbox lifecycle event.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SandboxEvent {
    /// Sandbox ID.
    #[prost(string, tag = "1")]
    pub sandbox_id: ::prost::alloc::string::String,
    /// Action:
    ///    "created"  — sandbox record created, VM booting
    ///    "ready"    — VM booted, sandbox accepting workloads
    ///    "running"  — a workload (cmd or Run) started
    ///    "idle"     — active workload exited, sandbox back to ready
    ///    "stopping" — Stop called, draining workload
    ///    "stopped"  — VM shut down
    ///    "failed"   — unrecoverable error
    ///    "removed"  — sandbox deleted
    #[prost(string, tag = "2")]
    pub action: ::prost::alloc::string::String,
    /// Unix nanoseconds.
    #[prost(int64, tag = "3")]
    pub timestamp: i64,
    /// Additional context, e.g.:
    ///    "exit_code" on "idle" / "stopped"
    ///    "error"     on "failed"
    #[prost(map = "string, string", tag = "4")]
    pub attributes:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
}
/// Request to checkpoint a sandbox.
/// The sandbox must be in "ready" or "idle" state (no active workload).
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckpointRequest {
    /// Sandbox ID to checkpoint.
    #[prost(string, tag = "1")]
    pub sandbox_id: ::prost::alloc::string::String,
    /// Human-readable label for the snapshot.
    #[prost(string, tag = "2")]
    pub name: ::prost::alloc::string::String,
    /// Labels attached to the snapshot.
    #[prost(map = "string, string", tag = "3")]
    pub labels:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
}
/// Response to Checkpoint.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CheckpointResponse {
    /// Snapshot ID.
    #[prost(string, tag = "1")]
    pub snapshot_id: ::prost::alloc::string::String,
    /// On-disk directory containing vmstate and mem files.
    #[prost(string, tag = "2")]
    pub snapshot_dir: ::prost::alloc::string::String,
    /// Creation timestamp (RFC3339).
    #[prost(string, tag = "3")]
    pub created_at: ::prost::alloc::string::String,
}
/// Request to restore a sandbox from a snapshot.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreRequest {
    /// Caller-supplied ID for the new sandbox (empty = auto-generated).
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Source snapshot ID.
    #[prost(string, tag = "2")]
    pub snapshot_id: ::prost::alloc::string::String,
    /// Labels to assign to the restored sandbox.
    #[prost(map = "string, string", tag = "3")]
    pub labels:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// Assign a fresh TAP interface and IP. Required when running multiple
    /// sandboxes restored from the same snapshot concurrently.
    #[prost(bool, tag = "4")]
    pub network_override: bool,
    /// TTL for the restored sandbox in seconds (0 = no limit).
    #[prost(uint32, tag = "5")]
    pub ttl_seconds: u32,
}
/// Response to Restore.
/// The restored sandbox starts in "ready" state immediately.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RestoreResponse {
    /// ID of the newly created sandbox.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// Allocated IP address.
    #[prost(string, tag = "2")]
    pub ip_address: ::prost::alloc::string::String,
}
/// Request to list snapshots.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSnapshotsRequest {
    /// Filter by the origin sandbox ID (empty = all).
    #[prost(string, tag = "1")]
    pub sandbox_id: ::prost::alloc::string::String,
    /// Filter by labels.
    #[prost(map = "string, string", tag = "2")]
    pub labels:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
}
/// Response to ListSnapshots.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListSnapshotsResponse {
    #[prost(message, repeated, tag = "1")]
    pub snapshots: ::prost::alloc::vec::Vec<SnapshotSummary>,
}
/// Lightweight snapshot summary.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SnapshotSummary {
    /// Snapshot ID.
    #[prost(string, tag = "1")]
    pub id: ::prost::alloc::string::String,
    /// ID of the sandbox that was checkpointed.
    #[prost(string, tag = "2")]
    pub sandbox_id: ::prost::alloc::string::String,
    /// Human-readable label.
    #[prost(string, tag = "3")]
    pub name: ::prost::alloc::string::String,
    /// Labels.
    #[prost(map = "string, string", tag = "4")]
    pub labels:
        ::std::collections::HashMap<::prost::alloc::string::String, ::prost::alloc::string::String>,
    /// On-disk directory.
    #[prost(string, tag = "5")]
    pub snapshot_dir: ::prost::alloc::string::String,
    /// Creation timestamp (RFC3339).
    #[prost(string, tag = "6")]
    pub created_at: ::prost::alloc::string::String,
}
/// Request to delete a snapshot.
#[derive(serde::Serialize, serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct DeleteSnapshotRequest {
    /// Snapshot ID.
    #[prost(string, tag = "1")]
    pub snapshot_id: ::prost::alloc::string::String,
}