Skip to main content

darkbio_wire/protocol/generated/
darkbio.wire.rs

1// This file is @generated by prost-build.
2/// HostToArk represents a message sent from the host to the Ark via the USB
3/// connection. It embeds all possible message types to keep the protocol simple.
4///
5/// Every message carries an id and is either a request, its id chosen by the
6/// host, or the host's response to a request of the Ark, echoing the Ark's id.
7/// To avoid id collisions, hosts allocate odd ids and Arks even ones, so the
8/// parity of the id alone distinguishes a response from a request.
9#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
10pub struct HostToArk {
11    /// Enveloping fields, reserved range 0x001-0x0ff
12    ///
13    /// Request identifier, the host's own or responded to
14    #[prost(uint64, tag = "1")]
15    pub id: u64,
16    /// Error encountered while serving the Ark's request (if any)
17    #[prost(message, optional, tag = "2")]
18    pub err: ::core::option::Option<Error>,
19    /// Body of the message, a request of the host or its response to a request of
20    /// the Ark. The tags are grouped by area, each area with its own range.
21    #[prost(
22        oneof = "host_to_ark::Content",
23        tags = "256, 257, 258, 259, 260, 513, 514, 515, 516, 517, 769, 770, 771, 772, 773, 774, 1025, 1026, 1027, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 1793, 4096"
24    )]
25    pub content: ::core::option::Option<host_to_ark::Content>,
26}
27/// Nested message and enum types in `HostToArk`.
28pub mod host_to_ark {
29    /// Body of the message, a request of the host or its response to a request of
30    /// the Ark. The tags are grouped by area, each area with its own range.
31    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
32    pub enum Content {
33        /// Installs the signed device attestation at manufacturing
34        #[prost(message, tag = "256")]
35        Onboard(super::OnboardingRequest),
36        /// Fetches the hardware and firmware versions
37        #[prost(message, tag = "257")]
38        DeviceInfo(super::DeviceInfoRequest),
39        /// Starts a cloud sync with the attested cloud keys
40        #[prost(message, tag = "258")]
41        CloudSyncStart(super::CloudSyncStartRequest),
42        /// Finishes a cloud sync with the signed server time
43        #[prost(message, tag = "259")]
44        CloudSyncFinish(super::CloudSyncFinishRequest),
45        /// Requests a proof of the device's genuinity
46        #[prost(message, tag = "260")]
47        GenuinityProof(super::GenuinityProofRequest),
48        /// Prepares an update, aborting any in progress
49        #[prost(message, tag = "513")]
50        FirmwareUpdatePrep(super::FirmwareUpdatePrepRequest),
51        /// Initiates a prepared update with the sealed firmware key
52        #[prost(message, tag = "514")]
53        FirmwareUpdateInit(super::FirmwareUpdateInitRequest),
54        /// Appends a chunk of the firmware archive
55        #[prost(message, tag = "515")]
56        FirmwareUpdateUpload(super::FirmwareUpdateUploadRequest),
57        /// Decrypts and verifies the uploaded firmware
58        #[prost(message, tag = "516")]
59        FirmwareUpdateVerify(super::FirmwareUpdateVerifyRequest),
60        /// Installs the verified firmware and reboots
61        #[prost(message, tag = "517")]
62        FirmwareUpdateInstall(super::FirmwareUpdateInstallRequest),
63        /// Asks the Ark to authorize a pairing rendezvous
64        #[prost(message, tag = "769")]
65        PairingAuth(super::PairingAuthRequest),
66        /// Injects the companion app's identity, relayed by the cloud
67        #[prost(message, tag = "770")]
68        PairingSetAppId(super::PairingSetAppIdentityRequest),
69        /// Injects the companion app's storage key material
70        #[prost(message, tag = "771")]
71        PairingSetAppStorage(super::PairingSetAppStorageRequest),
72        /// Confirms the app received the Ark's key material
73        #[prost(message, tag = "772")]
74        PairingAckArkStorage(super::PairingAckArkStorageRequest),
75        /// Waits for the user to accept the pairing
76        #[prost(message, tag = "773")]
77        PairingAccept(super::PairingAcceptanceRequest),
78        /// Waits for the Ark to finish pairing maintenance
79        #[prost(message, tag = "774")]
80        PairingComplete(super::PairingCompletionRequest),
81        /// Asks the Ark to authorize joining the app relay
82        #[prost(message, tag = "1025")]
83        RelayJoin(super::RelayJoinRequest),
84        /// Forwards one frame from the relay socket to the Ark
85        #[prost(message, tag = "1026")]
86        RelayInbound(super::RelayInboundRequest),
87        /// Confirms the relay socket accepted the frame
88        #[prost(message, tag = "1027")]
89        RelayOutbound(super::RelayOutboundResponse),
90        /// Starts the unlock, confirmed through the app
91        #[prost(message, tag = "1281")]
92        Unlock(super::UnlockRequest),
93        /// Begins a chunked upload of an app to execute
94        #[prost(message, tag = "1282")]
95        ExecUploadStart(super::ExecutionUploadStartRequest),
96        /// Appends a chunk to a pending app upload
97        #[prost(message, tag = "1283")]
98        ExecUploadChunk(super::ExecutionUploadChunkRequest),
99        /// Runs an uploaded app, confirmed through the app
100        #[prost(message, tag = "1284")]
101        ExecSched(super::ExecutionScheduleRequest),
102        /// Checks where a scheduled task stands
103        #[prost(message, tag = "1285")]
104        ExecStatus(super::ExecutionStatusRequest),
105        /// Cancels a task or a pending upload
106        #[prost(message, tag = "1286")]
107        ExecCancel(super::ExecutionCancelRequest),
108        /// Fetches the result of a resolved task
109        #[prost(message, tag = "1287")]
110        ExecResult(super::ExecutionResultRequest),
111        /// Reads the next piece of a released task's output
112        #[prost(message, tag = "1288")]
113        ExecOutput(super::ExecutionOutputRequest),
114        /// Lists the state of every data slot
115        #[prost(message, tag = "1537")]
116        SlotList(super::SlotListRequest),
117        /// Resets a slot to empty whatever its state
118        #[prost(message, tag = "1538")]
119        SlotRepair(super::SlotRepairRequest),
120        /// Removes the contents of a filled slot
121        #[prost(message, tag = "1539")]
122        SlotDelete(super::SlotDeleteRequest),
123        /// Asks the Ark to identify a file from its first chunk
124        #[prost(message, tag = "1540")]
125        SlotIdentify(super::SlotIdentifyRequest),
126        /// Starts uploading a file into a slot
127        #[prost(message, tag = "1541")]
128        SlotUploadStart(super::SlotUploadStartRequest),
129        /// Appends a chunk to a pending slot upload
130        #[prost(message, tag = "1542")]
131        SlotUploadChunk(super::SlotUploadChunkRequest),
132        /// Aborts a pending slot upload
133        #[prost(message, tag = "1543")]
134        SlotUploadCancel(super::SlotUploadCancelRequest),
135        /// Marks an upload complete and polls its processing
136        #[prost(message, tag = "1544")]
137        SlotUploadProcess(super::SlotUploadProcessRequest),
138        /// Maps every path an app can read, from the dataset view
139        #[prost(message, tag = "1793")]
140        DatasetPaths(super::DatasetPathsRequest),
141        /// Unreleased messages served by development firmware only, carried opaquely
142        /// so the public protocol is untouched while they are still under development.
143        /// Their schema is private and production Arks refuse the envelope.
144        #[prost(bytes, tag = "4096")]
145        Develop(::prost::alloc::vec::Vec<u8>),
146    }
147}
148/// ArkToHost represents a message sent from the Ark to the host via the USB
149/// connection. It embeds all possible message types to keep the protocol simple.
150///
151/// Every message carries an id and is either a request, its id chosen by the
152/// Ark, or the Ark's response to a request of the host, echoing the host's id.
153/// To avoid id collisions, hosts allocate odd ids and Arks even ones, so the
154/// parity of the id alone distinguishes a response from a request.
155#[derive(Clone, PartialEq, ::prost::Message)]
156pub struct ArkToHost {
157    /// Enveloping fields, reserved range 0x001-0x0ff
158    ///
159    /// Request identifier, responded to or the Ark's own
160    #[prost(uint64, tag = "1")]
161    pub id: u64,
162    /// Error encountered while serving the host's request (if any)
163    #[prost(message, optional, tag = "2")]
164    pub err: ::core::option::Option<Error>,
165    /// Body of the message, a response of the Ark to a request of the host or a
166    /// request of its own. The tags are grouped by area, each area with its own range.
167    #[prost(
168        oneof = "ark_to_host::Content",
169        tags = "256, 257, 258, 259, 260, 513, 514, 515, 516, 517, 769, 770, 771, 772, 773, 774, 1025, 1026, 1027, 1281, 1282, 1283, 1284, 1285, 1286, 1287, 1288, 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 1793, 4096"
170    )]
171    pub content: ::core::option::Option<ark_to_host::Content>,
172}
173/// Nested message and enum types in `ArkToHost`.
174pub mod ark_to_host {
175    /// Body of the message, a response of the Ark to a request of the host or a
176    /// request of its own. The tags are grouped by area, each area with its own range.
177    #[derive(Clone, PartialEq, ::prost::Oneof)]
178    pub enum Content {
179        /// Acknowledges the onboarding
180        #[prost(message, tag = "256")]
181        Onboard(super::OnboardingResponse),
182        /// Hardware and firmware versions of the Ark
183        #[prost(message, tag = "257")]
184        DeviceInfo(super::DeviceInfoResponse),
185        /// Challenge for the cloud to sign along its time
186        #[prost(message, tag = "258")]
187        CloudSyncStart(super::CloudSyncStartResponse),
188        /// Timestamp the Ark accepted from the cloud
189        #[prost(message, tag = "259")]
190        CloudSyncFinish(super::CloudSyncFinishResponse),
191        /// Encrypted proof of the Ark's genuinity for the cloud
192        #[prost(message, tag = "260")]
193        GenuinityProof(super::GenuinityProofResponse),
194        /// Ephemeral key to receive the firmware key with, sealed for the cloud
195        #[prost(message, tag = "513")]
196        FirmwareUpdatePrep(super::FirmwareUpdatePrepResponse),
197        /// Acknowledges the initiated update
198        #[prost(message, tag = "514")]
199        FirmwareUpdateInit(super::FirmwareUpdateInitResponse),
200        /// Acknowledges the appended firmware chunk
201        #[prost(message, tag = "515")]
202        FirmwareUpdateUpload(super::FirmwareUpdateUploadResponse),
203        /// Acknowledges the verified firmware
204        #[prost(message, tag = "516")]
205        FirmwareUpdateVerify(super::FirmwareUpdateVerifyResponse),
206        /// Acknowledges the installed firmware
207        #[prost(message, tag = "517")]
208        FirmwareUpdateInstall(super::FirmwareUpdateInstallResponse),
209        /// Signed authorization for the cloud to open a rendezvous
210        #[prost(message, tag = "769")]
211        PairingAuth(super::PairingAuthResponse),
212        /// Acknowledges the accepted app identity
213        #[prost(message, tag = "770")]
214        PairingSetAppId(super::PairingSetAppIdentityResponse),
215        /// Ark device infos and key material, sealed for the app
216        #[prost(message, tag = "771")]
217        PairingSetAppStorage(super::PairingSetAppStorageResponse),
218        /// Acknowledges the app's receipt of the Ark's keys
219        #[prost(message, tag = "772")]
220        PairingAckArkStorage(super::PairingAckArkStorageResponse),
221        /// Signed confirmation that the user accepted the pairing
222        #[prost(message, tag = "773")]
223        PairingAccept(super::PairingAcceptanceResponse),
224        /// Signed confirmation that the Ark finished pairing
225        #[prost(message, tag = "774")]
226        PairingComplete(super::PairingCompletionResponse),
227        /// Signed authorization for the cloud to join the relay
228        #[prost(message, tag = "1025")]
229        RelayJoin(super::RelayJoinResponse),
230        /// Confirms the Ark opened the frame
231        #[prost(message, tag = "1026")]
232        RelayInbound(super::RelayInboundResponse),
233        /// Asks the host to write one frame to its relay socket
234        #[prost(message, tag = "1027")]
235        RelayOutbound(super::RelayOutboundRequest),
236        /// Acknowledges the completed unlock
237        #[prost(message, tag = "1281")]
238        Unlock(super::UnlockResponse),
239        /// Task id for the later messages
240        #[prost(message, tag = "1282")]
241        ExecUploadStart(super::ExecutionUploadStartResponse),
242        /// Acknowledges the appended app chunk
243        #[prost(message, tag = "1283")]
244        ExecUploadChunk(super::ExecutionUploadChunkResponse),
245        /// Acknowledges the approved task, whose app now runs
246        #[prost(message, tag = "1284")]
247        ExecSched(super::ExecutionScheduleResponse),
248        /// Where the scheduled task stands
249        #[prost(message, tag = "1285")]
250        ExecStatus(super::ExecutionStatusResponse),
251        /// Acknowledges the canceled task or upload
252        #[prost(message, tag = "1286")]
253        ExecCancel(super::ExecutionCancelResponse),
254        /// What the owner saw when releasing the output
255        #[prost(message, tag = "1287")]
256        ExecResult(super::ExecutionResultResponse),
257        /// Next piece of the requested output stream
258        #[prost(message, tag = "1288")]
259        ExecOutput(super::ExecutionOutputResponse),
260        /// Current state of every data slot
261        #[prost(message, tag = "1537")]
262        SlotList(super::SlotListResponse),
263        /// Acknowledges the reset slot
264        #[prost(message, tag = "1538")]
265        SlotRepair(super::SlotRepairResponse),
266        /// Acknowledges the deleted slot
267        #[prost(message, tag = "1539")]
268        SlotDelete(super::SlotDeleteResponse),
269        /// Identification of the file's first chunk
270        #[prost(message, tag = "1540")]
271        SlotIdentify(super::SlotIdentifyResponse),
272        /// Session id of the approved upload
273        #[prost(message, tag = "1541")]
274        SlotUploadStart(super::SlotUploadStartResponse),
275        /// Acknowledges the appended slot chunk
276        #[prost(message, tag = "1542")]
277        SlotUploadChunk(super::SlotUploadChunkResponse),
278        /// Acknowledges the aborted upload
279        #[prost(message, tag = "1543")]
280        SlotUploadCancel(super::SlotUploadCancelResponse),
281        /// Processing progress of the completed upload
282        #[prost(message, tag = "1544")]
283        SlotUploadProcess(super::SlotUploadProcessResponse),
284        /// Every path an app can read, with its description, format and examples
285        #[prost(message, tag = "1793")]
286        DatasetPaths(super::DatasetPathsResponse),
287        /// Unreleased messages emitted by development firmware only, in response to
288        /// a develop request, carried opaquely so the public protocol is untouched
289        /// while they are still under development. Their schema is private.
290        #[prost(bytes, tag = "4096")]
291        Develop(::prost::alloc::vec::Vec<u8>),
292    }
293}
294/// Error answers a failed request, in place of the response content.
295///
296/// Codes 0x00 through 0xff (inclusive) are reserved for protocol-wide errors.
297/// Codes 0x100 and above are defined by the request type and may be reused
298/// with different meanings for different requests. The message text is human
299/// readable, not a stable code.
300#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
301pub struct Error {
302    /// Error code for programmatic interpretation
303    #[prost(uint64, tag = "1")]
304    pub code: u64,
305    /// Error message for user interfacing
306    #[prost(string, tag = "2")]
307    pub msg: ::prost::alloc::string::String,
308}
309/// OnboardingRequest is a vendor utility to onboard an Ark. Currently it contains
310/// the signed device genuinity attestation (certificate).
311///
312/// Note, as this method is only used during initial device setup, there is no API
313/// compatibility guarantee, it will evolve with the factory tooling.
314#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
315pub struct OnboardingRequest {
316    /// Signed device genuinity attestation (CWT) to install
317    #[prost(bytes = "vec", tag = "1")]
318    pub device_attestation: ::prost::alloc::vec::Vec<u8>,
319}
320/// OnboardingResponse is the acknowledgement of the onboarding.
321#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
322pub struct OnboardingResponse {}
323/// DeviceInfoRequest is sent by the host to fetch the Ark's device stats.
324#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
325pub struct DeviceInfoRequest {}
326/// DeviceInfoResponse returns various hardware and software version information.
327#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
328pub struct DeviceInfoResponse {
329    /// Ark device version (defines the major features)
330    #[prost(uint32, tag = "1")]
331    pub version_id: u32,
332    /// Ark device version label (as known by the device)
333    #[prost(string, tag = "2")]
334    pub version_str: ::prost::alloc::string::String,
335    /// Ark device revision (defines the minor differences)
336    #[prost(uint32, tag = "3")]
337    pub revision_id: u32,
338    /// Ark device revision label (as known by the device)
339    #[prost(string, tag = "4")]
340    pub revision_str: ::prost::alloc::string::String,
341    /// Current firmware version (X.Y.Z-commit)
342    #[prost(string, tag = "7")]
343    pub firmware_version: ::prost::alloc::string::String,
344    /// Current firmware publish unix timestamp
345    #[prost(uint64, tag = "8")]
346    pub firmware_publish: u64,
347    /// Whether a cloud identity was accepted since boot
348    #[prost(bool, tag = "9")]
349    pub cloud_synced: bool,
350    /// Current device clock unix timestamp, set by the cloud sync
351    #[prost(uint64, tag = "10")]
352    pub cloud_clock: u64,
353    /// Whether the Ark is paired with a companion app (user data initialized)
354    #[prost(bool, tag = "11")]
355    pub paired: bool,
356    /// Whether the user data storage is open (false if unpaired)
357    #[prost(bool, tag = "12")]
358    pub unlocked: bool,
359}
360/// CloudSyncStartRequest requests the device to start a synchronization procedure
361/// against the cloud servers to establish the current time as well as the currently
362/// active cloud identity.
363#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
364pub struct CloudSyncStartRequest {
365    /// Post-quantum CWT attestation for the server signing (xDSA) key
366    #[prost(bytes = "vec", tag = "1")]
367    pub signer: ::prost::alloc::vec::Vec<u8>,
368    /// Post-quantum CWT attestation for the server encryption (xHPKE) key
369    #[prost(bytes = "vec", tag = "2")]
370    pub crypto: ::prost::alloc::vec::Vec<u8>,
371}
372/// CloudSyncStartResponse is an initiation of a cloud sync from the device, authed
373/// to the requested cloud identity.
374#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
375pub struct CloudSyncStartResponse {
376    /// Random nonce to avoid malicious host machines setting bad times
377    #[prost(bytes = "vec", tag = "1")]
378    pub challenge: ::prost::alloc::vec::Vec<u8>,
379}
380/// CloudSyncFinishRequest is the completion of a previously initiated cloud sync
381/// procedure, this time being signed by a single identity currently used by the
382/// cloud.
383#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
384pub struct CloudSyncFinishRequest {
385    /// Unix timestamp from the server in milliseconds
386    #[prost(uint64, tag = "1")]
387    pub unixmilli: u64,
388    /// SignAt[Cloud]["cloudsync-v1"][unixmilli/1000](CBOR(challenge))
389    #[prost(bytes = "vec", tag = "2")]
390    pub signature: ::prost::alloc::vec::Vec<u8>,
391}
392/// CloudSyncFinishResponse is the acknowledgement whether the device accepted the
393/// cloud sync from the server or rejected for some reason.
394#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
395pub struct CloudSyncFinishResponse {
396    /// Timestamp that was accepted and set
397    #[prost(uint64, tag = "1")]
398    pub accepted: u64,
399}
400/// GenuinityProofRequest requests the device to generate a cryptographic proof of
401/// its own authenticity.
402#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
403pub struct GenuinityProofRequest {}
404/// GenuinityProofResponse is the device genuinity proof, an encrypted signature
405/// of the device.
406#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
407pub struct GenuinityProofResponse {
408    /// Seal[Ark->Cloud]["genuinity-v1"][null](null)
409    #[prost(bytes = "vec", tag = "1")]
410    pub proof: ::prost::alloc::vec::Vec<u8>,
411}
412/// FirmwareUpdatePrepRequest prepares a firmware update procedure. If any previous
413/// update procedure was in progress, it is aborted.
414#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
415pub struct FirmwareUpdatePrepRequest {
416    /// Version string to update to
417    #[prost(string, tag = "1")]
418    pub version: ::prost::alloc::string::String,
419    /// SHA256 hash of the (encrypted) firmware archive
420    #[prost(bytes = "vec", tag = "2")]
421    pub sha256: ::prost::alloc::vec::Vec<u8>,
422    /// Number of bytes (progress purposes, ignored otherwise)
423    #[prost(uint64, tag = "3")]
424    pub bytes: u64,
425}
426/// FirmwareUpdatePrepResponse confirms that a new firmware update procedure
427/// started. A rejected request gets an error instead.
428///
429/// The Ark generates a fresh ephemeral encryption key to receive the firmware
430/// access key. Its public half is sealed to the cloud, bound to the requested
431/// version and hash.
432#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
433pub struct FirmwareUpdatePrepResponse {
434    /// Seal[Ark->Cloud]["firmware-v1"][\[version, sha256\]](temp-key)
435    #[prost(bytes = "vec", tag = "1")]
436    pub auth: ::prost::alloc::vec::Vec<u8>,
437}
438/// FirmwareUpdateInitRequest initiates a previously prepared firmware update
439/// procedure by providing the authenticated and encrypted firmware key.
440///
441/// Note, if the initiation is rejected, the entire update process is torn down.
442#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
443pub struct FirmwareUpdateInitRequest {
444    /// Seal[Cloud->temp-key]["firmware-v1"][\[version, sha256\]](sym-key)
445    #[prost(bytes = "vec", tag = "1")]
446    pub access: ::prost::alloc::vec::Vec<u8>,
447}
448/// FirmwareUpdateInitResponse acknowledges the initiated update procedure. A
449/// rejected request gets an error instead.
450///
451/// Note, if the init is rejected, the entire update process is torn down.
452#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
453pub struct FirmwareUpdateInitResponse {}
454/// FirmwareUpdateUploadRequest requests appending a new chunk of data to the
455/// currently pending firmware upload process.
456#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
457pub struct FirmwareUpdateUploadRequest {
458    /// Chunk of firmware blob to append (reasonably capped)
459    #[prost(bytes = "vec", tag = "1")]
460    pub chunk: ::prost::alloc::vec::Vec<u8>,
461}
462/// FirmwareUpdateUploadResponse is the response whether the requested chunk was
463/// accepted or rejected.
464///
465/// Note, if the upload is rejected, the entire update process is torn down.
466#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
467pub struct FirmwareUpdateUploadResponse {}
468/// FirmwareUpdateVerifyRequest requests decrypting the uploaded firmware and
469/// verifying its contents, preparing for the last step of actually installing
470/// the firmware update.
471#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
472pub struct FirmwareUpdateVerifyRequest {}
473/// FirmwareUpdateVerifyResponse is the response whether the firmware just uploaded
474/// passed all verifications and is ready for application.
475///
476/// Note, if the verification is rejected, the entire update process is torn down.
477#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
478pub struct FirmwareUpdateVerifyResponse {}
479/// FirmwareUpdateInstallRequest requests the currently pending (but already
480/// verified) firmware to be applied to disk. This message will cause the device
481/// to reboot if applied successfully.
482#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
483pub struct FirmwareUpdateInstallRequest {}
484/// FirmwareUpdateInstallResponse is the response whether the firmware was applied
485/// successfully or not.
486#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
487pub struct FirmwareUpdateInstallResponse {}
488/// PairingAuthRequest requests the initiation of a pairing.
489#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
490pub struct PairingAuthRequest {}
491/// PairingAuthResponse responds whether the device is in a state compatible with
492/// pairing (i.e. reset) and if so, it signs an authorization for the server to open
493/// a new rendezvous point; containing the xHPKE public key to use for encrypting
494/// messages to this Ark after pairing.
495#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
496pub struct PairingAuthResponse {
497    /// Seal[Ark->Cloud]["pairing-v1"][null](pair-key)
498    #[prost(bytes = "vec", tag = "1")]
499    pub auth: ::prost::alloc::vec::Vec<u8>,
500    /// Fingerprint of the pair-key to transmit to the app out-of-protocol
501    #[prost(bytes = "vec", tag = "2")]
502    pub fprint: ::prost::alloc::vec::Vec<u8>,
503}
504/// PairingSetAppIdentityRequest injects the companion app's identity, relayed
505/// by the cloud.
506#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
507pub struct PairingSetAppIdentityRequest {
508    /// Seal[Cloud->Ark]["pairing-v1:identity"][\[ark_signer_id, ark_crypto_id\]](\[app_signer, app_crypto\])
509    #[prost(bytes = "vec", tag = "1")]
510    pub identity: ::prost::alloc::vec::Vec<u8>,
511}
512/// PairingSetAppIdentityResponse confirms whether the remote identity was
513/// accepted by the Ark or not.
514#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
515pub struct PairingSetAppIdentityResponse {}
516/// PairingSetAppStorageRequest injects the app's storage key material into the
517/// pairing flow.
518#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
519pub struct PairingSetAppStorageRequest {
520    /// Seal[App->Ark]["pairing-v1:storage"][\[ark_signer_id, ark_crypto_id, app_signer_id, app_crypto_id\]](\[app_keymat\])
521    #[prost(bytes = "vec", tag = "1")]
522    pub app_key: ::prost::alloc::vec::Vec<u8>,
523}
524/// PairingSetAppStorageResponse confirms whether the remote storage material
525/// was accepted, and if so, bundles the ark device infos and ark key material.
526#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
527pub struct PairingSetAppStorageResponse {
528    /// Seal[Ark->App]["pairing-v1:storage"][\[ark_signer_id, ark_crypto_id, app_signer_id, app_crypto_id, app_keymat\]](\[hw_ver, hw_rev, fw_ver, fw_pub, ark_keymat\])
529    #[prost(bytes = "vec", tag = "1")]
530    pub ark_keys: ::prost::alloc::vec::Vec<u8>,
531}
532/// PairingAckArkStorageRequest confirms from the app that the Ark's key material
533/// was received correctly.
534#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
535pub struct PairingAckArkStorageRequest {
536    /// Seal[App->Ark]["pairing-v1:storage"][\[ark_signer_id, ark_crypto_id, app_signer_id, app_crypto_id, ark_keymat\]](null)
537    #[prost(bytes = "vec", tag = "1")]
538    pub app_ack: ::prost::alloc::vec::Vec<u8>,
539}
540/// PairingAckArkStorageResponse confirms that the key ack was accepted.
541#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
542pub struct PairingAckArkStorageResponse {}
543/// PairingAcceptanceRequest is a blocking poller to wait until the user accepts
544/// a pairing request or it times out.
545#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
546pub struct PairingAcceptanceRequest {}
547/// PairingAcceptanceResponse returns whether the user accepted the pairing or
548/// if it timed out. At this point, the device still needs to format itself.
549#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
550pub struct PairingAcceptanceResponse {
551    /// Seal[Ark->Cloud]["pairing-v1:accept"][\[ark_signer_id, ark_crypto_id, app_signer_id, app_crypto_id\]](null)
552    #[prost(bytes = "vec", tag = "1")]
553    pub confirm: ::prost::alloc::vec::Vec<u8>,
554}
555/// PairingCompletionRequest is a blocking poller to wait until the device finishes
556/// any pairing maintenance operation (e.g. encrypting itself).
557#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
558pub struct PairingCompletionRequest {}
559/// PairingCompletionResponse returns whether the device finished preparing for
560/// live operation.
561#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
562pub struct PairingCompletionResponse {
563    /// Seal[Ark->Cloud]["pairing-v1:complete"][\[ark_signer_id, ark_crypto_id, app_signer_id, app_crypto_id\]](null)
564    #[prost(bytes = "vec", tag = "1")]
565    pub confirm: ::prost::alloc::vec::Vec<u8>,
566}
567/// RelayJoinRequest requests authorization to join the communication relay with
568/// the companion app.
569#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
570pub struct RelayJoinRequest {}
571/// RelayJoinResponse responds whether the device is in a state compatible with
572/// relaying (i.e. paired) and if so, it signs an authorization for the server
573/// to join the rendezvous point.
574#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
575pub struct RelayJoinResponse {
576    /// Seal[Ark->Cloud]["relaying-v2:join"][cloud_crypto_id](null)
577    #[prost(bytes = "vec", tag = "1")]
578    pub auth: ::prost::alloc::vec::Vec<u8>,
579}
580/// RelayInboundRequest forwards one frame from the host's relay socket to the Ark.
581///
582/// The relay connects the Ark with its companion app through the host and the
583/// cloud. Its frames are opaque to the host, which forwards them unchanged in
584/// both directions and never interprets them. Each frame is sealed to its
585/// recipient by the other endpoint, or by the cloud itself, and its
586/// authenticated data names the recipient's encryption key.
587///
588/// The host sends one request for each message its relay socket delivers, in
589/// arrival order.
590#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
591pub struct RelayInboundRequest {
592    /// Seal[App|Cloud->Ark]["relaying-v2:frame"][ark_crypto_id](...)
593    #[prost(bytes = "vec", tag = "1")]
594    pub frame: ::prost::alloc::vec::Vec<u8>,
595}
596/// RelayInboundResponse confirms the Ark opened the frame, which decrypted and
597/// verified. The Ark answers before acting on the frame's content, and refuses
598/// a frame it cannot open with an error whose message names the cause.
599#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
600pub struct RelayInboundResponse {}
601/// RelayOutboundRequest asks the host to write one frame to its relay socket.
602///
603/// A host without a relay socket attaches one first through relay_join. If it
604/// cannot, it answers with the reserved UNAVAILABLE error.
605#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
606pub struct RelayOutboundRequest {
607    /// Seal[Ark->App]["relaying-v2:frame"][app_crypto_id](...)
608    #[prost(bytes = "vec", tag = "1")]
609    pub frame: ::prost::alloc::vec::Vec<u8>,
610}
611/// RelayOutboundResponse confirms that the relay socket accepted the frame, which
612/// does not mean the frame reached the app.
613#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
614pub struct RelayOutboundResponse {}
615/// UnlockRequest asks the Ark to open its user data storage.
616///
617/// The Ark answers once the owner approves or declines on their phone, or the
618/// approval window runs out.
619#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
620pub struct UnlockRequest {}
621/// UnlockResponse acknowledges the completed unlock. Any other outcome gets an
622/// error instead.
623#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
624pub struct UnlockResponse {}
625/// ExecutionUploadStartRequest begins a chunked upload of a WASM binary to
626/// execute. The declared size is used to pre-allocate the receive buffer and
627/// to reject oversized uploads early; the actual bytes are sent via subsequent
628/// ExecutionUploadChunkRequest messages.
629#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
630pub struct ExecutionUploadStartRequest {
631    /// Total binary size in bytes
632    #[prost(uint64, tag = "1")]
633    pub bytes: u64,
634}
635/// ExecutionUploadStartResponse contains the id of the new task, which every
636/// later message about it carries. The task belongs to the session that opened
637/// it. When that session ends, the Ark drops the task whatever its stage,
638/// canceling a running app.
639#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
640pub struct ExecutionUploadStartResponse {
641    /// Task id to stream chunks into
642    #[prost(uint64, tag = "1")]
643    pub taskid: u64,
644}
645/// ExecutionUploadChunkRequest appends a chunk of data to a pending upload.
646/// Chunks must be appended in order and must not overrun the declared size.
647#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
648pub struct ExecutionUploadChunkRequest {
649    /// Task id to append to
650    #[prost(uint64, tag = "1")]
651    pub taskid: u64,
652    /// Data chunk to append (reasonably capped)
653    #[prost(bytes = "vec", tag = "2")]
654    pub chunk: ::prost::alloc::vec::Vec<u8>,
655}
656/// ExecutionUploadChunkResponse is an empty ack of the chunk upload request.
657#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
658pub struct ExecutionUploadChunkResponse {}
659/// ExecutionScheduleRequest finalizes an upload and requests the device to
660/// execute the uploaded 3rd party app. The upload must have been completed
661/// (i.e. the sum of chunk sizes matches the declared size).
662///
663/// The Ark answers once the owner approves or declines on their phone, or the
664/// approval window runs out.
665#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
666pub struct ExecutionScheduleRequest {
667    /// Task id returned by ExecutionUploadStartResponse
668    #[prost(uint64, tag = "1")]
669    pub taskid: u64,
670}
671/// ExecutionScheduleResponse acks that the owner approved the task and its app
672/// now runs. The host already holds the task id from the preceding
673/// ExecutionUploadStartResponse.
674#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
675pub struct ExecutionScheduleResponse {}
676/// ExecutionCancelRequest cancels an upload, a task awaiting the owner's
677/// approval or a running app. An interrupted app fails, and its report goes to
678/// the owner's review like any other. A task whose app already ended cannot be
679/// canceled.
680#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
681pub struct ExecutionCancelRequest {
682    /// Task id to cancel
683    #[prost(uint64, tag = "1")]
684    pub taskid: u64,
685}
686/// ExecutionCancelResponse acknowledges the canceled task or upload.
687#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
688pub struct ExecutionCancelResponse {}
689/// ExecutionStatusRequest checks where a scheduled task stands. Only the
690/// session that scheduled the task can check it.
691#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
692pub struct ExecutionStatusRequest {
693    /// Task id to check
694    #[prost(uint64, tag = "1")]
695    pub taskid: u64,
696}
697/// ExecutionStatusResponse reports where a scheduled task stands.
698#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
699pub struct ExecutionStatusResponse {
700    /// Where the task stands
701    #[prost(enumeration = "ExecutionState", tag = "3")]
702    pub state: i32,
703}
704/// ExecutionResultRequest fetches the result of a resolved task.
705///
706/// A released task answers with what the owner saw, the same until the task
707/// closes for the host. A withheld task fails it with the reserved error its
708/// report's approval closed with, and that failure closes the task.
709#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
710pub struct ExecutionResultRequest {
711    /// Task id to fetch the result of
712    #[prost(uint64, tag = "1")]
713    pub taskid: u64,
714}
715/// ExecutionResultResponse holds what the owner saw when releasing the task's
716/// output, which the host then reads through ExecutionOutputRequest.
717#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
718pub struct ExecutionResultResponse {
719    /// App name from its manifest
720    #[prost(string, tag = "1")]
721    pub name: ::prost::alloc::string::String,
722    /// App version from its manifest
723    #[prost(string, tag = "2")]
724    pub version: ::prost::alloc::string::String,
725    /// Whether the app is a develop build
726    #[prost(bool, tag = "3")]
727    pub develop: bool,
728    /// Whether the app succeeded
729    #[prost(bool, tag = "4")]
730    pub success: bool,
731    /// Paths of the owner's data as mounted, without public grants
732    #[prost(string, repeated, tag = "5")]
733    pub paths: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
734    /// Media type of the report, such as text/markdown
735    #[prost(string, tag = "6")]
736    pub media: ::prost::alloc::string::String,
737    /// Length in bytes of the report, the app's standard output
738    #[prost(uint64, tag = "7")]
739    pub stdout_bytes: u64,
740    /// Length in bytes of a develop build's standard error, 0 otherwise
741    #[prost(uint64, tag = "8")]
742    pub stderr_bytes: u64,
743}
744/// ExecutionOutputRequest reads the next piece of a released task's output.
745///
746/// Each stream is read once and in order, in pieces of the size the host asks
747/// for. The Ark refuses a size of zero, or one whose answer would not fit a
748/// wire message. The task closes for the host once exec_result has answered
749/// and both streams are read to their end.
750#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
751pub struct ExecutionOutputRequest {
752    /// Task id to read the output of
753    #[prost(uint64, tag = "1")]
754    pub taskid: u64,
755    /// Stream to read
756    #[prost(enumeration = "ExecutionStream", tag = "2")]
757    pub stream: i32,
758    /// Bytes of the stream read so far, the only offset the Ark accepts
759    #[prost(uint64, tag = "3")]
760    pub offset: u64,
761    /// Most bytes to return, chosen by the host
762    #[prost(uint64, tag = "4")]
763    pub size: u64,
764}
765/// ExecutionOutputResponse carries the next piece of the requested stream.
766#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
767pub struct ExecutionOutputResponse {
768    /// The requested bytes, fewer only at the stream's end
769    #[prost(bytes = "vec", tag = "1")]
770    pub chunk: ::prost::alloc::vec::Vec<u8>,
771}
772/// SlotDownload describes the public download the device advertises for a
773/// reference slot, so a host can fetch it and stream it back in.
774#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
775pub struct SlotDownload {
776    /// Public download URL
777    #[prost(string, tag = "1")]
778    pub url: ::prost::alloc::string::String,
779    /// Download size in bytes
780    #[prost(uint64, tag = "2")]
781    pub bytes: u64,
782    /// Download SHA256 checksum
783    #[prost(string, tag = "3")]
784    pub sha256: ::prost::alloc::string::String,
785}
786/// SlotStatus describes the current state of a single slot on the device. The
787/// data fields are generic so a host renders a kind it has never seen.
788#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
789pub struct SlotStatus {
790    /// Slot type
791    #[prost(enumeration = "SlotKind", tag = "1")]
792    pub kind: i32,
793    /// Human-readable slot name
794    #[prost(string, tag = "2")]
795    pub name: ::prost::alloc::string::String,
796    /// Owner-facing description of the data this slot holds
797    #[prost(string, tag = "3")]
798    pub desc: ::prost::alloc::string::String,
799    /// The file that fills this slot, its required shape and what is refused
800    #[prost(string, tag = "4")]
801    pub format: ::prost::alloc::string::String,
802    /// Nature of the data (personal, reference)
803    #[prost(enumeration = "SlotOrigin", tag = "5")]
804    pub origin: i32,
805    /// Whether the slot is empty, filled or damaged
806    #[prost(enumeration = "SlotState", tag = "6")]
807    pub state: i32,
808    /// Why the slot is damaged, empty otherwise
809    #[prost(string, tag = "7")]
810    pub damage: ::prost::alloc::string::String,
811    /// Slots that must be filled before this one is actionable
812    #[prost(enumeration = "SlotKind", repeated, tag = "8")]
813    pub deps: ::prost::alloc::vec::Vec<i32>,
814    /// Bytes on disk for this slot (0 if empty)
815    #[prost(uint64, tag = "9")]
816    pub bytes: u64,
817    /// Reference assembly the data is keyed to (e.g. "GRCh38.p14")
818    #[prost(string, tag = "10")]
819    pub build: ::prost::alloc::string::String,
820    /// The dataset's own release, if it has one (e.g. dbSNP "157")
821    #[prost(string, tag = "11")]
822    pub version: ::prost::alloc::string::String,
823    /// Advertised public download, absent if none
824    #[prost(message, optional, tag = "12")]
825    pub download: ::core::option::Option<SlotDownload>,
826}
827/// SlotListRequest requests the state of all slots on the device.
828#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
829pub struct SlotListRequest {}
830/// SlotListResponse contains the current state of every slot.
831#[derive(Clone, PartialEq, ::prost::Message)]
832pub struct SlotListResponse {
833    /// State of every slot, one entry per slot kind
834    #[prost(message, repeated, tag = "1")]
835    pub slots: ::prost::alloc::vec::Vec<SlotStatus>,
836}
837/// SlotRepairRequest resets a slot to empty regardless of its current state.
838/// Unlike SlotDelete (which requires the slot to be filled), repair is a stateless
839/// force cleanup that removes any leftover metadata and/or files on disk. It is
840/// intended for recovering from corruption or half-written state after crashes.
841#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
842pub struct SlotRepairRequest {
843    /// Slot to repair (reset to empty)
844    #[prost(enumeration = "SlotKind", tag = "1")]
845    pub slot: i32,
846}
847/// SlotRepairResponse is an empty ack of the repair request.
848#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
849pub struct SlotRepairResponse {}
850/// SlotDeleteRequest removes the contents of a filled slot. The slot must be
851/// in a healthy, filled state; corrupted or half-written slots must be cleaned
852/// up via SlotRepair instead.
853#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
854pub struct SlotDeleteRequest {
855    /// Slot to delete
856    #[prost(enumeration = "SlotKind", tag = "1")]
857    pub slot: i32,
858}
859/// SlotDeleteResponse is an empty ack of the delete request.
860#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
861pub struct SlotDeleteResponse {}
862/// SlotIdentifyRequest sends an ephemeral file chunk to the Ark and asks it to
863/// identify the file. Its purpose is to filter potentially huge files (e.g. a
864/// 30GB compressed whole genome sequencing) before uploading them, and to
865/// answer what a file is without uploading it at all.
866#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
867pub struct SlotIdentifyRequest {
868    /// File name to guess the contents of
869    #[prost(string, tag = "1")]
870    pub name: ::prost::alloc::string::String,
871    /// File size to guess the contents of
872    #[prost(uint64, tag = "2")]
873    pub size: u64,
874    /// First chunk of the file to guess the contents of
875    #[prost(bytes = "vec", tag = "3")]
876    pub chunk: ::prost::alloc::vec::Vec<u8>,
877    /// Possible slots to interpret as (empty == any)
878    #[prost(enumeration = "SlotKind", repeated, tag = "4")]
879    pub kinds: ::prost::alloc::vec::Vec<i32>,
880}
881/// SlotIdentifyResponse contains the identification based on the chunk shared
882/// in the request.
883#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
884pub struct SlotIdentifyResponse {
885    /// Identified slot type to use during upload
886    #[prost(enumeration = "SlotKind", tag = "1")]
887    pub kind: i32,
888    /// Identification confidence level
889    #[prost(enumeration = "SlotConfidence", tag = "2")]
890    pub conf: i32,
891    /// Short summary of the identified data
892    #[prost(string, tag = "3")]
893    pub summary: ::prost::alloc::string::String,
894    /// Detailed description of the identified data
895    #[prost(string, tag = "4")]
896    pub details: ::prost::alloc::string::String,
897    /// Reason why the file is rejected, empty otherwise
898    #[prost(string, tag = "5")]
899    pub rejection: ::prost::alloc::string::String,
900}
901/// SlotUploadStartRequest requests uploading a file into a slot of the given
902/// kind (e.g. a whole genome variant call file).
903#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
904pub struct SlotUploadStartRequest {
905    /// Slot type requesting to upload
906    #[prost(enumeration = "SlotKind", tag = "1")]
907    pub kind: i32,
908    /// File name to guess the contents of
909    #[prost(string, tag = "2")]
910    pub name: ::prost::alloc::string::String,
911    /// File size to guess the contents of
912    #[prost(uint64, tag = "3")]
913    pub size: u64,
914    /// First chunk of the file to guess the contents of
915    #[prost(bytes = "vec", tag = "4")]
916    pub chunk: ::prost::alloc::vec::Vec<u8>,
917}
918/// SlotUploadStartResponse contains a unique session id for an approved upload.
919#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
920pub struct SlotUploadStartResponse {
921    /// Session id for concurrent uploads (not recommended)
922    #[prost(uint64, tag = "1")]
923    pub session: u64,
924}
925/// SlotUploadChunkRequest contains a new chunk of data to append to a pending
926/// upload session.
927#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
928pub struct SlotUploadChunkRequest {
929    /// Session id into which to append a new chunk
930    #[prost(uint64, tag = "1")]
931    pub session: u64,
932    /// Data chunk to append (reasonably capped)
933    #[prost(bytes = "vec", tag = "2")]
934    pub chunk: ::prost::alloc::vec::Vec<u8>,
935}
936/// SlotUploadChunkResponse is an empty ack of the chunk upload request.
937#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
938pub struct SlotUploadChunkResponse {}
939/// SlotUploadCancelRequest contains an upload session id to abort.
940#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
941pub struct SlotUploadCancelRequest {
942    /// Session id to cancel
943    #[prost(uint64, tag = "1")]
944    pub session: u64,
945}
946/// SlotUploadCancelResponse is an empty ack of the cancellation request.
947#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
948pub struct SlotUploadCancelResponse {}
949/// SlotPhase names one step of a slot's processing pipeline.
950#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
951pub struct SlotPhase {
952    /// Short label for the phase
953    #[prost(string, tag = "1")]
954    pub name: ::prost::alloc::string::String,
955    /// Description of what the phase does
956    #[prost(string, tag = "2")]
957    pub desc: ::prost::alloc::string::String,
958}
959/// SlotUploadProcessRequest marks an upload session ready for processing and
960/// requests a progress report to be sent back. May be called multiple times.
961#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
962pub struct SlotUploadProcessRequest {
963    /// Session id to mark as completed
964    #[prost(uint64, tag = "1")]
965    pub session: u64,
966}
967/// SlotUploadProcessResponse acks the completion of a slot upload and also
968/// contains the current processing progress.
969#[derive(Clone, PartialEq, ::prost::Message)]
970pub struct SlotUploadProcessResponse {
971    /// Unix timestamp when data processing started
972    #[prost(uint64, tag = "1")]
973    pub proc_start: u64,
974    /// Every phase of the pipeline, in order
975    #[prost(message, repeated, tag = "2")]
976    pub phases: ::prost::alloc::vec::Vec<SlotPhase>,
977    /// Current phase (1-indexed)
978    #[prost(uint64, tag = "3")]
979    pub phase_in: u64,
980    /// Unix timestamp when the current phase started
981    #[prost(uint64, tag = "4")]
982    pub phase_start: u64,
983    /// Approximate progress for this phase \[0-10000\]
984    #[prost(uint64, tag = "5")]
985    pub phase_progress: u64,
986    /// Failure reason if processing failed, empty otherwise
987    #[prost(string, tag = "6")]
988    pub failure: ::prost::alloc::string::String,
989}
990/// DatasetPathsRequest requests the map of every path an app can read, the
991/// dataset view the device derives from its slots, lenses included.
992#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
993pub struct DatasetPathsRequest {}
994/// DatasetPathsResponse maps every path an app can read, available or not, in
995/// tree order. It describes the tree only and never carries a value from the
996/// owner's data.
997#[derive(Clone, PartialEq, ::prost::Message)]
998pub struct DatasetPathsResponse {
999    /// Every path pattern, in tree order
1000    #[prost(message, repeated, tag = "1")]
1001    pub paths: ::prost::alloc::vec::Vec<DatasetPath>,
1002}
1003/// DatasetPath describes one path pattern under the data root. A segment in angle
1004/// brackets is a placeholder, described by the directory entry it names. The path
1005/// is the entry's stable key.
1006///
1007/// A grantable path also carries its wording and whether it is public. A public
1008/// path reads nothing about the owner's DNA, such as the reference genome or
1009/// which datasets are uploaded. The wording is an English template that
1010/// describes a grant to the owner, with each placeholder named after the path's
1011/// own, such as "Your genome around variant {rsid}".
1012#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1013pub struct DatasetPath {
1014    /// Path as a manifest names it
1015    #[prost(string, tag = "1")]
1016    pub path: ::prost::alloc::string::String,
1017    /// Directory or file
1018    #[prost(bool, tag = "2")]
1019    pub directory: bool,
1020    /// Whether a manifest may name it
1021    #[prost(bool, tag = "3")]
1022    pub grantable: bool,
1023    /// Whether the data this path needs is on the Ark now
1024    #[prost(bool, tag = "4")]
1025    pub available: bool,
1026    /// What it holds, when it is absent and when it fails
1027    #[prost(string, tag = "5")]
1028    pub desc: ::prost::alloc::string::String,
1029    /// Exact file content, or what a directory lists
1030    #[prost(string, tag = "6")]
1031    pub format: ::prost::alloc::string::String,
1032    /// Complete example values, most typical first
1033    #[prost(string, repeated, tag = "7")]
1034    pub examples: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1035    /// Whether a grant reads nothing about the owner's DNA, for grantable paths
1036    #[prost(bool, tag = "8")]
1037    pub public: bool,
1038    /// Template wording a grant to the owner, for grantable paths
1039    #[prost(string, tag = "9")]
1040    pub wording: ::prost::alloc::string::String,
1041}
1042/// ReservedErrors names the assigned protocol-wide errors in the reserved range
1043/// 0x00 to 0xff (inclusive). No code in this range may be assigned a request
1044/// specific meaning. Assigned codes must not be repurposed.
1045#[non_exhaustive]
1046#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1047#[repr(i32)]
1048pub enum ReservedErrors {
1049    /// A failure without a standardized reason. Zero does not indicate success;
1050    /// the presence of an Error in the response indicates failure.
1051    Unspecified = 0,
1052    /// The request's responder was released without providing an application reply.
1053    Unanswered = 1,
1054    /// The peer does not know this request. Emitted by the protocol layer itself
1055    /// when a request's content is not in its schema.
1056    Unknown = 2,
1057    /// The peer knows this request but never serves it in this build or role,
1058    /// firmware updates on an emulator or develop envelopes on production.
1059    Unsupported = 3,
1060    /// The peer serves this request but not in its current state, before cloud
1061    /// sync or pairing. It may once the state changes.
1062    Unavailable = 4,
1063    /// The peer serves this request but the phone approval it depends on did not
1064    /// authorize it. The owner declined, or the phone's answer broke the approval's
1065    /// rules and counts as a decline.
1066    Unauthorized = 5,
1067    /// The peer serves this request but the approval it depends on did not arrive
1068    /// before its window ran out, on the phone or at the button.
1069    Unconfirmed = 6,
1070    /// The peer serves this request but the approval it depends on could not be
1071    /// sent to the phone, since the relay failed on the way.
1072    Undelivered = 7,
1073}
1074impl ReservedErrors {
1075    /// String value of the enum field names used in the ProtoBuf definition.
1076    ///
1077    /// The values are not transformed in any way and thus are considered stable
1078    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1079    pub fn as_str_name(&self) -> &'static str {
1080        match self {
1081            Self::Unspecified => "RESERVED_ERRORS_UNSPECIFIED",
1082            Self::Unanswered => "RESERVED_ERRORS_UNANSWERED",
1083            Self::Unknown => "RESERVED_ERRORS_UNKNOWN",
1084            Self::Unsupported => "RESERVED_ERRORS_UNSUPPORTED",
1085            Self::Unavailable => "RESERVED_ERRORS_UNAVAILABLE",
1086            Self::Unauthorized => "RESERVED_ERRORS_UNAUTHORIZED",
1087            Self::Unconfirmed => "RESERVED_ERRORS_UNCONFIRMED",
1088            Self::Undelivered => "RESERVED_ERRORS_UNDELIVERED",
1089        }
1090    }
1091    /// Creates an enum from field names used in the ProtoBuf definition.
1092    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1093        match value {
1094            "RESERVED_ERRORS_UNSPECIFIED" => Some(Self::Unspecified),
1095            "RESERVED_ERRORS_UNANSWERED" => Some(Self::Unanswered),
1096            "RESERVED_ERRORS_UNKNOWN" => Some(Self::Unknown),
1097            "RESERVED_ERRORS_UNSUPPORTED" => Some(Self::Unsupported),
1098            "RESERVED_ERRORS_UNAVAILABLE" => Some(Self::Unavailable),
1099            "RESERVED_ERRORS_UNAUTHORIZED" => Some(Self::Unauthorized),
1100            "RESERVED_ERRORS_UNCONFIRMED" => Some(Self::Unconfirmed),
1101            "RESERVED_ERRORS_UNDELIVERED" => Some(Self::Undelivered),
1102            _ => None,
1103        }
1104    }
1105}
1106/// ExecutionState is where a scheduled task stands for its host.
1107#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1108#[repr(i32)]
1109pub enum ExecutionState {
1110    /// Never sent, an unset state
1111    Unspecified = 0,
1112    /// The app still runs
1113    Running = 1,
1114    /// The app ended and the owner reviews its report
1115    Awaiting = 2,
1116    /// The review closed, so exec_result answers
1117    Resolved = 3,
1118}
1119impl ExecutionState {
1120    /// String value of the enum field names used in the ProtoBuf definition.
1121    ///
1122    /// The values are not transformed in any way and thus are considered stable
1123    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1124    pub fn as_str_name(&self) -> &'static str {
1125        match self {
1126            Self::Unspecified => "EXECUTION_STATE_UNSPECIFIED",
1127            Self::Running => "EXECUTION_STATE_RUNNING",
1128            Self::Awaiting => "EXECUTION_STATE_AWAITING",
1129            Self::Resolved => "EXECUTION_STATE_RESOLVED",
1130        }
1131    }
1132    /// Creates an enum from field names used in the ProtoBuf definition.
1133    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1134        match value {
1135            "EXECUTION_STATE_UNSPECIFIED" => Some(Self::Unspecified),
1136            "EXECUTION_STATE_RUNNING" => Some(Self::Running),
1137            "EXECUTION_STATE_AWAITING" => Some(Self::Awaiting),
1138            "EXECUTION_STATE_RESOLVED" => Some(Self::Resolved),
1139            _ => None,
1140        }
1141    }
1142}
1143/// ExecutionStream names one of the app's output streams.
1144#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1145#[repr(i32)]
1146pub enum ExecutionStream {
1147    /// Never sent, an unset stream
1148    Unspecified = 0,
1149    /// Standard output, the report
1150    Stdout = 1,
1151    /// Standard error, kept for develop builds only
1152    Stderr = 2,
1153}
1154impl ExecutionStream {
1155    /// String value of the enum field names used in the ProtoBuf definition.
1156    ///
1157    /// The values are not transformed in any way and thus are considered stable
1158    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1159    pub fn as_str_name(&self) -> &'static str {
1160        match self {
1161            Self::Unspecified => "EXECUTION_STREAM_UNSPECIFIED",
1162            Self::Stdout => "EXECUTION_STREAM_STDOUT",
1163            Self::Stderr => "EXECUTION_STREAM_STDERR",
1164        }
1165    }
1166    /// Creates an enum from field names used in the ProtoBuf definition.
1167    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1168        match value {
1169            "EXECUTION_STREAM_UNSPECIFIED" => Some(Self::Unspecified),
1170            "EXECUTION_STREAM_STDOUT" => Some(Self::Stdout),
1171            "EXECUTION_STREAM_STDERR" => Some(Self::Stderr),
1172            _ => None,
1173        }
1174    }
1175}
1176/// SlotKind identifies a slot on the device. Each value corresponds to a unique
1177/// data type that the device can store and manage.
1178#[non_exhaustive]
1179#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1180#[repr(i32)]
1181pub enum SlotKind {
1182    /// Never sent, an unset kind
1183    Unspecified = 0,
1184    /// Human reference genome assembly
1185    ReferenceGenome = 1,
1186    /// Gene-to-coordinate mapping database
1187    GeneAnnotations = 2,
1188    /// User's small variant calls, SNVs and indels
1189    SmallVariants = 3,
1190    /// Variant catalog (rsID-to-position), from dbSNP
1191    VariantCatalog = 4,
1192    /// User's structural variant calls
1193    StructuralVariants = 5,
1194    /// User's copy number calls
1195    CopyNumberVariants = 6,
1196}
1197impl SlotKind {
1198    /// String value of the enum field names used in the ProtoBuf definition.
1199    ///
1200    /// The values are not transformed in any way and thus are considered stable
1201    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1202    pub fn as_str_name(&self) -> &'static str {
1203        match self {
1204            Self::Unspecified => "SLOT_KIND_UNSPECIFIED",
1205            Self::ReferenceGenome => "SLOT_KIND_REFERENCE_GENOME",
1206            Self::GeneAnnotations => "SLOT_KIND_GENE_ANNOTATIONS",
1207            Self::SmallVariants => "SLOT_KIND_SMALL_VARIANTS",
1208            Self::VariantCatalog => "SLOT_KIND_VARIANT_CATALOG",
1209            Self::StructuralVariants => "SLOT_KIND_STRUCTURAL_VARIANTS",
1210            Self::CopyNumberVariants => "SLOT_KIND_COPY_NUMBER_VARIANTS",
1211        }
1212    }
1213    /// Creates an enum from field names used in the ProtoBuf definition.
1214    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1215        match value {
1216            "SLOT_KIND_UNSPECIFIED" => Some(Self::Unspecified),
1217            "SLOT_KIND_REFERENCE_GENOME" => Some(Self::ReferenceGenome),
1218            "SLOT_KIND_GENE_ANNOTATIONS" => Some(Self::GeneAnnotations),
1219            "SLOT_KIND_SMALL_VARIANTS" => Some(Self::SmallVariants),
1220            "SLOT_KIND_VARIANT_CATALOG" => Some(Self::VariantCatalog),
1221            "SLOT_KIND_STRUCTURAL_VARIANTS" => Some(Self::StructuralVariants),
1222            "SLOT_KIND_COPY_NUMBER_VARIANTS" => Some(Self::CopyNumberVariants),
1223            _ => None,
1224        }
1225    }
1226}
1227/// SlotOrigin describes the nature of the data in a slot, determining what
1228/// actions are available to the user for filling it.
1229#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1230#[repr(i32)]
1231pub enum SlotOrigin {
1232    /// Never sent, an unset origin
1233    Unspecified = 0,
1234    /// Unique to the user, uploaded by them
1235    Personal = 1,
1236    /// Standard reference data, downloaded from public sources
1237    Reference = 2,
1238}
1239impl SlotOrigin {
1240    /// String value of the enum field names used in the ProtoBuf definition.
1241    ///
1242    /// The values are not transformed in any way and thus are considered stable
1243    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1244    pub fn as_str_name(&self) -> &'static str {
1245        match self {
1246            Self::Unspecified => "SLOT_ORIGIN_UNSPECIFIED",
1247            Self::Personal => "SLOT_ORIGIN_PERSONAL",
1248            Self::Reference => "SLOT_ORIGIN_REFERENCE",
1249        }
1250    }
1251    /// Creates an enum from field names used in the ProtoBuf definition.
1252    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1253        match value {
1254            "SLOT_ORIGIN_UNSPECIFIED" => Some(Self::Unspecified),
1255            "SLOT_ORIGIN_PERSONAL" => Some(Self::Personal),
1256            "SLOT_ORIGIN_REFERENCE" => Some(Self::Reference),
1257            _ => None,
1258        }
1259    }
1260}
1261/// SlotState describes whether a slot holds data and whether that data is sound.
1262#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1263#[repr(i32)]
1264pub enum SlotState {
1265    /// Never sent, an unset state
1266    Unspecified = 0,
1267    /// Nothing stored
1268    Empty = 1,
1269    /// Data present and healthy
1270    Filled = 2,
1271    /// Files exist but the metadata is missing, corrupt or outdated
1272    Damaged = 3,
1273}
1274impl SlotState {
1275    /// String value of the enum field names used in the ProtoBuf definition.
1276    ///
1277    /// The values are not transformed in any way and thus are considered stable
1278    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1279    pub fn as_str_name(&self) -> &'static str {
1280        match self {
1281            Self::Unspecified => "SLOT_STATE_UNSPECIFIED",
1282            Self::Empty => "SLOT_STATE_EMPTY",
1283            Self::Filled => "SLOT_STATE_FILLED",
1284            Self::Damaged => "SLOT_STATE_DAMAGED",
1285        }
1286    }
1287    /// Creates an enum from field names used in the ProtoBuf definition.
1288    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1289        match value {
1290            "SLOT_STATE_UNSPECIFIED" => Some(Self::Unspecified),
1291            "SLOT_STATE_EMPTY" => Some(Self::Empty),
1292            "SLOT_STATE_FILLED" => Some(Self::Filled),
1293            "SLOT_STATE_DAMAGED" => Some(Self::Damaged),
1294            _ => None,
1295        }
1296    }
1297}
1298/// SlotConfidence indicates how confident the device is in its identification
1299/// of a file, based on content, filename and size.
1300#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1301#[repr(i32)]
1302pub enum SlotConfidence {
1303    /// Never sent, an unset confidence
1304    Unspecified = 0,
1305    /// Filename/extension only, no content confirmation
1306    Low = 1,
1307    /// Format detected but slot type inferred from size/filename
1308    Mid = 2,
1309    /// Magic bytes match and format-specific content confirmed
1310    High = 3,
1311}
1312impl SlotConfidence {
1313    /// String value of the enum field names used in the ProtoBuf definition.
1314    ///
1315    /// The values are not transformed in any way and thus are considered stable
1316    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1317    pub fn as_str_name(&self) -> &'static str {
1318        match self {
1319            Self::Unspecified => "SLOT_CONFIDENCE_UNSPECIFIED",
1320            Self::Low => "SLOT_CONFIDENCE_LOW",
1321            Self::Mid => "SLOT_CONFIDENCE_MID",
1322            Self::High => "SLOT_CONFIDENCE_HIGH",
1323        }
1324    }
1325    /// Creates an enum from field names used in the ProtoBuf definition.
1326    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1327        match value {
1328            "SLOT_CONFIDENCE_UNSPECIFIED" => Some(Self::Unspecified),
1329            "SLOT_CONFIDENCE_LOW" => Some(Self::Low),
1330            "SLOT_CONFIDENCE_MID" => Some(Self::Mid),
1331            "SLOT_CONFIDENCE_HIGH" => Some(Self::High),
1332            _ => None,
1333        }
1334    }
1335}