|
| 1 | +// This file is @generated by prost-build. |
| 2 | +#[derive(Clone, PartialEq, ::prost::Message)] |
| 3 | +pub struct MigrationPayload { |
| 4 | + #[prost(message, repeated, tag = "1")] |
| 5 | + pub otp_parameters: ::prost::alloc::vec::Vec<OtpParameters>, |
| 6 | + #[prost(int32, tag = "2")] |
| 7 | + pub version: i32, |
| 8 | + #[prost(int32, tag = "3")] |
| 9 | + pub batch_size: i32, |
| 10 | + #[prost(int32, tag = "4")] |
| 11 | + pub batch_index: i32, |
| 12 | + #[prost(int32, tag = "5")] |
| 13 | + pub batch_id: i32, |
| 14 | +} |
| 15 | +/// Nested message and enum types in `MigrationPayload`. |
| 16 | +pub mod migration_payload { |
| 17 | + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] |
| 18 | + #[repr(i32)] |
| 19 | + pub enum Algorithm { |
| 20 | + Unspecified = 0, |
| 21 | + Sha1 = 1, |
| 22 | + Sha256 = 2, |
| 23 | + Sha512 = 3, |
| 24 | + } |
| 25 | + impl Algorithm { |
| 26 | + /// String value of the enum field names used in the ProtoBuf definition. |
| 27 | + /// |
| 28 | + /// The values are not transformed in any way and thus are considered stable |
| 29 | + /// (if the ProtoBuf definition does not change) and safe for programmatic use. |
| 30 | + pub fn as_str_name(&self) -> &'static str { |
| 31 | + match self { |
| 32 | + Self::Unspecified => "ALGORITHM_UNSPECIFIED", |
| 33 | + Self::Sha1 => "ALGORITHM_SHA1", |
| 34 | + Self::Sha256 => "ALGORITHM_SHA256", |
| 35 | + Self::Sha512 => "ALGORITHM_SHA512", |
| 36 | + } |
| 37 | + } |
| 38 | + |
| 39 | + /// Creates an enum from field names used in the ProtoBuf definition. |
| 40 | + pub fn from_str_name(value: &str) -> ::core::option::Option<Self> { |
| 41 | + match value { |
| 42 | + "ALGORITHM_UNSPECIFIED" => Some(Self::Unspecified), |
| 43 | + "ALGORITHM_SHA1" => Some(Self::Sha1), |
| 44 | + "ALGORITHM_SHA256" => Some(Self::Sha256), |
| 45 | + "ALGORITHM_SHA512" => Some(Self::Sha512), |
| 46 | + _ => None, |
| 47 | + } |
| 48 | + } |
| 49 | + } |
| 50 | + #[derive(Clone, Copy, Debug, PartialEq, Eq, Hash, PartialOrd, Ord, ::prost::Enumeration)] |
| 51 | + #[repr(i32)] |
| 52 | + pub enum OtpType { |
| 53 | + Unspecified = 0, |
| 54 | + Hotp = 1, |
| 55 | + Totp = 2, |
| 56 | + } |
| 57 | + impl OtpType { |
| 58 | + /// String value of the enum field names used in the ProtoBuf definition. |
| 59 | + /// |
| 60 | + /// The values are not transformed in any way and thus are considered stable |
| 61 | + /// (if the ProtoBuf definition does not change) and safe for programmatic use. |
| 62 | + pub fn as_str_name(&self) -> &'static str { |
| 63 | + match self { |
| 64 | + Self::Unspecified => "OTP_TYPE_UNSPECIFIED", |
| 65 | + Self::Hotp => "OTP_TYPE_HOTP", |
| 66 | + Self::Totp => "OTP_TYPE_TOTP", |
| 67 | + } |
| 68 | + } |
| 69 | + |
| 70 | + /// Creates an enum from field names used in the ProtoBuf definition. |
| 71 | + pub fn from_str_name(value: &str) -> ::core::option::Option<Self> { |
| 72 | + match value { |
| 73 | + "OTP_TYPE_UNSPECIFIED" => Some(Self::Unspecified), |
| 74 | + "OTP_TYPE_HOTP" => Some(Self::Hotp), |
| 75 | + "OTP_TYPE_TOTP" => Some(Self::Totp), |
| 76 | + _ => None, |
| 77 | + } |
| 78 | + } |
| 79 | + } |
| 80 | +} |
| 81 | +#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)] |
| 82 | +pub struct OtpParameters { |
| 83 | + #[prost(bytes = "vec", tag = "1")] |
| 84 | + pub secret: ::prost::alloc::vec::Vec<u8>, |
| 85 | + #[prost(string, tag = "2")] |
| 86 | + pub name: ::prost::alloc::string::String, |
| 87 | + #[prost(string, tag = "3")] |
| 88 | + pub issuer: ::prost::alloc::string::String, |
| 89 | + #[prost(enumeration = "migration_payload::Algorithm", tag = "4")] |
| 90 | + pub algorithm: i32, |
| 91 | + #[prost(int64, tag = "5")] |
| 92 | + pub digits: i64, |
| 93 | + #[prost(enumeration = "migration_payload::OtpType", tag = "6")] |
| 94 | + pub r#type: i32, |
| 95 | + #[prost(int64, tag = "7")] |
| 96 | + pub counter: i64, |
| 97 | +} |
0 commit comments