turnkey_client 0.8.0

A Rust client to interact with the Turnkey API.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct Timestamp {
    /// Stringified int
    pub seconds: ::prost::alloc::string::String,
    /// Stringified int
    pub nanos: ::prost::alloc::string::String,
}
#[derive(Debug)]
/// This proto definition is used in our external-facing APIs.
/// It's important to leverage annotations because they're used in our external interfaces.
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct OrganizationData {
    pub organization_id: ::prost::alloc::string::String,
    pub name: ::prost::alloc::string::String,
    #[serde(default)]
    pub users: ::prost::alloc::vec::Vec<User>,
    #[serde(default)]
    pub policies: ::prost::alloc::vec::Vec<Policy>,
    #[serde(default)]
    pub private_keys: ::prost::alloc::vec::Vec<PrivateKey>,
    #[serde(default)]
    pub invitations: ::prost::alloc::vec::Vec<Invitation>,
    #[serde(default)]
    pub tags: ::prost::alloc::vec::Vec<Tag>,
    #[serde(default)]
    pub root_quorum: ::core::option::Option<Quorum>,
    #[serde(default)]
    pub features: ::prost::alloc::vec::Vec<
        super::super::super::immutable::data::v1::Feature,
    >,
    #[serde(default)]
    pub wallets: ::prost::alloc::vec::Vec<Wallet>,
    #[serde(default)]
    pub smart_contract_interface_references: ::prost::alloc::vec::Vec<
        super::super::super::immutable::data::v1::SmartContractInterfaceReference,
    >,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct OauthProvider {
    pub provider_id: ::prost::alloc::string::String,
    pub provider_name: ::prost::alloc::string::String,
    pub issuer: ::prost::alloc::string::String,
    pub audience: ::prost::alloc::string::String,
    pub subject: ::prost::alloc::string::String,
    #[serde(default)]
    pub created_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub updated_at: ::core::option::Option<Timestamp>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct User {
    pub user_id: ::prost::alloc::string::String,
    pub user_name: ::prost::alloc::string::String,
    /// some users do not have emails (programmatic users)
    #[serde(default)]
    pub user_email: ::core::option::Option<::prost::alloc::string::String>,
    #[serde(default)]
    pub user_phone_number: ::core::option::Option<::prost::alloc::string::String>,
    #[serde(default)]
    pub authenticators: ::prost::alloc::vec::Vec<Authenticator>,
    #[serde(default)]
    pub api_keys: ::prost::alloc::vec::Vec<ApiKey>,
    #[serde(default)]
    pub user_tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[serde(default)]
    pub oauth_providers: ::prost::alloc::vec::Vec<OauthProvider>,
    #[serde(default)]
    pub created_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub updated_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub mfa_policies: ::prost::alloc::vec::Vec<MfaPolicy>,
}
#[derive(Debug)]
#[serde_with::serde_as]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct ApiKey {
    #[serde(default)]
    pub credential: ::core::option::Option<Credential>,
    pub api_key_id: ::prost::alloc::string::String,
    pub api_key_name: ::prost::alloc::string::String,
    #[serde(default)]
    pub created_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub updated_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    #[serde_as(as = "Option<serde_with::DisplayFromStr>")]
    pub expiration_seconds: ::core::option::Option<u64>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct Authenticator {
    #[serde(default)]
    pub transports: Vec<
        super::super::super::immutable::webauthn::v1::AuthenticatorTransport,
    >,
    pub attestation_type: ::prost::alloc::string::String,
    pub aaguid: ::prost::alloc::string::String,
    pub credential_id: ::prost::alloc::string::String,
    pub model: ::prost::alloc::string::String,
    #[serde(default)]
    pub credential: ::core::option::Option<Credential>,
    pub authenticator_id: ::prost::alloc::string::String,
    pub authenticator_name: ::prost::alloc::string::String,
    #[serde(default)]
    pub created_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub updated_at: ::core::option::Option<Timestamp>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct Credential {
    pub public_key: ::prost::alloc::string::String,
    /// To distinguish the credential type (webauthn, API key)
    pub r#type: super::super::super::immutable::common::v1::CredentialType,
    /// The session profile associated with this credential, if any (only CREDENTIAL_TYPE_LOGIN credentials)
    #[serde(default)]
    pub session_profile_id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct Policy {
    pub policy_id: ::prost::alloc::string::String,
    pub policy_name: ::prost::alloc::string::String,
    pub effect: super::super::super::immutable::common::v1::Effect,
    #[serde(default)]
    pub created_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub updated_at: ::core::option::Option<Timestamp>,
    pub notes: ::prost::alloc::string::String,
    #[serde(default)]
    pub consensus: ::core::option::Option<::prost::alloc::string::String>,
    #[serde(default)]
    pub condition: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct PrivateKey {
    pub private_key_id: ::prost::alloc::string::String,
    pub public_key: ::prost::alloc::string::String,
    pub private_key_name: ::prost::alloc::string::String,
    pub curve: super::super::super::immutable::common::v1::Curve,
    #[serde(default)]
    pub addresses: ::prost::alloc::vec::Vec<Address>,
    #[serde(default)]
    pub private_key_tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[serde(default)]
    pub created_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub updated_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub exported: bool,
    #[serde(default)]
    pub imported: bool,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct Address {
    pub format: super::super::super::immutable::common::v1::AddressFormat,
    pub address: ::prost::alloc::string::String,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct Invitation {
    pub invitation_id: ::prost::alloc::string::String,
    pub receiver_user_name: ::prost::alloc::string::String,
    pub receiver_email: ::prost::alloc::string::String,
    #[serde(default)]
    pub receiver_user_tags: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    pub access_type: super::super::super::immutable::common::v1::AccessType,
    pub status: InvitationStatus,
    #[serde(default)]
    pub created_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub updated_at: ::core::option::Option<Timestamp>,
    pub sender_user_id: ::prost::alloc::string::String,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct Tag {
    pub tag_id: ::prost::alloc::string::String,
    pub tag_name: ::prost::alloc::string::String,
    pub tag_type: TagType,
    #[serde(default)]
    pub created_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub updated_at: ::core::option::Option<Timestamp>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct Quorum {
    #[serde(default)]
    pub threshold: i32,
    #[serde(default)]
    pub user_ids: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct Wallet {
    pub wallet_id: ::prost::alloc::string::String,
    pub wallet_name: ::prost::alloc::string::String,
    #[serde(default)]
    pub created_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub updated_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub exported: bool,
    #[serde(default)]
    pub imported: bool,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct Config {
    #[serde(default)]
    pub features: ::prost::alloc::vec::Vec<
        super::super::super::immutable::data::v1::Feature,
    >,
    #[serde(default)]
    pub quorum: ::core::option::Option<Quorum>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct Oauth2Credential {
    pub oauth2_credential_id: ::prost::alloc::string::String,
    pub organization_id: ::prost::alloc::string::String,
    pub provider: super::super::super::immutable::common::v1::Oauth2Provider,
    pub client_id: ::prost::alloc::string::String,
    pub encrypted_client_secret: ::prost::alloc::string::String,
    #[serde(default)]
    pub created_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub updated_at: ::core::option::Option<Timestamp>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct FiatOnRampCredential {
    pub fiat_onramp_credential_id: ::prost::alloc::string::String,
    pub organization_id: ::prost::alloc::string::String,
    pub onramp_provider: super::super::super::immutable::common::v1::FiatOnRampProvider,
    /// @inject_tag: validate:"omitempty"
    #[serde(default)]
    pub project_id: ::core::option::Option<::prost::alloc::string::String>,
    /// @inject_tag: validate:"required"
    pub publishable_api_key: ::prost::alloc::string::String,
    /// @inject_tag: validate:"required"
    pub encrypted_secret_api_key: ::prost::alloc::string::String,
    /// @inject_tag: validate:"omitempty"
    #[serde(default)]
    pub encrypted_private_api_key: ::core::option::Option<
        ::prost::alloc::string::String,
    >,
    /// @inject_tag: validate:"omitempty"
    #[serde(default)]
    pub sandbox_mode: bool,
    #[serde(default)]
    pub created_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub updated_at: ::core::option::Option<Timestamp>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct MfaPolicy {
    pub mfa_policy_id: ::prost::alloc::string::String,
    pub mfa_policy_name: ::prost::alloc::string::String,
    pub condition: ::prost::alloc::string::String,
    #[serde(default)]
    pub required_authentication_methods: ::prost::alloc::vec::Vec<
        RequiredAuthenticationMethod,
    >,
    #[serde(default)]
    pub order: u32,
    #[serde(default)]
    pub notes: ::core::option::Option<::prost::alloc::string::String>,
    #[serde(default)]
    pub created_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub updated_at: ::core::option::Option<Timestamp>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct RequiredAuthenticationMethod {
    #[serde(default)]
    pub any: ::prost::alloc::vec::Vec<AuthenticationMethod>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct AuthenticationMethod {
    pub r#type: super::super::super::immutable::common::v1::AuthenticationType,
    #[serde(default)]
    pub id: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub enum InvitationStatus {
    #[serde(rename = "INVITATION_STATUS_UNSPECIFIED")]
    Unspecified = 0,
    #[serde(rename = "INVITATION_STATUS_CREATED")]
    Created = 1,
    #[serde(rename = "INVITATION_STATUS_ACCEPTED")]
    Accepted = 2,
    #[serde(rename = "INVITATION_STATUS_REVOKED")]
    Revoked = 3,
}
impl InvitationStatus {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "INVITATION_STATUS_UNSPECIFIED",
            Self::Created => "INVITATION_STATUS_CREATED",
            Self::Accepted => "INVITATION_STATUS_ACCEPTED",
            Self::Revoked => "INVITATION_STATUS_REVOKED",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "INVITATION_STATUS_UNSPECIFIED" => Some(Self::Unspecified),
            "INVITATION_STATUS_CREATED" => Some(Self::Created),
            "INVITATION_STATUS_ACCEPTED" => Some(Self::Accepted),
            "INVITATION_STATUS_REVOKED" => Some(Self::Revoked),
            _ => None,
        }
    }
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub enum TagType {
    #[serde(rename = "TAG_TYPE_UNSPECIFIED")]
    Unspecified = 0,
    #[serde(rename = "TAG_TYPE_USER")]
    User = 1,
    #[serde(rename = "TAG_TYPE_PRIVATE_KEY")]
    PrivateKey = 3,
}
impl TagType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "TAG_TYPE_UNSPECIFIED",
            Self::User => "TAG_TYPE_USER",
            Self::PrivateKey => "TAG_TYPE_PRIVATE_KEY",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "TAG_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "TAG_TYPE_USER" => Some(Self::User),
            "TAG_TYPE_PRIVATE_KEY" => Some(Self::PrivateKey),
            _ => None,
        }
    }
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct BootProof {
    pub ephemeral_public_key_hex: ::prost::alloc::string::String,
    pub aws_attestation_doc_b64: ::prost::alloc::string::String,
    pub qos_manifest_b64: ::prost::alloc::string::String,
    pub qos_manifest_envelope_b64: ::prost::alloc::string::String,
    pub deployment_label: ::prost::alloc::string::String,
    pub enclave_app: ::prost::alloc::string::String,
    pub owner: ::prost::alloc::string::String,
    #[serde(default)]
    pub created_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub qos_manifest_version: ::core::option::Option<::prost::alloc::string::String>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct AppProof {
    pub scheme: SignatureScheme,
    pub public_key: ::prost::alloc::string::String,
    pub proof_payload: ::prost::alloc::string::String,
    pub signature: ::prost::alloc::string::String,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct AppProofPayload {
    pub r#type: AppProofType,
    pub timestamp_ms: ::prost::alloc::string::String,
    #[serde(default)]
    pub proof_payload: ::core::option::Option<app_proof_payload::ProofPayload>,
}
/// Nested message and enum types in `AppProofPayload`.
pub mod app_proof_payload {
    #[derive(::serde::Serialize, ::serde::Deserialize)]
    #[derive(Clone, PartialEq)]
    #[derive(Debug)]
    pub enum ProofPayload {
        #[serde(rename = "PROOF_PAYLOAD_ADDRESS_DERIVATION_PROOF")]
        AddressDerivationProof(super::AddressDerivationProofPayload),
        #[serde(rename = "PROOF_PAYLOAD_POLICY_OUTCOME_PROOF")]
        PolicyOutcomeProof(super::PolicyOutcomeProofPayload),
    }
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct AddressDerivationProofPayload {
    pub organization_id: ::prost::alloc::string::String,
    #[serde(default)]
    pub wallet_id: ::core::option::Option<::prost::alloc::string::String>,
    #[serde(default)]
    pub derivation_path: ::core::option::Option<::prost::alloc::string::String>,
    pub address: ::prost::alloc::string::String,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct PolicyOutcomeProofPayload {
    pub organization_id: ::prost::alloc::string::String,
    pub outcome: super::super::super::immutable::common::v1::Outcome,
    pub decision_context_digest: ::prost::alloc::string::String,
    pub organization_data_digest: ::prost::alloc::string::String,
    pub parent_organization_data_digest: ::prost::alloc::string::String,
    #[serde(default)]
    pub user_request_approvals: ::prost::alloc::vec::Vec<
        super::super::super::immutable::models::v1::Signature,
    >,
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub enum SignatureScheme {
    #[serde(rename = "SIGNATURE_SCHEME_UNSPECIFIED")]
    Unspecified = 0,
    /// Scheme used by our enclave applications
    #[serde(rename = "SIGNATURE_SCHEME_EPHEMERAL_KEY_P256")]
    EphemeralKeyP256 = 1,
}
impl SignatureScheme {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "SIGNATURE_SCHEME_UNSPECIFIED",
            Self::EphemeralKeyP256 => "SIGNATURE_SCHEME_EPHEMERAL_KEY_P256",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "SIGNATURE_SCHEME_UNSPECIFIED" => Some(Self::Unspecified),
            "SIGNATURE_SCHEME_EPHEMERAL_KEY_P256" => Some(Self::EphemeralKeyP256),
            _ => None,
        }
    }
}
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord)]
pub enum AppProofType {
    #[serde(rename = "APP_PROOF_TYPE_UNSPECIFIED")]
    Unspecified = 0,
    #[serde(rename = "APP_PROOF_TYPE_ADDRESS_DERIVATION")]
    AddressDerivation = 1,
    #[serde(rename = "APP_PROOF_TYPE_POLICY_OUTCOME")]
    PolicyOutcome = 2,
}
impl AppProofType {
    /// String value of the enum field names used in the ProtoBuf definition.
    ///
    /// The values are not transformed in any way and thus are considered stable
    /// (if the ProtoBuf definition does not change) and safe for programmatic use.
    pub fn as_str_name(&self) -> &'static str {
        match self {
            Self::Unspecified => "APP_PROOF_TYPE_UNSPECIFIED",
            Self::AddressDerivation => "APP_PROOF_TYPE_ADDRESS_DERIVATION",
            Self::PolicyOutcome => "APP_PROOF_TYPE_POLICY_OUTCOME",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "APP_PROOF_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "APP_PROOF_TYPE_ADDRESS_DERIVATION" => Some(Self::AddressDerivation),
            "APP_PROOF_TYPE_POLICY_OUTCOME" => Some(Self::PolicyOutcome),
            _ => None,
        }
    }
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct MfaStatus {
    pub mfa_policy_id: ::prost::alloc::string::String,
    pub user_id: ::prost::alloc::string::String,
    #[serde(default)]
    pub satisfied: bool,
    #[serde(default)]
    pub satisfied_methods: ::prost::alloc::vec::Vec<AuthenticationMethod>,
    #[serde(default)]
    pub required_methods: ::prost::alloc::vec::Vec<RequiredAuthenticationMethod>,
}
#[derive(Debug)]
/// SessionProfile defines the constraints and capabilities of a session that can be created by a user.
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct SessionProfile {
    pub session_profile_id: ::prost::alloc::string::String,
    pub session_profile_name: ::prost::alloc::string::String,
    pub scope: ::prost::alloc::string::String,
    #[serde(default)]
    pub expiration_seconds: ::core::option::Option<::prost::alloc::string::String>,
    #[serde(default)]
    pub notes: ::core::option::Option<::prost::alloc::string::String>,
    #[serde(default)]
    pub created_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub updated_at: ::core::option::Option<Timestamp>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct SmartContractInterface {
    pub organization_id: ::prost::alloc::string::String,
    pub smart_contract_interface_id: ::prost::alloc::string::String,
    pub smart_contract_address: ::prost::alloc::string::String,
    pub smart_contract_interface: ::prost::alloc::string::String,
    pub r#type: ::prost::alloc::string::String,
    pub label: ::prost::alloc::string::String,
    pub notes: ::prost::alloc::string::String,
    #[serde(default)]
    pub created_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub updated_at: ::core::option::Option<Timestamp>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct TvcApp {
    pub id: ::prost::alloc::string::String,
    pub organization_id: ::prost::alloc::string::String,
    pub name: ::prost::alloc::string::String,
    pub quorum_public_key: ::prost::alloc::string::String,
    #[serde(default)]
    pub manifest_set: ::core::option::Option<TvcOperatorSet>,
    #[serde(default)]
    pub share_set: ::core::option::Option<TvcOperatorSet>,
    #[serde(default)]
    pub enable_egress: bool,
    #[serde(default)]
    pub created_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub updated_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub live_deployment_id: ::core::option::Option<::prost::alloc::string::String>,
    pub public_domain: ::prost::alloc::string::String,
    #[serde(default)]
    pub enable_debug_mode_deployments: bool,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct TvcDeployment {
    pub id: ::prost::alloc::string::String,
    pub organization_id: ::prost::alloc::string::String,
    pub app_id: ::prost::alloc::string::String,
    #[serde(default)]
    pub manifest_set: ::core::option::Option<TvcOperatorSet>,
    #[serde(default)]
    pub share_set: ::core::option::Option<TvcOperatorSet>,
    #[serde(default)]
    pub manifest: ::core::option::Option<TvcManifest>,
    #[serde(default)]
    pub manifest_approvals: ::prost::alloc::vec::Vec<TvcOperatorApproval>,
    pub qos_version: ::prost::alloc::string::String,
    #[serde(default)]
    pub pivot_container: ::core::option::Option<TvcContainerSpec>,
    #[serde(default)]
    pub created_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub updated_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub delete: bool,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct TvcContainerSpec {
    pub container_url: ::prost::alloc::string::String,
    pub path: ::prost::alloc::string::String,
    #[serde(default)]
    pub args: ::prost::alloc::vec::Vec<::prost::alloc::string::String>,
    #[serde(default)]
    pub has_pull_secret: bool,
    pub health_check_type: super::super::super::immutable::common::v1::TvcHealthCheckType,
    #[serde(default)]
    pub health_check_port: u32,
    #[serde(default)]
    pub public_ingress_port: u32,
}
#[derive(Debug)]
#[serde_with::serde_as]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct TvcOperatorApproval {
    pub id: ::prost::alloc::string::String,
    pub manifest_id: ::prost::alloc::string::String,
    #[serde(default)]
    pub operator: ::core::option::Option<TvcOperator>,
    #[serde(default)]
    #[serde_as(as = "serde_with::base64::Base64")]
    pub approval: ::prost::alloc::vec::Vec<u8>,
    #[serde(default)]
    pub created_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub updated_at: ::core::option::Option<Timestamp>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct TvcOperatorSet {
    pub id: ::prost::alloc::string::String,
    pub name: ::prost::alloc::string::String,
    pub organization_id: ::prost::alloc::string::String,
    #[serde(default)]
    pub operators: ::prost::alloc::vec::Vec<TvcOperator>,
    #[serde(default)]
    pub threshold: u32,
    #[serde(default)]
    pub created_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub updated_at: ::core::option::Option<Timestamp>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct TvcOperator {
    pub id: ::prost::alloc::string::String,
    pub name: ::prost::alloc::string::String,
    pub public_key: ::prost::alloc::string::String,
    #[serde(default)]
    pub created_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub updated_at: ::core::option::Option<Timestamp>,
}
#[derive(Debug)]
#[serde_with::serde_as]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct TvcManifest {
    pub id: ::prost::alloc::string::String,
    #[serde(default)]
    #[serde_as(as = "serde_with::base64::Base64")]
    pub manifest: ::prost::alloc::vec::Vec<u8>,
    #[serde(default)]
    pub created_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub updated_at: ::core::option::Option<Timestamp>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct DeploymentStatus {
    pub deployment_id: ::prost::alloc::string::String,
    #[serde(default)]
    pub ready_replicas: i32,
    #[serde(default)]
    pub desired_replicas: i32,
    #[serde(default)]
    pub last_updated_time: ::core::option::Option<Timestamp>,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct AppStatus {
    pub app_id: ::prost::alloc::string::String,
    #[serde(default)]
    pub deployments: ::prost::alloc::vec::Vec<DeploymentStatus>,
    pub targeted_deployment_id: ::prost::alloc::string::String,
}
#[derive(Debug)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct LogLine {
    pub content: ::prost::alloc::string::String,
    #[serde(default)]
    pub ts: ::core::option::Option<Timestamp>,
}
#[derive(Debug)]
/// An account derived from a Wallet
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(rename_all = "camelCase")]
#[derive(Clone, PartialEq)]
pub struct WalletAccount {
    pub wallet_account_id: ::prost::alloc::string::String,
    pub organization_id: ::prost::alloc::string::String,
    pub wallet_id: ::prost::alloc::string::String,
    pub curve: super::super::super::immutable::common::v1::Curve,
    pub path_format: super::super::super::immutable::common::v1::PathFormat,
    pub path: ::prost::alloc::string::String,
    pub address_format: super::super::super::immutable::common::v1::AddressFormat,
    pub address: ::prost::alloc::string::String,
    #[serde(default)]
    pub created_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub updated_at: ::core::option::Option<Timestamp>,
    #[serde(default)]
    pub public_key: ::core::option::Option<::prost::alloc::string::String>,
    #[serde(default)]
    pub wallet_details: ::core::option::Option<Wallet>,
    /// TODO(tim): temporarily removing this since it's always "false"
    /// bool exported = 12 [
    ///   (google.api.field_behavior) = REQUIRED,
    ///   (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_field) = {description: "True when a given Account is exported, false otherwise."}
    /// ];
    #[serde(default)]
    pub name: ::core::option::Option<::prost::alloc::string::String>,
}