zitadel 3.4.3

An implementation of ZITADEL API access and authentication in Rust.
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
// @generated
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SendPasskeyRegistrationLink {
    #[prost(string, optional, tag="1")]
    pub url_template: ::core::option::Option<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReturnPasskeyRegistrationCode {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PasskeyRegistrationCode {
    #[prost(string, tag="1")]
    pub id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub code: ::prost::alloc::string::String,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum PasskeyAuthenticator {
    Unspecified = 0,
    Platform = 1,
    CrossPlatform = 2,
}
impl PasskeyAuthenticator {
    /// 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 {
            PasskeyAuthenticator::Unspecified => "PASSKEY_AUTHENTICATOR_UNSPECIFIED",
            PasskeyAuthenticator::Platform => "PASSKEY_AUTHENTICATOR_PLATFORM",
            PasskeyAuthenticator::CrossPlatform => "PASSKEY_AUTHENTICATOR_CROSS_PLATFORM",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "PASSKEY_AUTHENTICATOR_UNSPECIFIED" => Some(Self::Unspecified),
            "PASSKEY_AUTHENTICATOR_PLATFORM" => Some(Self::Platform),
            "PASSKEY_AUTHENTICATOR_CROSS_PLATFORM" => Some(Self::CrossPlatform),
            _ => None,
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetHumanEmail {
    #[prost(string, tag="1")]
    pub email: ::prost::alloc::string::String,
    /// if no verification is specified, an email is sent with the default url
    #[prost(oneof="set_human_email::Verification", tags="2, 3, 4")]
    pub verification: ::core::option::Option<set_human_email::Verification>,
}
/// Nested message and enum types in `SetHumanEmail`.
pub mod set_human_email {
    /// if no verification is specified, an email is sent with the default url
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Verification {
        #[prost(message, tag="2")]
        SendCode(super::SendEmailVerificationCode),
        #[prost(message, tag="3")]
        ReturnCode(super::ReturnEmailVerificationCode),
        #[prost(bool, tag="4")]
        IsVerified(bool),
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SendEmailVerificationCode {
    #[prost(string, optional, tag="1")]
    pub url_template: ::core::option::Option<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReturnEmailVerificationCode {
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IdpInformation {
    #[prost(string, tag="2")]
    pub idp_id: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(string, tag="4")]
    pub user_name: ::prost::alloc::string::String,
    #[prost(message, optional, tag="5")]
    pub raw_information: ::core::option::Option<::pbjson_types::Struct>,
    #[prost(oneof="idp_information::Access", tags="1")]
    pub access: ::core::option::Option<idp_information::Access>,
}
/// Nested message and enum types in `IDPInformation`.
pub mod idp_information {
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Access {
        #[prost(message, tag="1")]
        Oauth(super::IdpoAuthAccessInformation),
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IdpoAuthAccessInformation {
    #[prost(string, tag="1")]
    pub access_token: ::prost::alloc::string::String,
    #[prost(string, optional, tag="2")]
    pub id_token: ::core::option::Option<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct IdpLink {
    #[prost(string, tag="1")]
    pub idp_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub user_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Password {
    #[prost(string, tag="1")]
    pub password: ::prost::alloc::string::String,
    #[prost(bool, tag="2")]
    pub change_required: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct HashedPassword {
    #[prost(string, tag="1")]
    pub hash: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub algorithm: ::prost::alloc::string::String,
    #[prost(bool, tag="3")]
    pub change_required: bool,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SendPasswordResetLink {
    #[prost(enumeration="NotificationType", tag="1")]
    pub notification_type: i32,
    #[prost(string, optional, tag="2")]
    pub url_template: ::core::option::Option<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ReturnPasswordResetCode {
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum NotificationType {
    Unspecified = 0,
    Email = 1,
    Sms = 2,
}
impl NotificationType {
    /// 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 {
            NotificationType::Unspecified => "NOTIFICATION_TYPE_Unspecified",
            NotificationType::Email => "NOTIFICATION_TYPE_Email",
            NotificationType::Sms => "NOTIFICATION_TYPE_SMS",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "NOTIFICATION_TYPE_Unspecified" => Some(Self::Unspecified),
            "NOTIFICATION_TYPE_Email" => Some(Self::Email),
            "NOTIFICATION_TYPE_SMS" => Some(Self::Sms),
            _ => None,
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct User {
    #[prost(string, tag="1")]
    pub id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetHumanProfile {
    #[prost(string, tag="1")]
    pub first_name: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub last_name: ::prost::alloc::string::String,
    #[prost(string, optional, tag="3")]
    pub nick_name: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="4")]
    pub display_name: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(string, optional, tag="5")]
    pub preferred_language: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(enumeration="Gender", optional, tag="6")]
    pub gender: ::core::option::Option<i32>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetMetadataEntry {
    #[prost(string, tag="1")]
    pub key: ::prost::alloc::string::String,
    #[prost(bytes="vec", tag="2")]
    pub value: ::prost::alloc::vec::Vec<u8>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum Gender {
    Unspecified = 0,
    Female = 1,
    Male = 2,
    Diverse = 3,
}
impl Gender {
    /// 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 {
            Gender::Unspecified => "GENDER_UNSPECIFIED",
            Gender::Female => "GENDER_FEMALE",
            Gender::Male => "GENDER_MALE",
            Gender::Diverse => "GENDER_DIVERSE",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "GENDER_UNSPECIFIED" => Some(Self::Unspecified),
            "GENDER_FEMALE" => Some(Self::Female),
            "GENDER_MALE" => Some(Self::Male),
            "GENDER_DIVERSE" => Some(Self::Diverse),
            _ => None,
        }
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddHumanUserRequest {
    /// optionally set your own id unique for the user
    #[prost(string, optional, tag="1")]
    pub user_id: ::core::option::Option<::prost::alloc::string::String>,
    /// optionally set a unique username, if none is provided the email will be used
    #[prost(string, optional, tag="2")]
    pub username: ::core::option::Option<::prost::alloc::string::String>,
    #[prost(message, optional, tag="3")]
    pub organisation: ::core::option::Option<super::super::object::v2alpha::Organisation>,
    #[prost(message, optional, tag="4")]
    pub profile: ::core::option::Option<SetHumanProfile>,
    #[prost(message, optional, tag="5")]
    pub email: ::core::option::Option<SetHumanEmail>,
    #[prost(message, repeated, tag="6")]
    pub metadata: ::prost::alloc::vec::Vec<SetMetadataEntry>,
    #[prost(message, repeated, tag="9")]
    pub idp_links: ::prost::alloc::vec::Vec<IdpLink>,
    #[prost(oneof="add_human_user_request::PasswordType", tags="7, 8")]
    pub password_type: ::core::option::Option<add_human_user_request::PasswordType>,
}
/// Nested message and enum types in `AddHumanUserRequest`.
pub mod add_human_user_request {
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum PasswordType {
        #[prost(message, tag="7")]
        Password(super::Password),
        #[prost(message, tag="8")]
        HashedPassword(super::HashedPassword),
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddHumanUserResponse {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag="2")]
    pub details: ::core::option::Option<super::super::object::v2alpha::Details>,
    #[prost(string, optional, tag="3")]
    pub email_code: ::core::option::Option<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetEmailRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub email: ::prost::alloc::string::String,
    /// if no verification is specified, an email is sent with the default url
    #[prost(oneof="set_email_request::Verification", tags="3, 4, 5")]
    pub verification: ::core::option::Option<set_email_request::Verification>,
}
/// Nested message and enum types in `SetEmailRequest`.
pub mod set_email_request {
    /// if no verification is specified, an email is sent with the default url
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Verification {
        #[prost(message, tag="3")]
        SendCode(super::SendEmailVerificationCode),
        #[prost(message, tag="4")]
        ReturnCode(super::ReturnEmailVerificationCode),
        #[prost(bool, tag="5")]
        IsVerified(bool),
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetEmailResponse {
    #[prost(message, optional, tag="1")]
    pub details: ::core::option::Option<super::super::object::v2alpha::Details>,
    /// in case the verification was set to return_code, the code will be returned
    #[prost(string, optional, tag="2")]
    pub verification_code: ::core::option::Option<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VerifyEmailRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub verification_code: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VerifyEmailResponse {
    #[prost(message, optional, tag="1")]
    pub details: ::core::option::Option<super::super::object::v2alpha::Details>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisterPasskeyRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag="2")]
    pub code: ::core::option::Option<PasskeyRegistrationCode>,
    #[prost(enumeration="PasskeyAuthenticator", tag="3")]
    pub authenticator: i32,
    #[prost(string, tag="4")]
    pub domain: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisterPasskeyResponse {
    #[prost(message, optional, tag="1")]
    pub details: ::core::option::Option<super::super::object::v2alpha::Details>,
    #[prost(string, tag="2")]
    pub passkey_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag="3")]
    pub public_key_credential_creation_options: ::core::option::Option<::pbjson_types::Struct>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VerifyPasskeyRegistrationRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub passkey_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag="3")]
    pub public_key_credential: ::core::option::Option<::pbjson_types::Struct>,
    #[prost(string, tag="4")]
    pub passkey_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VerifyPasskeyRegistrationResponse {
    #[prost(message, optional, tag="1")]
    pub details: ::core::option::Option<super::super::object::v2alpha::Details>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisterU2fRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub domain: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisterU2fResponse {
    #[prost(message, optional, tag="1")]
    pub details: ::core::option::Option<super::super::object::v2alpha::Details>,
    #[prost(string, tag="2")]
    pub u2f_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag="3")]
    pub public_key_credential_creation_options: ::core::option::Option<::pbjson_types::Struct>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VerifyU2fRegistrationRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub u2f_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag="3")]
    pub public_key_credential: ::core::option::Option<::pbjson_types::Struct>,
    #[prost(string, tag="4")]
    pub token_name: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VerifyU2fRegistrationResponse {
    #[prost(message, optional, tag="1")]
    pub details: ::core::option::Option<super::super::object::v2alpha::Details>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisterTotpRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RegisterTotpResponse {
    #[prost(message, optional, tag="1")]
    pub details: ::core::option::Option<super::super::object::v2alpha::Details>,
    #[prost(string, tag="2")]
    pub uri: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub secret: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VerifyTotpRegistrationRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub code: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct VerifyTotpRegistrationResponse {
    #[prost(message, optional, tag="1")]
    pub details: ::core::option::Option<super::super::object::v2alpha::Details>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreatePasskeyRegistrationLinkRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    /// if no medium is specified, an email is sent with the default url
    #[prost(oneof="create_passkey_registration_link_request::Medium", tags="2, 3")]
    pub medium: ::core::option::Option<create_passkey_registration_link_request::Medium>,
}
/// Nested message and enum types in `CreatePasskeyRegistrationLinkRequest`.
pub mod create_passkey_registration_link_request {
    /// if no medium is specified, an email is sent with the default url
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Medium {
        #[prost(message, tag="2")]
        SendLink(super::SendPasskeyRegistrationLink),
        #[prost(message, tag="3")]
        ReturnCode(super::ReturnPasskeyRegistrationCode),
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct CreatePasskeyRegistrationLinkResponse {
    #[prost(message, optional, tag="1")]
    pub details: ::core::option::Option<super::super::object::v2alpha::Details>,
    /// in case the medium was set to return_code, the code will be returned
    #[prost(message, optional, tag="2")]
    pub code: ::core::option::Option<PasskeyRegistrationCode>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartIdentityProviderFlowRequest {
    #[prost(string, tag="1")]
    pub idp_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub success_url: ::prost::alloc::string::String,
    #[prost(string, tag="3")]
    pub failure_url: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct StartIdentityProviderFlowResponse {
    #[prost(message, optional, tag="1")]
    pub details: ::core::option::Option<super::super::object::v2alpha::Details>,
    #[prost(oneof="start_identity_provider_flow_response::NextStep", tags="2")]
    pub next_step: ::core::option::Option<start_identity_provider_flow_response::NextStep>,
}
/// Nested message and enum types in `StartIdentityProviderFlowResponse`.
pub mod start_identity_provider_flow_response {
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum NextStep {
        #[prost(string, tag="2")]
        AuthUrl(::prost::alloc::string::String),
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RetrieveIdentityProviderInformationRequest {
    #[prost(string, tag="1")]
    pub intent_id: ::prost::alloc::string::String,
    #[prost(string, tag="2")]
    pub token: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct RetrieveIdentityProviderInformationResponse {
    #[prost(message, optional, tag="1")]
    pub details: ::core::option::Option<super::super::object::v2alpha::Details>,
    #[prost(message, optional, tag="2")]
    pub idp_information: ::core::option::Option<IdpInformation>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddIdpLinkRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag="2")]
    pub idp_link: ::core::option::Option<IdpLink>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct AddIdpLinkResponse {
    #[prost(message, optional, tag="1")]
    pub details: ::core::option::Option<super::super::object::v2alpha::Details>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PasswordResetRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    /// if no medium is specified, an email is sent with the default url
    #[prost(oneof="password_reset_request::Medium", tags="2, 3")]
    pub medium: ::core::option::Option<password_reset_request::Medium>,
}
/// Nested message and enum types in `PasswordResetRequest`.
pub mod password_reset_request {
    /// if no medium is specified, an email is sent with the default url
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Medium {
        #[prost(message, tag="2")]
        SendLink(super::SendPasswordResetLink),
        #[prost(message, tag="3")]
        ReturnCode(super::ReturnPasswordResetCode),
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct PasswordResetResponse {
    #[prost(message, optional, tag="1")]
    pub details: ::core::option::Option<super::super::object::v2alpha::Details>,
    /// in case the medium was set to return_code, the code will be returned
    #[prost(string, optional, tag="2")]
    pub verification_code: ::core::option::Option<::prost::alloc::string::String>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetPasswordRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
    #[prost(message, optional, tag="2")]
    pub new_password: ::core::option::Option<Password>,
    /// if neither, the current password must be provided nor a verification code generated by the PasswordReset is provided,
    /// the user must be granted permission to set a password
    #[prost(oneof="set_password_request::Verification", tags="3, 4")]
    pub verification: ::core::option::Option<set_password_request::Verification>,
}
/// Nested message and enum types in `SetPasswordRequest`.
pub mod set_password_request {
    /// if neither, the current password must be provided nor a verification code generated by the PasswordReset is provided,
    /// the user must be granted permission to set a password
    #[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Oneof)]
    pub enum Verification {
        #[prost(string, tag="3")]
        CurrentPassword(::prost::alloc::string::String),
        #[prost(string, tag="4")]
        VerificationCode(::prost::alloc::string::String),
    }
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct SetPasswordResponse {
    #[prost(message, optional, tag="1")]
    pub details: ::core::option::Option<super::super::object::v2alpha::Details>,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAuthenticationMethodTypesRequest {
    #[prost(string, tag="1")]
    pub user_id: ::prost::alloc::string::String,
}
#[allow(clippy::derive_partial_eq_without_eq)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct ListAuthenticationMethodTypesResponse {
    #[prost(message, optional, tag="1")]
    pub details: ::core::option::Option<super::super::object::v2alpha::ListDetails>,
    #[prost(enumeration="AuthenticationMethodType", repeated, tag="2")]
    pub auth_method_types: ::prost::alloc::vec::Vec<i32>,
}
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)]
#[repr(i32)]
pub enum AuthenticationMethodType {
    Unspecified = 0,
    Password = 1,
    Passkey = 2,
    Idp = 3,
    Totp = 4,
    U2f = 5,
}
impl AuthenticationMethodType {
    /// 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 {
            AuthenticationMethodType::Unspecified => "AUTHENTICATION_METHOD_TYPE_UNSPECIFIED",
            AuthenticationMethodType::Password => "AUTHENTICATION_METHOD_TYPE_PASSWORD",
            AuthenticationMethodType::Passkey => "AUTHENTICATION_METHOD_TYPE_PASSKEY",
            AuthenticationMethodType::Idp => "AUTHENTICATION_METHOD_TYPE_IDP",
            AuthenticationMethodType::Totp => "AUTHENTICATION_METHOD_TYPE_TOTP",
            AuthenticationMethodType::U2f => "AUTHENTICATION_METHOD_TYPE_U2F",
        }
    }
    /// Creates an enum from field names used in the ProtoBuf definition.
    pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
        match value {
            "AUTHENTICATION_METHOD_TYPE_UNSPECIFIED" => Some(Self::Unspecified),
            "AUTHENTICATION_METHOD_TYPE_PASSWORD" => Some(Self::Password),
            "AUTHENTICATION_METHOD_TYPE_PASSKEY" => Some(Self::Passkey),
            "AUTHENTICATION_METHOD_TYPE_IDP" => Some(Self::Idp),
            "AUTHENTICATION_METHOD_TYPE_TOTP" => Some(Self::Totp),
            "AUTHENTICATION_METHOD_TYPE_U2F" => Some(Self::U2f),
            _ => None,
        }
    }
}
include!("zitadel.user.v2alpha.tonic.rs");
// @@protoc_insertion_point(module)