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, 775, 1025, 1026, 1027, 1281, 1282, 1283, 1284, 1285, 1286, 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 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        /// Queries whether the Ark is paired and opened
64        #[prost(message, tag = "769")]
65        PairingStatus(super::PairingStatusRequest),
66        /// Asks the Ark to authorize a pairing rendezvous
67        #[prost(message, tag = "770")]
68        PairingAuth(super::PairingAuthRequest),
69        /// Injects the companion app's identity, relayed by the cloud
70        #[prost(message, tag = "771")]
71        PairingSetAppId(super::PairingSetAppIdentityRequest),
72        /// Injects the companion app's storage key material
73        #[prost(message, tag = "772")]
74        PairingSetAppStorage(super::PairingSetAppStorageRequest),
75        /// Confirms the app received the Ark's key material
76        #[prost(message, tag = "773")]
77        PairingAckArkStorage(super::PairingAckArkStorageRequest),
78        /// Waits for the user to accept the pairing
79        #[prost(message, tag = "774")]
80        PairingAccept(super::PairingAcceptanceRequest),
81        /// Waits for the Ark to finish pairing maintenance
82        #[prost(message, tag = "775")]
83        PairingComplete(super::PairingCompletionRequest),
84        /// Asks the Ark to authorize joining the app relay
85        #[prost(message, tag = "1025")]
86        RelayJoin(super::RelayJoinRequest),
87        /// Opaque request from the companion app to the Ark
88        #[prost(message, tag = "1026")]
89        RelayReq(super::RelayAppToArkRequest),
90        /// Opaque response from the companion app to an Ark request
91        #[prost(message, tag = "1027")]
92        RelayRes(super::RelayAppToArkResponse),
93        /// Starts the unlock, confirmed through the app
94        #[prost(message, tag = "1281")]
95        Unlock(super::UnlockRequest),
96        /// Begins a chunked upload of an app to execute
97        #[prost(message, tag = "1282")]
98        ExecUploadStart(super::ExecutionUploadStartRequest),
99        /// Appends a chunk to a pending app upload
100        #[prost(message, tag = "1283")]
101        ExecUploadChunk(super::ExecutionUploadChunkRequest),
102        /// Runs an uploaded app, confirmed through the app
103        #[prost(message, tag = "1284")]
104        ExecSched(super::ExecutionScheduleRequest),
105        /// Checks on a running app
106        #[prost(message, tag = "1285")]
107        ExecStatus(super::ExecutionStatusRequest),
108        /// Cancels an app run or a pending upload
109        #[prost(message, tag = "1286")]
110        ExecCancel(super::ExecutionCancelRequest),
111        /// Lists the state of every data slot
112        #[prost(message, tag = "1537")]
113        SlotList(super::SlotListRequest),
114        /// Resets a slot to empty whatever its state
115        #[prost(message, tag = "1538")]
116        SlotRepair(super::SlotRepairRequest),
117        /// Removes the contents of a filled slot
118        #[prost(message, tag = "1539")]
119        SlotDelete(super::SlotDeleteRequest),
120        /// Asks the Ark to identify a file from its first chunk
121        #[prost(message, tag = "1540")]
122        SlotUploadPeek(super::SlotUploadPeekRequest),
123        /// Starts uploading a file into a slot
124        #[prost(message, tag = "1541")]
125        SlotUploadStart(super::SlotUploadStartRequest),
126        /// Appends a chunk to a pending slot upload
127        #[prost(message, tag = "1542")]
128        SlotUploadChunk(super::SlotUploadChunkRequest),
129        /// Aborts a pending slot upload
130        #[prost(message, tag = "1543")]
131        SlotUploadCancel(super::SlotUploadCancelRequest),
132        /// Marks an upload complete and polls its processing
133        #[prost(message, tag = "1544")]
134        SlotUploadProcess(super::SlotUploadProcessRequest),
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, 775, 1025, 1026, 1027, 1028, 1281, 1282, 1283, 1284, 1285, 1286, 1537, 1538, 1539, 1540, 1541, 1542, 1543, 1544, 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        /// Whether the Ark is paired and opened
204        #[prost(message, tag = "769")]
205        PairingStatus(super::PairingStatusResponse),
206        /// Signed authorization for the cloud to open a rendezvous
207        #[prost(message, tag = "770")]
208        PairingAuth(super::PairingAuthResponse),
209        /// Acknowledges the accepted app identity
210        #[prost(message, tag = "771")]
211        PairingSetAppId(super::PairingSetAppIdentityResponse),
212        /// Ark device infos and key material, sealed for the app
213        #[prost(message, tag = "772")]
214        PairingSetAppStorage(super::PairingSetAppStorageResponse),
215        /// Acknowledges the app's receipt of the Ark's keys
216        #[prost(message, tag = "773")]
217        PairingAckArkStorage(super::PairingAckArkStorageResponse),
218        /// Signed confirmation that the user accepted the pairing
219        #[prost(message, tag = "774")]
220        PairingAccept(super::PairingAcceptanceResponse),
221        /// Signed confirmation that the Ark finished pairing
222        #[prost(message, tag = "775")]
223        PairingComplete(super::PairingCompletionResponse),
224        /// Signed authorization for the cloud to join the relay
225        #[prost(message, tag = "1025")]
226        RelayJoin(super::RelayJoinResponse),
227        /// Opaque request from the Ark to the companion app
228        #[prost(message, tag = "1026")]
229        RelayReq(super::RelayArkToAppRequest),
230        /// Opaque response from the Ark to an app request
231        #[prost(message, tag = "1027")]
232        RelayRes(super::RelayArkToAppResponse),
233        /// Protocol violation found in an app response, for debugging
234        #[prost(message, tag = "1028")]
235        RelayFail(super::RelayAppToArkFailure),
236        /// Acknowledges the completed unlock
237        #[prost(message, tag = "1281")]
238        Unlock(super::UnlockResponse),
239        /// Task id for the chunk, schedule and cancel 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 authorized and started execution
246        #[prost(message, tag = "1284")]
247        ExecSched(super::ExecutionScheduleResponse),
248        /// Whether the app still runs, with its result once done
249        #[prost(message, tag = "1285")]
250        ExecStatus(super::ExecutionStatusResponse),
251        /// Acknowledges the cancelled run or upload
252        #[prost(message, tag = "1286")]
253        ExecCancel(super::ExecutionCancelResponse),
254        /// Current state of every data slot
255        #[prost(message, tag = "1537")]
256        SlotList(super::SlotListResponse),
257        /// Acknowledges the reset slot
258        #[prost(message, tag = "1538")]
259        SlotRepair(super::SlotRepairResponse),
260        /// Acknowledges the deleted slot
261        #[prost(message, tag = "1539")]
262        SlotDelete(super::SlotDeleteResponse),
263        /// Identification of the peeked file
264        #[prost(message, tag = "1540")]
265        SlotUploadPeek(super::SlotUploadPeekResponse),
266        /// Session id of the approved upload
267        #[prost(message, tag = "1541")]
268        SlotUploadStart(super::SlotUploadStartResponse),
269        /// Acknowledges the appended slot chunk
270        #[prost(message, tag = "1542")]
271        SlotUploadChunk(super::SlotUploadChunkResponse),
272        /// Acknowledges the aborted upload
273        #[prost(message, tag = "1543")]
274        SlotUploadCancel(super::SlotUploadCancelResponse),
275        /// Processing progress of the completed upload
276        #[prost(message, tag = "1544")]
277        SlotUploadProcess(super::SlotUploadProcessResponse),
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}
339/// CloudSyncStartRequest requests the device to start a synchronization procedure
340/// against the cloud servers to establish the current time as well as the currently
341/// active cloud identity.
342#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
343pub struct CloudSyncStartRequest {
344    /// Post-quantum CWT attestation for the server signing (xDSA) key
345    #[prost(bytes = "vec", tag = "1")]
346    pub signer: ::prost::alloc::vec::Vec<u8>,
347    /// Post-quantum CWT attestation for the server encryption (xHPKE) key
348    #[prost(bytes = "vec", tag = "2")]
349    pub crypto: ::prost::alloc::vec::Vec<u8>,
350}
351/// CloudSyncStartResponse is an initiation of a cloud sync from the device, authed
352/// to the requested cloud identity.
353#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
354pub struct CloudSyncStartResponse {
355    /// Random nonce to avoid malicious host machines setting bad times
356    #[prost(bytes = "vec", tag = "1")]
357    pub challenge: ::prost::alloc::vec::Vec<u8>,
358}
359/// CloudSyncFinishRequest is the completion of a previously initiated cloud sync
360/// procedure, this time being signed by a single identity currently used by the
361/// cloud.
362#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
363pub struct CloudSyncFinishRequest {
364    /// Unix timestamp from the server in milliseconds
365    #[prost(uint64, tag = "1")]
366    pub unixmilli: u64,
367    /// SignAt[Cloud]["cloudsync-v1"][unixmilli/1000](CBOR(challenge))
368    #[prost(bytes = "vec", tag = "2")]
369    pub signature: ::prost::alloc::vec::Vec<u8>,
370}
371/// CloudSyncFinishResponse is the acknowledgement whether the device accepted the
372/// cloud sync from the server or rejected for some reason.
373#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
374pub struct CloudSyncFinishResponse {
375    /// Timestamp that was accepted and set
376    #[prost(uint64, tag = "1")]
377    pub accepted: u64,
378}
379/// GenuinityProofRequest requests the device to generate a cryptographic proof of
380/// its own authenticity.
381#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
382pub struct GenuinityProofRequest {}
383/// GenuinityProofResponse is the device genuinity proof, an encrypted signature
384/// of the device.
385#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
386pub struct GenuinityProofResponse {
387    /// Seal[Ark->Cloud]["genuinity-v1"][null](null)
388    #[prost(bytes = "vec", tag = "1")]
389    pub proof: ::prost::alloc::vec::Vec<u8>,
390}
391/// FirmwareUpdatePrepRequest prepares a firmware update procedure. If any previous
392/// update procedure was in progress, it is aborted.
393#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
394pub struct FirmwareUpdatePrepRequest {
395    /// Version string to update to
396    #[prost(string, tag = "1")]
397    pub version: ::prost::alloc::string::String,
398    /// SHA256 hash of the (encrypted) firmware archive
399    #[prost(bytes = "vec", tag = "2")]
400    pub sha256: ::prost::alloc::vec::Vec<u8>,
401    /// Number of bytes (progress purposes, ignored otherwise)
402    #[prost(uint64, tag = "3")]
403    pub bytes: u64,
404}
405/// FirmwareUpdatePrepResponse confirms whether a new firmware update process was
406/// started, or if the request was rejected and why.
407///
408/// If it was accepted, a new ephemeral encryption identity is generated by the Ark
409/// to receive the firmware access key to; and sent along with the firmware infos.
410#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
411pub struct FirmwareUpdatePrepResponse {
412    /// Seal[Ark->Cloud]["firmware-v1"][\[version, sha256\]](temp-key)
413    #[prost(bytes = "vec", tag = "1")]
414    pub auth: ::prost::alloc::vec::Vec<u8>,
415}
416/// FirmwareUpdateInitRequest initiates a previously prepared firmware update
417/// procedure by providing the authenticated and encrypted firmware key.
418///
419/// Note, if the initiation is rejected, the entire update process is torn down.
420#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
421pub struct FirmwareUpdateInitRequest {
422    /// Seal[Cloud->temp-key]["firmware-v1"][\[version, sha256\]](sym-key)
423    #[prost(bytes = "vec", tag = "1")]
424    pub access: ::prost::alloc::vec::Vec<u8>,
425}
426/// FirmwareUpdateInitResponse confirms whether a new firmware update process
427/// was started, or if the request was rejected and why.
428///
429/// Note, if the init is rejected, the entire update process is torn down.
430#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
431pub struct FirmwareUpdateInitResponse {}
432/// FirmwareUpdateUploadRequest requests appending a new chunk of data to the
433/// currently pending firmware upload process.
434#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
435pub struct FirmwareUpdateUploadRequest {
436    /// Chunk of firmware blob to append (reasonably capped)
437    #[prost(bytes = "vec", tag = "1")]
438    pub chunk: ::prost::alloc::vec::Vec<u8>,
439}
440/// FirmwareUpdateUploadResponse is the response whether the requested chunk was
441/// accepted or rejected.
442///
443/// Note, if the upload is rejected, the entire update process is torn down.
444#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
445pub struct FirmwareUpdateUploadResponse {}
446/// FirmwareUpdateVerifyRequest requests decrypting the uploaded firmware and
447/// verifying its contents, preparing for the last step of actually installing
448/// the firmware update.
449#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
450pub struct FirmwareUpdateVerifyRequest {}
451/// FirmwareUpdateVerifyResponse is the response whether the firmware just uploaded
452/// passed all verifications and is ready for application.
453///
454/// Note, if the verification is rejected, the entire update process is torn down.
455#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
456pub struct FirmwareUpdateVerifyResponse {}
457/// FirmwareUpdateInstallRequest requests the currently pending (but already
458/// verified) firmware to be applied to disk. This message will cause the device
459/// to reboot if applied successfully.
460#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
461pub struct FirmwareUpdateInstallRequest {}
462/// FirmwareUpdateInstallResponse is the response whether the firmware was applied
463/// successfully or not.
464#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
465pub struct FirmwareUpdateInstallResponse {}
466/// PairingStatusRequest requests the initialization status from the device.
467#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
468pub struct PairingStatusRequest {}
469/// PairingStatusResponse is the initialization status response of the device.
470#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
471pub struct PairingStatusResponse {
472    /// Whether the device has user data initialized
473    #[prost(bool, tag = "1")]
474    pub paired: bool,
475    /// Whether the device is currently opened (false if not paired)
476    #[prost(bool, tag = "2")]
477    pub opened: bool,
478}
479/// PairingAuthRequest requests the initiation of a pairing.
480#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
481pub struct PairingAuthRequest {}
482/// PairingAuthResponse responds whether the device is in a state compatible with
483/// pairing (i.e. reset) and if so, it signs an authorization for the server to open
484/// a new rendezvous point; containing the xHPKE public key to use for encrypting
485/// messages to this Ark after pairing.
486#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
487pub struct PairingAuthResponse {
488    /// Seal[Ark->Cloud]["pairing-v1"][null](pair-key)
489    #[prost(bytes = "vec", tag = "1")]
490    pub auth: ::prost::alloc::vec::Vec<u8>,
491    /// Fingerprint of the pair-key to transmit to the app out-of-protocol
492    #[prost(bytes = "vec", tag = "2")]
493    pub fprint: ::prost::alloc::vec::Vec<u8>,
494}
495/// PairingSetAppIdentityRequest injects the companion app's identity, relayed
496/// by the cloud.
497#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
498pub struct PairingSetAppIdentityRequest {
499    /// Seal[Cloud->App]["pairing-v1:identity"][\[ark_signer_id, ark_crypto_id\]](\[app_signer, app_crypto\])
500    #[prost(bytes = "vec", tag = "1")]
501    pub identity: ::prost::alloc::vec::Vec<u8>,
502}
503/// PairingSetAppIdentityResponse confirms whether the remote identity was
504/// accepted by the Ark or not.
505#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
506pub struct PairingSetAppIdentityResponse {}
507/// PairingSetAppStorageRequest injects the app's storage key material into the
508/// pairing flow.
509#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
510pub struct PairingSetAppStorageRequest {
511    /// Seal[App->Ark]["pairing-v1:storage"][\[ark_signer_id, ark_crypto_id, app_signer_id, app_crypto_id\]](\[app_keymat\])
512    #[prost(bytes = "vec", tag = "1")]
513    pub app_key: ::prost::alloc::vec::Vec<u8>,
514}
515/// PairingSetAppStorageResponse confirms whether the remote storage material
516/// was accepted, and if so, bundles the ark device infos and ark key material.
517#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
518pub struct PairingSetAppStorageResponse {
519    /// 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\])
520    #[prost(bytes = "vec", tag = "1")]
521    pub ark_keys: ::prost::alloc::vec::Vec<u8>,
522}
523/// PairingAckArkStorageRequest confirms from the app that the Ark's key material
524/// was received correctly.
525#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
526pub struct PairingAckArkStorageRequest {
527    /// Seal[App->Ark]["pairing-v1:storage"][\[ark_signer_id, ark_crypto_id, app_signer_id, app_crypto_id, ark_keymat\]](null)
528    #[prost(bytes = "vec", tag = "1")]
529    pub app_ack: ::prost::alloc::vec::Vec<u8>,
530}
531/// PairingAckArkStorageResponse confirms that the key ack was accepted.
532#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
533pub struct PairingAckArkStorageResponse {}
534/// PairingAcceptanceRequest is a blocking poller to wait until the user accepts
535/// a pairing request or it times out.
536#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
537pub struct PairingAcceptanceRequest {}
538/// PairingAcceptanceResponse returns whether the user accepted the pairing or
539/// if it timed out. At this point, the device still needs to format itself.
540#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
541pub struct PairingAcceptanceResponse {
542    /// Seal[Ark->Cloud]["pairing-v1:accept"][\[ark_signer_id, ark_crypto_id, app_signer_id, app_crypto_id\]](null)
543    #[prost(bytes = "vec", tag = "1")]
544    pub confirm: ::prost::alloc::vec::Vec<u8>,
545}
546/// PairingCompletionRequest is a blocking poller to wait until the device finishes
547/// any pairing maintenance operation (e.g. encrypting itself).
548#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
549pub struct PairingCompletionRequest {}
550/// PairingCompletionResponse returns whether the device finished preparing for
551/// live operation.
552#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
553pub struct PairingCompletionResponse {
554    /// Seal[Ark->Cloud]["pairing-v1:complete"][\[ark_signer_id, ark_crypto_id, app_signer_id, app_crypto_id\]](null)
555    #[prost(bytes = "vec", tag = "1")]
556    pub confirm: ::prost::alloc::vec::Vec<u8>,
557}
558/// RelayJoinRequest requests authorization to join the communication relay with
559/// the companion app.
560#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
561pub struct RelayJoinRequest {}
562/// RelayJoinResponse responds whether the device is in a state compatible with
563/// relaying (i.e. paired) and if so, it signs an authorization for the server
564/// to join the rendezvous point.
565#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
566pub struct RelayJoinResponse {
567    /// Seal[Ark->Cloud]["relaying-v1"][null](null)
568    #[prost(bytes = "vec", tag = "1")]
569    pub auth: ::prost::alloc::vec::Vec<u8>,
570}
571/// RelayAppToArkRequest is an opaque request from the companion app that the Ark may
572/// respond to, or may flat out reject.
573#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
574pub struct RelayAppToArkRequest {
575    /// Application layer request ID from the app
576    #[prost(uint64, tag = "1")]
577    pub id: u64,
578    /// Seal[App->Ark]["relaying-v1:request"][id](\[method, [params...]\]))
579    #[prost(bytes = "vec", tag = "2")]
580    pub req: ::prost::alloc::vec::Vec<u8>,
581}
582/// RelayArkToAppResponse is an opaque response from the Ark to the companion app to an
583/// opaque request.
584#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
585pub struct RelayArkToAppResponse {
586    /// Application layer request ID from the app being responding to
587    #[prost(uint64, tag = "1")]
588    pub id: u64,
589    /// Seal[Ark->App]["relaying-v1:response"][id](\[result, [err_code, err_str]\])
590    #[prost(bytes = "vec", tag = "2")]
591    pub res: ::prost::alloc::vec::Vec<u8>,
592}
593/// RelayAppToArkFailure is returned if a low level protocol violation is detected
594/// when an app-to-ark response was processed.
595///
596/// This is not an actionable message, rather it's just a way to expose a protocol
597/// failure / violation to the calling app for debugging purposes.
598#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
599pub struct RelayAppToArkFailure {
600    /// Reason for rejecting the response at the protocol level
601    #[prost(string, tag = "1")]
602    pub error: ::prost::alloc::string::String,
603}
604/// RelayArkToAppRequest is an opaque request from the Ark to the companion app, which
605/// will generally be sent as an interim response to some other request, requiring
606/// authorization from the app side.
607#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
608pub struct RelayArkToAppRequest {
609    /// Application layer request ID from the ark
610    #[prost(uint64, tag = "1")]
611    pub id: u64,
612    /// Seal[Ark->App]["relaying-v1:request"][id](\[method, [params...]\])
613    #[prost(bytes = "vec", tag = "2")]
614    pub req: ::prost::alloc::vec::Vec<u8>,
615}
616/// RelayAppToArkResponse is an opaque response from the companion app to an opaque
617/// Ark request. The ark will respond with the deferred response to the original
618/// request.
619#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
620pub struct RelayAppToArkResponse {
621    /// Application layer request ID from the ark being responding to
622    #[prost(uint64, tag = "1")]
623    pub id: u64,
624    /// Seal[App->Ark]["relaying-v1:response"][id](\[result, [err_code, err_str]\])
625    #[prost(bytes = "vec", tag = "2")]
626    pub res: ::prost::alloc::vec::Vec<u8>,
627}
628/// UnlockRequest requests the device to start the unlock procedure. This request
629/// is async, potentially returning a response only after confirming with the app.
630///
631/// It will trigger sending a RelayArkToAppRequest with the request content:
632///    - method: "unlock"
633///    - params: \[\]
634///
635/// The request expects a RelayAppToArkResponse with the response content:
636///
637///    If approved:
638///      - result = key: \[u8; 32\] // Shared secret from the pairing protocol
639///      - err_code: 0
640///      - err_str:  ""
641///
642///    If denied:
643///      - result = key = \[0u8; 32\] // All zeroes (signals a denial)
644///      - err_code: 0              // No error, deny is valid user choice
645///      - err_str:  ""             // No error, deny is valid user choice
646///
647/// where:
648///    - key: Symmetric key for accessing the storage partition
649///
650/// Note, relayed messages are encrypted and authenticated on the timestamp and
651/// request/response id, so there's no need for further complications.
652#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
653pub struct UnlockRequest {}
654/// UnlockResponse contains whether the unlock was successfully executed.
655#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
656pub struct UnlockResponse {}
657/// ExecutionUploadStartRequest begins a chunked upload of a WASM binary to
658/// execute. The declared size is used to pre-allocate the receive buffer and
659/// to reject oversized uploads early; the actual bytes are sent via subsequent
660/// ExecutionUploadChunkRequest messages.
661#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
662pub struct ExecutionUploadStartRequest {
663    /// Total binary size in bytes
664    #[prost(uint64, tag = "1")]
665    pub bytes: u64,
666}
667/// ExecutionUploadStartResponse contains the task id to use for subsequent
668/// chunk, schedule and cancel messages.
669#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
670pub struct ExecutionUploadStartResponse {
671    /// Task id to stream chunks into
672    #[prost(uint64, tag = "1")]
673    pub taskid: u64,
674}
675/// ExecutionUploadChunkRequest appends a chunk of data to a pending upload.
676/// Chunks must be appended in order and must not overrun the declared size.
677#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
678pub struct ExecutionUploadChunkRequest {
679    /// Task id to append to
680    #[prost(uint64, tag = "1")]
681    pub taskid: u64,
682    /// Data chunk to append (reasonably capped)
683    #[prost(bytes = "vec", tag = "2")]
684    pub chunk: ::prost::alloc::vec::Vec<u8>,
685}
686/// ExecutionUploadChunkResponse is an empty ack of the chunk upload request.
687#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
688pub struct ExecutionUploadChunkResponse {}
689/// ExecutionScheduleRequest finalizes an upload and requests the device to
690/// execute the uploaded 3rd party app. The upload must have been completed
691/// (i.e. the sum of chunk sizes matches the declared size).
692///
693/// This request is async, potentially returning a response only after confirming
694/// with the app.
695///
696/// It will trigger sending a RelayArkToAppRequest with the request content:
697///    - method: "execute"
698///    - params: \[task: string\]
699///
700/// The request expects a RelayAppToArkResponse with the response content:
701///
702///    If approved:
703///      - result = approval = true  // CBOR boolean
704///      - err_code: 0
705///      - err_str:  ""
706///
707///    If denied:
708///      - result = approval = false // CBOR boolean
709///      - err_code: 0              // No error, deny is valid user choice
710///      - err_str:  ""             // No error, deny is valid user choice
711///
712/// where:
713///    - approval: Whether the user approved or denied the execution request
714///
715/// Note, relayed messages are encrypted and authenticated on the timestamp and
716/// request/response id, so there's no need for further complications.
717#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
718pub struct ExecutionScheduleRequest {
719    /// Task id returned by ExecutionUploadStartResponse
720    #[prost(uint64, tag = "1")]
721    pub taskid: u64,
722}
723/// ExecutionScheduleResponse acks that the execution was authorized and the
724/// task is now running. The host already holds the task id from the preceding
725/// ExecutionUploadStartResponse.
726#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
727pub struct ExecutionScheduleResponse {}
728/// ExecutionCancelRequest cancels a previously started 3rd party app run or
729/// an in-progress upload.
730#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
731pub struct ExecutionCancelRequest {
732    /// Task id to cancel
733    #[prost(uint64, tag = "1")]
734    pub taskid: u64,
735}
736/// ExecutionCancelResponse contains the data gathered during an app's execution.
737#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
738pub struct ExecutionCancelResponse {}
739/// ExecutionStatusRequest checks the execution status of a previously started
740/// 3rd party app run.
741#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
742pub struct ExecutionStatusRequest {
743    /// Pending execution ID to check for updates
744    #[prost(uint64, tag = "1")]
745    pub taskid: u64,
746}
747/// ExecutionResultResponse contains the data gathered during an app's execution.
748#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
749pub struct ExecutionResultResponse {
750    /// Name of the executed app
751    #[prost(string, tag = "2")]
752    pub app_name: ::prost::alloc::string::String,
753    /// Version of the executed app
754    #[prost(string, tag = "3")]
755    pub app_version: ::prost::alloc::string::String,
756    /// Whether the task finished successfully
757    #[prost(bool, tag = "4")]
758    pub success: bool,
759    /// Raw standard output of the app
760    #[prost(bytes = "vec", tag = "5")]
761    pub stdout: ::prost::alloc::vec::Vec<u8>,
762    /// Raw standard error the app (only in develop mode)
763    #[prost(bytes = "vec", tag = "6")]
764    pub stderr: ::prost::alloc::vec::Vec<u8>,
765}
766/// ExecutionStatusResponse contains the status of a started 3rd party app
767/// execution.
768#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
769pub struct ExecutionStatusResponse {
770    /// Whether the app is still running
771    #[prost(bool, tag = "1")]
772    pub pending: bool,
773    /// The result of the execution
774    #[prost(message, optional, tag = "2")]
775    pub result: ::core::option::Option<ExecutionResultResponse>,
776}
777/// SlotMetaReferenceGenome contains metadata for the reference genome slot.
778/// Includes download information so the dashboard can fetch it from public sources.
779#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
780pub struct SlotMetaReferenceGenome {
781    /// Reference genome build (e.g. "GRCh38.p13")
782    #[prost(string, tag = "1")]
783    pub build: ::prost::alloc::string::String,
784    /// Public download URL for the reference genome
785    #[prost(string, tag = "2")]
786    pub download_url: ::prost::alloc::string::String,
787    /// Download file size in bytes
788    #[prost(uint64, tag = "3")]
789    pub download_bytes: u64,
790    /// Download file SHA256 checksum
791    #[prost(string, tag = "4")]
792    pub download_sha256: ::prost::alloc::string::String,
793}
794/// SlotMetaGeneAnnotations contains metadata for the gene annotations slot.
795/// Includes download information so the dashboard can fetch it from public sources.
796#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
797pub struct SlotMetaGeneAnnotations {
798    /// Reference genome build these annotations apply to
799    #[prost(string, tag = "1")]
800    pub build: ::prost::alloc::string::String,
801    /// Public download URL for the annotation file
802    #[prost(string, tag = "2")]
803    pub download_url: ::prost::alloc::string::String,
804    /// Download file size in bytes
805    #[prost(uint64, tag = "3")]
806    pub download_bytes: u64,
807    /// Download file SHA256 checksum
808    #[prost(string, tag = "4")]
809    pub download_sha256: ::prost::alloc::string::String,
810}
811/// SlotMetaSnpIndelCalls contains metadata for the user's variant calls slot.
812#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
813pub struct SlotMetaSnpIndelCalls {
814    /// Reference genome build the variants were called against
815    #[prost(string, tag = "1")]
816    pub build: ::prost::alloc::string::String,
817}
818/// SlotMetaVariantCatalog contains metadata for the variant-catalog slot. Includes
819/// download information so the dashboard can fetch it from public sources.
820#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
821pub struct SlotMetaVariantCatalog {
822    /// Reference genome build the dbSNP release is keyed to
823    #[prost(string, tag = "1")]
824    pub build: ::prost::alloc::string::String,
825    /// dbSNP build number (e.g. 157)
826    #[prost(uint32, tag = "2")]
827    pub dbsnp_build: u32,
828    /// Public download URL for the dbSNP VCF
829    #[prost(string, tag = "3")]
830    pub download_url: ::prost::alloc::string::String,
831    /// Download file size in bytes
832    #[prost(uint64, tag = "4")]
833    pub download_bytes: u64,
834    /// Download file SHA256 checksum
835    #[prost(string, tag = "5")]
836    pub download_sha256: ::prost::alloc::string::String,
837}
838/// SlotStatus describes the current state of a single slot slot on the device.
839#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
840pub struct SlotStatus {
841    /// Slot type
842    #[prost(enumeration = "SlotKind", tag = "1")]
843    pub kind: i32,
844    /// Human-readable slot name
845    #[prost(string, tag = "2")]
846    pub name: ::prost::alloc::string::String,
847    /// Detailed description of this slot
848    #[prost(string, tag = "3")]
849    pub desc: ::prost::alloc::string::String,
850    /// Nature of the data (personal, reference, generated)
851    #[prost(enumeration = "SlotOrigin", tag = "4")]
852    pub origin: i32,
853    /// Whether data is present on the device
854    #[prost(bool, tag = "5")]
855    pub filled: bool,
856    /// Non-empty if data files exist but metadata is missing/corrupt
857    #[prost(string, tag = "6")]
858    pub damaged: ::prost::alloc::string::String,
859    /// Slots that must be filled before this one is actionable
860    #[prost(enumeration = "SlotKind", repeated, tag = "7")]
861    pub deps: ::prost::alloc::vec::Vec<i32>,
862    /// Slot-type-specific metadata, set when the device has information about
863    /// this slot (either filled or dependencies provide enough context).
864    #[prost(oneof = "slot_status::Meta", tags = "100, 101, 102, 103")]
865    pub meta: ::core::option::Option<slot_status::Meta>,
866}
867/// Nested message and enum types in `SlotStatus`.
868pub mod slot_status {
869    /// Slot-type-specific metadata, set when the device has information about
870    /// this slot (either filled or dependencies provide enough context).
871    #[derive(Clone, PartialEq, Eq, Hash, ::prost::Oneof)]
872    pub enum Meta {
873        /// Metadata of the reference genome slot
874        #[prost(message, tag = "100")]
875        ReferenceGenome(super::SlotMetaReferenceGenome),
876        /// Metadata of the gene annotations slot
877        #[prost(message, tag = "101")]
878        GeneAnnotations(super::SlotMetaGeneAnnotations),
879        /// Metadata of the user's variant calls slot
880        #[prost(message, tag = "102")]
881        SnpIndelCalls(super::SlotMetaSnpIndelCalls),
882        /// Metadata of the variant catalog slot
883        #[prost(message, tag = "103")]
884        VariantCatalog(super::SlotMetaVariantCatalog),
885    }
886}
887/// SlotListRequest requests the state of all slot slots on the device.
888#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
889pub struct SlotListRequest {}
890/// SlotListResponse contains the current state of every slot slot.
891#[derive(Clone, PartialEq, ::prost::Message)]
892pub struct SlotListResponse {
893    /// State of every slot, one entry per slot kind
894    #[prost(message, repeated, tag = "1")]
895    pub slots: ::prost::alloc::vec::Vec<SlotStatus>,
896}
897/// SlotRepairRequest resets a slot to empty regardless of its current state.
898/// Unlike SlotDelete (which requires the slot to be filled), repair is a stateless
899/// force cleanup that removes any leftover metadata and/or files on disk. It is
900/// intended for recovering from corruption or half-written state after crashes.
901#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
902pub struct SlotRepairRequest {
903    /// Slot to repair (reset to empty)
904    #[prost(enumeration = "SlotKind", tag = "1")]
905    pub slot: i32,
906}
907/// SlotRepairResponse is an empty ack of the repair request.
908#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
909pub struct SlotRepairResponse {}
910/// SlotDeleteRequest removes the contents of a filled slot. The slot must be
911/// in a healthy, filled state; corrupted or half-written slots must be cleaned
912/// up via SlotRepair instead.
913#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
914pub struct SlotDeleteRequest {
915    /// Slot to delete
916    #[prost(enumeration = "SlotKind", tag = "1")]
917    pub slot: i32,
918}
919/// SlotDeleteResponse is an empty ack of the delete request.
920#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
921pub struct SlotDeleteResponse {}
922/// SlotUploadPeekRequest can be used to send an ephemeral file chunk to the
923/// Ark and ask it to attempt to identify it for the caller. Its purpose is to
924/// allow quickly filtering out potentially huge slots without uploading them
925/// first (e.g. q 30GB compressed whole genome sequencing).
926#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
927pub struct SlotUploadPeekRequest {
928    /// Slot file name to guess the contents of
929    #[prost(string, tag = "1")]
930    pub name: ::prost::alloc::string::String,
931    /// Slot file size to guess the contents of
932    #[prost(uint64, tag = "2")]
933    pub size: u64,
934    /// Slot first chunk to guess the contents of
935    #[prost(bytes = "vec", tag = "3")]
936    pub chunk: ::prost::alloc::vec::Vec<u8>,
937    /// Possible slot items to interpret as (empty == any)
938    #[prost(enumeration = "SlotKind", repeated, tag = "4")]
939    pub kinds: ::prost::alloc::vec::Vec<i32>,
940}
941/// SlotUploadPeekResponse contains the data identification based on the small
942/// chunk shared in the request.
943#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
944pub struct SlotUploadPeekResponse {
945    /// Identified slot type to use during upload
946    #[prost(enumeration = "SlotKind", tag = "1")]
947    pub kind: i32,
948    /// Identification confidence level
949    #[prost(enumeration = "SlotConfidence", tag = "2")]
950    pub conf: i32,
951    /// Short summary of the identified slot type
952    #[prost(string, tag = "3")]
953    pub summary: ::prost::alloc::string::String,
954    /// Detailed description of the identified slot type
955    #[prost(string, tag = "4")]
956    pub details: ::prost::alloc::string::String,
957    /// Reason why the slot is rejected
958    #[prost(string, tag = "5")]
959    pub reject: ::prost::alloc::string::String,
960}
961/// SlotUploadStartRequest requests uploading a specific type of slot (e.g
962/// a whole genome variant call file, a bloodwork report).
963#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
964pub struct SlotUploadStartRequest {
965    /// Slot type requesting to upload
966    #[prost(enumeration = "SlotKind", tag = "1")]
967    pub kind: i32,
968    /// Slot file name to guess the contents of
969    #[prost(string, tag = "2")]
970    pub name: ::prost::alloc::string::String,
971    /// Slot file size to guess the contents of
972    #[prost(uint64, tag = "3")]
973    pub size: u64,
974    /// Slot first chunk to guess the contents of
975    #[prost(bytes = "vec", tag = "4")]
976    pub chunk: ::prost::alloc::vec::Vec<u8>,
977}
978/// SlotUploadStartResponse contains a unique session id for an approved upload
979/// and a maximum file limit after which the upload will be killed.
980#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
981pub struct SlotUploadStartResponse {
982    /// Session id for concurrent uploads (not recommended)
983    #[prost(uint64, tag = "1")]
984    pub session: u64,
985}
986/// SlotUploadChunkRequest contains a new chunk of data to append to a pending
987/// upload session.
988#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
989pub struct SlotUploadChunkRequest {
990    /// Session id into which to append a new chunk
991    #[prost(uint64, tag = "1")]
992    pub session: u64,
993    /// Data chunk to append (reasonably capped)
994    #[prost(bytes = "vec", tag = "2")]
995    pub chunk: ::prost::alloc::vec::Vec<u8>,
996}
997/// SlotUploadChunkResponse is an empty ack of the chunk upload request.
998#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
999pub struct SlotUploadChunkResponse {}
1000/// SlotUploadCancelRequest contains an upload session id to abort.
1001#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1002pub struct SlotUploadCancelRequest {
1003    /// Session id to cancel
1004    #[prost(uint64, tag = "1")]
1005    pub session: u64,
1006}
1007/// SlotUploadCancelResponse is an empty ack of the cancellation request.
1008#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1009pub struct SlotUploadCancelResponse {}
1010/// SlotUploadProcessRequest marks an upload session ready for processing and
1011/// requests a progress report to be sent back. May be called multiple times.
1012#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
1013pub struct SlotUploadProcessRequest {
1014    /// Session id to mark as completed
1015    #[prost(uint64, tag = "1")]
1016    pub session: u64,
1017}
1018/// SlotUploadProcessResponse acks the completion of a slot upload and also
1019/// contains the current processing progress.
1020#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1021pub struct SlotUploadProcessResponse {
1022    /// Timestamp when data processing started
1023    #[prost(uint64, tag = "1")]
1024    pub proc_start: u64,
1025    /// Short labels for each phase
1026    #[prost(string, repeated, tag = "2")]
1027    pub phase_names: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1028    /// Descriptions for each phase
1029    #[prost(string, repeated, tag = "3")]
1030    pub phase_descs: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1031    /// Current phase (1-indexed)
1032    #[prost(uint64, tag = "4")]
1033    pub phase_in: u64,
1034    /// Timestamp when the current phase started
1035    #[prost(uint64, tag = "5")]
1036    pub phase_start: u64,
1037    /// Approximate progress for this phase \[0-10000\]
1038    #[prost(uint64, tag = "6")]
1039    pub phase_progress: u64,
1040    /// Failure reason if processing failed, empty otherwise
1041    #[prost(string, tag = "7")]
1042    pub failure: ::prost::alloc::string::String,
1043}
1044/// ReservedErrors names the assigned protocol-wide errors in the reserved range
1045/// 0x00 to 0xff (inclusive). No code in this range may be assigned a request
1046/// specific meaning. Assigned codes must not be repurposed.
1047#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1048#[repr(i32)]
1049pub enum ReservedErrors {
1050    /// A failure without a standardized reason. Zero does not indicate success;
1051    /// the presence of an Error in the response indicates failure.
1052    Unspecified = 0,
1053    /// The request's responder was released without providing an application reply.
1054    Unanswered = 1,
1055    /// The peer does not know this request. Emitted by the protocol layer itself
1056    /// when a request's content is not in its schema.
1057    Unknown = 2,
1058    /// The peer knows this request but never serves it in this build or role,
1059    /// firmware updates on an emulator or develop envelopes on production.
1060    Unsupported = 3,
1061    /// The peer serves this request but not in its current state, before cloud
1062    /// sync or pairing. It may once the state changes.
1063    Unavailable = 4,
1064}
1065impl ReservedErrors {
1066    /// String value of the enum field names used in the ProtoBuf definition.
1067    ///
1068    /// The values are not transformed in any way and thus are considered stable
1069    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1070    pub fn as_str_name(&self) -> &'static str {
1071        match self {
1072            Self::Unspecified => "RESERVED_ERRORS_UNSPECIFIED",
1073            Self::Unanswered => "RESERVED_ERRORS_UNANSWERED",
1074            Self::Unknown => "RESERVED_ERRORS_UNKNOWN",
1075            Self::Unsupported => "RESERVED_ERRORS_UNSUPPORTED",
1076            Self::Unavailable => "RESERVED_ERRORS_UNAVAILABLE",
1077        }
1078    }
1079    /// Creates an enum from field names used in the ProtoBuf definition.
1080    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1081        match value {
1082            "RESERVED_ERRORS_UNSPECIFIED" => Some(Self::Unspecified),
1083            "RESERVED_ERRORS_UNANSWERED" => Some(Self::Unanswered),
1084            "RESERVED_ERRORS_UNKNOWN" => Some(Self::Unknown),
1085            "RESERVED_ERRORS_UNSUPPORTED" => Some(Self::Unsupported),
1086            "RESERVED_ERRORS_UNAVAILABLE" => Some(Self::Unavailable),
1087            _ => None,
1088        }
1089    }
1090}
1091/// SlotKind identifies a slot slot on the device. Each value corresponds to
1092/// a unique data type that the device can store and manage.
1093#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1094#[repr(i32)]
1095pub enum SlotKind {
1096    /// Human reference genome assembly
1097    SlotReferenceGenome = 0,
1098    /// Gene-to-coordinate mapping database
1099    SlotGeneAnnotations = 1,
1100    /// User's SNP/indel variant calls
1101    SlotSnpIndelCalls = 2,
1102    /// Variant catalog (rsID-to-position), from dbSNP
1103    SlotVariantCatalog = 3,
1104}
1105impl SlotKind {
1106    /// String value of the enum field names used in the ProtoBuf definition.
1107    ///
1108    /// The values are not transformed in any way and thus are considered stable
1109    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1110    pub fn as_str_name(&self) -> &'static str {
1111        match self {
1112            Self::SlotReferenceGenome => "SLOT_REFERENCE_GENOME",
1113            Self::SlotGeneAnnotations => "SLOT_GENE_ANNOTATIONS",
1114            Self::SlotSnpIndelCalls => "SLOT_SNP_INDEL_CALLS",
1115            Self::SlotVariantCatalog => "SLOT_VARIANT_CATALOG",
1116        }
1117    }
1118    /// Creates an enum from field names used in the ProtoBuf definition.
1119    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1120        match value {
1121            "SLOT_REFERENCE_GENOME" => Some(Self::SlotReferenceGenome),
1122            "SLOT_GENE_ANNOTATIONS" => Some(Self::SlotGeneAnnotations),
1123            "SLOT_SNP_INDEL_CALLS" => Some(Self::SlotSnpIndelCalls),
1124            "SLOT_VARIANT_CATALOG" => Some(Self::SlotVariantCatalog),
1125            _ => None,
1126        }
1127    }
1128}
1129/// SlotOrigin describes the nature of the data in a slot, determining what
1130/// actions are available to the user for filling it.
1131#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1132#[repr(i32)]
1133pub enum SlotOrigin {
1134    /// Unique to the user, uploaded by them
1135    OriginPersonal = 0,
1136    /// Standard reference data, downloaded from public sources
1137    OriginReference = 1,
1138}
1139impl SlotOrigin {
1140    /// String value of the enum field names used in the ProtoBuf definition.
1141    ///
1142    /// The values are not transformed in any way and thus are considered stable
1143    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1144    pub fn as_str_name(&self) -> &'static str {
1145        match self {
1146            Self::OriginPersonal => "ORIGIN_PERSONAL",
1147            Self::OriginReference => "ORIGIN_REFERENCE",
1148        }
1149    }
1150    /// Creates an enum from field names used in the ProtoBuf definition.
1151    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1152        match value {
1153            "ORIGIN_PERSONAL" => Some(Self::OriginPersonal),
1154            "ORIGIN_REFERENCE" => Some(Self::OriginReference),
1155            _ => None,
1156        }
1157    }
1158}
1159/// SlotConfidence indicates how confident the device is in its classification
1160/// of a peeked slot, based on content, filename, and size.
1161#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1162#[repr(i32)]
1163pub enum SlotConfidence {
1164    /// Filename/extension only, no content confirmation
1165    ConfidenceLow = 0,
1166    /// Format detected but slot type inferred from size/filename
1167    ConfidenceMid = 1,
1168    /// Magic bytes match and format-specific content confirmed
1169    ConfidenceHigh = 2,
1170}
1171impl SlotConfidence {
1172    /// String value of the enum field names used in the ProtoBuf definition.
1173    ///
1174    /// The values are not transformed in any way and thus are considered stable
1175    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1176    pub fn as_str_name(&self) -> &'static str {
1177        match self {
1178            Self::ConfidenceLow => "CONFIDENCE_LOW",
1179            Self::ConfidenceMid => "CONFIDENCE_MID",
1180            Self::ConfidenceHigh => "CONFIDENCE_HIGH",
1181        }
1182    }
1183    /// Creates an enum from field names used in the ProtoBuf definition.
1184    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1185        match value {
1186            "CONFIDENCE_LOW" => Some(Self::ConfidenceLow),
1187            "CONFIDENCE_MID" => Some(Self::ConfidenceMid),
1188            "CONFIDENCE_HIGH" => Some(Self::ConfidenceHigh),
1189            _ => None,
1190        }
1191    }
1192}