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 a
8/// receiver can tell a response from a request by the parity of the id alone.
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, 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        /// Opaque request from the companion app to the Ark
85        #[prost(message, tag = "1026")]
86        RelayReq(super::RelayAppToArkRequest),
87        /// Opaque response from the companion app to an Ark request
88        #[prost(message, tag = "1027")]
89        RelayRes(super::RelayAppToArkResponse),
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 on a running app
103        #[prost(message, tag = "1285")]
104        ExecStatus(super::ExecutionStatusRequest),
105        /// Cancels an app run or a pending upload
106        #[prost(message, tag = "1286")]
107        ExecCancel(super::ExecutionCancelRequest),
108        /// Lists the state of every data slot
109        #[prost(message, tag = "1537")]
110        SlotList(super::SlotListRequest),
111        /// Resets a slot to empty whatever its state
112        #[prost(message, tag = "1538")]
113        SlotRepair(super::SlotRepairRequest),
114        /// Removes the contents of a filled slot
115        #[prost(message, tag = "1539")]
116        SlotDelete(super::SlotDeleteRequest),
117        /// Asks the Ark to identify a file from its first chunk
118        #[prost(message, tag = "1540")]
119        SlotIdentify(super::SlotIdentifyRequest),
120        /// Starts uploading a file into a slot
121        #[prost(message, tag = "1541")]
122        SlotUploadStart(super::SlotUploadStartRequest),
123        /// Appends a chunk to a pending slot upload
124        #[prost(message, tag = "1542")]
125        SlotUploadChunk(super::SlotUploadChunkRequest),
126        /// Aborts a pending slot upload
127        #[prost(message, tag = "1543")]
128        SlotUploadCancel(super::SlotUploadCancelRequest),
129        /// Marks an upload complete and polls its processing
130        #[prost(message, tag = "1544")]
131        SlotUploadProcess(super::SlotUploadProcessRequest),
132        /// Maps every path an app can read, from the dataset view
133        #[prost(message, tag = "1793")]
134        DatasetPaths(super::DatasetPathsRequest),
135        /// Unreleased messages served by development firmware only, carried opaquely
136        /// so the public protocol is untouched while they are still under development.
137        /// Their schema is private and production Arks refuse the envelope.
138        #[prost(bytes, tag = "4096")]
139        Develop(::prost::alloc::vec::Vec<u8>),
140    }
141}
142/// ArkToHost represents a message sent from the Ark to the host via the USB
143/// connection. It embeds all possible message types to keep the protocol simple.
144///
145/// Every message carries an id and is either a request, its id chosen by the
146/// Ark, or the Ark's response to a request of the host, echoing the host's id.
147/// To avoid id collisions, hosts allocate odd ids and Arks even ones, so a
148/// receiver can tell a response from a request by the parity of the id alone.
149#[derive(Clone, PartialEq, ::prost::Message)]
150pub struct ArkToHost {
151    /// Enveloping fields, reserved range 0x001-0x0ff
152    ///
153    /// Request identifier, responded to or the Ark's own
154    #[prost(uint64, tag = "1")]
155    pub id: u64,
156    /// Error encountered while serving the host's request (if any)
157    #[prost(message, optional, tag = "2")]
158    pub err: ::core::option::Option<Error>,
159    /// Body of the message, a response of the Ark to a request of the host or a
160    /// request of its own. The tags are grouped by area, each area with its own range.
161    #[prost(
162        oneof = "ark_to_host::Content",
163        tags = "256, 257, 258, 259, 260, 513, 514, 515, 516, 517, 769, 770, 771, 772, 773, 774, 1025, 1026, 1027, 1028, 1281, 1282, 1283, 1284, 1285, 1286, 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 1793, 4096"
164    )]
165    pub content: ::core::option::Option<ark_to_host::Content>,
166}
167/// Nested message and enum types in `ArkToHost`.
168pub mod ark_to_host {
169    /// Body of the message, a response of the Ark to a request of the host or a
170    /// request of its own. The tags are grouped by area, each area with its own range.
171    #[derive(Clone, PartialEq, ::prost::Oneof)]
172    pub enum Content {
173        /// Acknowledges the onboarding
174        #[prost(message, tag = "256")]
175        Onboard(super::OnboardingResponse),
176        /// Hardware and firmware versions of the Ark
177        #[prost(message, tag = "257")]
178        DeviceInfo(super::DeviceInfoResponse),
179        /// Challenge for the cloud to sign along its time
180        #[prost(message, tag = "258")]
181        CloudSyncStart(super::CloudSyncStartResponse),
182        /// Timestamp the Ark accepted from the cloud
183        #[prost(message, tag = "259")]
184        CloudSyncFinish(super::CloudSyncFinishResponse),
185        /// Encrypted proof of the Ark's genuinity for the cloud
186        #[prost(message, tag = "260")]
187        GenuinityProof(super::GenuinityProofResponse),
188        /// Ephemeral key to receive the firmware key with, sealed for the cloud
189        #[prost(message, tag = "513")]
190        FirmwareUpdatePrep(super::FirmwareUpdatePrepResponse),
191        /// Acknowledges the initiated update
192        #[prost(message, tag = "514")]
193        FirmwareUpdateInit(super::FirmwareUpdateInitResponse),
194        /// Acknowledges the appended firmware chunk
195        #[prost(message, tag = "515")]
196        FirmwareUpdateUpload(super::FirmwareUpdateUploadResponse),
197        /// Acknowledges the verified firmware
198        #[prost(message, tag = "516")]
199        FirmwareUpdateVerify(super::FirmwareUpdateVerifyResponse),
200        /// Acknowledges the installed firmware
201        #[prost(message, tag = "517")]
202        FirmwareUpdateInstall(super::FirmwareUpdateInstallResponse),
203        /// Signed authorization for the cloud to open a rendezvous
204        #[prost(message, tag = "769")]
205        PairingAuth(super::PairingAuthResponse),
206        /// Acknowledges the accepted app identity
207        #[prost(message, tag = "770")]
208        PairingSetAppId(super::PairingSetAppIdentityResponse),
209        /// Ark device infos and key material, sealed for the app
210        #[prost(message, tag = "771")]
211        PairingSetAppStorage(super::PairingSetAppStorageResponse),
212        /// Acknowledges the app's receipt of the Ark's keys
213        #[prost(message, tag = "772")]
214        PairingAckArkStorage(super::PairingAckArkStorageResponse),
215        /// Signed confirmation that the user accepted the pairing
216        #[prost(message, tag = "773")]
217        PairingAccept(super::PairingAcceptanceResponse),
218        /// Signed confirmation that the Ark finished pairing
219        #[prost(message, tag = "774")]
220        PairingComplete(super::PairingCompletionResponse),
221        /// Signed authorization for the cloud to join the relay
222        #[prost(message, tag = "1025")]
223        RelayJoin(super::RelayJoinResponse),
224        /// Opaque request from the Ark to the companion app
225        #[prost(message, tag = "1026")]
226        RelayReq(super::RelayArkToAppRequest),
227        /// Opaque response from the Ark to an app request
228        #[prost(message, tag = "1027")]
229        RelayRes(super::RelayArkToAppResponse),
230        /// Protocol violation found in an app response, for debugging
231        #[prost(message, tag = "1028")]
232        RelayFail(super::RelayAppToArkFailure),
233        /// Acknowledges the completed unlock
234        #[prost(message, tag = "1281")]
235        Unlock(super::UnlockResponse),
236        /// Task id for the chunk, schedule and cancel messages
237        #[prost(message, tag = "1282")]
238        ExecUploadStart(super::ExecutionUploadStartResponse),
239        /// Acknowledges the appended app chunk
240        #[prost(message, tag = "1283")]
241        ExecUploadChunk(super::ExecutionUploadChunkResponse),
242        /// Acknowledges the authorized and started execution
243        #[prost(message, tag = "1284")]
244        ExecSched(super::ExecutionScheduleResponse),
245        /// Whether the app still runs, with its result once done
246        #[prost(message, tag = "1285")]
247        ExecStatus(super::ExecutionStatusResponse),
248        /// Acknowledges the cancelled run or upload
249        #[prost(message, tag = "1286")]
250        ExecCancel(super::ExecutionCancelResponse),
251        /// Current state of every data slot
252        #[prost(message, tag = "1537")]
253        SlotList(super::SlotListResponse),
254        /// Acknowledges the reset slot
255        #[prost(message, tag = "1538")]
256        SlotRepair(super::SlotRepairResponse),
257        /// Acknowledges the deleted slot
258        #[prost(message, tag = "1539")]
259        SlotDelete(super::SlotDeleteResponse),
260        /// Identification of the file's first chunk
261        #[prost(message, tag = "1540")]
262        SlotIdentify(super::SlotIdentifyResponse),
263        /// Session id of the approved upload
264        #[prost(message, tag = "1541")]
265        SlotUploadStart(super::SlotUploadStartResponse),
266        /// Acknowledges the appended slot chunk
267        #[prost(message, tag = "1542")]
268        SlotUploadChunk(super::SlotUploadChunkResponse),
269        /// Acknowledges the aborted upload
270        #[prost(message, tag = "1543")]
271        SlotUploadCancel(super::SlotUploadCancelResponse),
272        /// Processing progress of the completed upload
273        #[prost(message, tag = "1544")]
274        SlotUploadProcess(super::SlotUploadProcessResponse),
275        /// Generated README.md of the dataset view
276        #[prost(message, tag = "1793")]
277        DatasetPaths(super::DatasetPathsResponse),
278        /// Unreleased messages emitted by development firmware only, in response to
279        /// a develop request, carried opaquely so the public protocol is untouched
280        /// while they are still under development. Their schema is private.
281        #[prost(bytes, tag = "4096")]
282        Develop(::prost::alloc::vec::Vec<u8>),
283    }
284}
285/// Error is sent along a response to a failed request.
286///
287/// Codes 0x00 through 0xff (inclusive) are reserved for protocol-wide errors.
288/// Codes 0x100 and above are defined by the request type and may be reused
289/// with different meanings for different requests. The message text is human,
290/// readable error, not a stable code.
291#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
292pub struct Error {
293    /// Error code for programmatic interpretation
294    #[prost(uint64, tag = "1")]
295    pub code: u64,
296    /// Error message for user interfacing
297    #[prost(string, tag = "2")]
298    pub msg: ::prost::alloc::string::String,
299}
300/// OnboardingRequest is a vendor utility to onboard an Ark. Currently it contains
301/// the signed device genuinity attestation (certificate).
302///
303/// Note, as this method is only used during initial device setup, there is no API
304/// compatibility guarantee, it will evolve with the factory tooling.
305#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
306pub struct OnboardingRequest {
307    /// Signed device genuinity attestation (CWT) to install
308    #[prost(bytes = "vec", tag = "1")]
309    pub device_attestation: ::prost::alloc::vec::Vec<u8>,
310}
311/// OnboardingResponse is the acknowledgement of the onboarding.
312#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
313pub struct OnboardingResponse {}
314/// DeviceInfoRequest is sent by the host to fetch the Ark's device stats.
315#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
316pub struct DeviceInfoRequest {}
317/// DeviceInfoResponse returns various hardware and software version information.
318#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
319pub struct DeviceInfoResponse {
320    /// Ark device version (defines the major features)
321    #[prost(uint32, tag = "1")]
322    pub version_id: u32,
323    /// Ark device version label (as known by the device)
324    #[prost(string, tag = "2")]
325    pub version_str: ::prost::alloc::string::String,
326    /// Ark device revision (defines the minor differences)
327    #[prost(uint32, tag = "3")]
328    pub revision_id: u32,
329    /// Ark device revision label (as known by the device)
330    #[prost(string, tag = "4")]
331    pub revision_str: ::prost::alloc::string::String,
332    /// Current firmware version (X.Y.Z-commit)
333    #[prost(string, tag = "7")]
334    pub firmware_version: ::prost::alloc::string::String,
335    /// Current firmware publish unix timestamp
336    #[prost(uint64, tag = "8")]
337    pub firmware_publish: u64,
338    /// Whether a cloud identity was accepted since boot
339    #[prost(bool, tag = "9")]
340    pub cloud_synced: bool,
341    /// Current device clock unix timestamp, set by the cloud sync
342    #[prost(uint64, tag = "10")]
343    pub cloud_clock: u64,
344    /// Whether the Ark is paired with a companion app (user data initialized)
345    #[prost(bool, tag = "11")]
346    pub paired: bool,
347    /// Whether the user data storage is open (false if unpaired)
348    #[prost(bool, tag = "12")]
349    pub unlocked: bool,
350}
351/// CloudSyncStartRequest requests the device to start a synchronization procedure
352/// against the cloud servers to establish the current time as well as the currently
353/// active cloud identity.
354#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
355pub struct CloudSyncStartRequest {
356    /// Post-quantum CWT attestation for the server signing (xDSA) key
357    #[prost(bytes = "vec", tag = "1")]
358    pub signer: ::prost::alloc::vec::Vec<u8>,
359    /// Post-quantum CWT attestation for the server encryption (xHPKE) key
360    #[prost(bytes = "vec", tag = "2")]
361    pub crypto: ::prost::alloc::vec::Vec<u8>,
362}
363/// CloudSyncStartResponse is an initiation of a cloud sync from the device, authed
364/// to the requested cloud identity.
365#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
366pub struct CloudSyncStartResponse {
367    /// Random nonce to avoid malicious host machines setting bad times
368    #[prost(bytes = "vec", tag = "1")]
369    pub challenge: ::prost::alloc::vec::Vec<u8>,
370}
371/// CloudSyncFinishRequest is the completion of a previously initiated cloud sync
372/// procedure, this time being signed by a single identity currently used by the
373/// cloud.
374#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
375pub struct CloudSyncFinishRequest {
376    /// Unix timestamp from the server in milliseconds
377    #[prost(uint64, tag = "1")]
378    pub unixmilli: u64,
379    /// SignAt[Cloud]["cloudsync-v1"][unixmilli/1000](CBOR(challenge))
380    #[prost(bytes = "vec", tag = "2")]
381    pub signature: ::prost::alloc::vec::Vec<u8>,
382}
383/// CloudSyncFinishResponse is the acknowledgement whether the device accepted the
384/// cloud sync from the server or rejected for some reason.
385#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
386pub struct CloudSyncFinishResponse {
387    /// Timestamp that was accepted and set
388    #[prost(uint64, tag = "1")]
389    pub accepted: u64,
390}
391/// GenuinityProofRequest requests the device to generate a cryptographic proof of
392/// its own authenticity.
393#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
394pub struct GenuinityProofRequest {}
395/// GenuinityProofResponse is the device genuinity proof, an encrypted signature
396/// of the device.
397#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
398pub struct GenuinityProofResponse {
399    /// Seal[Ark->Cloud]["genuinity-v1"][null](null)
400    #[prost(bytes = "vec", tag = "1")]
401    pub proof: ::prost::alloc::vec::Vec<u8>,
402}
403/// FirmwareUpdatePrepRequest prepares a firmware update procedure. If any previous
404/// update procedure was in progress, it is aborted.
405#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
406pub struct FirmwareUpdatePrepRequest {
407    /// Version string to update to
408    #[prost(string, tag = "1")]
409    pub version: ::prost::alloc::string::String,
410    /// SHA256 hash of the (encrypted) firmware archive
411    #[prost(bytes = "vec", tag = "2")]
412    pub sha256: ::prost::alloc::vec::Vec<u8>,
413    /// Number of bytes (progress purposes, ignored otherwise)
414    #[prost(uint64, tag = "3")]
415    pub bytes: u64,
416}
417/// FirmwareUpdatePrepResponse confirms whether a new firmware update process was
418/// started, or if the request was rejected and why.
419///
420/// If it was accepted, a new ephemeral encryption identity is generated by the Ark
421/// to receive the firmware access key to; and sent along with the firmware infos.
422#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
423pub struct FirmwareUpdatePrepResponse {
424    /// Seal[Ark->Cloud]["firmware-v1"][\[version, sha256\]](temp-key)
425    #[prost(bytes = "vec", tag = "1")]
426    pub auth: ::prost::alloc::vec::Vec<u8>,
427}
428/// FirmwareUpdateInitRequest initiates a previously prepared firmware update
429/// procedure by providing the authenticated and encrypted firmware key.
430///
431/// Note, if the initiation is rejected, the entire update process is torn down.
432#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
433pub struct FirmwareUpdateInitRequest {
434    /// Seal[Cloud->temp-key]["firmware-v1"][\[version, sha256\]](sym-key)
435    #[prost(bytes = "vec", tag = "1")]
436    pub access: ::prost::alloc::vec::Vec<u8>,
437}
438/// FirmwareUpdateInitResponse confirms whether a new firmware update process
439/// was started, or if the request was rejected and why.
440///
441/// Note, if the init is rejected, the entire update process is torn down.
442#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
443pub struct FirmwareUpdateInitResponse {}
444/// FirmwareUpdateUploadRequest requests appending a new chunk of data to the
445/// currently pending firmware upload process.
446#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
447pub struct FirmwareUpdateUploadRequest {
448    /// Chunk of firmware blob to append (reasonably capped)
449    #[prost(bytes = "vec", tag = "1")]
450    pub chunk: ::prost::alloc::vec::Vec<u8>,
451}
452/// FirmwareUpdateUploadResponse is the response whether the requested chunk was
453/// accepted or rejected.
454///
455/// Note, if the upload is rejected, the entire update process is torn down.
456#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
457pub struct FirmwareUpdateUploadResponse {}
458/// FirmwareUpdateVerifyRequest requests decrypting the uploaded firmware and
459/// verifying its contents, preparing for the last step of actually installing
460/// the firmware update.
461#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
462pub struct FirmwareUpdateVerifyRequest {}
463/// FirmwareUpdateVerifyResponse is the response whether the firmware just uploaded
464/// passed all verifications and is ready for application.
465///
466/// Note, if the verification is rejected, the entire update process is torn down.
467#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
468pub struct FirmwareUpdateVerifyResponse {}
469/// FirmwareUpdateInstallRequest requests the currently pending (but already
470/// verified) firmware to be applied to disk. This message will cause the device
471/// to reboot if applied successfully.
472#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
473pub struct FirmwareUpdateInstallRequest {}
474/// FirmwareUpdateInstallResponse is the response whether the firmware was applied
475/// successfully or not.
476#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
477pub struct FirmwareUpdateInstallResponse {}
478/// PairingAuthRequest requests the initiation of a pairing.
479#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
480pub struct PairingAuthRequest {}
481/// PairingAuthResponse responds whether the device is in a state compatible with
482/// pairing (i.e. reset) and if so, it signs an authorization for the server to open
483/// a new rendezvous point; containing the xHPKE public key to use for encrypting
484/// messages to this Ark after pairing.
485#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
486pub struct PairingAuthResponse {
487    /// Seal[Ark->Cloud]["pairing-v1"][null](pair-key)
488    #[prost(bytes = "vec", tag = "1")]
489    pub auth: ::prost::alloc::vec::Vec<u8>,
490    /// Fingerprint of the pair-key to transmit to the app out-of-protocol
491    #[prost(bytes = "vec", tag = "2")]
492    pub fprint: ::prost::alloc::vec::Vec<u8>,
493}
494/// PairingSetAppIdentityRequest injects the companion app's identity, relayed
495/// by the cloud.
496#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
497pub struct PairingSetAppIdentityRequest {
498    /// Seal[Cloud->App]["pairing-v1:identity"][\[ark_signer_id, ark_crypto_id\]](\[app_signer, app_crypto\])
499    #[prost(bytes = "vec", tag = "1")]
500    pub identity: ::prost::alloc::vec::Vec<u8>,
501}
502/// PairingSetAppIdentityResponse confirms whether the remote identity was
503/// accepted by the Ark or not.
504#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
505pub struct PairingSetAppIdentityResponse {}
506/// PairingSetAppStorageRequest injects the app's storage key material into the
507/// pairing flow.
508#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
509pub struct PairingSetAppStorageRequest {
510    /// Seal[App->Ark]["pairing-v1:storage"][\[ark_signer_id, ark_crypto_id, app_signer_id, app_crypto_id\]](\[app_keymat\])
511    #[prost(bytes = "vec", tag = "1")]
512    pub app_key: ::prost::alloc::vec::Vec<u8>,
513}
514/// PairingSetAppStorageResponse confirms whether the remote storage material
515/// was accepted, and if so, bundles the ark device infos and ark key material.
516#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
517pub struct PairingSetAppStorageResponse {
518    /// 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\])
519    #[prost(bytes = "vec", tag = "1")]
520    pub ark_keys: ::prost::alloc::vec::Vec<u8>,
521}
522/// PairingAckArkStorageRequest confirms from the app that the Ark's key material
523/// was received correctly.
524#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
525pub struct PairingAckArkStorageRequest {
526    /// Seal[App->Ark]["pairing-v1:storage"][\[ark_signer_id, ark_crypto_id, app_signer_id, app_crypto_id, ark_keymat\]](null)
527    #[prost(bytes = "vec", tag = "1")]
528    pub app_ack: ::prost::alloc::vec::Vec<u8>,
529}
530/// PairingAckArkStorageResponse confirms that the key ack was accepted.
531#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
532pub struct PairingAckArkStorageResponse {}
533/// PairingAcceptanceRequest is a blocking poller to wait until the user accepts
534/// a pairing request or it times out.
535#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
536pub struct PairingAcceptanceRequest {}
537/// PairingAcceptanceResponse returns whether the user accepted the pairing or
538/// if it timed out. At this point, the device still needs to format itself.
539#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
540pub struct PairingAcceptanceResponse {
541    /// Seal[Ark->Cloud]["pairing-v1:accept"][\[ark_signer_id, ark_crypto_id, app_signer_id, app_crypto_id\]](null)
542    #[prost(bytes = "vec", tag = "1")]
543    pub confirm: ::prost::alloc::vec::Vec<u8>,
544}
545/// PairingCompletionRequest is a blocking poller to wait until the device finishes
546/// any pairing maintenance operation (e.g. encrypting itself).
547#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
548pub struct PairingCompletionRequest {}
549/// PairingCompletionResponse returns whether the device finished preparing for
550/// live operation.
551#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
552pub struct PairingCompletionResponse {
553    /// Seal[Ark->Cloud]["pairing-v1:complete"][\[ark_signer_id, ark_crypto_id, app_signer_id, app_crypto_id\]](null)
554    #[prost(bytes = "vec", tag = "1")]
555    pub confirm: ::prost::alloc::vec::Vec<u8>,
556}
557/// RelayJoinRequest requests authorization to join the communication relay with
558/// the companion app.
559#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
560pub struct RelayJoinRequest {}
561/// RelayJoinResponse responds whether the device is in a state compatible with
562/// relaying (i.e. paired) and if so, it signs an authorization for the server
563/// to join the rendezvous point.
564#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
565pub struct RelayJoinResponse {
566    /// Seal[Ark->Cloud]["relaying-v1"][null](null)
567    #[prost(bytes = "vec", tag = "1")]
568    pub auth: ::prost::alloc::vec::Vec<u8>,
569}
570/// RelayAppToArkRequest is an opaque request from the companion app that the Ark may
571/// respond to, or may flat out reject.
572#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
573pub struct RelayAppToArkRequest {
574    /// Application layer request ID from the app
575    #[prost(uint64, tag = "1")]
576    pub id: u64,
577    /// Seal[App->Ark]["relaying-v1:request"][id](\[method, [params...]\]))
578    #[prost(bytes = "vec", tag = "2")]
579    pub req: ::prost::alloc::vec::Vec<u8>,
580}
581/// RelayArkToAppResponse is an opaque response from the Ark to the companion app to an
582/// opaque request.
583#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
584pub struct RelayArkToAppResponse {
585    /// Application layer request ID from the app being responding to
586    #[prost(uint64, tag = "1")]
587    pub id: u64,
588    /// Seal[Ark->App]["relaying-v1:response"][id](\[result, [err_code, err_str]\])
589    #[prost(bytes = "vec", tag = "2")]
590    pub res: ::prost::alloc::vec::Vec<u8>,
591}
592/// RelayAppToArkFailure is returned if a low level protocol violation is detected
593/// when an app-to-ark response was processed.
594///
595/// This is not an actionable message, rather it's just a way to expose a protocol
596/// failure / violation to the calling app for debugging purposes.
597#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
598pub struct RelayAppToArkFailure {
599    /// Reason for rejecting the response at the protocol level
600    #[prost(string, tag = "1")]
601    pub error: ::prost::alloc::string::String,
602}
603/// RelayArkToAppRequest is an opaque request from the Ark to the companion app, which
604/// will generally be sent as an interim response to some other request, requiring
605/// authorization from the app side.
606#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
607pub struct RelayArkToAppRequest {
608    /// Application layer request ID from the ark
609    #[prost(uint64, tag = "1")]
610    pub id: u64,
611    /// Seal[Ark->App]["relaying-v1:request"][id](\[method, [params...]\])
612    #[prost(bytes = "vec", tag = "2")]
613    pub req: ::prost::alloc::vec::Vec<u8>,
614}
615/// RelayAppToArkResponse is an opaque response from the companion app to an opaque
616/// Ark request. The ark will respond with the deferred response to the original
617/// request.
618#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
619pub struct RelayAppToArkResponse {
620    /// Application layer request ID from the ark being responding to
621    #[prost(uint64, tag = "1")]
622    pub id: u64,
623    /// Seal[App->Ark]["relaying-v1:response"][id](\[result, [err_code, err_str]\])
624    #[prost(bytes = "vec", tag = "2")]
625    pub res: ::prost::alloc::vec::Vec<u8>,
626}
627/// UnlockRequest requests the device to start the unlock procedure. This request
628/// is async, potentially returning a response only after confirming with the app.
629///
630/// It will trigger sending a RelayArkToAppRequest with the request content:
631///    - method: "unlock"
632///    - params: \[\]
633///
634/// The request expects a RelayAppToArkResponse with the response content:
635///
636///    If approved:
637///      - result = key: \[u8; 32\] // Shared secret from the pairing protocol
638///      - err_code: 0
639///      - err_str:  ""
640///
641///    If denied:
642///      - result = key = \[0u8; 32\] // All zeroes (signals a denial)
643///      - err_code: 0              // No error, deny is valid user choice
644///      - err_str:  ""             // No error, deny is valid user choice
645///
646/// where:
647///    - key: Symmetric key for accessing the storage partition
648///
649/// Note, relayed messages are encrypted and authenticated on the timestamp and
650/// request/response id, so there's no need for further complications.
651#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
652pub struct UnlockRequest {}
653/// UnlockResponse contains whether the unlock was successfully executed.
654#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
655pub struct UnlockResponse {}
656/// ExecutionUploadStartRequest begins a chunked upload of a WASM binary to
657/// execute. The declared size is used to pre-allocate the receive buffer and
658/// to reject oversized uploads early; the actual bytes are sent via subsequent
659/// ExecutionUploadChunkRequest messages.
660#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
661pub struct ExecutionUploadStartRequest {
662    /// Total binary size in bytes
663    #[prost(uint64, tag = "1")]
664    pub bytes: u64,
665}
666/// ExecutionUploadStartResponse contains the task id to use for subsequent
667/// chunk, schedule and cancel messages.
668#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
669pub struct ExecutionUploadStartResponse {
670    /// Task id to stream chunks into
671    #[prost(uint64, tag = "1")]
672    pub taskid: u64,
673}
674/// ExecutionUploadChunkRequest appends a chunk of data to a pending upload.
675/// Chunks must be appended in order and must not overrun the declared size.
676#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
677pub struct ExecutionUploadChunkRequest {
678    /// Task id to append to
679    #[prost(uint64, tag = "1")]
680    pub taskid: u64,
681    /// Data chunk to append (reasonably capped)
682    #[prost(bytes = "vec", tag = "2")]
683    pub chunk: ::prost::alloc::vec::Vec<u8>,
684}
685/// ExecutionUploadChunkResponse is an empty ack of the chunk upload request.
686#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
687pub struct ExecutionUploadChunkResponse {}
688/// ExecutionScheduleRequest finalizes an upload and requests the device to
689/// execute the uploaded 3rd party app. The upload must have been completed
690/// (i.e. the sum of chunk sizes matches the declared size).
691///
692/// This request is async, potentially returning a response only after confirming
693/// with the app.
694///
695/// It will trigger sending a RelayArkToAppRequest with the request content:
696///    - method: "execute"
697///    - params: \[task: string\]
698///
699/// The request expects a RelayAppToArkResponse with the response content:
700///
701///    If approved:
702///      - result = approval = true  // CBOR boolean
703///      - err_code: 0
704///      - err_str:  ""
705///
706///    If denied:
707///      - result = approval = false // CBOR boolean
708///      - err_code: 0              // No error, deny is valid user choice
709///      - err_str:  ""             // No error, deny is valid user choice
710///
711/// where:
712///    - approval: Whether the user approved or denied the execution request
713///
714/// Note, relayed messages are encrypted and authenticated on the timestamp and
715/// request/response id, so there's no need for further complications.
716#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
717pub struct ExecutionScheduleRequest {
718    /// Task id returned by ExecutionUploadStartResponse
719    #[prost(uint64, tag = "1")]
720    pub taskid: u64,
721}
722/// ExecutionScheduleResponse acks that the execution was authorized and the
723/// task is now running. The host already holds the task id from the preceding
724/// ExecutionUploadStartResponse.
725#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
726pub struct ExecutionScheduleResponse {}
727/// ExecutionCancelRequest cancels a previously started 3rd party app run or
728/// an in-progress upload.
729#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
730pub struct ExecutionCancelRequest {
731    /// Task id to cancel
732    #[prost(uint64, tag = "1")]
733    pub taskid: u64,
734}
735/// ExecutionCancelResponse contains the data gathered during an app's execution.
736#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
737pub struct ExecutionCancelResponse {}
738/// ExecutionStatusRequest checks the execution status of a previously started
739/// 3rd party app run.
740#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
741pub struct ExecutionStatusRequest {
742    /// Pending execution ID to check for updates
743    #[prost(uint64, tag = "1")]
744    pub taskid: u64,
745}
746/// ExecutionResultResponse contains the data gathered during an app's execution.
747#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
748pub struct ExecutionResultResponse {
749    /// Name of the executed app
750    #[prost(string, tag = "2")]
751    pub app_name: ::prost::alloc::string::String,
752    /// Version of the executed app
753    #[prost(string, tag = "3")]
754    pub app_version: ::prost::alloc::string::String,
755    /// Whether the task finished successfully
756    #[prost(bool, tag = "4")]
757    pub success: bool,
758    /// Raw standard output of the app
759    #[prost(bytes = "vec", tag = "5")]
760    pub stdout: ::prost::alloc::vec::Vec<u8>,
761    /// Raw standard error the app (only in develop mode)
762    #[prost(bytes = "vec", tag = "6")]
763    pub stderr: ::prost::alloc::vec::Vec<u8>,
764}
765/// ExecutionStatusResponse contains the status of a started 3rd party app
766/// execution.
767#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
768pub struct ExecutionStatusResponse {
769    /// Whether the app is still running
770    #[prost(bool, tag = "1")]
771    pub pending: bool,
772    /// The result of the execution
773    #[prost(message, optional, tag = "2")]
774    pub result: ::core::option::Option<ExecutionResultResponse>,
775}
776/// SlotDownload describes the public download the device advertises for a
777/// reference slot, so a host can fetch it and stream it back in.
778#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
779pub struct SlotDownload {
780    /// Public download URL
781    #[prost(string, tag = "1")]
782    pub url: ::prost::alloc::string::String,
783    /// Download size in bytes
784    #[prost(uint64, tag = "2")]
785    pub bytes: u64,
786    /// Download SHA256 checksum
787    #[prost(string, tag = "3")]
788    pub sha256: ::prost::alloc::string::String,
789}
790/// SlotStatus describes the current state of a single slot on the device. The
791/// data fields are generic so a host renders a kind it has never seen.
792#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
793pub struct SlotStatus {
794    /// Slot type
795    #[prost(enumeration = "SlotKind", tag = "1")]
796    pub kind: i32,
797    /// Human-readable slot name
798    #[prost(string, tag = "2")]
799    pub name: ::prost::alloc::string::String,
800    /// Detailed description of this slot
801    #[prost(string, tag = "3")]
802    pub desc: ::prost::alloc::string::String,
803    /// Nature of the data (personal, reference)
804    #[prost(enumeration = "SlotOrigin", tag = "4")]
805    pub origin: i32,
806    /// Whether the slot is empty, filled or damaged
807    #[prost(enumeration = "SlotState", tag = "5")]
808    pub state: i32,
809    /// Why the slot is damaged, empty otherwise
810    #[prost(string, tag = "6")]
811    pub damage: ::prost::alloc::string::String,
812    /// Slots that must be filled before this one is actionable
813    #[prost(enumeration = "SlotKind", repeated, tag = "7")]
814    pub deps: ::prost::alloc::vec::Vec<i32>,
815    /// Bytes on disk for this slot (0 if empty)
816    #[prost(uint64, tag = "8")]
817    pub bytes: u64,
818    /// Reference assembly the data is keyed to (e.g. "GRCh38.p14")
819    #[prost(string, tag = "9")]
820    pub build: ::prost::alloc::string::String,
821    /// The dataset's own release, if it has one (e.g. dbSNP "157")
822    #[prost(string, tag = "10")]
823    pub version: ::prost::alloc::string::String,
824    /// Advertised public download, absent if none
825    #[prost(message, optional, tag = "11")]
826    pub download: ::core::option::Option<SlotDownload>,
827}
828/// SlotListRequest requests the state of all slots on the device.
829#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
830pub struct SlotListRequest {}
831/// SlotListResponse contains the current state of every slot.
832#[derive(Clone, PartialEq, ::prost::Message)]
833pub struct SlotListResponse {
834    /// State of every slot, one entry per slot kind
835    #[prost(message, repeated, tag = "1")]
836    pub slots: ::prost::alloc::vec::Vec<SlotStatus>,
837}
838/// SlotRepairRequest resets a slot to empty regardless of its current state.
839/// Unlike SlotDelete (which requires the slot to be filled), repair is a stateless
840/// force cleanup that removes any leftover metadata and/or files on disk. It is
841/// intended for recovering from corruption or half-written state after crashes.
842#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
843pub struct SlotRepairRequest {
844    /// Slot to repair (reset to empty)
845    #[prost(enumeration = "SlotKind", tag = "1")]
846    pub slot: i32,
847}
848/// SlotRepairResponse is an empty ack of the repair request.
849#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
850pub struct SlotRepairResponse {}
851/// SlotDeleteRequest removes the contents of a filled slot. The slot must be
852/// in a healthy, filled state; corrupted or half-written slots must be cleaned
853/// up via SlotRepair instead.
854#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
855pub struct SlotDeleteRequest {
856    /// Slot to delete
857    #[prost(enumeration = "SlotKind", tag = "1")]
858    pub slot: i32,
859}
860/// SlotDeleteResponse is an empty ack of the delete request.
861#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
862pub struct SlotDeleteResponse {}
863/// SlotIdentifyRequest sends an ephemeral file chunk to the Ark and asks it to
864/// identify the file. Its purpose is to filter potentially huge files (e.g. a
865/// 30GB compressed whole genome sequencing) before uploading them, and to
866/// answer what a file is without uploading it at all.
867#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
868pub struct SlotIdentifyRequest {
869    /// File name to guess the contents of
870    #[prost(string, tag = "1")]
871    pub name: ::prost::alloc::string::String,
872    /// File size to guess the contents of
873    #[prost(uint64, tag = "2")]
874    pub size: u64,
875    /// First chunk of the file to guess the contents of
876    #[prost(bytes = "vec", tag = "3")]
877    pub chunk: ::prost::alloc::vec::Vec<u8>,
878    /// Possible slots to interpret as (empty == any)
879    #[prost(enumeration = "SlotKind", repeated, tag = "4")]
880    pub kinds: ::prost::alloc::vec::Vec<i32>,
881}
882/// SlotIdentifyResponse contains the identification based on the chunk shared
883/// in the request.
884#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
885pub struct SlotIdentifyResponse {
886    /// Identified slot type to use during upload
887    #[prost(enumeration = "SlotKind", tag = "1")]
888    pub kind: i32,
889    /// Identification confidence level
890    #[prost(enumeration = "SlotConfidence", tag = "2")]
891    pub conf: i32,
892    /// Short summary of the identified data
893    #[prost(string, tag = "3")]
894    pub summary: ::prost::alloc::string::String,
895    /// Detailed description of the identified data
896    #[prost(string, tag = "4")]
897    pub details: ::prost::alloc::string::String,
898    /// Reason why the file is rejected, empty otherwise
899    #[prost(string, tag = "5")]
900    pub rejection: ::prost::alloc::string::String,
901}
902/// SlotUploadStartRequest requests uploading a file into a slot of the given
903/// kind (e.g. a whole genome variant call file).
904#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
905pub struct SlotUploadStartRequest {
906    /// Slot type requesting to upload
907    #[prost(enumeration = "SlotKind", tag = "1")]
908    pub kind: i32,
909    /// File name to guess the contents of
910    #[prost(string, tag = "2")]
911    pub name: ::prost::alloc::string::String,
912    /// File size to guess the contents of
913    #[prost(uint64, tag = "3")]
914    pub size: u64,
915    /// First chunk of the file to guess the contents of
916    #[prost(bytes = "vec", tag = "4")]
917    pub chunk: ::prost::alloc::vec::Vec<u8>,
918}
919/// SlotUploadStartResponse contains a unique session id for an approved upload.
920#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
921pub struct SlotUploadStartResponse {
922    /// Session id for concurrent uploads (not recommended)
923    #[prost(uint64, tag = "1")]
924    pub session: u64,
925}
926/// SlotUploadChunkRequest contains a new chunk of data to append to a pending
927/// upload session.
928#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
929pub struct SlotUploadChunkRequest {
930    /// Session id into which to append a new chunk
931    #[prost(uint64, tag = "1")]
932    pub session: u64,
933    /// Data chunk to append (reasonably capped)
934    #[prost(bytes = "vec", tag = "2")]
935    pub chunk: ::prost::alloc::vec::Vec<u8>,
936}
937/// SlotUploadChunkResponse is an empty ack of the chunk upload request.
938#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
939pub struct SlotUploadChunkResponse {}
940/// SlotUploadCancelRequest contains an upload session id to abort.
941#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
942pub struct SlotUploadCancelRequest {
943    /// Session id to cancel
944    #[prost(uint64, tag = "1")]
945    pub session: u64,
946}
947/// SlotUploadCancelResponse is an empty ack of the cancellation request.
948#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
949pub struct SlotUploadCancelResponse {}
950/// SlotPhase names one step of a slot's processing pipeline.
951#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
952pub struct SlotPhase {
953    /// Short label for the phase
954    #[prost(string, tag = "1")]
955    pub name: ::prost::alloc::string::String,
956    /// Description of what the phase does
957    #[prost(string, tag = "2")]
958    pub desc: ::prost::alloc::string::String,
959}
960/// SlotUploadProcessRequest marks an upload session ready for processing and
961/// requests a progress report to be sent back. May be called multiple times.
962#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
963pub struct SlotUploadProcessRequest {
964    /// Session id to mark as completed
965    #[prost(uint64, tag = "1")]
966    pub session: u64,
967}
968/// SlotUploadProcessResponse acks the completion of a slot upload and also
969/// contains the current processing progress.
970#[derive(Clone, PartialEq, ::prost::Message)]
971pub struct SlotUploadProcessResponse {
972    /// Unix timestamp when data processing started
973    #[prost(uint64, tag = "1")]
974    pub proc_start: u64,
975    /// Every phase of the pipeline, in order
976    #[prost(message, repeated, tag = "2")]
977    pub phases: ::prost::alloc::vec::Vec<SlotPhase>,
978    /// Current phase (1-indexed)
979    #[prost(uint64, tag = "3")]
980    pub phase_in: u64,
981    /// Unix timestamp when the current phase started
982    #[prost(uint64, tag = "4")]
983    pub phase_start: u64,
984    /// Approximate progress for this phase \[0-10000\]
985    #[prost(uint64, tag = "5")]
986    pub phase_progress: u64,
987    /// Failure reason if processing failed, empty otherwise
988    #[prost(string, tag = "6")]
989    pub failure: ::prost::alloc::string::String,
990}
991/// DatasetPathsRequest requests the map of every path an app can read, the
992/// dataset view the device derives from its slots, lenses included.
993#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
994pub struct DatasetPathsRequest {}
995/// DatasetPathsResponse contains the generated README.md of the dataset view,
996/// the same file the Ark serves to apps at /v1/README.md: every path always,
997/// absent ones marked with the slot that would make them appear. It describes
998/// the tree only and never carries a value from the owner's data.
999#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1000pub struct DatasetPathsResponse {
1001    /// Generated README.md of the dataset view
1002    #[prost(string, tag = "1")]
1003    pub readme: ::prost::alloc::string::String,
1004}
1005/// ReservedErrors names the assigned protocol-wide errors in the reserved range
1006/// 0x00 to 0xff (inclusive). No code in this range may be assigned a request
1007/// specific meaning. Assigned codes must not be repurposed.
1008#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1009#[repr(i32)]
1010pub enum ReservedErrors {
1011    /// A failure without a standardized reason. Zero does not indicate success;
1012    /// the presence of an Error in the response indicates failure.
1013    Unspecified = 0,
1014    /// The request's responder was released without providing an application reply.
1015    Unanswered = 1,
1016    /// The peer does not know this request. Emitted by the protocol layer itself
1017    /// when a request's content is not in its schema.
1018    Unknown = 2,
1019    /// The peer knows this request but never serves it in this build or role,
1020    /// firmware updates on an emulator or develop envelopes on production.
1021    Unsupported = 3,
1022    /// The peer serves this request but not in its current state, before cloud
1023    /// sync or pairing. It may once the state changes.
1024    Unavailable = 4,
1025    /// The peer serves this request but the owner refused the approval it asked
1026    /// for on the phone. The owner's choice, not a failure.
1027    Unauthorized = 5,
1028    /// The peer serves this request but the approval it asked for did not arrive
1029    /// before its window ran out, on the phone or at the button.
1030    Unconfirmed = 6,
1031}
1032impl ReservedErrors {
1033    /// String value of the enum field names used in the ProtoBuf definition.
1034    ///
1035    /// The values are not transformed in any way and thus are considered stable
1036    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1037    pub fn as_str_name(&self) -> &'static str {
1038        match self {
1039            Self::Unspecified => "RESERVED_ERRORS_UNSPECIFIED",
1040            Self::Unanswered => "RESERVED_ERRORS_UNANSWERED",
1041            Self::Unknown => "RESERVED_ERRORS_UNKNOWN",
1042            Self::Unsupported => "RESERVED_ERRORS_UNSUPPORTED",
1043            Self::Unavailable => "RESERVED_ERRORS_UNAVAILABLE",
1044            Self::Unauthorized => "RESERVED_ERRORS_UNAUTHORIZED",
1045            Self::Unconfirmed => "RESERVED_ERRORS_UNCONFIRMED",
1046        }
1047    }
1048    /// Creates an enum from field names used in the ProtoBuf definition.
1049    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1050        match value {
1051            "RESERVED_ERRORS_UNSPECIFIED" => Some(Self::Unspecified),
1052            "RESERVED_ERRORS_UNANSWERED" => Some(Self::Unanswered),
1053            "RESERVED_ERRORS_UNKNOWN" => Some(Self::Unknown),
1054            "RESERVED_ERRORS_UNSUPPORTED" => Some(Self::Unsupported),
1055            "RESERVED_ERRORS_UNAVAILABLE" => Some(Self::Unavailable),
1056            "RESERVED_ERRORS_UNAUTHORIZED" => Some(Self::Unauthorized),
1057            "RESERVED_ERRORS_UNCONFIRMED" => Some(Self::Unconfirmed),
1058            _ => None,
1059        }
1060    }
1061}
1062/// SlotKind identifies a slot on the device. Each value corresponds to a unique
1063/// data type that the device can store and manage.
1064#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1065#[repr(i32)]
1066pub enum SlotKind {
1067    /// Never sent, an unset kind
1068    SlotUnspecified = 0,
1069    /// Human reference genome assembly
1070    SlotReferenceGenome = 1,
1071    /// Gene-to-coordinate mapping database
1072    SlotGeneAnnotations = 2,
1073    /// User's SNP/indel variant calls
1074    SlotSnpIndelCalls = 3,
1075    /// Variant catalog (rsID-to-position), from dbSNP
1076    SlotVariantCatalog = 4,
1077}
1078impl SlotKind {
1079    /// String value of the enum field names used in the ProtoBuf definition.
1080    ///
1081    /// The values are not transformed in any way and thus are considered stable
1082    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1083    pub fn as_str_name(&self) -> &'static str {
1084        match self {
1085            Self::SlotUnspecified => "SLOT_UNSPECIFIED",
1086            Self::SlotReferenceGenome => "SLOT_REFERENCE_GENOME",
1087            Self::SlotGeneAnnotations => "SLOT_GENE_ANNOTATIONS",
1088            Self::SlotSnpIndelCalls => "SLOT_SNP_INDEL_CALLS",
1089            Self::SlotVariantCatalog => "SLOT_VARIANT_CATALOG",
1090        }
1091    }
1092    /// Creates an enum from field names used in the ProtoBuf definition.
1093    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1094        match value {
1095            "SLOT_UNSPECIFIED" => Some(Self::SlotUnspecified),
1096            "SLOT_REFERENCE_GENOME" => Some(Self::SlotReferenceGenome),
1097            "SLOT_GENE_ANNOTATIONS" => Some(Self::SlotGeneAnnotations),
1098            "SLOT_SNP_INDEL_CALLS" => Some(Self::SlotSnpIndelCalls),
1099            "SLOT_VARIANT_CATALOG" => Some(Self::SlotVariantCatalog),
1100            _ => None,
1101        }
1102    }
1103}
1104/// SlotOrigin describes the nature of the data in a slot, determining what
1105/// actions are available to the user for filling it.
1106#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1107#[repr(i32)]
1108pub enum SlotOrigin {
1109    /// Never sent, an unset origin
1110    OriginUnspecified = 0,
1111    /// Unique to the user, uploaded by them
1112    OriginPersonal = 1,
1113    /// Standard reference data, downloaded from public sources
1114    OriginReference = 2,
1115}
1116impl SlotOrigin {
1117    /// String value of the enum field names used in the ProtoBuf definition.
1118    ///
1119    /// The values are not transformed in any way and thus are considered stable
1120    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1121    pub fn as_str_name(&self) -> &'static str {
1122        match self {
1123            Self::OriginUnspecified => "ORIGIN_UNSPECIFIED",
1124            Self::OriginPersonal => "ORIGIN_PERSONAL",
1125            Self::OriginReference => "ORIGIN_REFERENCE",
1126        }
1127    }
1128    /// Creates an enum from field names used in the ProtoBuf definition.
1129    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1130        match value {
1131            "ORIGIN_UNSPECIFIED" => Some(Self::OriginUnspecified),
1132            "ORIGIN_PERSONAL" => Some(Self::OriginPersonal),
1133            "ORIGIN_REFERENCE" => Some(Self::OriginReference),
1134            _ => None,
1135        }
1136    }
1137}
1138/// SlotState describes whether a slot holds data and whether that data is sound.
1139#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1140#[repr(i32)]
1141pub enum SlotState {
1142    /// Never sent, an unset state
1143    StateUnspecified = 0,
1144    /// Nothing stored
1145    StateEmpty = 1,
1146    /// Data present and healthy
1147    StateFilled = 2,
1148    /// Files exist but the metadata is missing, corrupt or outdated
1149    StateDamaged = 3,
1150}
1151impl SlotState {
1152    /// String value of the enum field names used in the ProtoBuf definition.
1153    ///
1154    /// The values are not transformed in any way and thus are considered stable
1155    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1156    pub fn as_str_name(&self) -> &'static str {
1157        match self {
1158            Self::StateUnspecified => "STATE_UNSPECIFIED",
1159            Self::StateEmpty => "STATE_EMPTY",
1160            Self::StateFilled => "STATE_FILLED",
1161            Self::StateDamaged => "STATE_DAMAGED",
1162        }
1163    }
1164    /// Creates an enum from field names used in the ProtoBuf definition.
1165    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1166        match value {
1167            "STATE_UNSPECIFIED" => Some(Self::StateUnspecified),
1168            "STATE_EMPTY" => Some(Self::StateEmpty),
1169            "STATE_FILLED" => Some(Self::StateFilled),
1170            "STATE_DAMAGED" => Some(Self::StateDamaged),
1171            _ => None,
1172        }
1173    }
1174}
1175/// SlotConfidence indicates how confident the device is in its identification
1176/// of a file, based on content, filename and size.
1177#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1178#[repr(i32)]
1179pub enum SlotConfidence {
1180    /// Never sent, an unset confidence
1181    ConfidenceUnspecified = 0,
1182    /// Filename/extension only, no content confirmation
1183    ConfidenceLow = 1,
1184    /// Format detected but slot type inferred from size/filename
1185    ConfidenceMid = 2,
1186    /// Magic bytes match and format-specific content confirmed
1187    ConfidenceHigh = 3,
1188}
1189impl SlotConfidence {
1190    /// String value of the enum field names used in the ProtoBuf definition.
1191    ///
1192    /// The values are not transformed in any way and thus are considered stable
1193    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1194    pub fn as_str_name(&self) -> &'static str {
1195        match self {
1196            Self::ConfidenceUnspecified => "CONFIDENCE_UNSPECIFIED",
1197            Self::ConfidenceLow => "CONFIDENCE_LOW",
1198            Self::ConfidenceMid => "CONFIDENCE_MID",
1199            Self::ConfidenceHigh => "CONFIDENCE_HIGH",
1200        }
1201    }
1202    /// Creates an enum from field names used in the ProtoBuf definition.
1203    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1204        match value {
1205            "CONFIDENCE_UNSPECIFIED" => Some(Self::ConfidenceUnspecified),
1206            "CONFIDENCE_LOW" => Some(Self::ConfidenceLow),
1207            "CONFIDENCE_MID" => Some(Self::ConfidenceMid),
1208            "CONFIDENCE_HIGH" => Some(Self::ConfidenceHigh),
1209            _ => None,
1210        }
1211    }
1212}