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 /// Every path an app can read, with its description, format and examples
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 /// Owner-facing description of the data this slot holds
801 #[prost(string, tag = "3")]
802 pub desc: ::prost::alloc::string::String,
803 /// The file that fills this slot, its required shape and what is refused
804 #[prost(string, tag = "4")]
805 pub format: ::prost::alloc::string::String,
806 /// Nature of the data (personal, reference)
807 #[prost(enumeration = "SlotOrigin", tag = "5")]
808 pub origin: i32,
809 /// Whether the slot is empty, filled or damaged
810 #[prost(enumeration = "SlotState", tag = "6")]
811 pub state: i32,
812 /// Why the slot is damaged, empty otherwise
813 #[prost(string, tag = "7")]
814 pub damage: ::prost::alloc::string::String,
815 /// Slots that must be filled before this one is actionable
816 #[prost(enumeration = "SlotKind", repeated, tag = "8")]
817 pub deps: ::prost::alloc::vec::Vec<i32>,
818 /// Bytes on disk for this slot (0 if empty)
819 #[prost(uint64, tag = "9")]
820 pub bytes: u64,
821 /// Reference assembly the data is keyed to (e.g. "GRCh38.p14")
822 #[prost(string, tag = "10")]
823 pub build: ::prost::alloc::string::String,
824 /// The dataset's own release, if it has one (e.g. dbSNP "157")
825 #[prost(string, tag = "11")]
826 pub version: ::prost::alloc::string::String,
827 /// Advertised public download, absent if none
828 #[prost(message, optional, tag = "12")]
829 pub download: ::core::option::Option<SlotDownload>,
830}
831/// SlotListRequest requests the state of all slots on the device.
832#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
833pub struct SlotListRequest {}
834/// SlotListResponse contains the current state of every slot.
835#[derive(Clone, PartialEq, ::prost::Message)]
836pub struct SlotListResponse {
837 /// State of every slot, one entry per slot kind
838 #[prost(message, repeated, tag = "1")]
839 pub slots: ::prost::alloc::vec::Vec<SlotStatus>,
840}
841/// SlotRepairRequest resets a slot to empty regardless of its current state.
842/// Unlike SlotDelete (which requires the slot to be filled), repair is a stateless
843/// force cleanup that removes any leftover metadata and/or files on disk. It is
844/// intended for recovering from corruption or half-written state after crashes.
845#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
846pub struct SlotRepairRequest {
847 /// Slot to repair (reset to empty)
848 #[prost(enumeration = "SlotKind", tag = "1")]
849 pub slot: i32,
850}
851/// SlotRepairResponse is an empty ack of the repair request.
852#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
853pub struct SlotRepairResponse {}
854/// SlotDeleteRequest removes the contents of a filled slot. The slot must be
855/// in a healthy, filled state; corrupted or half-written slots must be cleaned
856/// up via SlotRepair instead.
857#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
858pub struct SlotDeleteRequest {
859 /// Slot to delete
860 #[prost(enumeration = "SlotKind", tag = "1")]
861 pub slot: i32,
862}
863/// SlotDeleteResponse is an empty ack of the delete request.
864#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
865pub struct SlotDeleteResponse {}
866/// SlotIdentifyRequest sends an ephemeral file chunk to the Ark and asks it to
867/// identify the file. Its purpose is to filter potentially huge files (e.g. a
868/// 30GB compressed whole genome sequencing) before uploading them, and to
869/// answer what a file is without uploading it at all.
870#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
871pub struct SlotIdentifyRequest {
872 /// File name to guess the contents of
873 #[prost(string, tag = "1")]
874 pub name: ::prost::alloc::string::String,
875 /// File size to guess the contents of
876 #[prost(uint64, tag = "2")]
877 pub size: u64,
878 /// First chunk of the file to guess the contents of
879 #[prost(bytes = "vec", tag = "3")]
880 pub chunk: ::prost::alloc::vec::Vec<u8>,
881 /// Possible slots to interpret as (empty == any)
882 #[prost(enumeration = "SlotKind", repeated, tag = "4")]
883 pub kinds: ::prost::alloc::vec::Vec<i32>,
884}
885/// SlotIdentifyResponse contains the identification based on the chunk shared
886/// in the request.
887#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
888pub struct SlotIdentifyResponse {
889 /// Identified slot type to use during upload
890 #[prost(enumeration = "SlotKind", tag = "1")]
891 pub kind: i32,
892 /// Identification confidence level
893 #[prost(enumeration = "SlotConfidence", tag = "2")]
894 pub conf: i32,
895 /// Short summary of the identified data
896 #[prost(string, tag = "3")]
897 pub summary: ::prost::alloc::string::String,
898 /// Detailed description of the identified data
899 #[prost(string, tag = "4")]
900 pub details: ::prost::alloc::string::String,
901 /// Reason why the file is rejected, empty otherwise
902 #[prost(string, tag = "5")]
903 pub rejection: ::prost::alloc::string::String,
904}
905/// SlotUploadStartRequest requests uploading a file into a slot of the given
906/// kind (e.g. a whole genome variant call file).
907#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
908pub struct SlotUploadStartRequest {
909 /// Slot type requesting to upload
910 #[prost(enumeration = "SlotKind", tag = "1")]
911 pub kind: i32,
912 /// File name to guess the contents of
913 #[prost(string, tag = "2")]
914 pub name: ::prost::alloc::string::String,
915 /// File size to guess the contents of
916 #[prost(uint64, tag = "3")]
917 pub size: u64,
918 /// First chunk of the file to guess the contents of
919 #[prost(bytes = "vec", tag = "4")]
920 pub chunk: ::prost::alloc::vec::Vec<u8>,
921}
922/// SlotUploadStartResponse contains a unique session id for an approved upload.
923#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
924pub struct SlotUploadStartResponse {
925 /// Session id for concurrent uploads (not recommended)
926 #[prost(uint64, tag = "1")]
927 pub session: u64,
928}
929/// SlotUploadChunkRequest contains a new chunk of data to append to a pending
930/// upload session.
931#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
932pub struct SlotUploadChunkRequest {
933 /// Session id into which to append a new chunk
934 #[prost(uint64, tag = "1")]
935 pub session: u64,
936 /// Data chunk to append (reasonably capped)
937 #[prost(bytes = "vec", tag = "2")]
938 pub chunk: ::prost::alloc::vec::Vec<u8>,
939}
940/// SlotUploadChunkResponse is an empty ack of the chunk upload request.
941#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
942pub struct SlotUploadChunkResponse {}
943/// SlotUploadCancelRequest contains an upload session id to abort.
944#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
945pub struct SlotUploadCancelRequest {
946 /// Session id to cancel
947 #[prost(uint64, tag = "1")]
948 pub session: u64,
949}
950/// SlotUploadCancelResponse is an empty ack of the cancellation request.
951#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
952pub struct SlotUploadCancelResponse {}
953/// SlotPhase names one step of a slot's processing pipeline.
954#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
955pub struct SlotPhase {
956 /// Short label for the phase
957 #[prost(string, tag = "1")]
958 pub name: ::prost::alloc::string::String,
959 /// Description of what the phase does
960 #[prost(string, tag = "2")]
961 pub desc: ::prost::alloc::string::String,
962}
963/// SlotUploadProcessRequest marks an upload session ready for processing and
964/// requests a progress report to be sent back. May be called multiple times.
965#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
966pub struct SlotUploadProcessRequest {
967 /// Session id to mark as completed
968 #[prost(uint64, tag = "1")]
969 pub session: u64,
970}
971/// SlotUploadProcessResponse acks the completion of a slot upload and also
972/// contains the current processing progress.
973#[derive(Clone, PartialEq, ::prost::Message)]
974pub struct SlotUploadProcessResponse {
975 /// Unix timestamp when data processing started
976 #[prost(uint64, tag = "1")]
977 pub proc_start: u64,
978 /// Every phase of the pipeline, in order
979 #[prost(message, repeated, tag = "2")]
980 pub phases: ::prost::alloc::vec::Vec<SlotPhase>,
981 /// Current phase (1-indexed)
982 #[prost(uint64, tag = "3")]
983 pub phase_in: u64,
984 /// Unix timestamp when the current phase started
985 #[prost(uint64, tag = "4")]
986 pub phase_start: u64,
987 /// Approximate progress for this phase \[0-10000\]
988 #[prost(uint64, tag = "5")]
989 pub phase_progress: u64,
990 /// Failure reason if processing failed, empty otherwise
991 #[prost(string, tag = "6")]
992 pub failure: ::prost::alloc::string::String,
993}
994/// DatasetPathsRequest requests the map of every path an app can read, the
995/// dataset view the device derives from its slots, lenses included.
996#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
997pub struct DatasetPathsRequest {}
998/// DatasetPathsResponse maps every path an app can read, available or not, in
999/// tree order. It describes the tree only and never carries a value from the
1000/// owner's data.
1001#[derive(Clone, PartialEq, ::prost::Message)]
1002pub struct DatasetPathsResponse {
1003 /// Every path pattern, in tree order
1004 #[prost(message, repeated, tag = "1")]
1005 pub paths: ::prost::alloc::vec::Vec<DatasetPath>,
1006}
1007/// DatasetPath describes one path pattern under the data root. A segment in angle
1008/// brackets is a placeholder, described by the directory entry it names. The path
1009/// is the entry's stable key.
1010#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
1011pub struct DatasetPath {
1012 /// Path as a manifest names it
1013 #[prost(string, tag = "1")]
1014 pub path: ::prost::alloc::string::String,
1015 /// Directory or file
1016 #[prost(bool, tag = "2")]
1017 pub directory: bool,
1018 /// Whether a manifest may name it
1019 #[prost(bool, tag = "3")]
1020 pub grantable: bool,
1021 /// Whether the data this path needs is on the Ark now
1022 #[prost(bool, tag = "4")]
1023 pub available: bool,
1024 /// What it holds, when it is absent and when it fails
1025 #[prost(string, tag = "5")]
1026 pub desc: ::prost::alloc::string::String,
1027 /// Exact file content, or what a directory lists
1028 #[prost(string, tag = "6")]
1029 pub format: ::prost::alloc::string::String,
1030 /// Complete example values, most typical first
1031 #[prost(string, repeated, tag = "7")]
1032 pub examples: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
1033}
1034/// ReservedErrors names the assigned protocol-wide errors in the reserved range
1035/// 0x00 to 0xff (inclusive). No code in this range may be assigned a request
1036/// specific meaning. Assigned codes must not be repurposed.
1037#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1038#[repr(i32)]
1039pub enum ReservedErrors {
1040 /// A failure without a standardized reason. Zero does not indicate success;
1041 /// the presence of an Error in the response indicates failure.
1042 Unspecified = 0,
1043 /// The request's responder was released without providing an application reply.
1044 Unanswered = 1,
1045 /// The peer does not know this request. Emitted by the protocol layer itself
1046 /// when a request's content is not in its schema.
1047 Unknown = 2,
1048 /// The peer knows this request but never serves it in this build or role,
1049 /// firmware updates on an emulator or develop envelopes on production.
1050 Unsupported = 3,
1051 /// The peer serves this request but not in its current state, before cloud
1052 /// sync or pairing. It may once the state changes.
1053 Unavailable = 4,
1054 /// The peer serves this request but the owner refused the approval it asked
1055 /// for on the phone. The owner's choice, not a failure.
1056 Unauthorized = 5,
1057 /// The peer serves this request but the approval it asked for did not arrive
1058 /// before its window ran out, on the phone or at the button.
1059 Unconfirmed = 6,
1060}
1061impl ReservedErrors {
1062 /// String value of the enum field names used in the ProtoBuf definition.
1063 ///
1064 /// The values are not transformed in any way and thus are considered stable
1065 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1066 pub fn as_str_name(&self) -> &'static str {
1067 match self {
1068 Self::Unspecified => "RESERVED_ERRORS_UNSPECIFIED",
1069 Self::Unanswered => "RESERVED_ERRORS_UNANSWERED",
1070 Self::Unknown => "RESERVED_ERRORS_UNKNOWN",
1071 Self::Unsupported => "RESERVED_ERRORS_UNSUPPORTED",
1072 Self::Unavailable => "RESERVED_ERRORS_UNAVAILABLE",
1073 Self::Unauthorized => "RESERVED_ERRORS_UNAUTHORIZED",
1074 Self::Unconfirmed => "RESERVED_ERRORS_UNCONFIRMED",
1075 }
1076 }
1077 /// Creates an enum from field names used in the ProtoBuf definition.
1078 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1079 match value {
1080 "RESERVED_ERRORS_UNSPECIFIED" => Some(Self::Unspecified),
1081 "RESERVED_ERRORS_UNANSWERED" => Some(Self::Unanswered),
1082 "RESERVED_ERRORS_UNKNOWN" => Some(Self::Unknown),
1083 "RESERVED_ERRORS_UNSUPPORTED" => Some(Self::Unsupported),
1084 "RESERVED_ERRORS_UNAVAILABLE" => Some(Self::Unavailable),
1085 "RESERVED_ERRORS_UNAUTHORIZED" => Some(Self::Unauthorized),
1086 "RESERVED_ERRORS_UNCONFIRMED" => Some(Self::Unconfirmed),
1087 _ => None,
1088 }
1089 }
1090}
1091/// SlotKind identifies a slot on the device. Each value corresponds to a unique
1092/// 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 /// Never sent, an unset kind
1097 SlotUnspecified = 0,
1098 /// Human reference genome assembly
1099 SlotReferenceGenome = 1,
1100 /// Gene-to-coordinate mapping database
1101 SlotGeneAnnotations = 2,
1102 /// User's SNP/indel variant calls
1103 SlotSnpIndelCalls = 3,
1104 /// Variant catalog (rsID-to-position), from dbSNP
1105 SlotVariantCatalog = 4,
1106}
1107impl SlotKind {
1108 /// String value of the enum field names used in the ProtoBuf definition.
1109 ///
1110 /// The values are not transformed in any way and thus are considered stable
1111 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1112 pub fn as_str_name(&self) -> &'static str {
1113 match self {
1114 Self::SlotUnspecified => "SLOT_UNSPECIFIED",
1115 Self::SlotReferenceGenome => "SLOT_REFERENCE_GENOME",
1116 Self::SlotGeneAnnotations => "SLOT_GENE_ANNOTATIONS",
1117 Self::SlotSnpIndelCalls => "SLOT_SNP_INDEL_CALLS",
1118 Self::SlotVariantCatalog => "SLOT_VARIANT_CATALOG",
1119 }
1120 }
1121 /// Creates an enum from field names used in the ProtoBuf definition.
1122 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1123 match value {
1124 "SLOT_UNSPECIFIED" => Some(Self::SlotUnspecified),
1125 "SLOT_REFERENCE_GENOME" => Some(Self::SlotReferenceGenome),
1126 "SLOT_GENE_ANNOTATIONS" => Some(Self::SlotGeneAnnotations),
1127 "SLOT_SNP_INDEL_CALLS" => Some(Self::SlotSnpIndelCalls),
1128 "SLOT_VARIANT_CATALOG" => Some(Self::SlotVariantCatalog),
1129 _ => None,
1130 }
1131 }
1132}
1133/// SlotOrigin describes the nature of the data in a slot, determining what
1134/// actions are available to the user for filling it.
1135#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1136#[repr(i32)]
1137pub enum SlotOrigin {
1138 /// Never sent, an unset origin
1139 OriginUnspecified = 0,
1140 /// Unique to the user, uploaded by them
1141 OriginPersonal = 1,
1142 /// Standard reference data, downloaded from public sources
1143 OriginReference = 2,
1144}
1145impl SlotOrigin {
1146 /// String value of the enum field names used in the ProtoBuf definition.
1147 ///
1148 /// The values are not transformed in any way and thus are considered stable
1149 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1150 pub fn as_str_name(&self) -> &'static str {
1151 match self {
1152 Self::OriginUnspecified => "ORIGIN_UNSPECIFIED",
1153 Self::OriginPersonal => "ORIGIN_PERSONAL",
1154 Self::OriginReference => "ORIGIN_REFERENCE",
1155 }
1156 }
1157 /// Creates an enum from field names used in the ProtoBuf definition.
1158 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1159 match value {
1160 "ORIGIN_UNSPECIFIED" => Some(Self::OriginUnspecified),
1161 "ORIGIN_PERSONAL" => Some(Self::OriginPersonal),
1162 "ORIGIN_REFERENCE" => Some(Self::OriginReference),
1163 _ => None,
1164 }
1165 }
1166}
1167/// SlotState describes whether a slot holds data and whether that data is sound.
1168#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1169#[repr(i32)]
1170pub enum SlotState {
1171 /// Never sent, an unset state
1172 StateUnspecified = 0,
1173 /// Nothing stored
1174 StateEmpty = 1,
1175 /// Data present and healthy
1176 StateFilled = 2,
1177 /// Files exist but the metadata is missing, corrupt or outdated
1178 StateDamaged = 3,
1179}
1180impl SlotState {
1181 /// String value of the enum field names used in the ProtoBuf definition.
1182 ///
1183 /// The values are not transformed in any way and thus are considered stable
1184 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1185 pub fn as_str_name(&self) -> &'static str {
1186 match self {
1187 Self::StateUnspecified => "STATE_UNSPECIFIED",
1188 Self::StateEmpty => "STATE_EMPTY",
1189 Self::StateFilled => "STATE_FILLED",
1190 Self::StateDamaged => "STATE_DAMAGED",
1191 }
1192 }
1193 /// Creates an enum from field names used in the ProtoBuf definition.
1194 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1195 match value {
1196 "STATE_UNSPECIFIED" => Some(Self::StateUnspecified),
1197 "STATE_EMPTY" => Some(Self::StateEmpty),
1198 "STATE_FILLED" => Some(Self::StateFilled),
1199 "STATE_DAMAGED" => Some(Self::StateDamaged),
1200 _ => None,
1201 }
1202 }
1203}
1204/// SlotConfidence indicates how confident the device is in its identification
1205/// of a file, based on content, filename and size.
1206#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
1207#[repr(i32)]
1208pub enum SlotConfidence {
1209 /// Never sent, an unset confidence
1210 ConfidenceUnspecified = 0,
1211 /// Filename/extension only, no content confirmation
1212 ConfidenceLow = 1,
1213 /// Format detected but slot type inferred from size/filename
1214 ConfidenceMid = 2,
1215 /// Magic bytes match and format-specific content confirmed
1216 ConfidenceHigh = 3,
1217}
1218impl SlotConfidence {
1219 /// String value of the enum field names used in the ProtoBuf definition.
1220 ///
1221 /// The values are not transformed in any way and thus are considered stable
1222 /// (if the ProtoBuf definition does not change) and safe for programmatic use.
1223 pub fn as_str_name(&self) -> &'static str {
1224 match self {
1225 Self::ConfidenceUnspecified => "CONFIDENCE_UNSPECIFIED",
1226 Self::ConfidenceLow => "CONFIDENCE_LOW",
1227 Self::ConfidenceMid => "CONFIDENCE_MID",
1228 Self::ConfidenceHigh => "CONFIDENCE_HIGH",
1229 }
1230 }
1231 /// Creates an enum from field names used in the ProtoBuf definition.
1232 pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
1233 match value {
1234 "CONFIDENCE_UNSPECIFIED" => Some(Self::ConfidenceUnspecified),
1235 "CONFIDENCE_LOW" => Some(Self::ConfidenceLow),
1236 "CONFIDENCE_MID" => Some(Self::ConfidenceMid),
1237 "CONFIDENCE_HIGH" => Some(Self::ConfidenceHigh),
1238 _ => None,
1239 }
1240 }
1241}