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