From fe5be7e78d14ebd33fd3a673ee737ccd4507ce6b Mon Sep 17 00:00:00 2001 From: Momoko Hattori Date: Mon, 14 Aug 2023 13:18:02 +0900 Subject: [PATCH] system_api: Remove UserDataAuth After CL:4712775, crosvm doesn't call UserDataAuth's D-Bus methods. This CL hence removes Rust interface of UserDataAuth's D-Bus method and proto definitions used by UserDataAuth. BUG=b:229122701 TEST=./update_bindings.sh TEST=emerge- crosvm Change-Id: Idc79b07614a50bd17ff99c124e501a88eeda2c1b Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/4776924 Commit-Queue: Momoko Hattori Reviewed-by: Dennis Kempin --- .../client/org_chromium_userdataauth.rs | 497 - system_api/src/bindings/include_modules.rs | 2 - system_api/src/protos/UserDataAuth.rs | 15704 ---------------- system_api/src/protos/auth_factor.rs | 2875 --- system_api/src/protos/fido.rs | 2137 --- system_api/src/protos/include_protos.rs | 5 - system_api/src/protos/key.rs | 1267 -- system_api/src/protos/rpc.rs | 1406 -- system_api/update_bindings.sh | 6 - 9 files changed, 23899 deletions(-) delete mode 100644 system_api/src/bindings/client/org_chromium_userdataauth.rs delete mode 100644 system_api/src/protos/UserDataAuth.rs delete mode 100644 system_api/src/protos/auth_factor.rs delete mode 100644 system_api/src/protos/fido.rs delete mode 100644 system_api/src/protos/key.rs delete mode 100644 system_api/src/protos/rpc.rs diff --git a/system_api/src/bindings/client/org_chromium_userdataauth.rs b/system_api/src/bindings/client/org_chromium_userdataauth.rs deleted file mode 100644 index 613eb2b89b..0000000000 --- a/system_api/src/bindings/client/org_chromium_userdataauth.rs +++ /dev/null @@ -1,497 +0,0 @@ -// This code was autogenerated with `dbus-codegen-rust -s -m None`, see https://github.com/diwic/dbus-rs -use dbus as dbus; -#[allow(unused_imports)] -use dbus::arg; -use dbus::blocking; - -pub trait OrgChromiumUserDataAuthInterface { - fn is_mounted(&self, request: Vec) -> Result, dbus::Error>; - fn unmount(&self, request: Vec) -> Result, dbus::Error>; - fn remove(&self, request: Vec) -> Result, dbus::Error>; - fn list_keys(&self, request: Vec) -> Result, dbus::Error>; - fn get_web_authn_secret(&self, request: Vec) -> Result, dbus::Error>; - fn get_web_authn_secret_hash(&self, request: Vec) -> Result, dbus::Error>; - fn get_hibernate_secret(&self, request: Vec) -> Result, dbus::Error>; - fn get_encryption_info(&self, request: Vec) -> Result, dbus::Error>; - fn start_migrate_to_dircrypto(&self, request: Vec) -> Result, dbus::Error>; - fn needs_dircrypto_migration(&self, request: Vec) -> Result, dbus::Error>; - fn get_supported_key_policies(&self, request: Vec) -> Result, dbus::Error>; - fn get_account_disk_usage(&self, request: Vec) -> Result, dbus::Error>; - fn start_auth_session(&self, request: Vec) -> Result, dbus::Error>; - fn invalidate_auth_session(&self, request: Vec) -> Result, dbus::Error>; - fn extend_auth_session(&self, request: Vec) -> Result, dbus::Error>; - fn get_auth_session_status(&self, request: Vec) -> Result, dbus::Error>; - fn create_persistent_user(&self, request: Vec) -> Result, dbus::Error>; - fn authenticate_auth_factor(&self, request: Vec) -> Result, dbus::Error>; - fn prepare_guest_vault(&self, request: Vec) -> Result, dbus::Error>; - fn prepare_ephemeral_vault(&self, request: Vec) -> Result, dbus::Error>; - fn prepare_persistent_vault(&self, request: Vec) -> Result, dbus::Error>; - fn prepare_vault_for_migration(&self, request: Vec) -> Result, dbus::Error>; - fn add_auth_factor(&self, request: Vec) -> Result, dbus::Error>; - fn update_auth_factor(&self, request: Vec) -> Result, dbus::Error>; - fn update_auth_factor_metadata(&self, request: Vec) -> Result, dbus::Error>; - fn remove_auth_factor(&self, request: Vec) -> Result, dbus::Error>; - fn list_auth_factors(&self, request: Vec) -> Result, dbus::Error>; - fn get_auth_factor_extended_info(&self, request: Vec) -> Result, dbus::Error>; - fn prepare_auth_factor(&self, request: Vec) -> Result, dbus::Error>; - fn terminate_auth_factor(&self, request: Vec) -> Result, dbus::Error>; - fn get_recovery_request(&self, request: Vec) -> Result, dbus::Error>; - fn reset_application_container(&self, request: Vec) -> Result, dbus::Error>; - fn create_vault_keyset(&self, request: Vec) -> Result, dbus::Error>; - fn get_arc_disk_features(&self, request: Vec) -> Result, dbus::Error>; -} - -#[derive(Debug)] -pub struct OrgChromiumUserDataAuthInterfaceDircryptoMigrationProgress { - pub status: Vec, -} - -impl arg::AppendAll for OrgChromiumUserDataAuthInterfaceDircryptoMigrationProgress { - fn append(&self, i: &mut arg::IterAppend) { - arg::RefArg::append(&self.status, i); - } -} - -impl arg::ReadAll for OrgChromiumUserDataAuthInterfaceDircryptoMigrationProgress { - fn read(i: &mut arg::Iter) -> Result { - Ok(OrgChromiumUserDataAuthInterfaceDircryptoMigrationProgress { - status: i.read()?, - }) - } -} - -impl dbus::message::SignalArgs for OrgChromiumUserDataAuthInterfaceDircryptoMigrationProgress { - const NAME: &'static str = "DircryptoMigrationProgress"; - const INTERFACE: &'static str = "org.chromium.UserDataAuthInterface"; -} - -#[derive(Debug)] -pub struct OrgChromiumUserDataAuthInterfaceAuthFactorStatusUpdate { - pub status: Vec, -} - -impl arg::AppendAll for OrgChromiumUserDataAuthInterfaceAuthFactorStatusUpdate { - fn append(&self, i: &mut arg::IterAppend) { - arg::RefArg::append(&self.status, i); - } -} - -impl arg::ReadAll for OrgChromiumUserDataAuthInterfaceAuthFactorStatusUpdate { - fn read(i: &mut arg::Iter) -> Result { - Ok(OrgChromiumUserDataAuthInterfaceAuthFactorStatusUpdate { - status: i.read()?, - }) - } -} - -impl dbus::message::SignalArgs for OrgChromiumUserDataAuthInterfaceAuthFactorStatusUpdate { - const NAME: &'static str = "AuthFactorStatusUpdate"; - const INTERFACE: &'static str = "org.chromium.UserDataAuthInterface"; -} - -#[derive(Debug)] -pub struct OrgChromiumUserDataAuthInterfaceLowDiskSpace { - pub status: Vec, -} - -impl arg::AppendAll for OrgChromiumUserDataAuthInterfaceLowDiskSpace { - fn append(&self, i: &mut arg::IterAppend) { - arg::RefArg::append(&self.status, i); - } -} - -impl arg::ReadAll for OrgChromiumUserDataAuthInterfaceLowDiskSpace { - fn read(i: &mut arg::Iter) -> Result { - Ok(OrgChromiumUserDataAuthInterfaceLowDiskSpace { - status: i.read()?, - }) - } -} - -impl dbus::message::SignalArgs for OrgChromiumUserDataAuthInterfaceLowDiskSpace { - const NAME: &'static str = "LowDiskSpace"; - const INTERFACE: &'static str = "org.chromium.UserDataAuthInterface"; -} - -#[derive(Debug)] -pub struct OrgChromiumUserDataAuthInterfaceAuthScanResult { - pub status: Vec, -} - -impl arg::AppendAll for OrgChromiumUserDataAuthInterfaceAuthScanResult { - fn append(&self, i: &mut arg::IterAppend) { - arg::RefArg::append(&self.status, i); - } -} - -impl arg::ReadAll for OrgChromiumUserDataAuthInterfaceAuthScanResult { - fn read(i: &mut arg::Iter) -> Result { - Ok(OrgChromiumUserDataAuthInterfaceAuthScanResult { - status: i.read()?, - }) - } -} - -impl dbus::message::SignalArgs for OrgChromiumUserDataAuthInterfaceAuthScanResult { - const NAME: &'static str = "AuthScanResult"; - const INTERFACE: &'static str = "org.chromium.UserDataAuthInterface"; -} - -#[derive(Debug)] -pub struct OrgChromiumUserDataAuthInterfacePrepareAuthFactorProgress { - pub status: Vec, -} - -impl arg::AppendAll for OrgChromiumUserDataAuthInterfacePrepareAuthFactorProgress { - fn append(&self, i: &mut arg::IterAppend) { - arg::RefArg::append(&self.status, i); - } -} - -impl arg::ReadAll for OrgChromiumUserDataAuthInterfacePrepareAuthFactorProgress { - fn read(i: &mut arg::Iter) -> Result { - Ok(OrgChromiumUserDataAuthInterfacePrepareAuthFactorProgress { - status: i.read()?, - }) - } -} - -impl dbus::message::SignalArgs for OrgChromiumUserDataAuthInterfacePrepareAuthFactorProgress { - const NAME: &'static str = "PrepareAuthFactorProgress"; - const INTERFACE: &'static str = "org.chromium.UserDataAuthInterface"; -} - -impl<'a, T: blocking::BlockingSender, C: ::std::ops::Deref> OrgChromiumUserDataAuthInterface for blocking::Proxy<'a, C> { - - fn is_mounted(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "IsMounted", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn unmount(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "Unmount", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn remove(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "Remove", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn list_keys(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "ListKeys", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn get_web_authn_secret(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "GetWebAuthnSecret", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn get_web_authn_secret_hash(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "GetWebAuthnSecretHash", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn get_hibernate_secret(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "GetHibernateSecret", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn get_encryption_info(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "GetEncryptionInfo", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn start_migrate_to_dircrypto(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "StartMigrateToDircrypto", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn needs_dircrypto_migration(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "NeedsDircryptoMigration", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn get_supported_key_policies(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "GetSupportedKeyPolicies", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn get_account_disk_usage(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "GetAccountDiskUsage", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn start_auth_session(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "StartAuthSession", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn invalidate_auth_session(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "InvalidateAuthSession", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn extend_auth_session(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "ExtendAuthSession", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn get_auth_session_status(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "GetAuthSessionStatus", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn create_persistent_user(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "CreatePersistentUser", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn authenticate_auth_factor(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "AuthenticateAuthFactor", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn prepare_guest_vault(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "PrepareGuestVault", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn prepare_ephemeral_vault(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "PrepareEphemeralVault", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn prepare_persistent_vault(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "PreparePersistentVault", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn prepare_vault_for_migration(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "PrepareVaultForMigration", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn add_auth_factor(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "AddAuthFactor", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn update_auth_factor(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "UpdateAuthFactor", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn update_auth_factor_metadata(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "UpdateAuthFactorMetadata", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn remove_auth_factor(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "RemoveAuthFactor", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn list_auth_factors(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "ListAuthFactors", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn get_auth_factor_extended_info(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "GetAuthFactorExtendedInfo", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn prepare_auth_factor(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "PrepareAuthFactor", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn terminate_auth_factor(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "TerminateAuthFactor", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn get_recovery_request(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "GetRecoveryRequest", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn reset_application_container(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "ResetApplicationContainer", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn create_vault_keyset(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "CreateVaultKeyset", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn get_arc_disk_features(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.UserDataAuthInterface", "GetArcDiskFeatures", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } -} - -pub trait OrgChromiumArcQuota { - fn get_arc_disk_features(&self, request: Vec) -> Result, dbus::Error>; - fn get_current_space_for_arc_uid(&self, request: Vec) -> Result, dbus::Error>; - fn get_current_space_for_arc_gid(&self, request: Vec) -> Result, dbus::Error>; - fn get_current_space_for_arc_project_id(&self, request: Vec) -> Result, dbus::Error>; - fn set_media_rwdata_file_project_id(&self, fd: arg::OwnedFd, request: Vec) -> Result, dbus::Error>; - fn set_media_rwdata_file_project_inheritance_flag(&self, fd: arg::OwnedFd, request: Vec) -> Result, dbus::Error>; -} - -impl<'a, T: blocking::BlockingSender, C: ::std::ops::Deref> OrgChromiumArcQuota for blocking::Proxy<'a, C> { - - fn get_arc_disk_features(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.ArcQuota", "GetArcDiskFeatures", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn get_current_space_for_arc_uid(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.ArcQuota", "GetCurrentSpaceForArcUid", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn get_current_space_for_arc_gid(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.ArcQuota", "GetCurrentSpaceForArcGid", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn get_current_space_for_arc_project_id(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.ArcQuota", "GetCurrentSpaceForArcProjectId", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn set_media_rwdata_file_project_id(&self, fd: arg::OwnedFd, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.ArcQuota", "SetMediaRWDataFileProjectId", (fd, request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn set_media_rwdata_file_project_inheritance_flag(&self, fd: arg::OwnedFd, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.ArcQuota", "SetMediaRWDataFileProjectInheritanceFlag", (fd, request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } -} - -pub trait OrgChromiumCryptohomePkcs11Interface { - fn pkcs11_is_tpm_token_ready(&self, request: Vec) -> Result, dbus::Error>; - fn pkcs11_get_tpm_token_info(&self, request: Vec) -> Result, dbus::Error>; - fn pkcs11_terminate(&self, request: Vec) -> Result, dbus::Error>; - fn pkcs11_restore_tpm_tokens(&self, request: Vec) -> Result, dbus::Error>; -} - -impl<'a, T: blocking::BlockingSender, C: ::std::ops::Deref> OrgChromiumCryptohomePkcs11Interface for blocking::Proxy<'a, C> { - - fn pkcs11_is_tpm_token_ready(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.CryptohomePkcs11Interface", "Pkcs11IsTpmTokenReady", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn pkcs11_get_tpm_token_info(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.CryptohomePkcs11Interface", "Pkcs11GetTpmTokenInfo", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn pkcs11_terminate(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.CryptohomePkcs11Interface", "Pkcs11Terminate", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn pkcs11_restore_tpm_tokens(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.CryptohomePkcs11Interface", "Pkcs11RestoreTpmTokens", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } -} - -pub trait OrgChromiumInstallAttributesInterface { - fn install_attributes_get(&self, request: Vec) -> Result, dbus::Error>; - fn install_attributes_set(&self, request: Vec) -> Result, dbus::Error>; - fn install_attributes_finalize(&self, request: Vec) -> Result, dbus::Error>; - fn install_attributes_get_status(&self, request: Vec) -> Result, dbus::Error>; - fn get_firmware_management_parameters(&self, request: Vec) -> Result, dbus::Error>; - fn remove_firmware_management_parameters(&self, request: Vec) -> Result, dbus::Error>; - fn set_firmware_management_parameters(&self, request: Vec) -> Result, dbus::Error>; -} - -impl<'a, T: blocking::BlockingSender, C: ::std::ops::Deref> OrgChromiumInstallAttributesInterface for blocking::Proxy<'a, C> { - - fn install_attributes_get(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.InstallAttributesInterface", "InstallAttributesGet", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn install_attributes_set(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.InstallAttributesInterface", "InstallAttributesSet", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn install_attributes_finalize(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.InstallAttributesInterface", "InstallAttributesFinalize", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn install_attributes_get_status(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.InstallAttributesInterface", "InstallAttributesGetStatus", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn get_firmware_management_parameters(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.InstallAttributesInterface", "GetFirmwareManagementParameters", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn remove_firmware_management_parameters(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.InstallAttributesInterface", "RemoveFirmwareManagementParameters", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn set_firmware_management_parameters(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.InstallAttributesInterface", "SetFirmwareManagementParameters", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } -} - -pub trait OrgChromiumCryptohomeMiscInterface { - fn get_system_salt(&self, request: Vec) -> Result, dbus::Error>; - fn update_current_user_activity_timestamp(&self, request: Vec) -> Result, dbus::Error>; - fn get_sanitized_username(&self, request: Vec) -> Result, dbus::Error>; - fn get_login_status(&self, request: Vec) -> Result, dbus::Error>; - fn lock_to_single_user_mount_until_reboot(&self, request: Vec) -> Result, dbus::Error>; - fn get_rsu_device_id(&self, request: Vec) -> Result, dbus::Error>; -} - -impl<'a, T: blocking::BlockingSender, C: ::std::ops::Deref> OrgChromiumCryptohomeMiscInterface for blocking::Proxy<'a, C> { - - fn get_system_salt(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.CryptohomeMiscInterface", "GetSystemSalt", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn update_current_user_activity_timestamp(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.CryptohomeMiscInterface", "UpdateCurrentUserActivityTimestamp", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn get_sanitized_username(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.CryptohomeMiscInterface", "GetSanitizedUsername", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn get_login_status(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.CryptohomeMiscInterface", "GetLoginStatus", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn lock_to_single_user_mount_until_reboot(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.CryptohomeMiscInterface", "LockToSingleUserMountUntilReboot", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } - - fn get_rsu_device_id(&self, request: Vec) -> Result, dbus::Error> { - self.method_call("org.chromium.CryptohomeMiscInterface", "GetRsuDeviceId", (request, )) - .and_then(|r: (Vec, )| Ok(r.0, )) - } -} diff --git a/system_api/src/bindings/include_modules.rs b/system_api/src/bindings/include_modules.rs index 63f54f9f1d..96c3682337 100644 --- a/system_api/src/bindings/include_modules.rs +++ b/system_api/src/bindings/include_modules.rs @@ -3,8 +3,6 @@ pub mod client { pub mod org_chromium_spaced; pub use org_chromium_spaced::*; - pub mod org_chromium_userdataauth; - pub use org_chromium_userdataauth::*; pub mod org_chromium_vtpm; pub use org_chromium_vtpm::*; } diff --git a/system_api/src/protos/UserDataAuth.rs b/system_api/src/protos/UserDataAuth.rs deleted file mode 100644 index cba4976116..0000000000 --- a/system_api/src/protos/UserDataAuth.rs +++ /dev/null @@ -1,15704 +0,0 @@ -// This file is generated by rust-protobuf 3.2.0. Do not edit -// .proto file is parsed by protoc 3.21.9 -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `UserDataAuth.proto` -// Generated for lite runtime - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0; - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.CryptohomeErrorInfo) -pub struct CryptohomeErrorInfo { - // message fields - // @@protoc_insertion_point(field:user_data_auth.CryptohomeErrorInfo.error_id) - pub error_id: ::std::string::String, - // @@protoc_insertion_point(field:user_data_auth.CryptohomeErrorInfo.readable_error_id) - pub readable_error_id: ::std::string::String, - // @@protoc_insertion_point(field:user_data_auth.CryptohomeErrorInfo.primary_action) - pub primary_action: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.CryptohomeErrorInfo.possible_actions) - pub possible_actions: ::std::vec::Vec<::protobuf::EnumOrUnknown>, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.CryptohomeErrorInfo.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CryptohomeErrorInfo { - fn default() -> &'a CryptohomeErrorInfo { - ::default_instance() - } -} - -impl CryptohomeErrorInfo { - pub fn new() -> CryptohomeErrorInfo { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for CryptohomeErrorInfo { - const NAME: &'static str = "CryptohomeErrorInfo"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.error_id = is.read_string()?; - }, - 18 => { - self.readable_error_id = is.read_string()?; - }, - 24 => { - self.primary_action = is.read_enum_or_unknown()?; - }, - 32 => { - self.possible_actions.push(is.read_enum_or_unknown()?); - }, - 34 => { - ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.possible_actions)? - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.error_id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.error_id); - } - if !self.readable_error_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.readable_error_id); - } - if self.primary_action != ::protobuf::EnumOrUnknown::new(PrimaryAction::PRIMARY_NO_ERROR) { - my_size += ::protobuf::rt::int32_size(3, self.primary_action.value()); - } - for value in &self.possible_actions { - my_size += ::protobuf::rt::int32_size(4, value.value()); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.error_id.is_empty() { - os.write_string(1, &self.error_id)?; - } - if !self.readable_error_id.is_empty() { - os.write_string(2, &self.readable_error_id)?; - } - if self.primary_action != ::protobuf::EnumOrUnknown::new(PrimaryAction::PRIMARY_NO_ERROR) { - os.write_enum(3, ::protobuf::EnumOrUnknown::value(&self.primary_action))?; - } - for v in &self.possible_actions { - os.write_enum(4, ::protobuf::EnumOrUnknown::value(v))?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CryptohomeErrorInfo { - CryptohomeErrorInfo::new() - } - - fn clear(&mut self) { - self.error_id.clear(); - self.readable_error_id.clear(); - self.primary_action = ::protobuf::EnumOrUnknown::new(PrimaryAction::PRIMARY_NO_ERROR); - self.possible_actions.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static CryptohomeErrorInfo { - static instance: CryptohomeErrorInfo = CryptohomeErrorInfo { - error_id: ::std::string::String::new(), - readable_error_id: ::std::string::String::new(), - primary_action: ::protobuf::EnumOrUnknown::from_i32(0), - possible_actions: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.IsMountedRequest) -pub struct IsMountedRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.IsMountedRequest.username) - pub username: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.IsMountedRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a IsMountedRequest { - fn default() -> &'a IsMountedRequest { - ::default_instance() - } -} - -impl IsMountedRequest { - pub fn new() -> IsMountedRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for IsMountedRequest { - const NAME: &'static str = "IsMountedRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.username = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.username.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.username); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.username.is_empty() { - os.write_string(1, &self.username)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> IsMountedRequest { - IsMountedRequest::new() - } - - fn clear(&mut self) { - self.username.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static IsMountedRequest { - static instance: IsMountedRequest = IsMountedRequest { - username: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.IsMountedReply) -pub struct IsMountedReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.IsMountedReply.is_mounted) - pub is_mounted: bool, - // @@protoc_insertion_point(field:user_data_auth.IsMountedReply.is_ephemeral_mount) - pub is_ephemeral_mount: bool, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.IsMountedReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a IsMountedReply { - fn default() -> &'a IsMountedReply { - ::default_instance() - } -} - -impl IsMountedReply { - pub fn new() -> IsMountedReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for IsMountedReply { - const NAME: &'static str = "IsMountedReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.is_mounted = is.read_bool()?; - }, - 16 => { - self.is_ephemeral_mount = is.read_bool()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.is_mounted != false { - my_size += 1 + 1; - } - if self.is_ephemeral_mount != false { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.is_mounted != false { - os.write_bool(1, self.is_mounted)?; - } - if self.is_ephemeral_mount != false { - os.write_bool(2, self.is_ephemeral_mount)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> IsMountedReply { - IsMountedReply::new() - } - - fn clear(&mut self) { - self.is_mounted = false; - self.is_ephemeral_mount = false; - self.special_fields.clear(); - } - - fn default_instance() -> &'static IsMountedReply { - static instance: IsMountedReply = IsMountedReply { - is_mounted: false, - is_ephemeral_mount: false, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.UnmountRequest) -pub struct UnmountRequest { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.UnmountRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a UnmountRequest { - fn default() -> &'a UnmountRequest { - ::default_instance() - } -} - -impl UnmountRequest { - pub fn new() -> UnmountRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for UnmountRequest { - const NAME: &'static str = "UnmountRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> UnmountRequest { - UnmountRequest::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static UnmountRequest { - static instance: UnmountRequest = UnmountRequest { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.UnmountReply) -pub struct UnmountReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.UnmountReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.UnmountReply.error_info) - pub error_info: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.UnmountReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a UnmountReply { - fn default() -> &'a UnmountReply { - ::default_instance() - } -} - -impl UnmountReply { - pub fn new() -> UnmountReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for UnmountReply { - const NAME: &'static str = "UnmountReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> UnmountReply { - UnmountReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static UnmountReply { - static instance: UnmountReply = UnmountReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.RemoveRequest) -pub struct RemoveRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.RemoveRequest.identifier) - pub identifier: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.RemoveRequest.auth_session_id) - pub auth_session_id: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.RemoveRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a RemoveRequest { - fn default() -> &'a RemoveRequest { - ::default_instance() - } -} - -impl RemoveRequest { - pub fn new() -> RemoveRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for RemoveRequest { - const NAME: &'static str = "RemoveRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.identifier)?; - }, - 18 => { - self.auth_session_id = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.identifier.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if !self.auth_session_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.auth_session_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.identifier.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if !self.auth_session_id.is_empty() { - os.write_bytes(2, &self.auth_session_id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> RemoveRequest { - RemoveRequest::new() - } - - fn clear(&mut self) { - self.identifier.clear(); - self.auth_session_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static RemoveRequest { - static instance: RemoveRequest = RemoveRequest { - identifier: ::protobuf::MessageField::none(), - auth_session_id: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.RemoveReply) -pub struct RemoveReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.RemoveReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.RemoveReply.error_info) - pub error_info: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.RemoveReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a RemoveReply { - fn default() -> &'a RemoveReply { - ::default_instance() - } -} - -impl RemoveReply { - pub fn new() -> RemoveReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for RemoveReply { - const NAME: &'static str = "RemoveReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> RemoveReply { - RemoveReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static RemoveReply { - static instance: RemoveReply = RemoveReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.ListKeysRequest) -pub struct ListKeysRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.ListKeysRequest.account_id) - pub account_id: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.ListKeysRequest.authorization_request) - pub authorization_request: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.ListKeysRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ListKeysRequest { - fn default() -> &'a ListKeysRequest { - ::default_instance() - } -} - -impl ListKeysRequest { - pub fn new() -> ListKeysRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for ListKeysRequest { - const NAME: &'static str = "ListKeysRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.account_id)?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.authorization_request)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.account_id.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.authorization_request.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.account_id.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if let Some(v) = self.authorization_request.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ListKeysRequest { - ListKeysRequest::new() - } - - fn clear(&mut self) { - self.account_id.clear(); - self.authorization_request.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ListKeysRequest { - static instance: ListKeysRequest = ListKeysRequest { - account_id: ::protobuf::MessageField::none(), - authorization_request: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.ListKeysReply) -pub struct ListKeysReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.ListKeysReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.ListKeysReply.error_info) - pub error_info: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.ListKeysReply.labels) - pub labels: ::std::vec::Vec<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.ListKeysReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ListKeysReply { - fn default() -> &'a ListKeysReply { - ::default_instance() - } -} - -impl ListKeysReply { - pub fn new() -> ListKeysReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for ListKeysReply { - const NAME: &'static str = "ListKeysReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - 18 => { - self.labels.push(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - for value in &self.labels { - my_size += ::protobuf::rt::string_size(2, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - for v in &self.labels { - os.write_string(2, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ListKeysReply { - ListKeysReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.labels.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ListKeysReply { - static instance: ListKeysReply = ListKeysReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - labels: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.CheckKeyRequest) -pub struct CheckKeyRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.CheckKeyRequest.account_id) - pub account_id: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.CheckKeyRequest.authorization_request) - pub authorization_request: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.CheckKeyRequest.unlock_webauthn_secret) - pub unlock_webauthn_secret: bool, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.CheckKeyRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CheckKeyRequest { - fn default() -> &'a CheckKeyRequest { - ::default_instance() - } -} - -impl CheckKeyRequest { - pub fn new() -> CheckKeyRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for CheckKeyRequest { - const NAME: &'static str = "CheckKeyRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.account_id)?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.authorization_request)?; - }, - 24 => { - self.unlock_webauthn_secret = is.read_bool()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.account_id.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.authorization_request.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if self.unlock_webauthn_secret != false { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.account_id.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if let Some(v) = self.authorization_request.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - if self.unlock_webauthn_secret != false { - os.write_bool(3, self.unlock_webauthn_secret)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CheckKeyRequest { - CheckKeyRequest::new() - } - - fn clear(&mut self) { - self.account_id.clear(); - self.authorization_request.clear(); - self.unlock_webauthn_secret = false; - self.special_fields.clear(); - } - - fn default_instance() -> &'static CheckKeyRequest { - static instance: CheckKeyRequest = CheckKeyRequest { - account_id: ::protobuf::MessageField::none(), - authorization_request: ::protobuf::MessageField::none(), - unlock_webauthn_secret: false, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.CheckKeyReply) -pub struct CheckKeyReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.CheckKeyReply.error) - pub error: ::protobuf::EnumOrUnknown, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.CheckKeyReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CheckKeyReply { - fn default() -> &'a CheckKeyReply { - ::default_instance() - } -} - -impl CheckKeyReply { - pub fn new() -> CheckKeyReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for CheckKeyReply { - const NAME: &'static str = "CheckKeyReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CheckKeyReply { - CheckKeyReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.special_fields.clear(); - } - - fn default_instance() -> &'static CheckKeyReply { - static instance: CheckKeyReply = CheckKeyReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.StartFingerprintAuthSessionRequest) -pub struct StartFingerprintAuthSessionRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.StartFingerprintAuthSessionRequest.account_id) - pub account_id: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.StartFingerprintAuthSessionRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a StartFingerprintAuthSessionRequest { - fn default() -> &'a StartFingerprintAuthSessionRequest { - ::default_instance() - } -} - -impl StartFingerprintAuthSessionRequest { - pub fn new() -> StartFingerprintAuthSessionRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for StartFingerprintAuthSessionRequest { - const NAME: &'static str = "StartFingerprintAuthSessionRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.account_id)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.account_id.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.account_id.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> StartFingerprintAuthSessionRequest { - StartFingerprintAuthSessionRequest::new() - } - - fn clear(&mut self) { - self.account_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static StartFingerprintAuthSessionRequest { - static instance: StartFingerprintAuthSessionRequest = StartFingerprintAuthSessionRequest { - account_id: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.StartFingerprintAuthSessionReply) -pub struct StartFingerprintAuthSessionReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.StartFingerprintAuthSessionReply.error) - pub error: ::protobuf::EnumOrUnknown, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.StartFingerprintAuthSessionReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a StartFingerprintAuthSessionReply { - fn default() -> &'a StartFingerprintAuthSessionReply { - ::default_instance() - } -} - -impl StartFingerprintAuthSessionReply { - pub fn new() -> StartFingerprintAuthSessionReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for StartFingerprintAuthSessionReply { - const NAME: &'static str = "StartFingerprintAuthSessionReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> StartFingerprintAuthSessionReply { - StartFingerprintAuthSessionReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.special_fields.clear(); - } - - fn default_instance() -> &'static StartFingerprintAuthSessionReply { - static instance: StartFingerprintAuthSessionReply = StartFingerprintAuthSessionReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.EndFingerprintAuthSessionRequest) -pub struct EndFingerprintAuthSessionRequest { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.EndFingerprintAuthSessionRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a EndFingerprintAuthSessionRequest { - fn default() -> &'a EndFingerprintAuthSessionRequest { - ::default_instance() - } -} - -impl EndFingerprintAuthSessionRequest { - pub fn new() -> EndFingerprintAuthSessionRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for EndFingerprintAuthSessionRequest { - const NAME: &'static str = "EndFingerprintAuthSessionRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> EndFingerprintAuthSessionRequest { - EndFingerprintAuthSessionRequest::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static EndFingerprintAuthSessionRequest { - static instance: EndFingerprintAuthSessionRequest = EndFingerprintAuthSessionRequest { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.EndFingerprintAuthSessionReply) -pub struct EndFingerprintAuthSessionReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.EndFingerprintAuthSessionReply.error) - pub error: ::protobuf::EnumOrUnknown, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.EndFingerprintAuthSessionReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a EndFingerprintAuthSessionReply { - fn default() -> &'a EndFingerprintAuthSessionReply { - ::default_instance() - } -} - -impl EndFingerprintAuthSessionReply { - pub fn new() -> EndFingerprintAuthSessionReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for EndFingerprintAuthSessionReply { - const NAME: &'static str = "EndFingerprintAuthSessionReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> EndFingerprintAuthSessionReply { - EndFingerprintAuthSessionReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.special_fields.clear(); - } - - fn default_instance() -> &'static EndFingerprintAuthSessionReply { - static instance: EndFingerprintAuthSessionReply = EndFingerprintAuthSessionReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetWebAuthnSecretRequest) -pub struct GetWebAuthnSecretRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetWebAuthnSecretRequest.account_id) - pub account_id: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetWebAuthnSecretRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetWebAuthnSecretRequest { - fn default() -> &'a GetWebAuthnSecretRequest { - ::default_instance() - } -} - -impl GetWebAuthnSecretRequest { - pub fn new() -> GetWebAuthnSecretRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetWebAuthnSecretRequest { - const NAME: &'static str = "GetWebAuthnSecretRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.account_id)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.account_id.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.account_id.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetWebAuthnSecretRequest { - GetWebAuthnSecretRequest::new() - } - - fn clear(&mut self) { - self.account_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetWebAuthnSecretRequest { - static instance: GetWebAuthnSecretRequest = GetWebAuthnSecretRequest { - account_id: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetWebAuthnSecretReply) -pub struct GetWebAuthnSecretReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetWebAuthnSecretReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.GetWebAuthnSecretReply.webauthn_secret) - pub webauthn_secret: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetWebAuthnSecretReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetWebAuthnSecretReply { - fn default() -> &'a GetWebAuthnSecretReply { - ::default_instance() - } -} - -impl GetWebAuthnSecretReply { - pub fn new() -> GetWebAuthnSecretReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetWebAuthnSecretReply { - const NAME: &'static str = "GetWebAuthnSecretReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - self.webauthn_secret = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if !self.webauthn_secret.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.webauthn_secret); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if !self.webauthn_secret.is_empty() { - os.write_bytes(2, &self.webauthn_secret)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetWebAuthnSecretReply { - GetWebAuthnSecretReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.webauthn_secret.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetWebAuthnSecretReply { - static instance: GetWebAuthnSecretReply = GetWebAuthnSecretReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - webauthn_secret: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetWebAuthnSecretHashRequest) -pub struct GetWebAuthnSecretHashRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetWebAuthnSecretHashRequest.account_id) - pub account_id: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetWebAuthnSecretHashRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetWebAuthnSecretHashRequest { - fn default() -> &'a GetWebAuthnSecretHashRequest { - ::default_instance() - } -} - -impl GetWebAuthnSecretHashRequest { - pub fn new() -> GetWebAuthnSecretHashRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetWebAuthnSecretHashRequest { - const NAME: &'static str = "GetWebAuthnSecretHashRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.account_id)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.account_id.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.account_id.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetWebAuthnSecretHashRequest { - GetWebAuthnSecretHashRequest::new() - } - - fn clear(&mut self) { - self.account_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetWebAuthnSecretHashRequest { - static instance: GetWebAuthnSecretHashRequest = GetWebAuthnSecretHashRequest { - account_id: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetWebAuthnSecretHashReply) -pub struct GetWebAuthnSecretHashReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetWebAuthnSecretHashReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.GetWebAuthnSecretHashReply.webauthn_secret_hash) - pub webauthn_secret_hash: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetWebAuthnSecretHashReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetWebAuthnSecretHashReply { - fn default() -> &'a GetWebAuthnSecretHashReply { - ::default_instance() - } -} - -impl GetWebAuthnSecretHashReply { - pub fn new() -> GetWebAuthnSecretHashReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetWebAuthnSecretHashReply { - const NAME: &'static str = "GetWebAuthnSecretHashReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - self.webauthn_secret_hash = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if !self.webauthn_secret_hash.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.webauthn_secret_hash); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if !self.webauthn_secret_hash.is_empty() { - os.write_bytes(2, &self.webauthn_secret_hash)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetWebAuthnSecretHashReply { - GetWebAuthnSecretHashReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.webauthn_secret_hash.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetWebAuthnSecretHashReply { - static instance: GetWebAuthnSecretHashReply = GetWebAuthnSecretHashReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - webauthn_secret_hash: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetHibernateSecretRequest) -pub struct GetHibernateSecretRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetHibernateSecretRequest.account_id) - pub account_id: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.GetHibernateSecretRequest.auth_session_id) - pub auth_session_id: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetHibernateSecretRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetHibernateSecretRequest { - fn default() -> &'a GetHibernateSecretRequest { - ::default_instance() - } -} - -impl GetHibernateSecretRequest { - pub fn new() -> GetHibernateSecretRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetHibernateSecretRequest { - const NAME: &'static str = "GetHibernateSecretRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.account_id)?; - }, - 18 => { - self.auth_session_id = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.account_id.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if !self.auth_session_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.auth_session_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.account_id.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if !self.auth_session_id.is_empty() { - os.write_bytes(2, &self.auth_session_id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetHibernateSecretRequest { - GetHibernateSecretRequest::new() - } - - fn clear(&mut self) { - self.account_id.clear(); - self.auth_session_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetHibernateSecretRequest { - static instance: GetHibernateSecretRequest = GetHibernateSecretRequest { - account_id: ::protobuf::MessageField::none(), - auth_session_id: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetHibernateSecretReply) -pub struct GetHibernateSecretReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetHibernateSecretReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.GetHibernateSecretReply.hibernate_secret) - pub hibernate_secret: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetHibernateSecretReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetHibernateSecretReply { - fn default() -> &'a GetHibernateSecretReply { - ::default_instance() - } -} - -impl GetHibernateSecretReply { - pub fn new() -> GetHibernateSecretReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetHibernateSecretReply { - const NAME: &'static str = "GetHibernateSecretReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - self.hibernate_secret = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if !self.hibernate_secret.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.hibernate_secret); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if !self.hibernate_secret.is_empty() { - os.write_bytes(2, &self.hibernate_secret)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetHibernateSecretReply { - GetHibernateSecretReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.hibernate_secret.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetHibernateSecretReply { - static instance: GetHibernateSecretReply = GetHibernateSecretReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - hibernate_secret: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetEncryptionInfoRequest) -pub struct GetEncryptionInfoRequest { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetEncryptionInfoRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetEncryptionInfoRequest { - fn default() -> &'a GetEncryptionInfoRequest { - ::default_instance() - } -} - -impl GetEncryptionInfoRequest { - pub fn new() -> GetEncryptionInfoRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetEncryptionInfoRequest { - const NAME: &'static str = "GetEncryptionInfoRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetEncryptionInfoRequest { - GetEncryptionInfoRequest::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetEncryptionInfoRequest { - static instance: GetEncryptionInfoRequest = GetEncryptionInfoRequest { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetEncryptionInfoReply) -pub struct GetEncryptionInfoReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetEncryptionInfoReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.GetEncryptionInfoReply.keylocker_supported) - pub keylocker_supported: bool, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetEncryptionInfoReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetEncryptionInfoReply { - fn default() -> &'a GetEncryptionInfoReply { - ::default_instance() - } -} - -impl GetEncryptionInfoReply { - pub fn new() -> GetEncryptionInfoReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetEncryptionInfoReply { - const NAME: &'static str = "GetEncryptionInfoReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 16 => { - self.keylocker_supported = is.read_bool()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if self.keylocker_supported != false { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if self.keylocker_supported != false { - os.write_bool(2, self.keylocker_supported)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetEncryptionInfoReply { - GetEncryptionInfoReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.keylocker_supported = false; - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetEncryptionInfoReply { - static instance: GetEncryptionInfoReply = GetEncryptionInfoReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - keylocker_supported: false, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.StartMigrateToDircryptoRequest) -pub struct StartMigrateToDircryptoRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.StartMigrateToDircryptoRequest.account_id) - pub account_id: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.StartMigrateToDircryptoRequest.minimal_migration) - pub minimal_migration: bool, - // @@protoc_insertion_point(field:user_data_auth.StartMigrateToDircryptoRequest.auth_session_id) - pub auth_session_id: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.StartMigrateToDircryptoRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a StartMigrateToDircryptoRequest { - fn default() -> &'a StartMigrateToDircryptoRequest { - ::default_instance() - } -} - -impl StartMigrateToDircryptoRequest { - pub fn new() -> StartMigrateToDircryptoRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for StartMigrateToDircryptoRequest { - const NAME: &'static str = "StartMigrateToDircryptoRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.account_id)?; - }, - 16 => { - self.minimal_migration = is.read_bool()?; - }, - 26 => { - self.auth_session_id = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.account_id.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if self.minimal_migration != false { - my_size += 1 + 1; - } - if !self.auth_session_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(3, &self.auth_session_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.account_id.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if self.minimal_migration != false { - os.write_bool(2, self.minimal_migration)?; - } - if !self.auth_session_id.is_empty() { - os.write_bytes(3, &self.auth_session_id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> StartMigrateToDircryptoRequest { - StartMigrateToDircryptoRequest::new() - } - - fn clear(&mut self) { - self.account_id.clear(); - self.minimal_migration = false; - self.auth_session_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static StartMigrateToDircryptoRequest { - static instance: StartMigrateToDircryptoRequest = StartMigrateToDircryptoRequest { - account_id: ::protobuf::MessageField::none(), - minimal_migration: false, - auth_session_id: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.StartMigrateToDircryptoReply) -pub struct StartMigrateToDircryptoReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.StartMigrateToDircryptoReply.error) - pub error: ::protobuf::EnumOrUnknown, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.StartMigrateToDircryptoReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a StartMigrateToDircryptoReply { - fn default() -> &'a StartMigrateToDircryptoReply { - ::default_instance() - } -} - -impl StartMigrateToDircryptoReply { - pub fn new() -> StartMigrateToDircryptoReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for StartMigrateToDircryptoReply { - const NAME: &'static str = "StartMigrateToDircryptoReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> StartMigrateToDircryptoReply { - StartMigrateToDircryptoReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.special_fields.clear(); - } - - fn default_instance() -> &'static StartMigrateToDircryptoReply { - static instance: StartMigrateToDircryptoReply = StartMigrateToDircryptoReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.DircryptoMigrationProgress) -pub struct DircryptoMigrationProgress { - // message fields - // @@protoc_insertion_point(field:user_data_auth.DircryptoMigrationProgress.status) - pub status: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.DircryptoMigrationProgress.current_bytes) - pub current_bytes: u64, - // @@protoc_insertion_point(field:user_data_auth.DircryptoMigrationProgress.total_bytes) - pub total_bytes: u64, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.DircryptoMigrationProgress.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a DircryptoMigrationProgress { - fn default() -> &'a DircryptoMigrationProgress { - ::default_instance() - } -} - -impl DircryptoMigrationProgress { - pub fn new() -> DircryptoMigrationProgress { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for DircryptoMigrationProgress { - const NAME: &'static str = "DircryptoMigrationProgress"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.status = is.read_enum_or_unknown()?; - }, - 16 => { - self.current_bytes = is.read_uint64()?; - }, - 24 => { - self.total_bytes = is.read_uint64()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.status != ::protobuf::EnumOrUnknown::new(DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_SUCCESS) { - my_size += ::protobuf::rt::int32_size(1, self.status.value()); - } - if self.current_bytes != 0 { - my_size += ::protobuf::rt::uint64_size(2, self.current_bytes); - } - if self.total_bytes != 0 { - my_size += ::protobuf::rt::uint64_size(3, self.total_bytes); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.status != ::protobuf::EnumOrUnknown::new(DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_SUCCESS) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.status))?; - } - if self.current_bytes != 0 { - os.write_uint64(2, self.current_bytes)?; - } - if self.total_bytes != 0 { - os.write_uint64(3, self.total_bytes)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> DircryptoMigrationProgress { - DircryptoMigrationProgress::new() - } - - fn clear(&mut self) { - self.status = ::protobuf::EnumOrUnknown::new(DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_SUCCESS); - self.current_bytes = 0; - self.total_bytes = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static DircryptoMigrationProgress { - static instance: DircryptoMigrationProgress = DircryptoMigrationProgress { - status: ::protobuf::EnumOrUnknown::from_i32(0), - current_bytes: 0, - total_bytes: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.NeedsDircryptoMigrationRequest) -pub struct NeedsDircryptoMigrationRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.NeedsDircryptoMigrationRequest.account_id) - pub account_id: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.NeedsDircryptoMigrationRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a NeedsDircryptoMigrationRequest { - fn default() -> &'a NeedsDircryptoMigrationRequest { - ::default_instance() - } -} - -impl NeedsDircryptoMigrationRequest { - pub fn new() -> NeedsDircryptoMigrationRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for NeedsDircryptoMigrationRequest { - const NAME: &'static str = "NeedsDircryptoMigrationRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.account_id)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.account_id.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.account_id.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> NeedsDircryptoMigrationRequest { - NeedsDircryptoMigrationRequest::new() - } - - fn clear(&mut self) { - self.account_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static NeedsDircryptoMigrationRequest { - static instance: NeedsDircryptoMigrationRequest = NeedsDircryptoMigrationRequest { - account_id: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.NeedsDircryptoMigrationReply) -pub struct NeedsDircryptoMigrationReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.NeedsDircryptoMigrationReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.NeedsDircryptoMigrationReply.needs_dircrypto_migration) - pub needs_dircrypto_migration: bool, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.NeedsDircryptoMigrationReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a NeedsDircryptoMigrationReply { - fn default() -> &'a NeedsDircryptoMigrationReply { - ::default_instance() - } -} - -impl NeedsDircryptoMigrationReply { - pub fn new() -> NeedsDircryptoMigrationReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for NeedsDircryptoMigrationReply { - const NAME: &'static str = "NeedsDircryptoMigrationReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 16 => { - self.needs_dircrypto_migration = is.read_bool()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if self.needs_dircrypto_migration != false { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if self.needs_dircrypto_migration != false { - os.write_bool(2, self.needs_dircrypto_migration)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> NeedsDircryptoMigrationReply { - NeedsDircryptoMigrationReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.needs_dircrypto_migration = false; - self.special_fields.clear(); - } - - fn default_instance() -> &'static NeedsDircryptoMigrationReply { - static instance: NeedsDircryptoMigrationReply = NeedsDircryptoMigrationReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - needs_dircrypto_migration: false, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetSupportedKeyPoliciesRequest) -pub struct GetSupportedKeyPoliciesRequest { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetSupportedKeyPoliciesRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetSupportedKeyPoliciesRequest { - fn default() -> &'a GetSupportedKeyPoliciesRequest { - ::default_instance() - } -} - -impl GetSupportedKeyPoliciesRequest { - pub fn new() -> GetSupportedKeyPoliciesRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetSupportedKeyPoliciesRequest { - const NAME: &'static str = "GetSupportedKeyPoliciesRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetSupportedKeyPoliciesRequest { - GetSupportedKeyPoliciesRequest::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetSupportedKeyPoliciesRequest { - static instance: GetSupportedKeyPoliciesRequest = GetSupportedKeyPoliciesRequest { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetSupportedKeyPoliciesReply) -pub struct GetSupportedKeyPoliciesReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetSupportedKeyPoliciesReply.low_entropy_credentials_supported) - pub low_entropy_credentials_supported: bool, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetSupportedKeyPoliciesReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetSupportedKeyPoliciesReply { - fn default() -> &'a GetSupportedKeyPoliciesReply { - ::default_instance() - } -} - -impl GetSupportedKeyPoliciesReply { - pub fn new() -> GetSupportedKeyPoliciesReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetSupportedKeyPoliciesReply { - const NAME: &'static str = "GetSupportedKeyPoliciesReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.low_entropy_credentials_supported = is.read_bool()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.low_entropy_credentials_supported != false { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.low_entropy_credentials_supported != false { - os.write_bool(1, self.low_entropy_credentials_supported)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetSupportedKeyPoliciesReply { - GetSupportedKeyPoliciesReply::new() - } - - fn clear(&mut self) { - self.low_entropy_credentials_supported = false; - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetSupportedKeyPoliciesReply { - static instance: GetSupportedKeyPoliciesReply = GetSupportedKeyPoliciesReply { - low_entropy_credentials_supported: false, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetAccountDiskUsageRequest) -pub struct GetAccountDiskUsageRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetAccountDiskUsageRequest.identifier) - pub identifier: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetAccountDiskUsageRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetAccountDiskUsageRequest { - fn default() -> &'a GetAccountDiskUsageRequest { - ::default_instance() - } -} - -impl GetAccountDiskUsageRequest { - pub fn new() -> GetAccountDiskUsageRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetAccountDiskUsageRequest { - const NAME: &'static str = "GetAccountDiskUsageRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.identifier)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.identifier.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.identifier.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetAccountDiskUsageRequest { - GetAccountDiskUsageRequest::new() - } - - fn clear(&mut self) { - self.identifier.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetAccountDiskUsageRequest { - static instance: GetAccountDiskUsageRequest = GetAccountDiskUsageRequest { - identifier: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetAccountDiskUsageReply) -pub struct GetAccountDiskUsageReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetAccountDiskUsageReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.GetAccountDiskUsageReply.size) - pub size: i64, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetAccountDiskUsageReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetAccountDiskUsageReply { - fn default() -> &'a GetAccountDiskUsageReply { - ::default_instance() - } -} - -impl GetAccountDiskUsageReply { - pub fn new() -> GetAccountDiskUsageReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetAccountDiskUsageReply { - const NAME: &'static str = "GetAccountDiskUsageReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 16 => { - self.size = is.read_int64()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if self.size != 0 { - my_size += ::protobuf::rt::int64_size(2, self.size); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if self.size != 0 { - os.write_int64(2, self.size)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetAccountDiskUsageReply { - GetAccountDiskUsageReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.size = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetAccountDiskUsageReply { - static instance: GetAccountDiskUsageReply = GetAccountDiskUsageReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - size: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.LowDiskSpace) -pub struct LowDiskSpace { - // message fields - // @@protoc_insertion_point(field:user_data_auth.LowDiskSpace.disk_free_bytes) - pub disk_free_bytes: u64, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.LowDiskSpace.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a LowDiskSpace { - fn default() -> &'a LowDiskSpace { - ::default_instance() - } -} - -impl LowDiskSpace { - pub fn new() -> LowDiskSpace { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for LowDiskSpace { - const NAME: &'static str = "LowDiskSpace"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.disk_free_bytes = is.read_uint64()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.disk_free_bytes != 0 { - my_size += ::protobuf::rt::uint64_size(1, self.disk_free_bytes); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.disk_free_bytes != 0 { - os.write_uint64(1, self.disk_free_bytes)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> LowDiskSpace { - LowDiskSpace::new() - } - - fn clear(&mut self) { - self.disk_free_bytes = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static LowDiskSpace { - static instance: LowDiskSpace = LowDiskSpace { - disk_free_bytes: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.StartAuthSessionRequest) -pub struct StartAuthSessionRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.StartAuthSessionRequest.account_id) - pub account_id: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.StartAuthSessionRequest.flags) - pub flags: u32, - // @@protoc_insertion_point(field:user_data_auth.StartAuthSessionRequest.intent) - pub intent: ::protobuf::EnumOrUnknown, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.StartAuthSessionRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a StartAuthSessionRequest { - fn default() -> &'a StartAuthSessionRequest { - ::default_instance() - } -} - -impl StartAuthSessionRequest { - pub fn new() -> StartAuthSessionRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for StartAuthSessionRequest { - const NAME: &'static str = "StartAuthSessionRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.account_id)?; - }, - 16 => { - self.flags = is.read_uint32()?; - }, - 24 => { - self.intent = is.read_enum_or_unknown()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.account_id.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if self.flags != 0 { - my_size += ::protobuf::rt::uint32_size(2, self.flags); - } - if self.intent != ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthIntent::AUTH_INTENT_UNSPECIFIED) { - my_size += ::protobuf::rt::int32_size(3, self.intent.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.account_id.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if self.flags != 0 { - os.write_uint32(2, self.flags)?; - } - if self.intent != ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthIntent::AUTH_INTENT_UNSPECIFIED) { - os.write_enum(3, ::protobuf::EnumOrUnknown::value(&self.intent))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> StartAuthSessionRequest { - StartAuthSessionRequest::new() - } - - fn clear(&mut self) { - self.account_id.clear(); - self.flags = 0; - self.intent = ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthIntent::AUTH_INTENT_UNSPECIFIED); - self.special_fields.clear(); - } - - fn default_instance() -> &'static StartAuthSessionRequest { - static instance: StartAuthSessionRequest = StartAuthSessionRequest { - account_id: ::protobuf::MessageField::none(), - flags: 0, - intent: ::protobuf::EnumOrUnknown::from_i32(0), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.StatusInfo) -pub struct StatusInfo { - // message fields - // @@protoc_insertion_point(field:user_data_auth.StatusInfo.time_available_in) - pub time_available_in: u64, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.StatusInfo.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a StatusInfo { - fn default() -> &'a StatusInfo { - ::default_instance() - } -} - -impl StatusInfo { - pub fn new() -> StatusInfo { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for StatusInfo { - const NAME: &'static str = "StatusInfo"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.time_available_in = is.read_uint64()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.time_available_in != 0 { - my_size += ::protobuf::rt::uint64_size(1, self.time_available_in); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.time_available_in != 0 { - os.write_uint64(1, self.time_available_in)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> StatusInfo { - StatusInfo::new() - } - - fn clear(&mut self) { - self.time_available_in = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static StatusInfo { - static instance: StatusInfo = StatusInfo { - time_available_in: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.AuthFactorWithStatus) -pub struct AuthFactorWithStatus { - // message fields - // @@protoc_insertion_point(field:user_data_auth.AuthFactorWithStatus.auth_factor) - pub auth_factor: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.AuthFactorWithStatus.available_for_intents) - pub available_for_intents: ::std::vec::Vec<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:user_data_auth.AuthFactorWithStatus.status_info) - pub status_info: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.AuthFactorWithStatus.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a AuthFactorWithStatus { - fn default() -> &'a AuthFactorWithStatus { - ::default_instance() - } -} - -impl AuthFactorWithStatus { - pub fn new() -> AuthFactorWithStatus { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for AuthFactorWithStatus { - const NAME: &'static str = "AuthFactorWithStatus"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.auth_factor)?; - }, - 16 => { - self.available_for_intents.push(is.read_enum_or_unknown()?); - }, - 18 => { - ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.available_for_intents)? - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.status_info)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.auth_factor.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - for value in &self.available_for_intents { - my_size += ::protobuf::rt::int32_size(2, value.value()); - }; - if let Some(v) = self.status_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.auth_factor.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - for v in &self.available_for_intents { - os.write_enum(2, ::protobuf::EnumOrUnknown::value(v))?; - }; - if let Some(v) = self.status_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> AuthFactorWithStatus { - AuthFactorWithStatus::new() - } - - fn clear(&mut self) { - self.auth_factor.clear(); - self.available_for_intents.clear(); - self.status_info.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static AuthFactorWithStatus { - static instance: AuthFactorWithStatus = AuthFactorWithStatus { - auth_factor: ::protobuf::MessageField::none(), - available_for_intents: ::std::vec::Vec::new(), - status_info: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.AuthFactorStatusUpdate) -pub struct AuthFactorStatusUpdate { - // message fields - // @@protoc_insertion_point(field:user_data_auth.AuthFactorStatusUpdate.broadcast_id) - pub broadcast_id: ::std::vec::Vec, - // @@protoc_insertion_point(field:user_data_auth.AuthFactorStatusUpdate.auth_factor_with_status) - pub auth_factor_with_status: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.AuthFactorStatusUpdate.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a AuthFactorStatusUpdate { - fn default() -> &'a AuthFactorStatusUpdate { - ::default_instance() - } -} - -impl AuthFactorStatusUpdate { - pub fn new() -> AuthFactorStatusUpdate { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for AuthFactorStatusUpdate { - const NAME: &'static str = "AuthFactorStatusUpdate"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.broadcast_id = is.read_bytes()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.auth_factor_with_status)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.broadcast_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.broadcast_id); - } - if let Some(v) = self.auth_factor_with_status.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.broadcast_id.is_empty() { - os.write_bytes(1, &self.broadcast_id)?; - } - if let Some(v) = self.auth_factor_with_status.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> AuthFactorStatusUpdate { - AuthFactorStatusUpdate::new() - } - - fn clear(&mut self) { - self.broadcast_id.clear(); - self.auth_factor_with_status.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static AuthFactorStatusUpdate { - static instance: AuthFactorStatusUpdate = AuthFactorStatusUpdate { - broadcast_id: ::std::vec::Vec::new(), - auth_factor_with_status: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.StartAuthSessionReply) -pub struct StartAuthSessionReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.StartAuthSessionReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.StartAuthSessionReply.error_info) - pub error_info: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.StartAuthSessionReply.auth_session_id) - pub auth_session_id: ::std::vec::Vec, - // @@protoc_insertion_point(field:user_data_auth.StartAuthSessionReply.broadcast_id) - pub broadcast_id: ::std::vec::Vec, - // @@protoc_insertion_point(field:user_data_auth.StartAuthSessionReply.user_exists) - pub user_exists: bool, - // @@protoc_insertion_point(field:user_data_auth.StartAuthSessionReply.auth_factors) - pub auth_factors: ::std::vec::Vec, - // @@protoc_insertion_point(field:user_data_auth.StartAuthSessionReply.configured_auth_factors_with_status) - pub configured_auth_factors_with_status: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.StartAuthSessionReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a StartAuthSessionReply { - fn default() -> &'a StartAuthSessionReply { - ::default_instance() - } -} - -impl StartAuthSessionReply { - pub fn new() -> StartAuthSessionReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for StartAuthSessionReply { - const NAME: &'static str = "StartAuthSessionReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 50 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - 18 => { - self.auth_session_id = is.read_bytes()?; - }, - 66 => { - self.broadcast_id = is.read_bytes()?; - }, - 24 => { - self.user_exists = is.read_bool()?; - }, - 42 => { - self.auth_factors.push(is.read_message()?); - }, - 74 => { - self.configured_auth_factors_with_status.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if !self.auth_session_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.auth_session_id); - } - if !self.broadcast_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(8, &self.broadcast_id); - } - if self.user_exists != false { - my_size += 1 + 1; - } - for value in &self.auth_factors { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.configured_auth_factors_with_status { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; - } - if !self.auth_session_id.is_empty() { - os.write_bytes(2, &self.auth_session_id)?; - } - if !self.broadcast_id.is_empty() { - os.write_bytes(8, &self.broadcast_id)?; - } - if self.user_exists != false { - os.write_bool(3, self.user_exists)?; - } - for v in &self.auth_factors { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - }; - for v in &self.configured_auth_factors_with_status { - ::protobuf::rt::write_message_field_with_cached_size(9, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> StartAuthSessionReply { - StartAuthSessionReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.auth_session_id.clear(); - self.broadcast_id.clear(); - self.user_exists = false; - self.auth_factors.clear(); - self.configured_auth_factors_with_status.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static StartAuthSessionReply { - static instance: StartAuthSessionReply = StartAuthSessionReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - auth_session_id: ::std::vec::Vec::new(), - broadcast_id: ::std::vec::Vec::new(), - user_exists: false, - auth_factors: ::std::vec::Vec::new(), - configured_auth_factors_with_status: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.InvalidateAuthSessionRequest) -pub struct InvalidateAuthSessionRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.InvalidateAuthSessionRequest.auth_session_id) - pub auth_session_id: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.InvalidateAuthSessionRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a InvalidateAuthSessionRequest { - fn default() -> &'a InvalidateAuthSessionRequest { - ::default_instance() - } -} - -impl InvalidateAuthSessionRequest { - pub fn new() -> InvalidateAuthSessionRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for InvalidateAuthSessionRequest { - const NAME: &'static str = "InvalidateAuthSessionRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.auth_session_id = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.auth_session_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.auth_session_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.auth_session_id.is_empty() { - os.write_bytes(1, &self.auth_session_id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> InvalidateAuthSessionRequest { - InvalidateAuthSessionRequest::new() - } - - fn clear(&mut self) { - self.auth_session_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static InvalidateAuthSessionRequest { - static instance: InvalidateAuthSessionRequest = InvalidateAuthSessionRequest { - auth_session_id: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.InvalidateAuthSessionReply) -pub struct InvalidateAuthSessionReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.InvalidateAuthSessionReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.InvalidateAuthSessionReply.error_info) - pub error_info: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.InvalidateAuthSessionReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a InvalidateAuthSessionReply { - fn default() -> &'a InvalidateAuthSessionReply { - ::default_instance() - } -} - -impl InvalidateAuthSessionReply { - pub fn new() -> InvalidateAuthSessionReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for InvalidateAuthSessionReply { - const NAME: &'static str = "InvalidateAuthSessionReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> InvalidateAuthSessionReply { - InvalidateAuthSessionReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static InvalidateAuthSessionReply { - static instance: InvalidateAuthSessionReply = InvalidateAuthSessionReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.ExtendAuthSessionRequest) -pub struct ExtendAuthSessionRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.ExtendAuthSessionRequest.auth_session_id) - pub auth_session_id: ::std::vec::Vec, - // @@protoc_insertion_point(field:user_data_auth.ExtendAuthSessionRequest.extension_duration) - pub extension_duration: u32, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.ExtendAuthSessionRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ExtendAuthSessionRequest { - fn default() -> &'a ExtendAuthSessionRequest { - ::default_instance() - } -} - -impl ExtendAuthSessionRequest { - pub fn new() -> ExtendAuthSessionRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for ExtendAuthSessionRequest { - const NAME: &'static str = "ExtendAuthSessionRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.auth_session_id = is.read_bytes()?; - }, - 16 => { - self.extension_duration = is.read_uint32()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.auth_session_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.auth_session_id); - } - if self.extension_duration != 0 { - my_size += ::protobuf::rt::uint32_size(2, self.extension_duration); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.auth_session_id.is_empty() { - os.write_bytes(1, &self.auth_session_id)?; - } - if self.extension_duration != 0 { - os.write_uint32(2, self.extension_duration)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ExtendAuthSessionRequest { - ExtendAuthSessionRequest::new() - } - - fn clear(&mut self) { - self.auth_session_id.clear(); - self.extension_duration = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static ExtendAuthSessionRequest { - static instance: ExtendAuthSessionRequest = ExtendAuthSessionRequest { - auth_session_id: ::std::vec::Vec::new(), - extension_duration: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.ExtendAuthSessionReply) -pub struct ExtendAuthSessionReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.ExtendAuthSessionReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.ExtendAuthSessionReply.error_info) - pub error_info: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.ExtendAuthSessionReply.seconds_left) - pub seconds_left: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.ExtendAuthSessionReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ExtendAuthSessionReply { - fn default() -> &'a ExtendAuthSessionReply { - ::default_instance() - } -} - -impl ExtendAuthSessionReply { - pub fn new() -> ExtendAuthSessionReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for ExtendAuthSessionReply { - const NAME: &'static str = "ExtendAuthSessionReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - 24 => { - self.seconds_left = ::std::option::Option::Some(is.read_uint32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.seconds_left { - my_size += ::protobuf::rt::uint32_size(3, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - if let Some(v) = self.seconds_left { - os.write_uint32(3, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ExtendAuthSessionReply { - ExtendAuthSessionReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.seconds_left = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static ExtendAuthSessionReply { - static instance: ExtendAuthSessionReply = ExtendAuthSessionReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - seconds_left: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.CreatePersistentUserRequest) -pub struct CreatePersistentUserRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.CreatePersistentUserRequest.auth_session_id) - pub auth_session_id: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.CreatePersistentUserRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CreatePersistentUserRequest { - fn default() -> &'a CreatePersistentUserRequest { - ::default_instance() - } -} - -impl CreatePersistentUserRequest { - pub fn new() -> CreatePersistentUserRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for CreatePersistentUserRequest { - const NAME: &'static str = "CreatePersistentUserRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.auth_session_id = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.auth_session_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.auth_session_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.auth_session_id.is_empty() { - os.write_bytes(1, &self.auth_session_id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CreatePersistentUserRequest { - CreatePersistentUserRequest::new() - } - - fn clear(&mut self) { - self.auth_session_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static CreatePersistentUserRequest { - static instance: CreatePersistentUserRequest = CreatePersistentUserRequest { - auth_session_id: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.CreatePersistentUserReply) -pub struct CreatePersistentUserReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.CreatePersistentUserReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.CreatePersistentUserReply.error_info) - pub error_info: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.CreatePersistentUserReply.sanitized_username) - pub sanitized_username: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.CreatePersistentUserReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CreatePersistentUserReply { - fn default() -> &'a CreatePersistentUserReply { - ::default_instance() - } -} - -impl CreatePersistentUserReply { - pub fn new() -> CreatePersistentUserReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for CreatePersistentUserReply { - const NAME: &'static str = "CreatePersistentUserReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - 18 => { - self.sanitized_username = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if !self.sanitized_username.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.sanitized_username); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - if !self.sanitized_username.is_empty() { - os.write_string(2, &self.sanitized_username)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CreatePersistentUserReply { - CreatePersistentUserReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.sanitized_username.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static CreatePersistentUserReply { - static instance: CreatePersistentUserReply = CreatePersistentUserReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - sanitized_username: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.PrepareGuestVaultRequest) -pub struct PrepareGuestVaultRequest { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.PrepareGuestVaultRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PrepareGuestVaultRequest { - fn default() -> &'a PrepareGuestVaultRequest { - ::default_instance() - } -} - -impl PrepareGuestVaultRequest { - pub fn new() -> PrepareGuestVaultRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for PrepareGuestVaultRequest { - const NAME: &'static str = "PrepareGuestVaultRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PrepareGuestVaultRequest { - PrepareGuestVaultRequest::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static PrepareGuestVaultRequest { - static instance: PrepareGuestVaultRequest = PrepareGuestVaultRequest { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.PrepareGuestVaultReply) -pub struct PrepareGuestVaultReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.PrepareGuestVaultReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.PrepareGuestVaultReply.error_info) - pub error_info: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.PrepareGuestVaultReply.sanitized_username) - pub sanitized_username: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.PrepareGuestVaultReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PrepareGuestVaultReply { - fn default() -> &'a PrepareGuestVaultReply { - ::default_instance() - } -} - -impl PrepareGuestVaultReply { - pub fn new() -> PrepareGuestVaultReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for PrepareGuestVaultReply { - const NAME: &'static str = "PrepareGuestVaultReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - 18 => { - self.sanitized_username = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if !self.sanitized_username.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.sanitized_username); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - if !self.sanitized_username.is_empty() { - os.write_string(2, &self.sanitized_username)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PrepareGuestVaultReply { - PrepareGuestVaultReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.sanitized_username.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static PrepareGuestVaultReply { - static instance: PrepareGuestVaultReply = PrepareGuestVaultReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - sanitized_username: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.PrepareEphemeralVaultRequest) -pub struct PrepareEphemeralVaultRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.PrepareEphemeralVaultRequest.auth_session_id) - pub auth_session_id: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.PrepareEphemeralVaultRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PrepareEphemeralVaultRequest { - fn default() -> &'a PrepareEphemeralVaultRequest { - ::default_instance() - } -} - -impl PrepareEphemeralVaultRequest { - pub fn new() -> PrepareEphemeralVaultRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for PrepareEphemeralVaultRequest { - const NAME: &'static str = "PrepareEphemeralVaultRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.auth_session_id = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.auth_session_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.auth_session_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.auth_session_id.is_empty() { - os.write_bytes(1, &self.auth_session_id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PrepareEphemeralVaultRequest { - PrepareEphemeralVaultRequest::new() - } - - fn clear(&mut self) { - self.auth_session_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static PrepareEphemeralVaultRequest { - static instance: PrepareEphemeralVaultRequest = PrepareEphemeralVaultRequest { - auth_session_id: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.PrepareEphemeralVaultReply) -pub struct PrepareEphemeralVaultReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.PrepareEphemeralVaultReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.PrepareEphemeralVaultReply.error_info) - pub error_info: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.PrepareEphemeralVaultReply.sanitized_username) - pub sanitized_username: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.PrepareEphemeralVaultReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PrepareEphemeralVaultReply { - fn default() -> &'a PrepareEphemeralVaultReply { - ::default_instance() - } -} - -impl PrepareEphemeralVaultReply { - pub fn new() -> PrepareEphemeralVaultReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for PrepareEphemeralVaultReply { - const NAME: &'static str = "PrepareEphemeralVaultReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - 18 => { - self.sanitized_username = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if !self.sanitized_username.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.sanitized_username); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - if !self.sanitized_username.is_empty() { - os.write_string(2, &self.sanitized_username)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PrepareEphemeralVaultReply { - PrepareEphemeralVaultReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.sanitized_username.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static PrepareEphemeralVaultReply { - static instance: PrepareEphemeralVaultReply = PrepareEphemeralVaultReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - sanitized_username: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetAuthSessionStatusRequest) -pub struct GetAuthSessionStatusRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetAuthSessionStatusRequest.auth_session_id) - pub auth_session_id: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetAuthSessionStatusRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetAuthSessionStatusRequest { - fn default() -> &'a GetAuthSessionStatusRequest { - ::default_instance() - } -} - -impl GetAuthSessionStatusRequest { - pub fn new() -> GetAuthSessionStatusRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetAuthSessionStatusRequest { - const NAME: &'static str = "GetAuthSessionStatusRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.auth_session_id = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.auth_session_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.auth_session_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.auth_session_id.is_empty() { - os.write_bytes(1, &self.auth_session_id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetAuthSessionStatusRequest { - GetAuthSessionStatusRequest::new() - } - - fn clear(&mut self) { - self.auth_session_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetAuthSessionStatusRequest { - static instance: GetAuthSessionStatusRequest = GetAuthSessionStatusRequest { - auth_session_id: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetAuthSessionStatusReply) -pub struct GetAuthSessionStatusReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetAuthSessionStatusReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.GetAuthSessionStatusReply.status) - pub status: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.GetAuthSessionStatusReply.time_left) - pub time_left: u32, - // @@protoc_insertion_point(field:user_data_auth.GetAuthSessionStatusReply.authorized_for) - pub authorized_for: ::std::vec::Vec<::protobuf::EnumOrUnknown>, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetAuthSessionStatusReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetAuthSessionStatusReply { - fn default() -> &'a GetAuthSessionStatusReply { - ::default_instance() - } -} - -impl GetAuthSessionStatusReply { - pub fn new() -> GetAuthSessionStatusReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetAuthSessionStatusReply { - const NAME: &'static str = "GetAuthSessionStatusReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 16 => { - self.status = is.read_enum_or_unknown()?; - }, - 24 => { - self.time_left = is.read_uint32()?; - }, - 32 => { - self.authorized_for.push(is.read_enum_or_unknown()?); - }, - 34 => { - ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.authorized_for)? - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if self.status != ::protobuf::EnumOrUnknown::new(AuthSessionStatus::AUTH_SESSION_STATUS_NOT_SET) { - my_size += ::protobuf::rt::int32_size(2, self.status.value()); - } - if self.time_left != 0 { - my_size += ::protobuf::rt::uint32_size(3, self.time_left); - } - for value in &self.authorized_for { - my_size += ::protobuf::rt::int32_size(4, value.value()); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if self.status != ::protobuf::EnumOrUnknown::new(AuthSessionStatus::AUTH_SESSION_STATUS_NOT_SET) { - os.write_enum(2, ::protobuf::EnumOrUnknown::value(&self.status))?; - } - if self.time_left != 0 { - os.write_uint32(3, self.time_left)?; - } - for v in &self.authorized_for { - os.write_enum(4, ::protobuf::EnumOrUnknown::value(v))?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetAuthSessionStatusReply { - GetAuthSessionStatusReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.status = ::protobuf::EnumOrUnknown::new(AuthSessionStatus::AUTH_SESSION_STATUS_NOT_SET); - self.time_left = 0; - self.authorized_for.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetAuthSessionStatusReply { - static instance: GetAuthSessionStatusReply = GetAuthSessionStatusReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - status: ::protobuf::EnumOrUnknown::from_i32(0), - time_left: 0, - authorized_for: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.PreparePersistentVaultRequest) -pub struct PreparePersistentVaultRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.PreparePersistentVaultRequest.auth_session_id) - pub auth_session_id: ::std::vec::Vec, - // @@protoc_insertion_point(field:user_data_auth.PreparePersistentVaultRequest.block_ecryptfs) - pub block_ecryptfs: bool, - // @@protoc_insertion_point(field:user_data_auth.PreparePersistentVaultRequest.encryption_type) - pub encryption_type: ::protobuf::EnumOrUnknown, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.PreparePersistentVaultRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PreparePersistentVaultRequest { - fn default() -> &'a PreparePersistentVaultRequest { - ::default_instance() - } -} - -impl PreparePersistentVaultRequest { - pub fn new() -> PreparePersistentVaultRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for PreparePersistentVaultRequest { - const NAME: &'static str = "PreparePersistentVaultRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.auth_session_id = is.read_bytes()?; - }, - 16 => { - self.block_ecryptfs = is.read_bool()?; - }, - 24 => { - self.encryption_type = is.read_enum_or_unknown()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.auth_session_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.auth_session_id); - } - if self.block_ecryptfs != false { - my_size += 1 + 1; - } - if self.encryption_type != ::protobuf::EnumOrUnknown::new(VaultEncryptionType::CRYPTOHOME_VAULT_ENCRYPTION_ANY) { - my_size += ::protobuf::rt::int32_size(3, self.encryption_type.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.auth_session_id.is_empty() { - os.write_bytes(1, &self.auth_session_id)?; - } - if self.block_ecryptfs != false { - os.write_bool(2, self.block_ecryptfs)?; - } - if self.encryption_type != ::protobuf::EnumOrUnknown::new(VaultEncryptionType::CRYPTOHOME_VAULT_ENCRYPTION_ANY) { - os.write_enum(3, ::protobuf::EnumOrUnknown::value(&self.encryption_type))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PreparePersistentVaultRequest { - PreparePersistentVaultRequest::new() - } - - fn clear(&mut self) { - self.auth_session_id.clear(); - self.block_ecryptfs = false; - self.encryption_type = ::protobuf::EnumOrUnknown::new(VaultEncryptionType::CRYPTOHOME_VAULT_ENCRYPTION_ANY); - self.special_fields.clear(); - } - - fn default_instance() -> &'static PreparePersistentVaultRequest { - static instance: PreparePersistentVaultRequest = PreparePersistentVaultRequest { - auth_session_id: ::std::vec::Vec::new(), - block_ecryptfs: false, - encryption_type: ::protobuf::EnumOrUnknown::from_i32(0), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.PreparePersistentVaultReply) -pub struct PreparePersistentVaultReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.PreparePersistentVaultReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.PreparePersistentVaultReply.error_info) - pub error_info: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.PreparePersistentVaultReply.sanitized_username) - pub sanitized_username: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.PreparePersistentVaultReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PreparePersistentVaultReply { - fn default() -> &'a PreparePersistentVaultReply { - ::default_instance() - } -} - -impl PreparePersistentVaultReply { - pub fn new() -> PreparePersistentVaultReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for PreparePersistentVaultReply { - const NAME: &'static str = "PreparePersistentVaultReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - 18 => { - self.sanitized_username = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if !self.sanitized_username.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.sanitized_username); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - if !self.sanitized_username.is_empty() { - os.write_string(2, &self.sanitized_username)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PreparePersistentVaultReply { - PreparePersistentVaultReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.sanitized_username.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static PreparePersistentVaultReply { - static instance: PreparePersistentVaultReply = PreparePersistentVaultReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - sanitized_username: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.PrepareVaultForMigrationRequest) -pub struct PrepareVaultForMigrationRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.PrepareVaultForMigrationRequest.auth_session_id) - pub auth_session_id: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.PrepareVaultForMigrationRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PrepareVaultForMigrationRequest { - fn default() -> &'a PrepareVaultForMigrationRequest { - ::default_instance() - } -} - -impl PrepareVaultForMigrationRequest { - pub fn new() -> PrepareVaultForMigrationRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for PrepareVaultForMigrationRequest { - const NAME: &'static str = "PrepareVaultForMigrationRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.auth_session_id = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.auth_session_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.auth_session_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.auth_session_id.is_empty() { - os.write_bytes(1, &self.auth_session_id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PrepareVaultForMigrationRequest { - PrepareVaultForMigrationRequest::new() - } - - fn clear(&mut self) { - self.auth_session_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static PrepareVaultForMigrationRequest { - static instance: PrepareVaultForMigrationRequest = PrepareVaultForMigrationRequest { - auth_session_id: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.PrepareVaultForMigrationReply) -pub struct PrepareVaultForMigrationReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.PrepareVaultForMigrationReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.PrepareVaultForMigrationReply.error_info) - pub error_info: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.PrepareVaultForMigrationReply.sanitized_username) - pub sanitized_username: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.PrepareVaultForMigrationReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PrepareVaultForMigrationReply { - fn default() -> &'a PrepareVaultForMigrationReply { - ::default_instance() - } -} - -impl PrepareVaultForMigrationReply { - pub fn new() -> PrepareVaultForMigrationReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for PrepareVaultForMigrationReply { - const NAME: &'static str = "PrepareVaultForMigrationReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - 18 => { - self.sanitized_username = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if !self.sanitized_username.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.sanitized_username); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - if !self.sanitized_username.is_empty() { - os.write_string(2, &self.sanitized_username)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PrepareVaultForMigrationReply { - PrepareVaultForMigrationReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.sanitized_username.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static PrepareVaultForMigrationReply { - static instance: PrepareVaultForMigrationReply = PrepareVaultForMigrationReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - sanitized_username: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetArcDiskFeaturesRequest) -pub struct GetArcDiskFeaturesRequest { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetArcDiskFeaturesRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetArcDiskFeaturesRequest { - fn default() -> &'a GetArcDiskFeaturesRequest { - ::default_instance() - } -} - -impl GetArcDiskFeaturesRequest { - pub fn new() -> GetArcDiskFeaturesRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetArcDiskFeaturesRequest { - const NAME: &'static str = "GetArcDiskFeaturesRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetArcDiskFeaturesRequest { - GetArcDiskFeaturesRequest::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetArcDiskFeaturesRequest { - static instance: GetArcDiskFeaturesRequest = GetArcDiskFeaturesRequest { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetArcDiskFeaturesReply) -pub struct GetArcDiskFeaturesReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetArcDiskFeaturesReply.quota_supported) - pub quota_supported: bool, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetArcDiskFeaturesReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetArcDiskFeaturesReply { - fn default() -> &'a GetArcDiskFeaturesReply { - ::default_instance() - } -} - -impl GetArcDiskFeaturesReply { - pub fn new() -> GetArcDiskFeaturesReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetArcDiskFeaturesReply { - const NAME: &'static str = "GetArcDiskFeaturesReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.quota_supported = is.read_bool()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.quota_supported != false { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.quota_supported != false { - os.write_bool(1, self.quota_supported)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetArcDiskFeaturesReply { - GetArcDiskFeaturesReply::new() - } - - fn clear(&mut self) { - self.quota_supported = false; - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetArcDiskFeaturesReply { - static instance: GetArcDiskFeaturesReply = GetArcDiskFeaturesReply { - quota_supported: false, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetCurrentSpaceForArcUidRequest) -pub struct GetCurrentSpaceForArcUidRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetCurrentSpaceForArcUidRequest.uid) - pub uid: u32, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetCurrentSpaceForArcUidRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetCurrentSpaceForArcUidRequest { - fn default() -> &'a GetCurrentSpaceForArcUidRequest { - ::default_instance() - } -} - -impl GetCurrentSpaceForArcUidRequest { - pub fn new() -> GetCurrentSpaceForArcUidRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetCurrentSpaceForArcUidRequest { - const NAME: &'static str = "GetCurrentSpaceForArcUidRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.uid = is.read_uint32()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.uid != 0 { - my_size += ::protobuf::rt::uint32_size(1, self.uid); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.uid != 0 { - os.write_uint32(1, self.uid)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetCurrentSpaceForArcUidRequest { - GetCurrentSpaceForArcUidRequest::new() - } - - fn clear(&mut self) { - self.uid = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetCurrentSpaceForArcUidRequest { - static instance: GetCurrentSpaceForArcUidRequest = GetCurrentSpaceForArcUidRequest { - uid: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetCurrentSpaceForArcUidReply) -pub struct GetCurrentSpaceForArcUidReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetCurrentSpaceForArcUidReply.cur_space) - pub cur_space: i64, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetCurrentSpaceForArcUidReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetCurrentSpaceForArcUidReply { - fn default() -> &'a GetCurrentSpaceForArcUidReply { - ::default_instance() - } -} - -impl GetCurrentSpaceForArcUidReply { - pub fn new() -> GetCurrentSpaceForArcUidReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetCurrentSpaceForArcUidReply { - const NAME: &'static str = "GetCurrentSpaceForArcUidReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.cur_space = is.read_int64()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.cur_space != 0 { - my_size += ::protobuf::rt::int64_size(1, self.cur_space); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.cur_space != 0 { - os.write_int64(1, self.cur_space)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetCurrentSpaceForArcUidReply { - GetCurrentSpaceForArcUidReply::new() - } - - fn clear(&mut self) { - self.cur_space = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetCurrentSpaceForArcUidReply { - static instance: GetCurrentSpaceForArcUidReply = GetCurrentSpaceForArcUidReply { - cur_space: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetCurrentSpaceForArcGidRequest) -pub struct GetCurrentSpaceForArcGidRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetCurrentSpaceForArcGidRequest.gid) - pub gid: u32, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetCurrentSpaceForArcGidRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetCurrentSpaceForArcGidRequest { - fn default() -> &'a GetCurrentSpaceForArcGidRequest { - ::default_instance() - } -} - -impl GetCurrentSpaceForArcGidRequest { - pub fn new() -> GetCurrentSpaceForArcGidRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetCurrentSpaceForArcGidRequest { - const NAME: &'static str = "GetCurrentSpaceForArcGidRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.gid = is.read_uint32()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.gid != 0 { - my_size += ::protobuf::rt::uint32_size(1, self.gid); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.gid != 0 { - os.write_uint32(1, self.gid)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetCurrentSpaceForArcGidRequest { - GetCurrentSpaceForArcGidRequest::new() - } - - fn clear(&mut self) { - self.gid = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetCurrentSpaceForArcGidRequest { - static instance: GetCurrentSpaceForArcGidRequest = GetCurrentSpaceForArcGidRequest { - gid: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetCurrentSpaceForArcGidReply) -pub struct GetCurrentSpaceForArcGidReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetCurrentSpaceForArcGidReply.cur_space) - pub cur_space: i64, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetCurrentSpaceForArcGidReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetCurrentSpaceForArcGidReply { - fn default() -> &'a GetCurrentSpaceForArcGidReply { - ::default_instance() - } -} - -impl GetCurrentSpaceForArcGidReply { - pub fn new() -> GetCurrentSpaceForArcGidReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetCurrentSpaceForArcGidReply { - const NAME: &'static str = "GetCurrentSpaceForArcGidReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.cur_space = is.read_int64()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.cur_space != 0 { - my_size += ::protobuf::rt::int64_size(1, self.cur_space); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.cur_space != 0 { - os.write_int64(1, self.cur_space)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetCurrentSpaceForArcGidReply { - GetCurrentSpaceForArcGidReply::new() - } - - fn clear(&mut self) { - self.cur_space = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetCurrentSpaceForArcGidReply { - static instance: GetCurrentSpaceForArcGidReply = GetCurrentSpaceForArcGidReply { - cur_space: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetCurrentSpaceForArcProjectIdRequest) -pub struct GetCurrentSpaceForArcProjectIdRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetCurrentSpaceForArcProjectIdRequest.project_id) - pub project_id: u32, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetCurrentSpaceForArcProjectIdRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetCurrentSpaceForArcProjectIdRequest { - fn default() -> &'a GetCurrentSpaceForArcProjectIdRequest { - ::default_instance() - } -} - -impl GetCurrentSpaceForArcProjectIdRequest { - pub fn new() -> GetCurrentSpaceForArcProjectIdRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetCurrentSpaceForArcProjectIdRequest { - const NAME: &'static str = "GetCurrentSpaceForArcProjectIdRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.project_id = is.read_uint32()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.project_id != 0 { - my_size += ::protobuf::rt::uint32_size(1, self.project_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.project_id != 0 { - os.write_uint32(1, self.project_id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetCurrentSpaceForArcProjectIdRequest { - GetCurrentSpaceForArcProjectIdRequest::new() - } - - fn clear(&mut self) { - self.project_id = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetCurrentSpaceForArcProjectIdRequest { - static instance: GetCurrentSpaceForArcProjectIdRequest = GetCurrentSpaceForArcProjectIdRequest { - project_id: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetCurrentSpaceForArcProjectIdReply) -pub struct GetCurrentSpaceForArcProjectIdReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetCurrentSpaceForArcProjectIdReply.cur_space) - pub cur_space: i64, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetCurrentSpaceForArcProjectIdReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetCurrentSpaceForArcProjectIdReply { - fn default() -> &'a GetCurrentSpaceForArcProjectIdReply { - ::default_instance() - } -} - -impl GetCurrentSpaceForArcProjectIdReply { - pub fn new() -> GetCurrentSpaceForArcProjectIdReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetCurrentSpaceForArcProjectIdReply { - const NAME: &'static str = "GetCurrentSpaceForArcProjectIdReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.cur_space = is.read_int64()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.cur_space != 0 { - my_size += ::protobuf::rt::int64_size(1, self.cur_space); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.cur_space != 0 { - os.write_int64(1, self.cur_space)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetCurrentSpaceForArcProjectIdReply { - GetCurrentSpaceForArcProjectIdReply::new() - } - - fn clear(&mut self) { - self.cur_space = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetCurrentSpaceForArcProjectIdReply { - static instance: GetCurrentSpaceForArcProjectIdReply = GetCurrentSpaceForArcProjectIdReply { - cur_space: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.SetMediaRWDataFileProjectIdRequest) -pub struct SetMediaRWDataFileProjectIdRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.SetMediaRWDataFileProjectIdRequest.project_id) - pub project_id: u32, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.SetMediaRWDataFileProjectIdRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a SetMediaRWDataFileProjectIdRequest { - fn default() -> &'a SetMediaRWDataFileProjectIdRequest { - ::default_instance() - } -} - -impl SetMediaRWDataFileProjectIdRequest { - pub fn new() -> SetMediaRWDataFileProjectIdRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for SetMediaRWDataFileProjectIdRequest { - const NAME: &'static str = "SetMediaRWDataFileProjectIdRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.project_id = is.read_uint32()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.project_id != 0 { - my_size += ::protobuf::rt::uint32_size(1, self.project_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.project_id != 0 { - os.write_uint32(1, self.project_id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SetMediaRWDataFileProjectIdRequest { - SetMediaRWDataFileProjectIdRequest::new() - } - - fn clear(&mut self) { - self.project_id = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static SetMediaRWDataFileProjectIdRequest { - static instance: SetMediaRWDataFileProjectIdRequest = SetMediaRWDataFileProjectIdRequest { - project_id: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.SetMediaRWDataFileProjectIdReply) -pub struct SetMediaRWDataFileProjectIdReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.SetMediaRWDataFileProjectIdReply.success) - pub success: bool, - // @@protoc_insertion_point(field:user_data_auth.SetMediaRWDataFileProjectIdReply.error) - pub error: i32, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.SetMediaRWDataFileProjectIdReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a SetMediaRWDataFileProjectIdReply { - fn default() -> &'a SetMediaRWDataFileProjectIdReply { - ::default_instance() - } -} - -impl SetMediaRWDataFileProjectIdReply { - pub fn new() -> SetMediaRWDataFileProjectIdReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for SetMediaRWDataFileProjectIdReply { - const NAME: &'static str = "SetMediaRWDataFileProjectIdReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.success = is.read_bool()?; - }, - 16 => { - self.error = is.read_int32()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.success != false { - my_size += 1 + 1; - } - if self.error != 0 { - my_size += ::protobuf::rt::int32_size(2, self.error); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.success != false { - os.write_bool(1, self.success)?; - } - if self.error != 0 { - os.write_int32(2, self.error)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SetMediaRWDataFileProjectIdReply { - SetMediaRWDataFileProjectIdReply::new() - } - - fn clear(&mut self) { - self.success = false; - self.error = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static SetMediaRWDataFileProjectIdReply { - static instance: SetMediaRWDataFileProjectIdReply = SetMediaRWDataFileProjectIdReply { - success: false, - error: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.SetMediaRWDataFileProjectInheritanceFlagRequest) -pub struct SetMediaRWDataFileProjectInheritanceFlagRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.SetMediaRWDataFileProjectInheritanceFlagRequest.enable) - pub enable: bool, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.SetMediaRWDataFileProjectInheritanceFlagRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a SetMediaRWDataFileProjectInheritanceFlagRequest { - fn default() -> &'a SetMediaRWDataFileProjectInheritanceFlagRequest { - ::default_instance() - } -} - -impl SetMediaRWDataFileProjectInheritanceFlagRequest { - pub fn new() -> SetMediaRWDataFileProjectInheritanceFlagRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for SetMediaRWDataFileProjectInheritanceFlagRequest { - const NAME: &'static str = "SetMediaRWDataFileProjectInheritanceFlagRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.enable = is.read_bool()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.enable != false { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.enable != false { - os.write_bool(1, self.enable)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SetMediaRWDataFileProjectInheritanceFlagRequest { - SetMediaRWDataFileProjectInheritanceFlagRequest::new() - } - - fn clear(&mut self) { - self.enable = false; - self.special_fields.clear(); - } - - fn default_instance() -> &'static SetMediaRWDataFileProjectInheritanceFlagRequest { - static instance: SetMediaRWDataFileProjectInheritanceFlagRequest = SetMediaRWDataFileProjectInheritanceFlagRequest { - enable: false, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.SetMediaRWDataFileProjectInheritanceFlagReply) -pub struct SetMediaRWDataFileProjectInheritanceFlagReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.SetMediaRWDataFileProjectInheritanceFlagReply.success) - pub success: bool, - // @@protoc_insertion_point(field:user_data_auth.SetMediaRWDataFileProjectInheritanceFlagReply.error) - pub error: i32, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.SetMediaRWDataFileProjectInheritanceFlagReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a SetMediaRWDataFileProjectInheritanceFlagReply { - fn default() -> &'a SetMediaRWDataFileProjectInheritanceFlagReply { - ::default_instance() - } -} - -impl SetMediaRWDataFileProjectInheritanceFlagReply { - pub fn new() -> SetMediaRWDataFileProjectInheritanceFlagReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for SetMediaRWDataFileProjectInheritanceFlagReply { - const NAME: &'static str = "SetMediaRWDataFileProjectInheritanceFlagReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.success = is.read_bool()?; - }, - 16 => { - self.error = is.read_int32()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.success != false { - my_size += 1 + 1; - } - if self.error != 0 { - my_size += ::protobuf::rt::int32_size(2, self.error); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.success != false { - os.write_bool(1, self.success)?; - } - if self.error != 0 { - os.write_int32(2, self.error)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SetMediaRWDataFileProjectInheritanceFlagReply { - SetMediaRWDataFileProjectInheritanceFlagReply::new() - } - - fn clear(&mut self) { - self.success = false; - self.error = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static SetMediaRWDataFileProjectInheritanceFlagReply { - static instance: SetMediaRWDataFileProjectInheritanceFlagReply = SetMediaRWDataFileProjectInheritanceFlagReply { - success: false, - error: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.TpmTokenInfo) -pub struct TpmTokenInfo { - // message fields - // @@protoc_insertion_point(field:user_data_auth.TpmTokenInfo.label) - pub label: ::std::string::String, - // @@protoc_insertion_point(field:user_data_auth.TpmTokenInfo.user_pin) - pub user_pin: ::std::string::String, - // @@protoc_insertion_point(field:user_data_auth.TpmTokenInfo.slot) - pub slot: i32, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.TpmTokenInfo.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a TpmTokenInfo { - fn default() -> &'a TpmTokenInfo { - ::default_instance() - } -} - -impl TpmTokenInfo { - pub fn new() -> TpmTokenInfo { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for TpmTokenInfo { - const NAME: &'static str = "TpmTokenInfo"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.label = is.read_string()?; - }, - 18 => { - self.user_pin = is.read_string()?; - }, - 24 => { - self.slot = is.read_int32()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.label.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.label); - } - if !self.user_pin.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.user_pin); - } - if self.slot != 0 { - my_size += ::protobuf::rt::int32_size(3, self.slot); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.label.is_empty() { - os.write_string(1, &self.label)?; - } - if !self.user_pin.is_empty() { - os.write_string(2, &self.user_pin)?; - } - if self.slot != 0 { - os.write_int32(3, self.slot)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> TpmTokenInfo { - TpmTokenInfo::new() - } - - fn clear(&mut self) { - self.label.clear(); - self.user_pin.clear(); - self.slot = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static TpmTokenInfo { - static instance: TpmTokenInfo = TpmTokenInfo { - label: ::std::string::String::new(), - user_pin: ::std::string::String::new(), - slot: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.Pkcs11IsTpmTokenReadyRequest) -pub struct Pkcs11IsTpmTokenReadyRequest { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.Pkcs11IsTpmTokenReadyRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Pkcs11IsTpmTokenReadyRequest { - fn default() -> &'a Pkcs11IsTpmTokenReadyRequest { - ::default_instance() - } -} - -impl Pkcs11IsTpmTokenReadyRequest { - pub fn new() -> Pkcs11IsTpmTokenReadyRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for Pkcs11IsTpmTokenReadyRequest { - const NAME: &'static str = "Pkcs11IsTpmTokenReadyRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Pkcs11IsTpmTokenReadyRequest { - Pkcs11IsTpmTokenReadyRequest::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static Pkcs11IsTpmTokenReadyRequest { - static instance: Pkcs11IsTpmTokenReadyRequest = Pkcs11IsTpmTokenReadyRequest { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.Pkcs11IsTpmTokenReadyReply) -pub struct Pkcs11IsTpmTokenReadyReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.Pkcs11IsTpmTokenReadyReply.ready) - pub ready: bool, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.Pkcs11IsTpmTokenReadyReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Pkcs11IsTpmTokenReadyReply { - fn default() -> &'a Pkcs11IsTpmTokenReadyReply { - ::default_instance() - } -} - -impl Pkcs11IsTpmTokenReadyReply { - pub fn new() -> Pkcs11IsTpmTokenReadyReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for Pkcs11IsTpmTokenReadyReply { - const NAME: &'static str = "Pkcs11IsTpmTokenReadyReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.ready = is.read_bool()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.ready != false { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.ready != false { - os.write_bool(1, self.ready)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Pkcs11IsTpmTokenReadyReply { - Pkcs11IsTpmTokenReadyReply::new() - } - - fn clear(&mut self) { - self.ready = false; - self.special_fields.clear(); - } - - fn default_instance() -> &'static Pkcs11IsTpmTokenReadyReply { - static instance: Pkcs11IsTpmTokenReadyReply = Pkcs11IsTpmTokenReadyReply { - ready: false, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.Pkcs11GetTpmTokenInfoRequest) -pub struct Pkcs11GetTpmTokenInfoRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.Pkcs11GetTpmTokenInfoRequest.username) - pub username: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.Pkcs11GetTpmTokenInfoRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Pkcs11GetTpmTokenInfoRequest { - fn default() -> &'a Pkcs11GetTpmTokenInfoRequest { - ::default_instance() - } -} - -impl Pkcs11GetTpmTokenInfoRequest { - pub fn new() -> Pkcs11GetTpmTokenInfoRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for Pkcs11GetTpmTokenInfoRequest { - const NAME: &'static str = "Pkcs11GetTpmTokenInfoRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.username = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.username.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.username); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.username.is_empty() { - os.write_string(1, &self.username)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Pkcs11GetTpmTokenInfoRequest { - Pkcs11GetTpmTokenInfoRequest::new() - } - - fn clear(&mut self) { - self.username.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static Pkcs11GetTpmTokenInfoRequest { - static instance: Pkcs11GetTpmTokenInfoRequest = Pkcs11GetTpmTokenInfoRequest { - username: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.Pkcs11GetTpmTokenInfoReply) -pub struct Pkcs11GetTpmTokenInfoReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.Pkcs11GetTpmTokenInfoReply.token_info) - pub token_info: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.Pkcs11GetTpmTokenInfoReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Pkcs11GetTpmTokenInfoReply { - fn default() -> &'a Pkcs11GetTpmTokenInfoReply { - ::default_instance() - } -} - -impl Pkcs11GetTpmTokenInfoReply { - pub fn new() -> Pkcs11GetTpmTokenInfoReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for Pkcs11GetTpmTokenInfoReply { - const NAME: &'static str = "Pkcs11GetTpmTokenInfoReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.token_info)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.token_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.token_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Pkcs11GetTpmTokenInfoReply { - Pkcs11GetTpmTokenInfoReply::new() - } - - fn clear(&mut self) { - self.token_info.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static Pkcs11GetTpmTokenInfoReply { - static instance: Pkcs11GetTpmTokenInfoReply = Pkcs11GetTpmTokenInfoReply { - token_info: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.Pkcs11TerminateRequest) -pub struct Pkcs11TerminateRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.Pkcs11TerminateRequest.username) - pub username: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.Pkcs11TerminateRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Pkcs11TerminateRequest { - fn default() -> &'a Pkcs11TerminateRequest { - ::default_instance() - } -} - -impl Pkcs11TerminateRequest { - pub fn new() -> Pkcs11TerminateRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for Pkcs11TerminateRequest { - const NAME: &'static str = "Pkcs11TerminateRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.username = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.username.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.username); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.username.is_empty() { - os.write_string(1, &self.username)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Pkcs11TerminateRequest { - Pkcs11TerminateRequest::new() - } - - fn clear(&mut self) { - self.username.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static Pkcs11TerminateRequest { - static instance: Pkcs11TerminateRequest = Pkcs11TerminateRequest { - username: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.Pkcs11TerminateReply) -pub struct Pkcs11TerminateReply { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.Pkcs11TerminateReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Pkcs11TerminateReply { - fn default() -> &'a Pkcs11TerminateReply { - ::default_instance() - } -} - -impl Pkcs11TerminateReply { - pub fn new() -> Pkcs11TerminateReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for Pkcs11TerminateReply { - const NAME: &'static str = "Pkcs11TerminateReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Pkcs11TerminateReply { - Pkcs11TerminateReply::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static Pkcs11TerminateReply { - static instance: Pkcs11TerminateReply = Pkcs11TerminateReply { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.Pkcs11RestoreTpmTokensRequest) -pub struct Pkcs11RestoreTpmTokensRequest { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.Pkcs11RestoreTpmTokensRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Pkcs11RestoreTpmTokensRequest { - fn default() -> &'a Pkcs11RestoreTpmTokensRequest { - ::default_instance() - } -} - -impl Pkcs11RestoreTpmTokensRequest { - pub fn new() -> Pkcs11RestoreTpmTokensRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for Pkcs11RestoreTpmTokensRequest { - const NAME: &'static str = "Pkcs11RestoreTpmTokensRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Pkcs11RestoreTpmTokensRequest { - Pkcs11RestoreTpmTokensRequest::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static Pkcs11RestoreTpmTokensRequest { - static instance: Pkcs11RestoreTpmTokensRequest = Pkcs11RestoreTpmTokensRequest { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.Pkcs11RestoreTpmTokensReply) -pub struct Pkcs11RestoreTpmTokensReply { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.Pkcs11RestoreTpmTokensReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Pkcs11RestoreTpmTokensReply { - fn default() -> &'a Pkcs11RestoreTpmTokensReply { - ::default_instance() - } -} - -impl Pkcs11RestoreTpmTokensReply { - pub fn new() -> Pkcs11RestoreTpmTokensReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for Pkcs11RestoreTpmTokensReply { - const NAME: &'static str = "Pkcs11RestoreTpmTokensReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Pkcs11RestoreTpmTokensReply { - Pkcs11RestoreTpmTokensReply::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static Pkcs11RestoreTpmTokensReply { - static instance: Pkcs11RestoreTpmTokensReply = Pkcs11RestoreTpmTokensReply { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.InstallAttributesGetRequest) -pub struct InstallAttributesGetRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.InstallAttributesGetRequest.name) - pub name: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.InstallAttributesGetRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a InstallAttributesGetRequest { - fn default() -> &'a InstallAttributesGetRequest { - ::default_instance() - } -} - -impl InstallAttributesGetRequest { - pub fn new() -> InstallAttributesGetRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for InstallAttributesGetRequest { - const NAME: &'static str = "InstallAttributesGetRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.name = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.name.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.name); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.name.is_empty() { - os.write_string(1, &self.name)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> InstallAttributesGetRequest { - InstallAttributesGetRequest::new() - } - - fn clear(&mut self) { - self.name.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static InstallAttributesGetRequest { - static instance: InstallAttributesGetRequest = InstallAttributesGetRequest { - name: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.InstallAttributesGetReply) -pub struct InstallAttributesGetReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.InstallAttributesGetReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.InstallAttributesGetReply.value) - pub value: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.InstallAttributesGetReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a InstallAttributesGetReply { - fn default() -> &'a InstallAttributesGetReply { - ::default_instance() - } -} - -impl InstallAttributesGetReply { - pub fn new() -> InstallAttributesGetReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for InstallAttributesGetReply { - const NAME: &'static str = "InstallAttributesGetReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - self.value = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if !self.value.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.value); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if !self.value.is_empty() { - os.write_bytes(2, &self.value)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> InstallAttributesGetReply { - InstallAttributesGetReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.value.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static InstallAttributesGetReply { - static instance: InstallAttributesGetReply = InstallAttributesGetReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - value: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.InstallAttributesSetRequest) -pub struct InstallAttributesSetRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.InstallAttributesSetRequest.name) - pub name: ::std::string::String, - // @@protoc_insertion_point(field:user_data_auth.InstallAttributesSetRequest.value) - pub value: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.InstallAttributesSetRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a InstallAttributesSetRequest { - fn default() -> &'a InstallAttributesSetRequest { - ::default_instance() - } -} - -impl InstallAttributesSetRequest { - pub fn new() -> InstallAttributesSetRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for InstallAttributesSetRequest { - const NAME: &'static str = "InstallAttributesSetRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.name = is.read_string()?; - }, - 18 => { - self.value = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.name.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.name); - } - if !self.value.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.value); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.name.is_empty() { - os.write_string(1, &self.name)?; - } - if !self.value.is_empty() { - os.write_bytes(2, &self.value)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> InstallAttributesSetRequest { - InstallAttributesSetRequest::new() - } - - fn clear(&mut self) { - self.name.clear(); - self.value.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static InstallAttributesSetRequest { - static instance: InstallAttributesSetRequest = InstallAttributesSetRequest { - name: ::std::string::String::new(), - value: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.InstallAttributesSetReply) -pub struct InstallAttributesSetReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.InstallAttributesSetReply.error) - pub error: ::protobuf::EnumOrUnknown, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.InstallAttributesSetReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a InstallAttributesSetReply { - fn default() -> &'a InstallAttributesSetReply { - ::default_instance() - } -} - -impl InstallAttributesSetReply { - pub fn new() -> InstallAttributesSetReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for InstallAttributesSetReply { - const NAME: &'static str = "InstallAttributesSetReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> InstallAttributesSetReply { - InstallAttributesSetReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.special_fields.clear(); - } - - fn default_instance() -> &'static InstallAttributesSetReply { - static instance: InstallAttributesSetReply = InstallAttributesSetReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.InstallAttributesFinalizeRequest) -pub struct InstallAttributesFinalizeRequest { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.InstallAttributesFinalizeRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a InstallAttributesFinalizeRequest { - fn default() -> &'a InstallAttributesFinalizeRequest { - ::default_instance() - } -} - -impl InstallAttributesFinalizeRequest { - pub fn new() -> InstallAttributesFinalizeRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for InstallAttributesFinalizeRequest { - const NAME: &'static str = "InstallAttributesFinalizeRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> InstallAttributesFinalizeRequest { - InstallAttributesFinalizeRequest::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static InstallAttributesFinalizeRequest { - static instance: InstallAttributesFinalizeRequest = InstallAttributesFinalizeRequest { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.InstallAttributesFinalizeReply) -pub struct InstallAttributesFinalizeReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.InstallAttributesFinalizeReply.error) - pub error: ::protobuf::EnumOrUnknown, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.InstallAttributesFinalizeReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a InstallAttributesFinalizeReply { - fn default() -> &'a InstallAttributesFinalizeReply { - ::default_instance() - } -} - -impl InstallAttributesFinalizeReply { - pub fn new() -> InstallAttributesFinalizeReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for InstallAttributesFinalizeReply { - const NAME: &'static str = "InstallAttributesFinalizeReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> InstallAttributesFinalizeReply { - InstallAttributesFinalizeReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.special_fields.clear(); - } - - fn default_instance() -> &'static InstallAttributesFinalizeReply { - static instance: InstallAttributesFinalizeReply = InstallAttributesFinalizeReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.InstallAttributesGetStatusRequest) -pub struct InstallAttributesGetStatusRequest { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.InstallAttributesGetStatusRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a InstallAttributesGetStatusRequest { - fn default() -> &'a InstallAttributesGetStatusRequest { - ::default_instance() - } -} - -impl InstallAttributesGetStatusRequest { - pub fn new() -> InstallAttributesGetStatusRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for InstallAttributesGetStatusRequest { - const NAME: &'static str = "InstallAttributesGetStatusRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> InstallAttributesGetStatusRequest { - InstallAttributesGetStatusRequest::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static InstallAttributesGetStatusRequest { - static instance: InstallAttributesGetStatusRequest = InstallAttributesGetStatusRequest { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.InstallAttributesGetStatusReply) -pub struct InstallAttributesGetStatusReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.InstallAttributesGetStatusReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.InstallAttributesGetStatusReply.count) - pub count: i32, - // @@protoc_insertion_point(field:user_data_auth.InstallAttributesGetStatusReply.is_secure) - pub is_secure: bool, - // @@protoc_insertion_point(field:user_data_auth.InstallAttributesGetStatusReply.state) - pub state: ::protobuf::EnumOrUnknown, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.InstallAttributesGetStatusReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a InstallAttributesGetStatusReply { - fn default() -> &'a InstallAttributesGetStatusReply { - ::default_instance() - } -} - -impl InstallAttributesGetStatusReply { - pub fn new() -> InstallAttributesGetStatusReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for InstallAttributesGetStatusReply { - const NAME: &'static str = "InstallAttributesGetStatusReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 16 => { - self.count = is.read_int32()?; - }, - 24 => { - self.is_secure = is.read_bool()?; - }, - 32 => { - self.state = is.read_enum_or_unknown()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if self.count != 0 { - my_size += ::protobuf::rt::int32_size(2, self.count); - } - if self.is_secure != false { - my_size += 1 + 1; - } - if self.state != ::protobuf::EnumOrUnknown::new(InstallAttributesState::UNKNOWN) { - my_size += ::protobuf::rt::int32_size(4, self.state.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if self.count != 0 { - os.write_int32(2, self.count)?; - } - if self.is_secure != false { - os.write_bool(3, self.is_secure)?; - } - if self.state != ::protobuf::EnumOrUnknown::new(InstallAttributesState::UNKNOWN) { - os.write_enum(4, ::protobuf::EnumOrUnknown::value(&self.state))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> InstallAttributesGetStatusReply { - InstallAttributesGetStatusReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.count = 0; - self.is_secure = false; - self.state = ::protobuf::EnumOrUnknown::new(InstallAttributesState::UNKNOWN); - self.special_fields.clear(); - } - - fn default_instance() -> &'static InstallAttributesGetStatusReply { - static instance: InstallAttributesGetStatusReply = InstallAttributesGetStatusReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - count: 0, - is_secure: false, - state: ::protobuf::EnumOrUnknown::from_i32(0), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.FirmwareManagementParameters) -pub struct FirmwareManagementParameters { - // message fields - // @@protoc_insertion_point(field:user_data_auth.FirmwareManagementParameters.flags) - pub flags: u32, - // @@protoc_insertion_point(field:user_data_auth.FirmwareManagementParameters.developer_key_hash) - pub developer_key_hash: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.FirmwareManagementParameters.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a FirmwareManagementParameters { - fn default() -> &'a FirmwareManagementParameters { - ::default_instance() - } -} - -impl FirmwareManagementParameters { - pub fn new() -> FirmwareManagementParameters { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for FirmwareManagementParameters { - const NAME: &'static str = "FirmwareManagementParameters"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.flags = is.read_uint32()?; - }, - 18 => { - self.developer_key_hash = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.flags != 0 { - my_size += ::protobuf::rt::uint32_size(1, self.flags); - } - if !self.developer_key_hash.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.developer_key_hash); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.flags != 0 { - os.write_uint32(1, self.flags)?; - } - if !self.developer_key_hash.is_empty() { - os.write_bytes(2, &self.developer_key_hash)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> FirmwareManagementParameters { - FirmwareManagementParameters::new() - } - - fn clear(&mut self) { - self.flags = 0; - self.developer_key_hash.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static FirmwareManagementParameters { - static instance: FirmwareManagementParameters = FirmwareManagementParameters { - flags: 0, - developer_key_hash: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetFirmwareManagementParametersRequest) -pub struct GetFirmwareManagementParametersRequest { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetFirmwareManagementParametersRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetFirmwareManagementParametersRequest { - fn default() -> &'a GetFirmwareManagementParametersRequest { - ::default_instance() - } -} - -impl GetFirmwareManagementParametersRequest { - pub fn new() -> GetFirmwareManagementParametersRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetFirmwareManagementParametersRequest { - const NAME: &'static str = "GetFirmwareManagementParametersRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetFirmwareManagementParametersRequest { - GetFirmwareManagementParametersRequest::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetFirmwareManagementParametersRequest { - static instance: GetFirmwareManagementParametersRequest = GetFirmwareManagementParametersRequest { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetFirmwareManagementParametersReply) -pub struct GetFirmwareManagementParametersReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetFirmwareManagementParametersReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.GetFirmwareManagementParametersReply.fwmp) - pub fwmp: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetFirmwareManagementParametersReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetFirmwareManagementParametersReply { - fn default() -> &'a GetFirmwareManagementParametersReply { - ::default_instance() - } -} - -impl GetFirmwareManagementParametersReply { - pub fn new() -> GetFirmwareManagementParametersReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetFirmwareManagementParametersReply { - const NAME: &'static str = "GetFirmwareManagementParametersReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.fwmp)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.fwmp.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.fwmp.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetFirmwareManagementParametersReply { - GetFirmwareManagementParametersReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.fwmp.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetFirmwareManagementParametersReply { - static instance: GetFirmwareManagementParametersReply = GetFirmwareManagementParametersReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - fwmp: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.RemoveFirmwareManagementParametersRequest) -pub struct RemoveFirmwareManagementParametersRequest { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.RemoveFirmwareManagementParametersRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a RemoveFirmwareManagementParametersRequest { - fn default() -> &'a RemoveFirmwareManagementParametersRequest { - ::default_instance() - } -} - -impl RemoveFirmwareManagementParametersRequest { - pub fn new() -> RemoveFirmwareManagementParametersRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for RemoveFirmwareManagementParametersRequest { - const NAME: &'static str = "RemoveFirmwareManagementParametersRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> RemoveFirmwareManagementParametersRequest { - RemoveFirmwareManagementParametersRequest::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static RemoveFirmwareManagementParametersRequest { - static instance: RemoveFirmwareManagementParametersRequest = RemoveFirmwareManagementParametersRequest { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.RemoveFirmwareManagementParametersReply) -pub struct RemoveFirmwareManagementParametersReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.RemoveFirmwareManagementParametersReply.error) - pub error: ::protobuf::EnumOrUnknown, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.RemoveFirmwareManagementParametersReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a RemoveFirmwareManagementParametersReply { - fn default() -> &'a RemoveFirmwareManagementParametersReply { - ::default_instance() - } -} - -impl RemoveFirmwareManagementParametersReply { - pub fn new() -> RemoveFirmwareManagementParametersReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for RemoveFirmwareManagementParametersReply { - const NAME: &'static str = "RemoveFirmwareManagementParametersReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> RemoveFirmwareManagementParametersReply { - RemoveFirmwareManagementParametersReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.special_fields.clear(); - } - - fn default_instance() -> &'static RemoveFirmwareManagementParametersReply { - static instance: RemoveFirmwareManagementParametersReply = RemoveFirmwareManagementParametersReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.SetFirmwareManagementParametersRequest) -pub struct SetFirmwareManagementParametersRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.SetFirmwareManagementParametersRequest.fwmp) - pub fwmp: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.SetFirmwareManagementParametersRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a SetFirmwareManagementParametersRequest { - fn default() -> &'a SetFirmwareManagementParametersRequest { - ::default_instance() - } -} - -impl SetFirmwareManagementParametersRequest { - pub fn new() -> SetFirmwareManagementParametersRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for SetFirmwareManagementParametersRequest { - const NAME: &'static str = "SetFirmwareManagementParametersRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.fwmp)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.fwmp.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.fwmp.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SetFirmwareManagementParametersRequest { - SetFirmwareManagementParametersRequest::new() - } - - fn clear(&mut self) { - self.fwmp.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static SetFirmwareManagementParametersRequest { - static instance: SetFirmwareManagementParametersRequest = SetFirmwareManagementParametersRequest { - fwmp: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.SetFirmwareManagementParametersReply) -pub struct SetFirmwareManagementParametersReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.SetFirmwareManagementParametersReply.error) - pub error: ::protobuf::EnumOrUnknown, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.SetFirmwareManagementParametersReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a SetFirmwareManagementParametersReply { - fn default() -> &'a SetFirmwareManagementParametersReply { - ::default_instance() - } -} - -impl SetFirmwareManagementParametersReply { - pub fn new() -> SetFirmwareManagementParametersReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for SetFirmwareManagementParametersReply { - const NAME: &'static str = "SetFirmwareManagementParametersReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SetFirmwareManagementParametersReply { - SetFirmwareManagementParametersReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.special_fields.clear(); - } - - fn default_instance() -> &'static SetFirmwareManagementParametersReply { - static instance: SetFirmwareManagementParametersReply = SetFirmwareManagementParametersReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetSystemSaltRequest) -pub struct GetSystemSaltRequest { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetSystemSaltRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetSystemSaltRequest { - fn default() -> &'a GetSystemSaltRequest { - ::default_instance() - } -} - -impl GetSystemSaltRequest { - pub fn new() -> GetSystemSaltRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetSystemSaltRequest { - const NAME: &'static str = "GetSystemSaltRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetSystemSaltRequest { - GetSystemSaltRequest::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetSystemSaltRequest { - static instance: GetSystemSaltRequest = GetSystemSaltRequest { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetSystemSaltReply) -pub struct GetSystemSaltReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetSystemSaltReply.salt) - pub salt: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetSystemSaltReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetSystemSaltReply { - fn default() -> &'a GetSystemSaltReply { - ::default_instance() - } -} - -impl GetSystemSaltReply { - pub fn new() -> GetSystemSaltReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetSystemSaltReply { - const NAME: &'static str = "GetSystemSaltReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.salt = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.salt.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.salt); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.salt.is_empty() { - os.write_bytes(1, &self.salt)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetSystemSaltReply { - GetSystemSaltReply::new() - } - - fn clear(&mut self) { - self.salt.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetSystemSaltReply { - static instance: GetSystemSaltReply = GetSystemSaltReply { - salt: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.UpdateCurrentUserActivityTimestampRequest) -pub struct UpdateCurrentUserActivityTimestampRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.UpdateCurrentUserActivityTimestampRequest.time_shift_sec) - pub time_shift_sec: i32, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.UpdateCurrentUserActivityTimestampRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a UpdateCurrentUserActivityTimestampRequest { - fn default() -> &'a UpdateCurrentUserActivityTimestampRequest { - ::default_instance() - } -} - -impl UpdateCurrentUserActivityTimestampRequest { - pub fn new() -> UpdateCurrentUserActivityTimestampRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for UpdateCurrentUserActivityTimestampRequest { - const NAME: &'static str = "UpdateCurrentUserActivityTimestampRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.time_shift_sec = is.read_int32()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.time_shift_sec != 0 { - my_size += ::protobuf::rt::int32_size(1, self.time_shift_sec); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.time_shift_sec != 0 { - os.write_int32(1, self.time_shift_sec)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> UpdateCurrentUserActivityTimestampRequest { - UpdateCurrentUserActivityTimestampRequest::new() - } - - fn clear(&mut self) { - self.time_shift_sec = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static UpdateCurrentUserActivityTimestampRequest { - static instance: UpdateCurrentUserActivityTimestampRequest = UpdateCurrentUserActivityTimestampRequest { - time_shift_sec: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.UpdateCurrentUserActivityTimestampReply) -pub struct UpdateCurrentUserActivityTimestampReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.UpdateCurrentUserActivityTimestampReply.error) - pub error: ::protobuf::EnumOrUnknown, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.UpdateCurrentUserActivityTimestampReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a UpdateCurrentUserActivityTimestampReply { - fn default() -> &'a UpdateCurrentUserActivityTimestampReply { - ::default_instance() - } -} - -impl UpdateCurrentUserActivityTimestampReply { - pub fn new() -> UpdateCurrentUserActivityTimestampReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for UpdateCurrentUserActivityTimestampReply { - const NAME: &'static str = "UpdateCurrentUserActivityTimestampReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> UpdateCurrentUserActivityTimestampReply { - UpdateCurrentUserActivityTimestampReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.special_fields.clear(); - } - - fn default_instance() -> &'static UpdateCurrentUserActivityTimestampReply { - static instance: UpdateCurrentUserActivityTimestampReply = UpdateCurrentUserActivityTimestampReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetSanitizedUsernameRequest) -pub struct GetSanitizedUsernameRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetSanitizedUsernameRequest.username) - pub username: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetSanitizedUsernameRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetSanitizedUsernameRequest { - fn default() -> &'a GetSanitizedUsernameRequest { - ::default_instance() - } -} - -impl GetSanitizedUsernameRequest { - pub fn new() -> GetSanitizedUsernameRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetSanitizedUsernameRequest { - const NAME: &'static str = "GetSanitizedUsernameRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.username = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.username.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.username); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.username.is_empty() { - os.write_string(1, &self.username)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetSanitizedUsernameRequest { - GetSanitizedUsernameRequest::new() - } - - fn clear(&mut self) { - self.username.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetSanitizedUsernameRequest { - static instance: GetSanitizedUsernameRequest = GetSanitizedUsernameRequest { - username: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetSanitizedUsernameReply) -pub struct GetSanitizedUsernameReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetSanitizedUsernameReply.sanitized_username) - pub sanitized_username: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetSanitizedUsernameReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetSanitizedUsernameReply { - fn default() -> &'a GetSanitizedUsernameReply { - ::default_instance() - } -} - -impl GetSanitizedUsernameReply { - pub fn new() -> GetSanitizedUsernameReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetSanitizedUsernameReply { - const NAME: &'static str = "GetSanitizedUsernameReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.sanitized_username = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.sanitized_username.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.sanitized_username); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.sanitized_username.is_empty() { - os.write_string(1, &self.sanitized_username)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetSanitizedUsernameReply { - GetSanitizedUsernameReply::new() - } - - fn clear(&mut self) { - self.sanitized_username.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetSanitizedUsernameReply { - static instance: GetSanitizedUsernameReply = GetSanitizedUsernameReply { - sanitized_username: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetLoginStatusRequest) -pub struct GetLoginStatusRequest { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetLoginStatusRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetLoginStatusRequest { - fn default() -> &'a GetLoginStatusRequest { - ::default_instance() - } -} - -impl GetLoginStatusRequest { - pub fn new() -> GetLoginStatusRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetLoginStatusRequest { - const NAME: &'static str = "GetLoginStatusRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetLoginStatusRequest { - GetLoginStatusRequest::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetLoginStatusRequest { - static instance: GetLoginStatusRequest = GetLoginStatusRequest { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetLoginStatusReply) -pub struct GetLoginStatusReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetLoginStatusReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.GetLoginStatusReply.owner_user_exists) - pub owner_user_exists: bool, - // @@protoc_insertion_point(field:user_data_auth.GetLoginStatusReply.is_locked_to_single_user) - pub is_locked_to_single_user: bool, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetLoginStatusReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetLoginStatusReply { - fn default() -> &'a GetLoginStatusReply { - ::default_instance() - } -} - -impl GetLoginStatusReply { - pub fn new() -> GetLoginStatusReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetLoginStatusReply { - const NAME: &'static str = "GetLoginStatusReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 16 => { - self.owner_user_exists = is.read_bool()?; - }, - 24 => { - self.is_locked_to_single_user = is.read_bool()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if self.owner_user_exists != false { - my_size += 1 + 1; - } - if self.is_locked_to_single_user != false { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if self.owner_user_exists != false { - os.write_bool(2, self.owner_user_exists)?; - } - if self.is_locked_to_single_user != false { - os.write_bool(3, self.is_locked_to_single_user)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetLoginStatusReply { - GetLoginStatusReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.owner_user_exists = false; - self.is_locked_to_single_user = false; - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetLoginStatusReply { - static instance: GetLoginStatusReply = GetLoginStatusReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - owner_user_exists: false, - is_locked_to_single_user: false, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.LockToSingleUserMountUntilRebootRequest) -pub struct LockToSingleUserMountUntilRebootRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.LockToSingleUserMountUntilRebootRequest.account_id) - pub account_id: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.LockToSingleUserMountUntilRebootRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a LockToSingleUserMountUntilRebootRequest { - fn default() -> &'a LockToSingleUserMountUntilRebootRequest { - ::default_instance() - } -} - -impl LockToSingleUserMountUntilRebootRequest { - pub fn new() -> LockToSingleUserMountUntilRebootRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for LockToSingleUserMountUntilRebootRequest { - const NAME: &'static str = "LockToSingleUserMountUntilRebootRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.account_id)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.account_id.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.account_id.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> LockToSingleUserMountUntilRebootRequest { - LockToSingleUserMountUntilRebootRequest::new() - } - - fn clear(&mut self) { - self.account_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static LockToSingleUserMountUntilRebootRequest { - static instance: LockToSingleUserMountUntilRebootRequest = LockToSingleUserMountUntilRebootRequest { - account_id: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.LockToSingleUserMountUntilRebootReply) -pub struct LockToSingleUserMountUntilRebootReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.LockToSingleUserMountUntilRebootReply.error) - pub error: ::protobuf::EnumOrUnknown, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.LockToSingleUserMountUntilRebootReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a LockToSingleUserMountUntilRebootReply { - fn default() -> &'a LockToSingleUserMountUntilRebootReply { - ::default_instance() - } -} - -impl LockToSingleUserMountUntilRebootReply { - pub fn new() -> LockToSingleUserMountUntilRebootReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for LockToSingleUserMountUntilRebootReply { - const NAME: &'static str = "LockToSingleUserMountUntilRebootReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> LockToSingleUserMountUntilRebootReply { - LockToSingleUserMountUntilRebootReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.special_fields.clear(); - } - - fn default_instance() -> &'static LockToSingleUserMountUntilRebootReply { - static instance: LockToSingleUserMountUntilRebootReply = LockToSingleUserMountUntilRebootReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetRsuDeviceIdReply) -pub struct GetRsuDeviceIdReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetRsuDeviceIdReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.GetRsuDeviceIdReply.rsu_device_id) - pub rsu_device_id: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetRsuDeviceIdReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetRsuDeviceIdReply { - fn default() -> &'a GetRsuDeviceIdReply { - ::default_instance() - } -} - -impl GetRsuDeviceIdReply { - pub fn new() -> GetRsuDeviceIdReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetRsuDeviceIdReply { - const NAME: &'static str = "GetRsuDeviceIdReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - self.rsu_device_id = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if !self.rsu_device_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.rsu_device_id); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if !self.rsu_device_id.is_empty() { - os.write_bytes(2, &self.rsu_device_id)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetRsuDeviceIdReply { - GetRsuDeviceIdReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.rsu_device_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetRsuDeviceIdReply { - static instance: GetRsuDeviceIdReply = GetRsuDeviceIdReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - rsu_device_id: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetRsuDeviceIdRequest) -pub struct GetRsuDeviceIdRequest { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetRsuDeviceIdRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetRsuDeviceIdRequest { - fn default() -> &'a GetRsuDeviceIdRequest { - ::default_instance() - } -} - -impl GetRsuDeviceIdRequest { - pub fn new() -> GetRsuDeviceIdRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetRsuDeviceIdRequest { - const NAME: &'static str = "GetRsuDeviceIdRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetRsuDeviceIdRequest { - GetRsuDeviceIdRequest::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetRsuDeviceIdRequest { - static instance: GetRsuDeviceIdRequest = GetRsuDeviceIdRequest { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.ResetApplicationContainerRequest) -pub struct ResetApplicationContainerRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.ResetApplicationContainerRequest.account_id) - pub account_id: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.ResetApplicationContainerRequest.application_name) - pub application_name: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.ResetApplicationContainerRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ResetApplicationContainerRequest { - fn default() -> &'a ResetApplicationContainerRequest { - ::default_instance() - } -} - -impl ResetApplicationContainerRequest { - pub fn new() -> ResetApplicationContainerRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for ResetApplicationContainerRequest { - const NAME: &'static str = "ResetApplicationContainerRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.account_id)?; - }, - 18 => { - self.application_name = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.account_id.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if !self.application_name.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.application_name); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.account_id.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if !self.application_name.is_empty() { - os.write_string(2, &self.application_name)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ResetApplicationContainerRequest { - ResetApplicationContainerRequest::new() - } - - fn clear(&mut self) { - self.account_id.clear(); - self.application_name.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ResetApplicationContainerRequest { - static instance: ResetApplicationContainerRequest = ResetApplicationContainerRequest { - account_id: ::protobuf::MessageField::none(), - application_name: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.ResetApplicationContainerReply) -pub struct ResetApplicationContainerReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.ResetApplicationContainerReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.ResetApplicationContainerReply.error_info) - pub error_info: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.ResetApplicationContainerReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ResetApplicationContainerReply { - fn default() -> &'a ResetApplicationContainerReply { - ::default_instance() - } -} - -impl ResetApplicationContainerReply { - pub fn new() -> ResetApplicationContainerReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for ResetApplicationContainerReply { - const NAME: &'static str = "ResetApplicationContainerReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ResetApplicationContainerReply { - ResetApplicationContainerReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ResetApplicationContainerReply { - static instance: ResetApplicationContainerReply = ResetApplicationContainerReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.FidoMakeCredentialRequest) -pub struct FidoMakeCredentialRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.FidoMakeCredentialRequest.account_id) - pub account_id: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.FidoMakeCredentialRequest.make_credential_options) - pub make_credential_options: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.FidoMakeCredentialRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a FidoMakeCredentialRequest { - fn default() -> &'a FidoMakeCredentialRequest { - ::default_instance() - } -} - -impl FidoMakeCredentialRequest { - pub fn new() -> FidoMakeCredentialRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for FidoMakeCredentialRequest { - const NAME: &'static str = "FidoMakeCredentialRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.account_id)?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.make_credential_options)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.account_id.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.make_credential_options.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.account_id.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if let Some(v) = self.make_credential_options.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> FidoMakeCredentialRequest { - FidoMakeCredentialRequest::new() - } - - fn clear(&mut self) { - self.account_id.clear(); - self.make_credential_options.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static FidoMakeCredentialRequest { - static instance: FidoMakeCredentialRequest = FidoMakeCredentialRequest { - account_id: ::protobuf::MessageField::none(), - make_credential_options: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.FidoMakeCredentialReply) -pub struct FidoMakeCredentialReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.FidoMakeCredentialReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.FidoMakeCredentialReply.make_credential_response) - pub make_credential_response: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.FidoMakeCredentialReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a FidoMakeCredentialReply { - fn default() -> &'a FidoMakeCredentialReply { - ::default_instance() - } -} - -impl FidoMakeCredentialReply { - pub fn new() -> FidoMakeCredentialReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for FidoMakeCredentialReply { - const NAME: &'static str = "FidoMakeCredentialReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.make_credential_response)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.make_credential_response.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.make_credential_response.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> FidoMakeCredentialReply { - FidoMakeCredentialReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.make_credential_response.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static FidoMakeCredentialReply { - static instance: FidoMakeCredentialReply = FidoMakeCredentialReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - make_credential_response: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.FidoGetAssertionRequest) -pub struct FidoGetAssertionRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.FidoGetAssertionRequest.get_assertion_options) - pub get_assertion_options: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.FidoGetAssertionRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a FidoGetAssertionRequest { - fn default() -> &'a FidoGetAssertionRequest { - ::default_instance() - } -} - -impl FidoGetAssertionRequest { - pub fn new() -> FidoGetAssertionRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for FidoGetAssertionRequest { - const NAME: &'static str = "FidoGetAssertionRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.get_assertion_options)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.get_assertion_options.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.get_assertion_options.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> FidoGetAssertionRequest { - FidoGetAssertionRequest::new() - } - - fn clear(&mut self) { - self.get_assertion_options.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static FidoGetAssertionRequest { - static instance: FidoGetAssertionRequest = FidoGetAssertionRequest { - get_assertion_options: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.FidoGetAssertionReply) -pub struct FidoGetAssertionReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.FidoGetAssertionReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.FidoGetAssertionReply.get_assertion_response) - pub get_assertion_response: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.FidoGetAssertionReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a FidoGetAssertionReply { - fn default() -> &'a FidoGetAssertionReply { - ::default_instance() - } -} - -impl FidoGetAssertionReply { - pub fn new() -> FidoGetAssertionReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for FidoGetAssertionReply { - const NAME: &'static str = "FidoGetAssertionReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.get_assertion_response)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.get_assertion_response.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.get_assertion_response.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> FidoGetAssertionReply { - FidoGetAssertionReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.get_assertion_response.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static FidoGetAssertionReply { - static instance: FidoGetAssertionReply = FidoGetAssertionReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - get_assertion_response: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.AddAuthFactorRequest) -pub struct AddAuthFactorRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.AddAuthFactorRequest.auth_session_id) - pub auth_session_id: ::std::vec::Vec, - // @@protoc_insertion_point(field:user_data_auth.AddAuthFactorRequest.auth_factor) - pub auth_factor: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.AddAuthFactorRequest.auth_input) - pub auth_input: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.AddAuthFactorRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a AddAuthFactorRequest { - fn default() -> &'a AddAuthFactorRequest { - ::default_instance() - } -} - -impl AddAuthFactorRequest { - pub fn new() -> AddAuthFactorRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for AddAuthFactorRequest { - const NAME: &'static str = "AddAuthFactorRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.auth_session_id = is.read_bytes()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.auth_factor)?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.auth_input)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.auth_session_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.auth_session_id); - } - if let Some(v) = self.auth_factor.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.auth_input.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.auth_session_id.is_empty() { - os.write_bytes(1, &self.auth_session_id)?; - } - if let Some(v) = self.auth_factor.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - if let Some(v) = self.auth_input.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> AddAuthFactorRequest { - AddAuthFactorRequest::new() - } - - fn clear(&mut self) { - self.auth_session_id.clear(); - self.auth_factor.clear(); - self.auth_input.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static AddAuthFactorRequest { - static instance: AddAuthFactorRequest = AddAuthFactorRequest { - auth_session_id: ::std::vec::Vec::new(), - auth_factor: ::protobuf::MessageField::none(), - auth_input: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.AddAuthFactorReply) -pub struct AddAuthFactorReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.AddAuthFactorReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.AddAuthFactorReply.error_info) - pub error_info: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.AddAuthFactorReply.added_auth_factor) - pub added_auth_factor: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.AddAuthFactorReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a AddAuthFactorReply { - fn default() -> &'a AddAuthFactorReply { - ::default_instance() - } -} - -impl AddAuthFactorReply { - pub fn new() -> AddAuthFactorReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for AddAuthFactorReply { - const NAME: &'static str = "AddAuthFactorReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.added_auth_factor)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.added_auth_factor.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - if let Some(v) = self.added_auth_factor.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> AddAuthFactorReply { - AddAuthFactorReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.added_auth_factor.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static AddAuthFactorReply { - static instance: AddAuthFactorReply = AddAuthFactorReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - added_auth_factor: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.AuthenticateAuthFactorRequest) -pub struct AuthenticateAuthFactorRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.AuthenticateAuthFactorRequest.auth_session_id) - pub auth_session_id: ::std::vec::Vec, - // @@protoc_insertion_point(field:user_data_auth.AuthenticateAuthFactorRequest.auth_factor_label) - pub auth_factor_label: ::std::string::String, - // @@protoc_insertion_point(field:user_data_auth.AuthenticateAuthFactorRequest.auth_input) - pub auth_input: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.AuthenticateAuthFactorRequest.auth_factor_labels) - pub auth_factor_labels: ::std::vec::Vec<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.AuthenticateAuthFactorRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a AuthenticateAuthFactorRequest { - fn default() -> &'a AuthenticateAuthFactorRequest { - ::default_instance() - } -} - -impl AuthenticateAuthFactorRequest { - pub fn new() -> AuthenticateAuthFactorRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for AuthenticateAuthFactorRequest { - const NAME: &'static str = "AuthenticateAuthFactorRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.auth_session_id = is.read_bytes()?; - }, - 18 => { - self.auth_factor_label = is.read_string()?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.auth_input)?; - }, - 34 => { - self.auth_factor_labels.push(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.auth_session_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.auth_session_id); - } - if !self.auth_factor_label.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.auth_factor_label); - } - if let Some(v) = self.auth_input.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - for value in &self.auth_factor_labels { - my_size += ::protobuf::rt::string_size(4, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.auth_session_id.is_empty() { - os.write_bytes(1, &self.auth_session_id)?; - } - if !self.auth_factor_label.is_empty() { - os.write_string(2, &self.auth_factor_label)?; - } - if let Some(v) = self.auth_input.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - for v in &self.auth_factor_labels { - os.write_string(4, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> AuthenticateAuthFactorRequest { - AuthenticateAuthFactorRequest::new() - } - - fn clear(&mut self) { - self.auth_session_id.clear(); - self.auth_factor_label.clear(); - self.auth_input.clear(); - self.auth_factor_labels.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static AuthenticateAuthFactorRequest { - static instance: AuthenticateAuthFactorRequest = AuthenticateAuthFactorRequest { - auth_session_id: ::std::vec::Vec::new(), - auth_factor_label: ::std::string::String::new(), - auth_input: ::protobuf::MessageField::none(), - auth_factor_labels: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.AuthenticateAuthFactorReply) -pub struct AuthenticateAuthFactorReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.AuthenticateAuthFactorReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.AuthenticateAuthFactorReply.error_info) - pub error_info: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.AuthenticateAuthFactorReply.authorized_for) - pub authorized_for: ::std::vec::Vec<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:user_data_auth.AuthenticateAuthFactorReply.seconds_left) - pub seconds_left: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.AuthenticateAuthFactorReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a AuthenticateAuthFactorReply { - fn default() -> &'a AuthenticateAuthFactorReply { - ::default_instance() - } -} - -impl AuthenticateAuthFactorReply { - pub fn new() -> AuthenticateAuthFactorReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for AuthenticateAuthFactorReply { - const NAME: &'static str = "AuthenticateAuthFactorReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - 32 => { - self.authorized_for.push(is.read_enum_or_unknown()?); - }, - 34 => { - ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.authorized_for)? - }, - 40 => { - self.seconds_left = ::std::option::Option::Some(is.read_uint32()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - for value in &self.authorized_for { - my_size += ::protobuf::rt::int32_size(4, value.value()); - }; - if let Some(v) = self.seconds_left { - my_size += ::protobuf::rt::uint32_size(5, v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - for v in &self.authorized_for { - os.write_enum(4, ::protobuf::EnumOrUnknown::value(v))?; - }; - if let Some(v) = self.seconds_left { - os.write_uint32(5, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> AuthenticateAuthFactorReply { - AuthenticateAuthFactorReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.authorized_for.clear(); - self.seconds_left = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static AuthenticateAuthFactorReply { - static instance: AuthenticateAuthFactorReply = AuthenticateAuthFactorReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - authorized_for: ::std::vec::Vec::new(), - seconds_left: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.UpdateAuthFactorRequest) -pub struct UpdateAuthFactorRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.UpdateAuthFactorRequest.auth_session_id) - pub auth_session_id: ::std::vec::Vec, - // @@protoc_insertion_point(field:user_data_auth.UpdateAuthFactorRequest.auth_factor_label) - pub auth_factor_label: ::std::string::String, - // @@protoc_insertion_point(field:user_data_auth.UpdateAuthFactorRequest.auth_factor) - pub auth_factor: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.UpdateAuthFactorRequest.auth_input) - pub auth_input: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.UpdateAuthFactorRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a UpdateAuthFactorRequest { - fn default() -> &'a UpdateAuthFactorRequest { - ::default_instance() - } -} - -impl UpdateAuthFactorRequest { - pub fn new() -> UpdateAuthFactorRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for UpdateAuthFactorRequest { - const NAME: &'static str = "UpdateAuthFactorRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.auth_session_id = is.read_bytes()?; - }, - 18 => { - self.auth_factor_label = is.read_string()?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.auth_factor)?; - }, - 34 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.auth_input)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.auth_session_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.auth_session_id); - } - if !self.auth_factor_label.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.auth_factor_label); - } - if let Some(v) = self.auth_factor.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.auth_input.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.auth_session_id.is_empty() { - os.write_bytes(1, &self.auth_session_id)?; - } - if !self.auth_factor_label.is_empty() { - os.write_string(2, &self.auth_factor_label)?; - } - if let Some(v) = self.auth_factor.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - if let Some(v) = self.auth_input.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> UpdateAuthFactorRequest { - UpdateAuthFactorRequest::new() - } - - fn clear(&mut self) { - self.auth_session_id.clear(); - self.auth_factor_label.clear(); - self.auth_factor.clear(); - self.auth_input.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static UpdateAuthFactorRequest { - static instance: UpdateAuthFactorRequest = UpdateAuthFactorRequest { - auth_session_id: ::std::vec::Vec::new(), - auth_factor_label: ::std::string::String::new(), - auth_factor: ::protobuf::MessageField::none(), - auth_input: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.UpdateAuthFactorReply) -pub struct UpdateAuthFactorReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.UpdateAuthFactorReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.UpdateAuthFactorReply.error_info) - pub error_info: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.UpdateAuthFactorReply.updated_auth_factor) - pub updated_auth_factor: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.UpdateAuthFactorReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a UpdateAuthFactorReply { - fn default() -> &'a UpdateAuthFactorReply { - ::default_instance() - } -} - -impl UpdateAuthFactorReply { - pub fn new() -> UpdateAuthFactorReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for UpdateAuthFactorReply { - const NAME: &'static str = "UpdateAuthFactorReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.updated_auth_factor)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.updated_auth_factor.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - if let Some(v) = self.updated_auth_factor.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> UpdateAuthFactorReply { - UpdateAuthFactorReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.updated_auth_factor.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static UpdateAuthFactorReply { - static instance: UpdateAuthFactorReply = UpdateAuthFactorReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - updated_auth_factor: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.UpdateAuthFactorMetadataRequest) -pub struct UpdateAuthFactorMetadataRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.UpdateAuthFactorMetadataRequest.auth_session_id) - pub auth_session_id: ::std::vec::Vec, - // @@protoc_insertion_point(field:user_data_auth.UpdateAuthFactorMetadataRequest.auth_factor_label) - pub auth_factor_label: ::std::string::String, - // @@protoc_insertion_point(field:user_data_auth.UpdateAuthFactorMetadataRequest.auth_factor) - pub auth_factor: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.UpdateAuthFactorMetadataRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a UpdateAuthFactorMetadataRequest { - fn default() -> &'a UpdateAuthFactorMetadataRequest { - ::default_instance() - } -} - -impl UpdateAuthFactorMetadataRequest { - pub fn new() -> UpdateAuthFactorMetadataRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for UpdateAuthFactorMetadataRequest { - const NAME: &'static str = "UpdateAuthFactorMetadataRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.auth_session_id = is.read_bytes()?; - }, - 18 => { - self.auth_factor_label = is.read_string()?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.auth_factor)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.auth_session_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.auth_session_id); - } - if !self.auth_factor_label.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.auth_factor_label); - } - if let Some(v) = self.auth_factor.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.auth_session_id.is_empty() { - os.write_bytes(1, &self.auth_session_id)?; - } - if !self.auth_factor_label.is_empty() { - os.write_string(2, &self.auth_factor_label)?; - } - if let Some(v) = self.auth_factor.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> UpdateAuthFactorMetadataRequest { - UpdateAuthFactorMetadataRequest::new() - } - - fn clear(&mut self) { - self.auth_session_id.clear(); - self.auth_factor_label.clear(); - self.auth_factor.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static UpdateAuthFactorMetadataRequest { - static instance: UpdateAuthFactorMetadataRequest = UpdateAuthFactorMetadataRequest { - auth_session_id: ::std::vec::Vec::new(), - auth_factor_label: ::std::string::String::new(), - auth_factor: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.UpdateAuthFactorMetadataReply) -pub struct UpdateAuthFactorMetadataReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.UpdateAuthFactorMetadataReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.UpdateAuthFactorMetadataReply.error_info) - pub error_info: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.UpdateAuthFactorMetadataReply.updated_auth_factor) - pub updated_auth_factor: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.UpdateAuthFactorMetadataReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a UpdateAuthFactorMetadataReply { - fn default() -> &'a UpdateAuthFactorMetadataReply { - ::default_instance() - } -} - -impl UpdateAuthFactorMetadataReply { - pub fn new() -> UpdateAuthFactorMetadataReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for UpdateAuthFactorMetadataReply { - const NAME: &'static str = "UpdateAuthFactorMetadataReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.updated_auth_factor)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.updated_auth_factor.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - if let Some(v) = self.updated_auth_factor.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> UpdateAuthFactorMetadataReply { - UpdateAuthFactorMetadataReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.updated_auth_factor.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static UpdateAuthFactorMetadataReply { - static instance: UpdateAuthFactorMetadataReply = UpdateAuthFactorMetadataReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - updated_auth_factor: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.RemoveAuthFactorRequest) -pub struct RemoveAuthFactorRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.RemoveAuthFactorRequest.auth_session_id) - pub auth_session_id: ::std::vec::Vec, - // @@protoc_insertion_point(field:user_data_auth.RemoveAuthFactorRequest.auth_factor_label) - pub auth_factor_label: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.RemoveAuthFactorRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a RemoveAuthFactorRequest { - fn default() -> &'a RemoveAuthFactorRequest { - ::default_instance() - } -} - -impl RemoveAuthFactorRequest { - pub fn new() -> RemoveAuthFactorRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for RemoveAuthFactorRequest { - const NAME: &'static str = "RemoveAuthFactorRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.auth_session_id = is.read_bytes()?; - }, - 18 => { - self.auth_factor_label = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.auth_session_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.auth_session_id); - } - if !self.auth_factor_label.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.auth_factor_label); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.auth_session_id.is_empty() { - os.write_bytes(1, &self.auth_session_id)?; - } - if !self.auth_factor_label.is_empty() { - os.write_string(2, &self.auth_factor_label)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> RemoveAuthFactorRequest { - RemoveAuthFactorRequest::new() - } - - fn clear(&mut self) { - self.auth_session_id.clear(); - self.auth_factor_label.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static RemoveAuthFactorRequest { - static instance: RemoveAuthFactorRequest = RemoveAuthFactorRequest { - auth_session_id: ::std::vec::Vec::new(), - auth_factor_label: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.RemoveAuthFactorReply) -pub struct RemoveAuthFactorReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.RemoveAuthFactorReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.RemoveAuthFactorReply.error_info) - pub error_info: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.RemoveAuthFactorReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a RemoveAuthFactorReply { - fn default() -> &'a RemoveAuthFactorReply { - ::default_instance() - } -} - -impl RemoveAuthFactorReply { - pub fn new() -> RemoveAuthFactorReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for RemoveAuthFactorReply { - const NAME: &'static str = "RemoveAuthFactorReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> RemoveAuthFactorReply { - RemoveAuthFactorReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static RemoveAuthFactorReply { - static instance: RemoveAuthFactorReply = RemoveAuthFactorReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.AuthIntentsForAuthFactorType) -pub struct AuthIntentsForAuthFactorType { - // message fields - // @@protoc_insertion_point(field:user_data_auth.AuthIntentsForAuthFactorType.type) - pub type_: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.AuthIntentsForAuthFactorType.current) - pub current: ::std::vec::Vec<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:user_data_auth.AuthIntentsForAuthFactorType.minimum) - pub minimum: ::std::vec::Vec<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:user_data_auth.AuthIntentsForAuthFactorType.maximum) - pub maximum: ::std::vec::Vec<::protobuf::EnumOrUnknown>, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.AuthIntentsForAuthFactorType.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a AuthIntentsForAuthFactorType { - fn default() -> &'a AuthIntentsForAuthFactorType { - ::default_instance() - } -} - -impl AuthIntentsForAuthFactorType { - pub fn new() -> AuthIntentsForAuthFactorType { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for AuthIntentsForAuthFactorType { - const NAME: &'static str = "AuthIntentsForAuthFactorType"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.type_ = is.read_enum_or_unknown()?; - }, - 16 => { - self.current.push(is.read_enum_or_unknown()?); - }, - 18 => { - ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.current)? - }, - 24 => { - self.minimum.push(is.read_enum_or_unknown()?); - }, - 26 => { - ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.minimum)? - }, - 32 => { - self.maximum.push(is.read_enum_or_unknown()?); - }, - 34 => { - ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.maximum)? - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.type_ != ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED) { - my_size += ::protobuf::rt::int32_size(1, self.type_.value()); - } - for value in &self.current { - my_size += ::protobuf::rt::int32_size(2, value.value()); - }; - for value in &self.minimum { - my_size += ::protobuf::rt::int32_size(3, value.value()); - }; - for value in &self.maximum { - my_size += ::protobuf::rt::int32_size(4, value.value()); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.type_ != ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.type_))?; - } - for v in &self.current { - os.write_enum(2, ::protobuf::EnumOrUnknown::value(v))?; - }; - for v in &self.minimum { - os.write_enum(3, ::protobuf::EnumOrUnknown::value(v))?; - }; - for v in &self.maximum { - os.write_enum(4, ::protobuf::EnumOrUnknown::value(v))?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> AuthIntentsForAuthFactorType { - AuthIntentsForAuthFactorType::new() - } - - fn clear(&mut self) { - self.type_ = ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED); - self.current.clear(); - self.minimum.clear(); - self.maximum.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static AuthIntentsForAuthFactorType { - static instance: AuthIntentsForAuthFactorType = AuthIntentsForAuthFactorType { - type_: ::protobuf::EnumOrUnknown::from_i32(0), - current: ::std::vec::Vec::new(), - minimum: ::std::vec::Vec::new(), - maximum: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.ListAuthFactorsRequest) -pub struct ListAuthFactorsRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.ListAuthFactorsRequest.account_id) - pub account_id: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.ListAuthFactorsRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ListAuthFactorsRequest { - fn default() -> &'a ListAuthFactorsRequest { - ::default_instance() - } -} - -impl ListAuthFactorsRequest { - pub fn new() -> ListAuthFactorsRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for ListAuthFactorsRequest { - const NAME: &'static str = "ListAuthFactorsRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.account_id)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.account_id.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.account_id.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ListAuthFactorsRequest { - ListAuthFactorsRequest::new() - } - - fn clear(&mut self) { - self.account_id.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ListAuthFactorsRequest { - static instance: ListAuthFactorsRequest = ListAuthFactorsRequest { - account_id: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.ListAuthFactorsReply) -pub struct ListAuthFactorsReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.ListAuthFactorsReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.ListAuthFactorsReply.error_info) - pub error_info: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.ListAuthFactorsReply.configured_auth_factors) - pub configured_auth_factors: ::std::vec::Vec, - // @@protoc_insertion_point(field:user_data_auth.ListAuthFactorsReply.configured_auth_factors_with_status) - pub configured_auth_factors_with_status: ::std::vec::Vec, - // @@protoc_insertion_point(field:user_data_auth.ListAuthFactorsReply.supported_auth_factors) - pub supported_auth_factors: ::std::vec::Vec<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:user_data_auth.ListAuthFactorsReply.auth_intents_for_types) - pub auth_intents_for_types: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.ListAuthFactorsReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ListAuthFactorsReply { - fn default() -> &'a ListAuthFactorsReply { - ::default_instance() - } -} - -impl ListAuthFactorsReply { - pub fn new() -> ListAuthFactorsReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for ListAuthFactorsReply { - const NAME: &'static str = "ListAuthFactorsReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - 26 => { - self.configured_auth_factors.push(is.read_message()?); - }, - 42 => { - self.configured_auth_factors_with_status.push(is.read_message()?); - }, - 32 => { - self.supported_auth_factors.push(is.read_enum_or_unknown()?); - }, - 34 => { - ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.supported_auth_factors)? - }, - 50 => { - self.auth_intents_for_types.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - for value in &self.configured_auth_factors { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.configured_auth_factors_with_status { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - for value in &self.supported_auth_factors { - my_size += ::protobuf::rt::int32_size(4, value.value()); - }; - for value in &self.auth_intents_for_types { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - for v in &self.configured_auth_factors { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - }; - for v in &self.configured_auth_factors_with_status { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - }; - for v in &self.supported_auth_factors { - os.write_enum(4, ::protobuf::EnumOrUnknown::value(v))?; - }; - for v in &self.auth_intents_for_types { - ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ListAuthFactorsReply { - ListAuthFactorsReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.configured_auth_factors.clear(); - self.configured_auth_factors_with_status.clear(); - self.supported_auth_factors.clear(); - self.auth_intents_for_types.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ListAuthFactorsReply { - static instance: ListAuthFactorsReply = ListAuthFactorsReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - configured_auth_factors: ::std::vec::Vec::new(), - configured_auth_factors_with_status: ::std::vec::Vec::new(), - supported_auth_factors: ::std::vec::Vec::new(), - auth_intents_for_types: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.RecoveryExtendedInfoRequest) -pub struct RecoveryExtendedInfoRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.RecoveryExtendedInfoRequest.max_depth) - pub max_depth: u32, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.RecoveryExtendedInfoRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a RecoveryExtendedInfoRequest { - fn default() -> &'a RecoveryExtendedInfoRequest { - ::default_instance() - } -} - -impl RecoveryExtendedInfoRequest { - pub fn new() -> RecoveryExtendedInfoRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for RecoveryExtendedInfoRequest { - const NAME: &'static str = "RecoveryExtendedInfoRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.max_depth = is.read_uint32()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.max_depth != 0 { - my_size += ::protobuf::rt::uint32_size(1, self.max_depth); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.max_depth != 0 { - os.write_uint32(1, self.max_depth)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> RecoveryExtendedInfoRequest { - RecoveryExtendedInfoRequest::new() - } - - fn clear(&mut self) { - self.max_depth = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static RecoveryExtendedInfoRequest { - static instance: RecoveryExtendedInfoRequest = RecoveryExtendedInfoRequest { - max_depth: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.RecoveryExtendedInfoReply) -pub struct RecoveryExtendedInfoReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.RecoveryExtendedInfoReply.recovery_ids) - pub recovery_ids: ::std::vec::Vec<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.RecoveryExtendedInfoReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a RecoveryExtendedInfoReply { - fn default() -> &'a RecoveryExtendedInfoReply { - ::default_instance() - } -} - -impl RecoveryExtendedInfoReply { - pub fn new() -> RecoveryExtendedInfoReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for RecoveryExtendedInfoReply { - const NAME: &'static str = "RecoveryExtendedInfoReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.recovery_ids.push(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.recovery_ids { - my_size += ::protobuf::rt::string_size(1, &value); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.recovery_ids { - os.write_string(1, &v)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> RecoveryExtendedInfoReply { - RecoveryExtendedInfoReply::new() - } - - fn clear(&mut self) { - self.recovery_ids.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static RecoveryExtendedInfoReply { - static instance: RecoveryExtendedInfoReply = RecoveryExtendedInfoReply { - recovery_ids: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetAuthFactorExtendedInfoRequest) -pub struct GetAuthFactorExtendedInfoRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetAuthFactorExtendedInfoRequest.account_id) - pub account_id: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.GetAuthFactorExtendedInfoRequest.auth_factor_label) - pub auth_factor_label: ::std::string::String, - // message oneof groups - pub extended_info: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetAuthFactorExtendedInfoRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetAuthFactorExtendedInfoRequest { - fn default() -> &'a GetAuthFactorExtendedInfoRequest { - ::default_instance() - } -} - -impl GetAuthFactorExtendedInfoRequest { - pub fn new() -> GetAuthFactorExtendedInfoRequest { - ::std::default::Default::default() - } - - // .user_data_auth.RecoveryExtendedInfoRequest recovery_info_request = 3; - - pub fn recovery_info_request(&self) -> &RecoveryExtendedInfoRequest { - match self.extended_info { - ::std::option::Option::Some(get_auth_factor_extended_info_request::Extended_info::RecoveryInfoRequest(ref v)) => v, - _ => ::default_instance(), - } - } - - pub fn clear_recovery_info_request(&mut self) { - self.extended_info = ::std::option::Option::None; - } - - pub fn has_recovery_info_request(&self) -> bool { - match self.extended_info { - ::std::option::Option::Some(get_auth_factor_extended_info_request::Extended_info::RecoveryInfoRequest(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_recovery_info_request(&mut self, v: RecoveryExtendedInfoRequest) { - self.extended_info = ::std::option::Option::Some(get_auth_factor_extended_info_request::Extended_info::RecoveryInfoRequest(v)) - } - - // Mutable pointer to the field. - pub fn mut_recovery_info_request(&mut self) -> &mut RecoveryExtendedInfoRequest { - if let ::std::option::Option::Some(get_auth_factor_extended_info_request::Extended_info::RecoveryInfoRequest(_)) = self.extended_info { - } else { - self.extended_info = ::std::option::Option::Some(get_auth_factor_extended_info_request::Extended_info::RecoveryInfoRequest(RecoveryExtendedInfoRequest::new())); - } - match self.extended_info { - ::std::option::Option::Some(get_auth_factor_extended_info_request::Extended_info::RecoveryInfoRequest(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_recovery_info_request(&mut self) -> RecoveryExtendedInfoRequest { - if self.has_recovery_info_request() { - match self.extended_info.take() { - ::std::option::Option::Some(get_auth_factor_extended_info_request::Extended_info::RecoveryInfoRequest(v)) => v, - _ => panic!(), - } - } else { - RecoveryExtendedInfoRequest::new() - } - } -} - -impl ::protobuf::Message for GetAuthFactorExtendedInfoRequest { - const NAME: &'static str = "GetAuthFactorExtendedInfoRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.account_id)?; - }, - 18 => { - self.auth_factor_label = is.read_string()?; - }, - 26 => { - self.extended_info = ::std::option::Option::Some(get_auth_factor_extended_info_request::Extended_info::RecoveryInfoRequest(is.read_message()?)); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.account_id.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if !self.auth_factor_label.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.auth_factor_label); - } - if let ::std::option::Option::Some(ref v) = self.extended_info { - match v { - &get_auth_factor_extended_info_request::Extended_info::RecoveryInfoRequest(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }, - }; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.account_id.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if !self.auth_factor_label.is_empty() { - os.write_string(2, &self.auth_factor_label)?; - } - if let ::std::option::Option::Some(ref v) = self.extended_info { - match v { - &get_auth_factor_extended_info_request::Extended_info::RecoveryInfoRequest(ref v) => { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - }, - }; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetAuthFactorExtendedInfoRequest { - GetAuthFactorExtendedInfoRequest::new() - } - - fn clear(&mut self) { - self.account_id.clear(); - self.auth_factor_label.clear(); - self.extended_info = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetAuthFactorExtendedInfoRequest { - static instance: GetAuthFactorExtendedInfoRequest = GetAuthFactorExtendedInfoRequest { - account_id: ::protobuf::MessageField::none(), - auth_factor_label: ::std::string::String::new(), - extended_info: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -/// Nested message and enums of message `GetAuthFactorExtendedInfoRequest` -pub mod get_auth_factor_extended_info_request { - - #[derive(Clone,PartialEq,Debug)] - #[non_exhaustive] - // @@protoc_insertion_point(oneof:user_data_auth.GetAuthFactorExtendedInfoRequest.extended_info) - pub enum Extended_info { - // @@protoc_insertion_point(oneof_field:user_data_auth.GetAuthFactorExtendedInfoRequest.recovery_info_request) - RecoveryInfoRequest(super::RecoveryExtendedInfoRequest), - } - - impl ::protobuf::Oneof for Extended_info { - } - - impl Extended_info { - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetAuthFactorExtendedInfoReply) -pub struct GetAuthFactorExtendedInfoReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetAuthFactorExtendedInfoReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.GetAuthFactorExtendedInfoReply.error_info) - pub error_info: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.GetAuthFactorExtendedInfoReply.auth_factor) - pub auth_factor: ::protobuf::MessageField, - // message oneof groups - pub extended_info: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetAuthFactorExtendedInfoReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetAuthFactorExtendedInfoReply { - fn default() -> &'a GetAuthFactorExtendedInfoReply { - ::default_instance() - } -} - -impl GetAuthFactorExtendedInfoReply { - pub fn new() -> GetAuthFactorExtendedInfoReply { - ::std::default::Default::default() - } - - // .user_data_auth.RecoveryExtendedInfoReply recovery_info_reply = 4; - - pub fn recovery_info_reply(&self) -> &RecoveryExtendedInfoReply { - match self.extended_info { - ::std::option::Option::Some(get_auth_factor_extended_info_reply::Extended_info::RecoveryInfoReply(ref v)) => v, - _ => ::default_instance(), - } - } - - pub fn clear_recovery_info_reply(&mut self) { - self.extended_info = ::std::option::Option::None; - } - - pub fn has_recovery_info_reply(&self) -> bool { - match self.extended_info { - ::std::option::Option::Some(get_auth_factor_extended_info_reply::Extended_info::RecoveryInfoReply(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_recovery_info_reply(&mut self, v: RecoveryExtendedInfoReply) { - self.extended_info = ::std::option::Option::Some(get_auth_factor_extended_info_reply::Extended_info::RecoveryInfoReply(v)) - } - - // Mutable pointer to the field. - pub fn mut_recovery_info_reply(&mut self) -> &mut RecoveryExtendedInfoReply { - if let ::std::option::Option::Some(get_auth_factor_extended_info_reply::Extended_info::RecoveryInfoReply(_)) = self.extended_info { - } else { - self.extended_info = ::std::option::Option::Some(get_auth_factor_extended_info_reply::Extended_info::RecoveryInfoReply(RecoveryExtendedInfoReply::new())); - } - match self.extended_info { - ::std::option::Option::Some(get_auth_factor_extended_info_reply::Extended_info::RecoveryInfoReply(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_recovery_info_reply(&mut self) -> RecoveryExtendedInfoReply { - if self.has_recovery_info_reply() { - match self.extended_info.take() { - ::std::option::Option::Some(get_auth_factor_extended_info_reply::Extended_info::RecoveryInfoReply(v)) => v, - _ => panic!(), - } - } else { - RecoveryExtendedInfoReply::new() - } - } -} - -impl ::protobuf::Message for GetAuthFactorExtendedInfoReply { - const NAME: &'static str = "GetAuthFactorExtendedInfoReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.auth_factor)?; - }, - 34 => { - self.extended_info = ::std::option::Option::Some(get_auth_factor_extended_info_reply::Extended_info::RecoveryInfoReply(is.read_message()?)); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.auth_factor.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let ::std::option::Option::Some(ref v) = self.extended_info { - match v { - &get_auth_factor_extended_info_reply::Extended_info::RecoveryInfoReply(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }, - }; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - if let Some(v) = self.auth_factor.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - if let ::std::option::Option::Some(ref v) = self.extended_info { - match v { - &get_auth_factor_extended_info_reply::Extended_info::RecoveryInfoReply(ref v) => { - ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; - }, - }; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetAuthFactorExtendedInfoReply { - GetAuthFactorExtendedInfoReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.auth_factor.clear(); - self.extended_info = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetAuthFactorExtendedInfoReply { - static instance: GetAuthFactorExtendedInfoReply = GetAuthFactorExtendedInfoReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - auth_factor: ::protobuf::MessageField::none(), - extended_info: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -/// Nested message and enums of message `GetAuthFactorExtendedInfoReply` -pub mod get_auth_factor_extended_info_reply { - - #[derive(Clone,PartialEq,Debug)] - #[non_exhaustive] - // @@protoc_insertion_point(oneof:user_data_auth.GetAuthFactorExtendedInfoReply.extended_info) - pub enum Extended_info { - // @@protoc_insertion_point(oneof_field:user_data_auth.GetAuthFactorExtendedInfoReply.recovery_info_reply) - RecoveryInfoReply(super::RecoveryExtendedInfoReply), - } - - impl ::protobuf::Oneof for Extended_info { - } - - impl Extended_info { - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetRecoveryRequestRequest) -pub struct GetRecoveryRequestRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetRecoveryRequestRequest.auth_session_id) - pub auth_session_id: ::std::vec::Vec, - // @@protoc_insertion_point(field:user_data_auth.GetRecoveryRequestRequest.auth_factor_label) - pub auth_factor_label: ::std::string::String, - // @@protoc_insertion_point(field:user_data_auth.GetRecoveryRequestRequest.requestor_user_id_type) - pub requestor_user_id_type: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.GetRecoveryRequestRequest.requestor_user_id) - pub requestor_user_id: ::std::string::String, - // @@protoc_insertion_point(field:user_data_auth.GetRecoveryRequestRequest.gaia_access_token) - pub gaia_access_token: ::std::string::String, - // @@protoc_insertion_point(field:user_data_auth.GetRecoveryRequestRequest.gaia_reauth_proof_token) - pub gaia_reauth_proof_token: ::std::string::String, - // @@protoc_insertion_point(field:user_data_auth.GetRecoveryRequestRequest.epoch_response) - pub epoch_response: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetRecoveryRequestRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetRecoveryRequestRequest { - fn default() -> &'a GetRecoveryRequestRequest { - ::default_instance() - } -} - -impl GetRecoveryRequestRequest { - pub fn new() -> GetRecoveryRequestRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetRecoveryRequestRequest { - const NAME: &'static str = "GetRecoveryRequestRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.auth_session_id = is.read_bytes()?; - }, - 18 => { - self.auth_factor_label = is.read_string()?; - }, - 24 => { - self.requestor_user_id_type = is.read_enum_or_unknown()?; - }, - 34 => { - self.requestor_user_id = is.read_string()?; - }, - 42 => { - self.gaia_access_token = is.read_string()?; - }, - 50 => { - self.gaia_reauth_proof_token = is.read_string()?; - }, - 58 => { - self.epoch_response = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.auth_session_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.auth_session_id); - } - if !self.auth_factor_label.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.auth_factor_label); - } - if self.requestor_user_id_type != ::protobuf::EnumOrUnknown::new(get_recovery_request_request::UserType::UNKNOWN) { - my_size += ::protobuf::rt::int32_size(3, self.requestor_user_id_type.value()); - } - if !self.requestor_user_id.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.requestor_user_id); - } - if !self.gaia_access_token.is_empty() { - my_size += ::protobuf::rt::string_size(5, &self.gaia_access_token); - } - if !self.gaia_reauth_proof_token.is_empty() { - my_size += ::protobuf::rt::string_size(6, &self.gaia_reauth_proof_token); - } - if !self.epoch_response.is_empty() { - my_size += ::protobuf::rt::bytes_size(7, &self.epoch_response); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.auth_session_id.is_empty() { - os.write_bytes(1, &self.auth_session_id)?; - } - if !self.auth_factor_label.is_empty() { - os.write_string(2, &self.auth_factor_label)?; - } - if self.requestor_user_id_type != ::protobuf::EnumOrUnknown::new(get_recovery_request_request::UserType::UNKNOWN) { - os.write_enum(3, ::protobuf::EnumOrUnknown::value(&self.requestor_user_id_type))?; - } - if !self.requestor_user_id.is_empty() { - os.write_string(4, &self.requestor_user_id)?; - } - if !self.gaia_access_token.is_empty() { - os.write_string(5, &self.gaia_access_token)?; - } - if !self.gaia_reauth_proof_token.is_empty() { - os.write_string(6, &self.gaia_reauth_proof_token)?; - } - if !self.epoch_response.is_empty() { - os.write_bytes(7, &self.epoch_response)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetRecoveryRequestRequest { - GetRecoveryRequestRequest::new() - } - - fn clear(&mut self) { - self.auth_session_id.clear(); - self.auth_factor_label.clear(); - self.requestor_user_id_type = ::protobuf::EnumOrUnknown::new(get_recovery_request_request::UserType::UNKNOWN); - self.requestor_user_id.clear(); - self.gaia_access_token.clear(); - self.gaia_reauth_proof_token.clear(); - self.epoch_response.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetRecoveryRequestRequest { - static instance: GetRecoveryRequestRequest = GetRecoveryRequestRequest { - auth_session_id: ::std::vec::Vec::new(), - auth_factor_label: ::std::string::String::new(), - requestor_user_id_type: ::protobuf::EnumOrUnknown::from_i32(0), - requestor_user_id: ::std::string::String::new(), - gaia_access_token: ::std::string::String::new(), - gaia_reauth_proof_token: ::std::string::String::new(), - epoch_response: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -/// Nested message and enums of message `GetRecoveryRequestRequest` -pub mod get_recovery_request_request { - #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] - // @@protoc_insertion_point(enum:user_data_auth.GetRecoveryRequestRequest.UserType) - pub enum UserType { - // @@protoc_insertion_point(enum_value:user_data_auth.GetRecoveryRequestRequest.UserType.UNKNOWN) - UNKNOWN = 0, - // @@protoc_insertion_point(enum_value:user_data_auth.GetRecoveryRequestRequest.UserType.GAIA_ID) - GAIA_ID = 1, - } - - impl ::protobuf::Enum for UserType { - const NAME: &'static str = "UserType"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(UserType::UNKNOWN), - 1 => ::std::option::Option::Some(UserType::GAIA_ID), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [UserType] = &[ - UserType::UNKNOWN, - UserType::GAIA_ID, - ]; - } - - impl ::std::default::Default for UserType { - fn default() -> Self { - UserType::UNKNOWN - } - } - -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.GetRecoveryRequestReply) -pub struct GetRecoveryRequestReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.GetRecoveryRequestReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.GetRecoveryRequestReply.error_info) - pub error_info: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.GetRecoveryRequestReply.recovery_request) - pub recovery_request: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.GetRecoveryRequestReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetRecoveryRequestReply { - fn default() -> &'a GetRecoveryRequestReply { - ::default_instance() - } -} - -impl GetRecoveryRequestReply { - pub fn new() -> GetRecoveryRequestReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetRecoveryRequestReply { - const NAME: &'static str = "GetRecoveryRequestReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - 26 => { - self.recovery_request = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if !self.recovery_request.is_empty() { - my_size += ::protobuf::rt::bytes_size(3, &self.recovery_request); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - if !self.recovery_request.is_empty() { - os.write_bytes(3, &self.recovery_request)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetRecoveryRequestReply { - GetRecoveryRequestReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.recovery_request.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetRecoveryRequestReply { - static instance: GetRecoveryRequestReply = GetRecoveryRequestReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - recovery_request: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.CreateVaultKeysetRequest) -pub struct CreateVaultKeysetRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.CreateVaultKeysetRequest.auth_session_id) - pub auth_session_id: ::std::vec::Vec, - // @@protoc_insertion_point(field:user_data_auth.CreateVaultKeysetRequest.passkey) - pub passkey: ::std::vec::Vec, - // @@protoc_insertion_point(field:user_data_auth.CreateVaultKeysetRequest.key_label) - pub key_label: ::std::string::String, - // @@protoc_insertion_point(field:user_data_auth.CreateVaultKeysetRequest.type) - pub type_: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.CreateVaultKeysetRequest.disable_key_data) - pub disable_key_data: bool, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.CreateVaultKeysetRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CreateVaultKeysetRequest { - fn default() -> &'a CreateVaultKeysetRequest { - ::default_instance() - } -} - -impl CreateVaultKeysetRequest { - pub fn new() -> CreateVaultKeysetRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for CreateVaultKeysetRequest { - const NAME: &'static str = "CreateVaultKeysetRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.auth_session_id = is.read_bytes()?; - }, - 18 => { - self.passkey = is.read_bytes()?; - }, - 26 => { - self.key_label = is.read_string()?; - }, - 32 => { - self.type_ = is.read_enum_or_unknown()?; - }, - 40 => { - self.disable_key_data = is.read_bool()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.auth_session_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.auth_session_id); - } - if !self.passkey.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.passkey); - } - if !self.key_label.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.key_label); - } - if self.type_ != ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED) { - my_size += ::protobuf::rt::int32_size(4, self.type_.value()); - } - if self.disable_key_data != false { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.auth_session_id.is_empty() { - os.write_bytes(1, &self.auth_session_id)?; - } - if !self.passkey.is_empty() { - os.write_bytes(2, &self.passkey)?; - } - if !self.key_label.is_empty() { - os.write_string(3, &self.key_label)?; - } - if self.type_ != ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED) { - os.write_enum(4, ::protobuf::EnumOrUnknown::value(&self.type_))?; - } - if self.disable_key_data != false { - os.write_bool(5, self.disable_key_data)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CreateVaultKeysetRequest { - CreateVaultKeysetRequest::new() - } - - fn clear(&mut self) { - self.auth_session_id.clear(); - self.passkey.clear(); - self.key_label.clear(); - self.type_ = ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED); - self.disable_key_data = false; - self.special_fields.clear(); - } - - fn default_instance() -> &'static CreateVaultKeysetRequest { - static instance: CreateVaultKeysetRequest = CreateVaultKeysetRequest { - auth_session_id: ::std::vec::Vec::new(), - passkey: ::std::vec::Vec::new(), - key_label: ::std::string::String::new(), - type_: ::protobuf::EnumOrUnknown::from_i32(0), - disable_key_data: false, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.CreateVaultKeysetReply) -pub struct CreateVaultKeysetReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.CreateVaultKeysetReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.CreateVaultKeysetReply.error_info) - pub error_info: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.CreateVaultKeysetReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CreateVaultKeysetReply { - fn default() -> &'a CreateVaultKeysetReply { - ::default_instance() - } -} - -impl CreateVaultKeysetReply { - pub fn new() -> CreateVaultKeysetReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for CreateVaultKeysetReply { - const NAME: &'static str = "CreateVaultKeysetReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CreateVaultKeysetReply { - CreateVaultKeysetReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static CreateVaultKeysetReply { - static instance: CreateVaultKeysetReply = CreateVaultKeysetReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.PrepareAuthFactorRequest) -pub struct PrepareAuthFactorRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.PrepareAuthFactorRequest.auth_session_id) - pub auth_session_id: ::std::vec::Vec, - // @@protoc_insertion_point(field:user_data_auth.PrepareAuthFactorRequest.auth_factor_type) - pub auth_factor_type: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.PrepareAuthFactorRequest.purpose) - pub purpose: ::protobuf::EnumOrUnknown, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.PrepareAuthFactorRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PrepareAuthFactorRequest { - fn default() -> &'a PrepareAuthFactorRequest { - ::default_instance() - } -} - -impl PrepareAuthFactorRequest { - pub fn new() -> PrepareAuthFactorRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for PrepareAuthFactorRequest { - const NAME: &'static str = "PrepareAuthFactorRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.auth_session_id = is.read_bytes()?; - }, - 16 => { - self.auth_factor_type = is.read_enum_or_unknown()?; - }, - 24 => { - self.purpose = is.read_enum_or_unknown()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.auth_session_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.auth_session_id); - } - if self.auth_factor_type != ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED) { - my_size += ::protobuf::rt::int32_size(2, self.auth_factor_type.value()); - } - if self.purpose != ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorPreparePurpose::PURPOSE_UNSPECIFIED) { - my_size += ::protobuf::rt::int32_size(3, self.purpose.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.auth_session_id.is_empty() { - os.write_bytes(1, &self.auth_session_id)?; - } - if self.auth_factor_type != ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED) { - os.write_enum(2, ::protobuf::EnumOrUnknown::value(&self.auth_factor_type))?; - } - if self.purpose != ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorPreparePurpose::PURPOSE_UNSPECIFIED) { - os.write_enum(3, ::protobuf::EnumOrUnknown::value(&self.purpose))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PrepareAuthFactorRequest { - PrepareAuthFactorRequest::new() - } - - fn clear(&mut self) { - self.auth_session_id.clear(); - self.auth_factor_type = ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED); - self.purpose = ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorPreparePurpose::PURPOSE_UNSPECIFIED); - self.special_fields.clear(); - } - - fn default_instance() -> &'static PrepareAuthFactorRequest { - static instance: PrepareAuthFactorRequest = PrepareAuthFactorRequest { - auth_session_id: ::std::vec::Vec::new(), - auth_factor_type: ::protobuf::EnumOrUnknown::from_i32(0), - purpose: ::protobuf::EnumOrUnknown::from_i32(0), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.PrepareAuthFactorReply) -pub struct PrepareAuthFactorReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.PrepareAuthFactorReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.PrepareAuthFactorReply.error_info) - pub error_info: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.PrepareAuthFactorReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PrepareAuthFactorReply { - fn default() -> &'a PrepareAuthFactorReply { - ::default_instance() - } -} - -impl PrepareAuthFactorReply { - pub fn new() -> PrepareAuthFactorReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for PrepareAuthFactorReply { - const NAME: &'static str = "PrepareAuthFactorReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PrepareAuthFactorReply { - PrepareAuthFactorReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static PrepareAuthFactorReply { - static instance: PrepareAuthFactorReply = PrepareAuthFactorReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.TerminateAuthFactorRequest) -pub struct TerminateAuthFactorRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.TerminateAuthFactorRequest.auth_session_id) - pub auth_session_id: ::std::vec::Vec, - // @@protoc_insertion_point(field:user_data_auth.TerminateAuthFactorRequest.auth_factor_type) - pub auth_factor_type: ::protobuf::EnumOrUnknown, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.TerminateAuthFactorRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a TerminateAuthFactorRequest { - fn default() -> &'a TerminateAuthFactorRequest { - ::default_instance() - } -} - -impl TerminateAuthFactorRequest { - pub fn new() -> TerminateAuthFactorRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for TerminateAuthFactorRequest { - const NAME: &'static str = "TerminateAuthFactorRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.auth_session_id = is.read_bytes()?; - }, - 16 => { - self.auth_factor_type = is.read_enum_or_unknown()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.auth_session_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.auth_session_id); - } - if self.auth_factor_type != ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED) { - my_size += ::protobuf::rt::int32_size(2, self.auth_factor_type.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.auth_session_id.is_empty() { - os.write_bytes(1, &self.auth_session_id)?; - } - if self.auth_factor_type != ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED) { - os.write_enum(2, ::protobuf::EnumOrUnknown::value(&self.auth_factor_type))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> TerminateAuthFactorRequest { - TerminateAuthFactorRequest::new() - } - - fn clear(&mut self) { - self.auth_session_id.clear(); - self.auth_factor_type = ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED); - self.special_fields.clear(); - } - - fn default_instance() -> &'static TerminateAuthFactorRequest { - static instance: TerminateAuthFactorRequest = TerminateAuthFactorRequest { - auth_session_id: ::std::vec::Vec::new(), - auth_factor_type: ::protobuf::EnumOrUnknown::from_i32(0), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.TerminateAuthFactorReply) -pub struct TerminateAuthFactorReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.TerminateAuthFactorReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.TerminateAuthFactorReply.error_info) - pub error_info: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.TerminateAuthFactorReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a TerminateAuthFactorReply { - fn default() -> &'a TerminateAuthFactorReply { - ::default_instance() - } -} - -impl TerminateAuthFactorReply { - pub fn new() -> TerminateAuthFactorReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for TerminateAuthFactorReply { - const NAME: &'static str = "TerminateAuthFactorReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> TerminateAuthFactorReply { - TerminateAuthFactorReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static TerminateAuthFactorReply { - static instance: TerminateAuthFactorReply = TerminateAuthFactorReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.ModifyAuthFactorIntentsRequest) -pub struct ModifyAuthFactorIntentsRequest { - // message fields - // @@protoc_insertion_point(field:user_data_auth.ModifyAuthFactorIntentsRequest.auth_session_id) - pub auth_session_id: ::std::vec::Vec, - // @@protoc_insertion_point(field:user_data_auth.ModifyAuthFactorIntentsRequest.type) - pub type_: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.ModifyAuthFactorIntentsRequest.intents) - pub intents: ::std::vec::Vec<::protobuf::EnumOrUnknown>, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.ModifyAuthFactorIntentsRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ModifyAuthFactorIntentsRequest { - fn default() -> &'a ModifyAuthFactorIntentsRequest { - ::default_instance() - } -} - -impl ModifyAuthFactorIntentsRequest { - pub fn new() -> ModifyAuthFactorIntentsRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for ModifyAuthFactorIntentsRequest { - const NAME: &'static str = "ModifyAuthFactorIntentsRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.auth_session_id = is.read_bytes()?; - }, - 16 => { - self.type_ = is.read_enum_or_unknown()?; - }, - 24 => { - self.intents.push(is.read_enum_or_unknown()?); - }, - 26 => { - ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.intents)? - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.auth_session_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.auth_session_id); - } - if self.type_ != ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED) { - my_size += ::protobuf::rt::int32_size(2, self.type_.value()); - } - for value in &self.intents { - my_size += ::protobuf::rt::int32_size(3, value.value()); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.auth_session_id.is_empty() { - os.write_bytes(1, &self.auth_session_id)?; - } - if self.type_ != ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED) { - os.write_enum(2, ::protobuf::EnumOrUnknown::value(&self.type_))?; - } - for v in &self.intents { - os.write_enum(3, ::protobuf::EnumOrUnknown::value(v))?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ModifyAuthFactorIntentsRequest { - ModifyAuthFactorIntentsRequest::new() - } - - fn clear(&mut self) { - self.auth_session_id.clear(); - self.type_ = ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED); - self.intents.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ModifyAuthFactorIntentsRequest { - static instance: ModifyAuthFactorIntentsRequest = ModifyAuthFactorIntentsRequest { - auth_session_id: ::std::vec::Vec::new(), - type_: ::protobuf::EnumOrUnknown::from_i32(0), - intents: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.ModifyAuthFactorIntentsReply) -pub struct ModifyAuthFactorIntentsReply { - // message fields - // @@protoc_insertion_point(field:user_data_auth.ModifyAuthFactorIntentsReply.error) - pub error: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.ModifyAuthFactorIntentsReply.error_info) - pub error_info: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.ModifyAuthFactorIntentsReply.auth_intents) - pub auth_intents: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.ModifyAuthFactorIntentsReply.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ModifyAuthFactorIntentsReply { - fn default() -> &'a ModifyAuthFactorIntentsReply { - ::default_instance() - } -} - -impl ModifyAuthFactorIntentsReply { - pub fn new() -> ModifyAuthFactorIntentsReply { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for ModifyAuthFactorIntentsReply { - const NAME: &'static str = "ModifyAuthFactorIntentsReply"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.error = is.read_enum_or_unknown()?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.error_info)?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.auth_intents)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - my_size += ::protobuf::rt::int32_size(1, self.error.value()); - } - if let Some(v) = self.error_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.auth_intents.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.error != ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.error))?; - } - if let Some(v) = self.error_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - if let Some(v) = self.auth_intents.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ModifyAuthFactorIntentsReply { - ModifyAuthFactorIntentsReply::new() - } - - fn clear(&mut self) { - self.error = ::protobuf::EnumOrUnknown::new(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET); - self.error_info.clear(); - self.auth_intents.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ModifyAuthFactorIntentsReply { - static instance: ModifyAuthFactorIntentsReply = ModifyAuthFactorIntentsReply { - error: ::protobuf::EnumOrUnknown::from_i32(0), - error_info: ::protobuf::MessageField::none(), - auth_intents: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.AuthScanResult) -pub struct AuthScanResult { - // message oneof groups - pub scan_result: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.AuthScanResult.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a AuthScanResult { - fn default() -> &'a AuthScanResult { - ::default_instance() - } -} - -impl AuthScanResult { - pub fn new() -> AuthScanResult { - ::std::default::Default::default() - } - - // .user_data_auth.FingerprintScanResult fingerprint_result = 1; - - pub fn fingerprint_result(&self) -> FingerprintScanResult { - match self.scan_result { - ::std::option::Option::Some(auth_scan_result::Scan_result::FingerprintResult(v)) => ::protobuf::EnumOrUnknown::enum_value_or_default(&v), - _ => FingerprintScanResult::FINGERPRINT_SCAN_RESULT_SUCCESS, - } - } - - pub fn clear_fingerprint_result(&mut self) { - self.scan_result = ::std::option::Option::None; - } - - pub fn has_fingerprint_result(&self) -> bool { - match self.scan_result { - ::std::option::Option::Some(auth_scan_result::Scan_result::FingerprintResult(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_fingerprint_result(&mut self, v: FingerprintScanResult) { - self.scan_result = ::std::option::Option::Some(auth_scan_result::Scan_result::FingerprintResult(::protobuf::EnumOrUnknown::new(v))) - } -} - -impl ::protobuf::Message for AuthScanResult { - const NAME: &'static str = "AuthScanResult"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.scan_result = ::std::option::Option::Some(auth_scan_result::Scan_result::FingerprintResult(is.read_enum_or_unknown()?)); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let ::std::option::Option::Some(ref v) = self.scan_result { - match v { - &auth_scan_result::Scan_result::FingerprintResult(v) => { - my_size += ::protobuf::rt::int32_size(1, v.value()); - }, - }; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let ::std::option::Option::Some(ref v) = self.scan_result { - match v { - &auth_scan_result::Scan_result::FingerprintResult(v) => { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?; - }, - }; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> AuthScanResult { - AuthScanResult::new() - } - - fn clear(&mut self) { - self.scan_result = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static AuthScanResult { - static instance: AuthScanResult = AuthScanResult { - scan_result: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -/// Nested message and enums of message `AuthScanResult` -pub mod auth_scan_result { - - #[derive(Clone,PartialEq,Debug)] - #[non_exhaustive] - // @@protoc_insertion_point(oneof:user_data_auth.AuthScanResult.scan_result) - pub enum Scan_result { - // @@protoc_insertion_point(oneof_field:user_data_auth.AuthScanResult.fingerprint_result) - FingerprintResult(::protobuf::EnumOrUnknown), - } - - impl ::protobuf::Oneof for Scan_result { - } - - impl Scan_result { - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.FingerprintEnrollmentProgress) -pub struct FingerprintEnrollmentProgress { - // message fields - // @@protoc_insertion_point(field:user_data_auth.FingerprintEnrollmentProgress.percent_complete) - pub percent_complete: i32, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.FingerprintEnrollmentProgress.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a FingerprintEnrollmentProgress { - fn default() -> &'a FingerprintEnrollmentProgress { - ::default_instance() - } -} - -impl FingerprintEnrollmentProgress { - pub fn new() -> FingerprintEnrollmentProgress { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for FingerprintEnrollmentProgress { - const NAME: &'static str = "FingerprintEnrollmentProgress"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.percent_complete = is.read_int32()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.percent_complete != 0 { - my_size += ::protobuf::rt::int32_size(1, self.percent_complete); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.percent_complete != 0 { - os.write_int32(1, self.percent_complete)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> FingerprintEnrollmentProgress { - FingerprintEnrollmentProgress::new() - } - - fn clear(&mut self) { - self.percent_complete = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static FingerprintEnrollmentProgress { - static instance: FingerprintEnrollmentProgress = FingerprintEnrollmentProgress { - percent_complete: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.AuthEnrollmentProgress) -pub struct AuthEnrollmentProgress { - // message fields - // @@protoc_insertion_point(field:user_data_auth.AuthEnrollmentProgress.scan_result) - pub scan_result: ::protobuf::MessageField, - // @@protoc_insertion_point(field:user_data_auth.AuthEnrollmentProgress.done) - pub done: bool, - // message oneof groups - pub progress: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.AuthEnrollmentProgress.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a AuthEnrollmentProgress { - fn default() -> &'a AuthEnrollmentProgress { - ::default_instance() - } -} - -impl AuthEnrollmentProgress { - pub fn new() -> AuthEnrollmentProgress { - ::std::default::Default::default() - } - - // .user_data_auth.FingerprintEnrollmentProgress fingerprint_progress = 3; - - pub fn fingerprint_progress(&self) -> &FingerprintEnrollmentProgress { - match self.progress { - ::std::option::Option::Some(auth_enrollment_progress::Progress::FingerprintProgress(ref v)) => v, - _ => ::default_instance(), - } - } - - pub fn clear_fingerprint_progress(&mut self) { - self.progress = ::std::option::Option::None; - } - - pub fn has_fingerprint_progress(&self) -> bool { - match self.progress { - ::std::option::Option::Some(auth_enrollment_progress::Progress::FingerprintProgress(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_fingerprint_progress(&mut self, v: FingerprintEnrollmentProgress) { - self.progress = ::std::option::Option::Some(auth_enrollment_progress::Progress::FingerprintProgress(v)) - } - - // Mutable pointer to the field. - pub fn mut_fingerprint_progress(&mut self) -> &mut FingerprintEnrollmentProgress { - if let ::std::option::Option::Some(auth_enrollment_progress::Progress::FingerprintProgress(_)) = self.progress { - } else { - self.progress = ::std::option::Option::Some(auth_enrollment_progress::Progress::FingerprintProgress(FingerprintEnrollmentProgress::new())); - } - match self.progress { - ::std::option::Option::Some(auth_enrollment_progress::Progress::FingerprintProgress(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_fingerprint_progress(&mut self) -> FingerprintEnrollmentProgress { - if self.has_fingerprint_progress() { - match self.progress.take() { - ::std::option::Option::Some(auth_enrollment_progress::Progress::FingerprintProgress(v)) => v, - _ => panic!(), - } - } else { - FingerprintEnrollmentProgress::new() - } - } -} - -impl ::protobuf::Message for AuthEnrollmentProgress { - const NAME: &'static str = "AuthEnrollmentProgress"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.scan_result)?; - }, - 16 => { - self.done = is.read_bool()?; - }, - 26 => { - self.progress = ::std::option::Option::Some(auth_enrollment_progress::Progress::FingerprintProgress(is.read_message()?)); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.scan_result.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if self.done != false { - my_size += 1 + 1; - } - if let ::std::option::Option::Some(ref v) = self.progress { - match v { - &auth_enrollment_progress::Progress::FingerprintProgress(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }, - }; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.scan_result.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if self.done != false { - os.write_bool(2, self.done)?; - } - if let ::std::option::Option::Some(ref v) = self.progress { - match v { - &auth_enrollment_progress::Progress::FingerprintProgress(ref v) => { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - }, - }; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> AuthEnrollmentProgress { - AuthEnrollmentProgress::new() - } - - fn clear(&mut self) { - self.scan_result.clear(); - self.done = false; - self.progress = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static AuthEnrollmentProgress { - static instance: AuthEnrollmentProgress = AuthEnrollmentProgress { - scan_result: ::protobuf::MessageField::none(), - done: false, - progress: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -/// Nested message and enums of message `AuthEnrollmentProgress` -pub mod auth_enrollment_progress { - - #[derive(Clone,PartialEq,Debug)] - #[non_exhaustive] - // @@protoc_insertion_point(oneof:user_data_auth.AuthEnrollmentProgress.progress) - pub enum Progress { - // @@protoc_insertion_point(oneof_field:user_data_auth.AuthEnrollmentProgress.fingerprint_progress) - FingerprintProgress(super::FingerprintEnrollmentProgress), - } - - impl ::protobuf::Oneof for Progress { - } - - impl Progress { - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.AuthScanDone) -pub struct AuthScanDone { - // message fields - // @@protoc_insertion_point(field:user_data_auth.AuthScanDone.scan_result) - pub scan_result: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.AuthScanDone.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a AuthScanDone { - fn default() -> &'a AuthScanDone { - ::default_instance() - } -} - -impl AuthScanDone { - pub fn new() -> AuthScanDone { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for AuthScanDone { - const NAME: &'static str = "AuthScanDone"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.scan_result)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.scan_result.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.scan_result.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> AuthScanDone { - AuthScanDone::new() - } - - fn clear(&mut self) { - self.scan_result.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static AuthScanDone { - static instance: AuthScanDone = AuthScanDone { - scan_result: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.PrepareAuthFactorForAddProgress) -pub struct PrepareAuthFactorForAddProgress { - // message fields - // @@protoc_insertion_point(field:user_data_auth.PrepareAuthFactorForAddProgress.auth_factor_type) - pub auth_factor_type: ::protobuf::EnumOrUnknown, - // message oneof groups - pub progress: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.PrepareAuthFactorForAddProgress.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PrepareAuthFactorForAddProgress { - fn default() -> &'a PrepareAuthFactorForAddProgress { - ::default_instance() - } -} - -impl PrepareAuthFactorForAddProgress { - pub fn new() -> PrepareAuthFactorForAddProgress { - ::std::default::Default::default() - } - - // .user_data_auth.AuthEnrollmentProgress biometrics_progress = 2; - - pub fn biometrics_progress(&self) -> &AuthEnrollmentProgress { - match self.progress { - ::std::option::Option::Some(prepare_auth_factor_for_add_progress::Progress::BiometricsProgress(ref v)) => v, - _ => ::default_instance(), - } - } - - pub fn clear_biometrics_progress(&mut self) { - self.progress = ::std::option::Option::None; - } - - pub fn has_biometrics_progress(&self) -> bool { - match self.progress { - ::std::option::Option::Some(prepare_auth_factor_for_add_progress::Progress::BiometricsProgress(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_biometrics_progress(&mut self, v: AuthEnrollmentProgress) { - self.progress = ::std::option::Option::Some(prepare_auth_factor_for_add_progress::Progress::BiometricsProgress(v)) - } - - // Mutable pointer to the field. - pub fn mut_biometrics_progress(&mut self) -> &mut AuthEnrollmentProgress { - if let ::std::option::Option::Some(prepare_auth_factor_for_add_progress::Progress::BiometricsProgress(_)) = self.progress { - } else { - self.progress = ::std::option::Option::Some(prepare_auth_factor_for_add_progress::Progress::BiometricsProgress(AuthEnrollmentProgress::new())); - } - match self.progress { - ::std::option::Option::Some(prepare_auth_factor_for_add_progress::Progress::BiometricsProgress(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_biometrics_progress(&mut self) -> AuthEnrollmentProgress { - if self.has_biometrics_progress() { - match self.progress.take() { - ::std::option::Option::Some(prepare_auth_factor_for_add_progress::Progress::BiometricsProgress(v)) => v, - _ => panic!(), - } - } else { - AuthEnrollmentProgress::new() - } - } -} - -impl ::protobuf::Message for PrepareAuthFactorForAddProgress { - const NAME: &'static str = "PrepareAuthFactorForAddProgress"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.auth_factor_type = is.read_enum_or_unknown()?; - }, - 18 => { - self.progress = ::std::option::Option::Some(prepare_auth_factor_for_add_progress::Progress::BiometricsProgress(is.read_message()?)); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.auth_factor_type != ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED) { - my_size += ::protobuf::rt::int32_size(1, self.auth_factor_type.value()); - } - if let ::std::option::Option::Some(ref v) = self.progress { - match v { - &prepare_auth_factor_for_add_progress::Progress::BiometricsProgress(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }, - }; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.auth_factor_type != ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.auth_factor_type))?; - } - if let ::std::option::Option::Some(ref v) = self.progress { - match v { - &prepare_auth_factor_for_add_progress::Progress::BiometricsProgress(ref v) => { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - }, - }; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PrepareAuthFactorForAddProgress { - PrepareAuthFactorForAddProgress::new() - } - - fn clear(&mut self) { - self.auth_factor_type = ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED); - self.progress = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static PrepareAuthFactorForAddProgress { - static instance: PrepareAuthFactorForAddProgress = PrepareAuthFactorForAddProgress { - auth_factor_type: ::protobuf::EnumOrUnknown::from_i32(0), - progress: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -/// Nested message and enums of message `PrepareAuthFactorForAddProgress` -pub mod prepare_auth_factor_for_add_progress { - - #[derive(Clone,PartialEq,Debug)] - #[non_exhaustive] - // @@protoc_insertion_point(oneof:user_data_auth.PrepareAuthFactorForAddProgress.progress) - pub enum Progress { - // @@protoc_insertion_point(oneof_field:user_data_auth.PrepareAuthFactorForAddProgress.biometrics_progress) - BiometricsProgress(super::AuthEnrollmentProgress), - } - - impl ::protobuf::Oneof for Progress { - } - - impl Progress { - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.PrepareAuthFactorForAuthProgress) -pub struct PrepareAuthFactorForAuthProgress { - // message fields - // @@protoc_insertion_point(field:user_data_auth.PrepareAuthFactorForAuthProgress.auth_factor_type) - pub auth_factor_type: ::protobuf::EnumOrUnknown, - // message oneof groups - pub progress: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.PrepareAuthFactorForAuthProgress.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PrepareAuthFactorForAuthProgress { - fn default() -> &'a PrepareAuthFactorForAuthProgress { - ::default_instance() - } -} - -impl PrepareAuthFactorForAuthProgress { - pub fn new() -> PrepareAuthFactorForAuthProgress { - ::std::default::Default::default() - } - - // .user_data_auth.AuthScanDone biometrics_progress = 2; - - pub fn biometrics_progress(&self) -> &AuthScanDone { - match self.progress { - ::std::option::Option::Some(prepare_auth_factor_for_auth_progress::Progress::BiometricsProgress(ref v)) => v, - _ => ::default_instance(), - } - } - - pub fn clear_biometrics_progress(&mut self) { - self.progress = ::std::option::Option::None; - } - - pub fn has_biometrics_progress(&self) -> bool { - match self.progress { - ::std::option::Option::Some(prepare_auth_factor_for_auth_progress::Progress::BiometricsProgress(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_biometrics_progress(&mut self, v: AuthScanDone) { - self.progress = ::std::option::Option::Some(prepare_auth_factor_for_auth_progress::Progress::BiometricsProgress(v)) - } - - // Mutable pointer to the field. - pub fn mut_biometrics_progress(&mut self) -> &mut AuthScanDone { - if let ::std::option::Option::Some(prepare_auth_factor_for_auth_progress::Progress::BiometricsProgress(_)) = self.progress { - } else { - self.progress = ::std::option::Option::Some(prepare_auth_factor_for_auth_progress::Progress::BiometricsProgress(AuthScanDone::new())); - } - match self.progress { - ::std::option::Option::Some(prepare_auth_factor_for_auth_progress::Progress::BiometricsProgress(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_biometrics_progress(&mut self) -> AuthScanDone { - if self.has_biometrics_progress() { - match self.progress.take() { - ::std::option::Option::Some(prepare_auth_factor_for_auth_progress::Progress::BiometricsProgress(v)) => v, - _ => panic!(), - } - } else { - AuthScanDone::new() - } - } -} - -impl ::protobuf::Message for PrepareAuthFactorForAuthProgress { - const NAME: &'static str = "PrepareAuthFactorForAuthProgress"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.auth_factor_type = is.read_enum_or_unknown()?; - }, - 18 => { - self.progress = ::std::option::Option::Some(prepare_auth_factor_for_auth_progress::Progress::BiometricsProgress(is.read_message()?)); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.auth_factor_type != ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED) { - my_size += ::protobuf::rt::int32_size(1, self.auth_factor_type.value()); - } - if let ::std::option::Option::Some(ref v) = self.progress { - match v { - &prepare_auth_factor_for_auth_progress::Progress::BiometricsProgress(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }, - }; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.auth_factor_type != ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.auth_factor_type))?; - } - if let ::std::option::Option::Some(ref v) = self.progress { - match v { - &prepare_auth_factor_for_auth_progress::Progress::BiometricsProgress(ref v) => { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - }, - }; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PrepareAuthFactorForAuthProgress { - PrepareAuthFactorForAuthProgress::new() - } - - fn clear(&mut self) { - self.auth_factor_type = ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED); - self.progress = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static PrepareAuthFactorForAuthProgress { - static instance: PrepareAuthFactorForAuthProgress = PrepareAuthFactorForAuthProgress { - auth_factor_type: ::protobuf::EnumOrUnknown::from_i32(0), - progress: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -/// Nested message and enums of message `PrepareAuthFactorForAuthProgress` -pub mod prepare_auth_factor_for_auth_progress { - - #[derive(Clone,PartialEq,Debug)] - #[non_exhaustive] - // @@protoc_insertion_point(oneof:user_data_auth.PrepareAuthFactorForAuthProgress.progress) - pub enum Progress { - // @@protoc_insertion_point(oneof_field:user_data_auth.PrepareAuthFactorForAuthProgress.biometrics_progress) - BiometricsProgress(super::AuthScanDone), - } - - impl ::protobuf::Oneof for Progress { - } - - impl Progress { - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.PrepareAuthFactorProgress) -pub struct PrepareAuthFactorProgress { - // message fields - // @@protoc_insertion_point(field:user_data_auth.PrepareAuthFactorProgress.purpose) - pub purpose: ::protobuf::EnumOrUnknown, - // message oneof groups - pub progress: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.PrepareAuthFactorProgress.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PrepareAuthFactorProgress { - fn default() -> &'a PrepareAuthFactorProgress { - ::default_instance() - } -} - -impl PrepareAuthFactorProgress { - pub fn new() -> PrepareAuthFactorProgress { - ::std::default::Default::default() - } - - // .user_data_auth.PrepareAuthFactorForAddProgress add_progress = 2; - - pub fn add_progress(&self) -> &PrepareAuthFactorForAddProgress { - match self.progress { - ::std::option::Option::Some(prepare_auth_factor_progress::Progress::AddProgress(ref v)) => v, - _ => ::default_instance(), - } - } - - pub fn clear_add_progress(&mut self) { - self.progress = ::std::option::Option::None; - } - - pub fn has_add_progress(&self) -> bool { - match self.progress { - ::std::option::Option::Some(prepare_auth_factor_progress::Progress::AddProgress(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_add_progress(&mut self, v: PrepareAuthFactorForAddProgress) { - self.progress = ::std::option::Option::Some(prepare_auth_factor_progress::Progress::AddProgress(v)) - } - - // Mutable pointer to the field. - pub fn mut_add_progress(&mut self) -> &mut PrepareAuthFactorForAddProgress { - if let ::std::option::Option::Some(prepare_auth_factor_progress::Progress::AddProgress(_)) = self.progress { - } else { - self.progress = ::std::option::Option::Some(prepare_auth_factor_progress::Progress::AddProgress(PrepareAuthFactorForAddProgress::new())); - } - match self.progress { - ::std::option::Option::Some(prepare_auth_factor_progress::Progress::AddProgress(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_add_progress(&mut self) -> PrepareAuthFactorForAddProgress { - if self.has_add_progress() { - match self.progress.take() { - ::std::option::Option::Some(prepare_auth_factor_progress::Progress::AddProgress(v)) => v, - _ => panic!(), - } - } else { - PrepareAuthFactorForAddProgress::new() - } - } - - // .user_data_auth.PrepareAuthFactorForAuthProgress auth_progress = 3; - - pub fn auth_progress(&self) -> &PrepareAuthFactorForAuthProgress { - match self.progress { - ::std::option::Option::Some(prepare_auth_factor_progress::Progress::AuthProgress(ref v)) => v, - _ => ::default_instance(), - } - } - - pub fn clear_auth_progress(&mut self) { - self.progress = ::std::option::Option::None; - } - - pub fn has_auth_progress(&self) -> bool { - match self.progress { - ::std::option::Option::Some(prepare_auth_factor_progress::Progress::AuthProgress(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_auth_progress(&mut self, v: PrepareAuthFactorForAuthProgress) { - self.progress = ::std::option::Option::Some(prepare_auth_factor_progress::Progress::AuthProgress(v)) - } - - // Mutable pointer to the field. - pub fn mut_auth_progress(&mut self) -> &mut PrepareAuthFactorForAuthProgress { - if let ::std::option::Option::Some(prepare_auth_factor_progress::Progress::AuthProgress(_)) = self.progress { - } else { - self.progress = ::std::option::Option::Some(prepare_auth_factor_progress::Progress::AuthProgress(PrepareAuthFactorForAuthProgress::new())); - } - match self.progress { - ::std::option::Option::Some(prepare_auth_factor_progress::Progress::AuthProgress(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_auth_progress(&mut self) -> PrepareAuthFactorForAuthProgress { - if self.has_auth_progress() { - match self.progress.take() { - ::std::option::Option::Some(prepare_auth_factor_progress::Progress::AuthProgress(v)) => v, - _ => panic!(), - } - } else { - PrepareAuthFactorForAuthProgress::new() - } - } -} - -impl ::protobuf::Message for PrepareAuthFactorProgress { - const NAME: &'static str = "PrepareAuthFactorProgress"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.purpose = is.read_enum_or_unknown()?; - }, - 18 => { - self.progress = ::std::option::Option::Some(prepare_auth_factor_progress::Progress::AddProgress(is.read_message()?)); - }, - 26 => { - self.progress = ::std::option::Option::Some(prepare_auth_factor_progress::Progress::AuthProgress(is.read_message()?)); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.purpose != ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorPreparePurpose::PURPOSE_UNSPECIFIED) { - my_size += ::protobuf::rt::int32_size(1, self.purpose.value()); - } - if let ::std::option::Option::Some(ref v) = self.progress { - match v { - &prepare_auth_factor_progress::Progress::AddProgress(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }, - &prepare_auth_factor_progress::Progress::AuthProgress(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }, - }; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.purpose != ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorPreparePurpose::PURPOSE_UNSPECIFIED) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.purpose))?; - } - if let ::std::option::Option::Some(ref v) = self.progress { - match v { - &prepare_auth_factor_progress::Progress::AddProgress(ref v) => { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - }, - &prepare_auth_factor_progress::Progress::AuthProgress(ref v) => { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - }, - }; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PrepareAuthFactorProgress { - PrepareAuthFactorProgress::new() - } - - fn clear(&mut self) { - self.purpose = ::protobuf::EnumOrUnknown::new(super::auth_factor::AuthFactorPreparePurpose::PURPOSE_UNSPECIFIED); - self.progress = ::std::option::Option::None; - self.progress = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static PrepareAuthFactorProgress { - static instance: PrepareAuthFactorProgress = PrepareAuthFactorProgress { - purpose: ::protobuf::EnumOrUnknown::from_i32(0), - progress: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -/// Nested message and enums of message `PrepareAuthFactorProgress` -pub mod prepare_auth_factor_progress { - - #[derive(Clone,PartialEq,Debug)] - #[non_exhaustive] - // @@protoc_insertion_point(oneof:user_data_auth.PrepareAuthFactorProgress.progress) - pub enum Progress { - // @@protoc_insertion_point(oneof_field:user_data_auth.PrepareAuthFactorProgress.add_progress) - AddProgress(super::PrepareAuthFactorForAddProgress), - // @@protoc_insertion_point(oneof_field:user_data_auth.PrepareAuthFactorProgress.auth_progress) - AuthProgress(super::PrepareAuthFactorForAuthProgress), - } - - impl ::protobuf::Oneof for Progress { - } - - impl Progress { - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:user_data_auth.CryptohomeErrorCode) -pub enum CryptohomeErrorCode { - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_NOT_SET) - CRYPTOHOME_ERROR_NOT_SET = 0, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_ACCOUNT_NOT_FOUND) - CRYPTOHOME_ERROR_ACCOUNT_NOT_FOUND = 1, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_AUTHORIZATION_KEY_NOT_FOUND) - CRYPTOHOME_ERROR_AUTHORIZATION_KEY_NOT_FOUND = 2, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_AUTHORIZATION_KEY_FAILED) - CRYPTOHOME_ERROR_AUTHORIZATION_KEY_FAILED = 3, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_NOT_IMPLEMENTED) - CRYPTOHOME_ERROR_NOT_IMPLEMENTED = 4, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_MOUNT_FATAL) - CRYPTOHOME_ERROR_MOUNT_FATAL = 5, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_MOUNT_MOUNT_POINT_BUSY) - CRYPTOHOME_ERROR_MOUNT_MOUNT_POINT_BUSY = 6, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_TPM_COMM_ERROR) - CRYPTOHOME_ERROR_TPM_COMM_ERROR = 7, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_TPM_DEFEND_LOCK) - CRYPTOHOME_ERROR_TPM_DEFEND_LOCK = 8, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_TPM_NEEDS_REBOOT) - CRYPTOHOME_ERROR_TPM_NEEDS_REBOOT = 9, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_AUTHORIZATION_KEY_DENIED) - CRYPTOHOME_ERROR_AUTHORIZATION_KEY_DENIED = 10, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_KEY_QUOTA_EXCEEDED) - CRYPTOHOME_ERROR_KEY_QUOTA_EXCEEDED = 11, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_KEY_LABEL_EXISTS) - CRYPTOHOME_ERROR_KEY_LABEL_EXISTS = 12, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_BACKING_STORE_FAILURE) - CRYPTOHOME_ERROR_BACKING_STORE_FAILURE = 13, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_UPDATE_SIGNATURE_INVALID) - CRYPTOHOME_ERROR_UPDATE_SIGNATURE_INVALID = 14, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_KEY_NOT_FOUND) - CRYPTOHOME_ERROR_KEY_NOT_FOUND = 15, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_LOCKBOX_SIGNATURE_INVALID) - CRYPTOHOME_ERROR_LOCKBOX_SIGNATURE_INVALID = 16, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_LOCKBOX_CANNOT_SIGN) - CRYPTOHOME_ERROR_LOCKBOX_CANNOT_SIGN = 17, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_BOOT_ATTRIBUTE_NOT_FOUND) - CRYPTOHOME_ERROR_BOOT_ATTRIBUTE_NOT_FOUND = 18, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_BOOT_ATTRIBUTES_CANNOT_SIGN) - CRYPTOHOME_ERROR_BOOT_ATTRIBUTES_CANNOT_SIGN = 19, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_TPM_EK_NOT_AVAILABLE) - CRYPTOHOME_ERROR_TPM_EK_NOT_AVAILABLE = 20, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_ATTESTATION_NOT_READY) - CRYPTOHOME_ERROR_ATTESTATION_NOT_READY = 21, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_CANNOT_CONNECT_TO_CA) - CRYPTOHOME_ERROR_CANNOT_CONNECT_TO_CA = 22, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_CA_REFUSED_ENROLLMENT) - CRYPTOHOME_ERROR_CA_REFUSED_ENROLLMENT = 23, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_CA_REFUSED_CERTIFICATE) - CRYPTOHOME_ERROR_CA_REFUSED_CERTIFICATE = 24, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_INTERNAL_ATTESTATION_ERROR) - CRYPTOHOME_ERROR_INTERNAL_ATTESTATION_ERROR = 25, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_INVALID) - CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_INVALID = 26, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_CANNOT_STORE) - CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_CANNOT_STORE = 27, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_CANNOT_REMOVE) - CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_CANNOT_REMOVE = 28, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_MOUNT_OLD_ENCRYPTION) - CRYPTOHOME_ERROR_MOUNT_OLD_ENCRYPTION = 29, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_MOUNT_PREVIOUS_MIGRATION_INCOMPLETE) - CRYPTOHOME_ERROR_MOUNT_PREVIOUS_MIGRATION_INCOMPLETE = 30, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_MIGRATE_KEY_FAILED) - CRYPTOHOME_ERROR_MIGRATE_KEY_FAILED = 31, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_REMOVE_FAILED) - CRYPTOHOME_ERROR_REMOVE_FAILED = 32, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_INVALID_ARGUMENT) - CRYPTOHOME_ERROR_INVALID_ARGUMENT = 33, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_GET_FAILED) - CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_GET_FAILED = 34, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_SET_FAILED) - CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_SET_FAILED = 35, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_FINALIZE_FAILED) - CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_FINALIZE_FAILED = 36, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_UPDATE_USER_ACTIVITY_TIMESTAMP_FAILED) - CRYPTOHOME_ERROR_UPDATE_USER_ACTIVITY_TIMESTAMP_FAILED = 37, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_FAILED_TO_READ_PCR) - CRYPTOHOME_ERROR_FAILED_TO_READ_PCR = 38, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_PCR_ALREADY_EXTENDED) - CRYPTOHOME_ERROR_PCR_ALREADY_EXTENDED = 39, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_FAILED_TO_EXTEND_PCR) - CRYPTOHOME_ERROR_FAILED_TO_EXTEND_PCR = 40, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_TPM_UPDATE_REQUIRED) - CRYPTOHOME_ERROR_TPM_UPDATE_REQUIRED = 41, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_FINGERPRINT_ERROR_INTERNAL) - CRYPTOHOME_ERROR_FINGERPRINT_ERROR_INTERNAL = 42, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_FINGERPRINT_RETRY_REQUIRED) - CRYPTOHOME_ERROR_FINGERPRINT_RETRY_REQUIRED = 43, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_FINGERPRINT_DENIED) - CRYPTOHOME_ERROR_FINGERPRINT_DENIED = 44, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_VAULT_UNRECOVERABLE) - CRYPTOHOME_ERROR_VAULT_UNRECOVERABLE = 45, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_FIDO_MAKE_CREDENTIAL_FAILED) - CRYPTOHOME_ERROR_FIDO_MAKE_CREDENTIAL_FAILED = 46, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_FIDO_GET_ASSERTION_FAILED) - CRYPTOHOME_ERROR_FIDO_GET_ASSERTION_FAILED = 47, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_TOKEN_SERIALIZATION_FAILED) - CRYPTOHOME_TOKEN_SERIALIZATION_FAILED = 48, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_INVALID_AUTH_SESSION_TOKEN) - CRYPTOHOME_INVALID_AUTH_SESSION_TOKEN = 49, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ADD_CREDENTIALS_FAILED) - CRYPTOHOME_ADD_CREDENTIALS_FAILED = 50, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_UNAUTHENTICATED_AUTH_SESSION) - CRYPTOHOME_ERROR_UNAUTHENTICATED_AUTH_SESSION = 51, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_UNKNOWN_LEGACY) - CRYPTOHOME_ERROR_UNKNOWN_LEGACY = 52, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_UNUSABLE_VAULT) - CRYPTOHOME_ERROR_UNUSABLE_VAULT = 53, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_REMOVE_CREDENTIALS_FAILED) - CRYPTOHOME_REMOVE_CREDENTIALS_FAILED = 54, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_UPDATE_CREDENTIALS_FAILED) - CRYPTOHOME_UPDATE_CREDENTIALS_FAILED = 55, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_RECOVERY_TRANSIENT) - CRYPTOHOME_ERROR_RECOVERY_TRANSIENT = 56, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_RECOVERY_FATAL) - CRYPTOHOME_ERROR_RECOVERY_FATAL = 57, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_BIOMETRICS_BUSY) - CRYPTOHOME_ERROR_BIOMETRICS_BUSY = 58, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_CREDENTIAL_LOCKED) - CRYPTOHOME_ERROR_CREDENTIAL_LOCKED = 59, - // @@protoc_insertion_point(enum_value:user_data_auth.CryptohomeErrorCode.CRYPTOHOME_ERROR_CREDENTIAL_EXPIRED) - CRYPTOHOME_ERROR_CREDENTIAL_EXPIRED = 60, -} - -impl ::protobuf::Enum for CryptohomeErrorCode { - const NAME: &'static str = "CryptohomeErrorCode"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET), - 1 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_ACCOUNT_NOT_FOUND), - 2 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_AUTHORIZATION_KEY_NOT_FOUND), - 3 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_AUTHORIZATION_KEY_FAILED), - 4 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_IMPLEMENTED), - 5 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_MOUNT_FATAL), - 6 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_MOUNT_MOUNT_POINT_BUSY), - 7 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_TPM_COMM_ERROR), - 8 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_TPM_DEFEND_LOCK), - 9 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_TPM_NEEDS_REBOOT), - 10 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_AUTHORIZATION_KEY_DENIED), - 11 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_KEY_QUOTA_EXCEEDED), - 12 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_KEY_LABEL_EXISTS), - 13 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_BACKING_STORE_FAILURE), - 14 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_UPDATE_SIGNATURE_INVALID), - 15 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_KEY_NOT_FOUND), - 16 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_LOCKBOX_SIGNATURE_INVALID), - 17 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_LOCKBOX_CANNOT_SIGN), - 18 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_BOOT_ATTRIBUTE_NOT_FOUND), - 19 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_BOOT_ATTRIBUTES_CANNOT_SIGN), - 20 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_TPM_EK_NOT_AVAILABLE), - 21 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_ATTESTATION_NOT_READY), - 22 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_CANNOT_CONNECT_TO_CA), - 23 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_CA_REFUSED_ENROLLMENT), - 24 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_CA_REFUSED_CERTIFICATE), - 25 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_INTERNAL_ATTESTATION_ERROR), - 26 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_INVALID), - 27 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_CANNOT_STORE), - 28 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_CANNOT_REMOVE), - 29 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_MOUNT_OLD_ENCRYPTION), - 30 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_MOUNT_PREVIOUS_MIGRATION_INCOMPLETE), - 31 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_MIGRATE_KEY_FAILED), - 32 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_REMOVE_FAILED), - 33 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_INVALID_ARGUMENT), - 34 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_GET_FAILED), - 35 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_SET_FAILED), - 36 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_FINALIZE_FAILED), - 37 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_UPDATE_USER_ACTIVITY_TIMESTAMP_FAILED), - 38 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_FAILED_TO_READ_PCR), - 39 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_PCR_ALREADY_EXTENDED), - 40 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_FAILED_TO_EXTEND_PCR), - 41 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_TPM_UPDATE_REQUIRED), - 42 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_FINGERPRINT_ERROR_INTERNAL), - 43 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_FINGERPRINT_RETRY_REQUIRED), - 44 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_FINGERPRINT_DENIED), - 45 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_VAULT_UNRECOVERABLE), - 46 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_FIDO_MAKE_CREDENTIAL_FAILED), - 47 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_FIDO_GET_ASSERTION_FAILED), - 48 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_TOKEN_SERIALIZATION_FAILED), - 49 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_INVALID_AUTH_SESSION_TOKEN), - 50 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ADD_CREDENTIALS_FAILED), - 51 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_UNAUTHENTICATED_AUTH_SESSION), - 52 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_UNKNOWN_LEGACY), - 53 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_UNUSABLE_VAULT), - 54 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_REMOVE_CREDENTIALS_FAILED), - 55 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_UPDATE_CREDENTIALS_FAILED), - 56 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_RECOVERY_TRANSIENT), - 57 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_RECOVERY_FATAL), - 58 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_BIOMETRICS_BUSY), - 59 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_CREDENTIAL_LOCKED), - 60 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_CREDENTIAL_EXPIRED), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [CryptohomeErrorCode] = &[ - CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET, - CryptohomeErrorCode::CRYPTOHOME_ERROR_ACCOUNT_NOT_FOUND, - CryptohomeErrorCode::CRYPTOHOME_ERROR_AUTHORIZATION_KEY_NOT_FOUND, - CryptohomeErrorCode::CRYPTOHOME_ERROR_AUTHORIZATION_KEY_FAILED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_IMPLEMENTED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_MOUNT_FATAL, - CryptohomeErrorCode::CRYPTOHOME_ERROR_MOUNT_MOUNT_POINT_BUSY, - CryptohomeErrorCode::CRYPTOHOME_ERROR_TPM_COMM_ERROR, - CryptohomeErrorCode::CRYPTOHOME_ERROR_TPM_DEFEND_LOCK, - CryptohomeErrorCode::CRYPTOHOME_ERROR_TPM_NEEDS_REBOOT, - CryptohomeErrorCode::CRYPTOHOME_ERROR_AUTHORIZATION_KEY_DENIED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_KEY_QUOTA_EXCEEDED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_KEY_LABEL_EXISTS, - CryptohomeErrorCode::CRYPTOHOME_ERROR_BACKING_STORE_FAILURE, - CryptohomeErrorCode::CRYPTOHOME_ERROR_UPDATE_SIGNATURE_INVALID, - CryptohomeErrorCode::CRYPTOHOME_ERROR_KEY_NOT_FOUND, - CryptohomeErrorCode::CRYPTOHOME_ERROR_LOCKBOX_SIGNATURE_INVALID, - CryptohomeErrorCode::CRYPTOHOME_ERROR_LOCKBOX_CANNOT_SIGN, - CryptohomeErrorCode::CRYPTOHOME_ERROR_BOOT_ATTRIBUTE_NOT_FOUND, - CryptohomeErrorCode::CRYPTOHOME_ERROR_BOOT_ATTRIBUTES_CANNOT_SIGN, - CryptohomeErrorCode::CRYPTOHOME_ERROR_TPM_EK_NOT_AVAILABLE, - CryptohomeErrorCode::CRYPTOHOME_ERROR_ATTESTATION_NOT_READY, - CryptohomeErrorCode::CRYPTOHOME_ERROR_CANNOT_CONNECT_TO_CA, - CryptohomeErrorCode::CRYPTOHOME_ERROR_CA_REFUSED_ENROLLMENT, - CryptohomeErrorCode::CRYPTOHOME_ERROR_CA_REFUSED_CERTIFICATE, - CryptohomeErrorCode::CRYPTOHOME_ERROR_INTERNAL_ATTESTATION_ERROR, - CryptohomeErrorCode::CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_INVALID, - CryptohomeErrorCode::CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_CANNOT_STORE, - CryptohomeErrorCode::CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_CANNOT_REMOVE, - CryptohomeErrorCode::CRYPTOHOME_ERROR_MOUNT_OLD_ENCRYPTION, - CryptohomeErrorCode::CRYPTOHOME_ERROR_MOUNT_PREVIOUS_MIGRATION_INCOMPLETE, - CryptohomeErrorCode::CRYPTOHOME_ERROR_MIGRATE_KEY_FAILED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_REMOVE_FAILED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_INVALID_ARGUMENT, - CryptohomeErrorCode::CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_GET_FAILED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_SET_FAILED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_FINALIZE_FAILED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_UPDATE_USER_ACTIVITY_TIMESTAMP_FAILED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_FAILED_TO_READ_PCR, - CryptohomeErrorCode::CRYPTOHOME_ERROR_PCR_ALREADY_EXTENDED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_FAILED_TO_EXTEND_PCR, - CryptohomeErrorCode::CRYPTOHOME_ERROR_TPM_UPDATE_REQUIRED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_FINGERPRINT_ERROR_INTERNAL, - CryptohomeErrorCode::CRYPTOHOME_ERROR_FINGERPRINT_RETRY_REQUIRED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_FINGERPRINT_DENIED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_VAULT_UNRECOVERABLE, - CryptohomeErrorCode::CRYPTOHOME_ERROR_FIDO_MAKE_CREDENTIAL_FAILED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_FIDO_GET_ASSERTION_FAILED, - CryptohomeErrorCode::CRYPTOHOME_TOKEN_SERIALIZATION_FAILED, - CryptohomeErrorCode::CRYPTOHOME_INVALID_AUTH_SESSION_TOKEN, - CryptohomeErrorCode::CRYPTOHOME_ADD_CREDENTIALS_FAILED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_UNAUTHENTICATED_AUTH_SESSION, - CryptohomeErrorCode::CRYPTOHOME_ERROR_UNKNOWN_LEGACY, - CryptohomeErrorCode::CRYPTOHOME_ERROR_UNUSABLE_VAULT, - CryptohomeErrorCode::CRYPTOHOME_REMOVE_CREDENTIALS_FAILED, - CryptohomeErrorCode::CRYPTOHOME_UPDATE_CREDENTIALS_FAILED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_RECOVERY_TRANSIENT, - CryptohomeErrorCode::CRYPTOHOME_ERROR_RECOVERY_FATAL, - CryptohomeErrorCode::CRYPTOHOME_ERROR_BIOMETRICS_BUSY, - CryptohomeErrorCode::CRYPTOHOME_ERROR_CREDENTIAL_LOCKED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_CREDENTIAL_EXPIRED, - ]; -} - -impl ::std::default::Default for CryptohomeErrorCode { - fn default() -> Self { - CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET - } -} - - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:user_data_auth.PrimaryAction) -pub enum PrimaryAction { - // @@protoc_insertion_point(enum_value:user_data_auth.PrimaryAction.PRIMARY_NO_ERROR) - PRIMARY_NO_ERROR = 0, - // @@protoc_insertion_point(enum_value:user_data_auth.PrimaryAction.PRIMARY_NONE) - PRIMARY_NONE = 1, - // @@protoc_insertion_point(enum_value:user_data_auth.PrimaryAction.PRIMARY_CREATE_REQUIRED) - PRIMARY_CREATE_REQUIRED = 2, - // @@protoc_insertion_point(enum_value:user_data_auth.PrimaryAction.PRIMARY_NOTIFY_OLD_ENCRYPTION_POLICY) - PRIMARY_NOTIFY_OLD_ENCRYPTION_POLICY = 3, - // @@protoc_insertion_point(enum_value:user_data_auth.PrimaryAction.PRIMARY_RESUME_PREVIOUS_MIGRATION) - PRIMARY_RESUME_PREVIOUS_MIGRATION = 4, - // @@protoc_insertion_point(enum_value:user_data_auth.PrimaryAction.PRIMARY_TPM_UDPATE_REQUIRED) - PRIMARY_TPM_UDPATE_REQUIRED = 5, - // @@protoc_insertion_point(enum_value:user_data_auth.PrimaryAction.PRIMARY_TPM_NEEDS_REBOOT) - PRIMARY_TPM_NEEDS_REBOOT = 6, - // @@protoc_insertion_point(enum_value:user_data_auth.PrimaryAction.PRIMARY_TPM_LOCKOUT) - PRIMARY_TPM_LOCKOUT = 7, - // @@protoc_insertion_point(enum_value:user_data_auth.PrimaryAction.PRIMARY_INCORRECT_AUTH) - PRIMARY_INCORRECT_AUTH = 8, - // @@protoc_insertion_point(enum_value:user_data_auth.PrimaryAction.PRIMARY_LE_LOCKED_OUT) - PRIMARY_LE_LOCKED_OUT = 9, - // @@protoc_insertion_point(enum_value:user_data_auth.PrimaryAction.PRIMARY_LE_EXPIRED) - PRIMARY_LE_EXPIRED = 10, -} - -impl ::protobuf::Enum for PrimaryAction { - const NAME: &'static str = "PrimaryAction"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(PrimaryAction::PRIMARY_NO_ERROR), - 1 => ::std::option::Option::Some(PrimaryAction::PRIMARY_NONE), - 2 => ::std::option::Option::Some(PrimaryAction::PRIMARY_CREATE_REQUIRED), - 3 => ::std::option::Option::Some(PrimaryAction::PRIMARY_NOTIFY_OLD_ENCRYPTION_POLICY), - 4 => ::std::option::Option::Some(PrimaryAction::PRIMARY_RESUME_PREVIOUS_MIGRATION), - 5 => ::std::option::Option::Some(PrimaryAction::PRIMARY_TPM_UDPATE_REQUIRED), - 6 => ::std::option::Option::Some(PrimaryAction::PRIMARY_TPM_NEEDS_REBOOT), - 7 => ::std::option::Option::Some(PrimaryAction::PRIMARY_TPM_LOCKOUT), - 8 => ::std::option::Option::Some(PrimaryAction::PRIMARY_INCORRECT_AUTH), - 9 => ::std::option::Option::Some(PrimaryAction::PRIMARY_LE_LOCKED_OUT), - 10 => ::std::option::Option::Some(PrimaryAction::PRIMARY_LE_EXPIRED), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [PrimaryAction] = &[ - PrimaryAction::PRIMARY_NO_ERROR, - PrimaryAction::PRIMARY_NONE, - PrimaryAction::PRIMARY_CREATE_REQUIRED, - PrimaryAction::PRIMARY_NOTIFY_OLD_ENCRYPTION_POLICY, - PrimaryAction::PRIMARY_RESUME_PREVIOUS_MIGRATION, - PrimaryAction::PRIMARY_TPM_UDPATE_REQUIRED, - PrimaryAction::PRIMARY_TPM_NEEDS_REBOOT, - PrimaryAction::PRIMARY_TPM_LOCKOUT, - PrimaryAction::PRIMARY_INCORRECT_AUTH, - PrimaryAction::PRIMARY_LE_LOCKED_OUT, - PrimaryAction::PRIMARY_LE_EXPIRED, - ]; -} - -impl ::std::default::Default for PrimaryAction { - fn default() -> Self { - PrimaryAction::PRIMARY_NO_ERROR - } -} - - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:user_data_auth.PossibleAction) -pub enum PossibleAction { - // @@protoc_insertion_point(enum_value:user_data_auth.PossibleAction.POSSIBLY_NONE) - POSSIBLY_NONE = 0, - // @@protoc_insertion_point(enum_value:user_data_auth.PossibleAction.POSSIBLY_RETRY) - POSSIBLY_RETRY = 1, - // @@protoc_insertion_point(enum_value:user_data_auth.PossibleAction.POSSIBLY_REBOOT) - POSSIBLY_REBOOT = 2, - // @@protoc_insertion_point(enum_value:user_data_auth.PossibleAction.POSSIBLY_AUTH) - POSSIBLY_AUTH = 3, - // @@protoc_insertion_point(enum_value:user_data_auth.PossibleAction.POSSIBLY_DELETE_VAULT) - POSSIBLY_DELETE_VAULT = 5, - // @@protoc_insertion_point(enum_value:user_data_auth.PossibleAction.POSSIBLY_POWERWASH) - POSSIBLY_POWERWASH = 6, - // @@protoc_insertion_point(enum_value:user_data_auth.PossibleAction.POSSIBLY_DEV_CHECK_UNEXPECTED_STATE) - POSSIBLY_DEV_CHECK_UNEXPECTED_STATE = 7, - // @@protoc_insertion_point(enum_value:user_data_auth.PossibleAction.POSSIBLY_FATAL) - POSSIBLY_FATAL = 8, -} - -impl ::protobuf::Enum for PossibleAction { - const NAME: &'static str = "PossibleAction"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(PossibleAction::POSSIBLY_NONE), - 1 => ::std::option::Option::Some(PossibleAction::POSSIBLY_RETRY), - 2 => ::std::option::Option::Some(PossibleAction::POSSIBLY_REBOOT), - 3 => ::std::option::Option::Some(PossibleAction::POSSIBLY_AUTH), - 5 => ::std::option::Option::Some(PossibleAction::POSSIBLY_DELETE_VAULT), - 6 => ::std::option::Option::Some(PossibleAction::POSSIBLY_POWERWASH), - 7 => ::std::option::Option::Some(PossibleAction::POSSIBLY_DEV_CHECK_UNEXPECTED_STATE), - 8 => ::std::option::Option::Some(PossibleAction::POSSIBLY_FATAL), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [PossibleAction] = &[ - PossibleAction::POSSIBLY_NONE, - PossibleAction::POSSIBLY_RETRY, - PossibleAction::POSSIBLY_REBOOT, - PossibleAction::POSSIBLY_AUTH, - PossibleAction::POSSIBLY_DELETE_VAULT, - PossibleAction::POSSIBLY_POWERWASH, - PossibleAction::POSSIBLY_DEV_CHECK_UNEXPECTED_STATE, - PossibleAction::POSSIBLY_FATAL, - ]; -} - -impl ::std::default::Default for PossibleAction { - fn default() -> Self { - PossibleAction::POSSIBLY_NONE - } -} - - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:user_data_auth.DircryptoMigrationStatus) -pub enum DircryptoMigrationStatus { - // @@protoc_insertion_point(enum_value:user_data_auth.DircryptoMigrationStatus.DIRCRYPTO_MIGRATION_SUCCESS) - DIRCRYPTO_MIGRATION_SUCCESS = 0, - // @@protoc_insertion_point(enum_value:user_data_auth.DircryptoMigrationStatus.DIRCRYPTO_MIGRATION_FAILED) - DIRCRYPTO_MIGRATION_FAILED = 1, - // @@protoc_insertion_point(enum_value:user_data_auth.DircryptoMigrationStatus.DIRCRYPTO_MIGRATION_INITIALIZING) - DIRCRYPTO_MIGRATION_INITIALIZING = 2, - // @@protoc_insertion_point(enum_value:user_data_auth.DircryptoMigrationStatus.DIRCRYPTO_MIGRATION_IN_PROGRESS) - DIRCRYPTO_MIGRATION_IN_PROGRESS = 3, -} - -impl ::protobuf::Enum for DircryptoMigrationStatus { - const NAME: &'static str = "DircryptoMigrationStatus"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_SUCCESS), - 1 => ::std::option::Option::Some(DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_FAILED), - 2 => ::std::option::Option::Some(DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_INITIALIZING), - 3 => ::std::option::Option::Some(DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_IN_PROGRESS), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [DircryptoMigrationStatus] = &[ - DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_SUCCESS, - DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_FAILED, - DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_INITIALIZING, - DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_IN_PROGRESS, - ]; -} - -impl ::std::default::Default for DircryptoMigrationStatus { - fn default() -> Self { - DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_SUCCESS - } -} - - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:user_data_auth.AuthSessionFlags) -pub enum AuthSessionFlags { - // @@protoc_insertion_point(enum_value:user_data_auth.AuthSessionFlags.AUTH_SESSION_FLAGS_NONE) - AUTH_SESSION_FLAGS_NONE = 0, - // @@protoc_insertion_point(enum_value:user_data_auth.AuthSessionFlags.AUTH_SESSION_FLAGS_EPHEMERAL_USER) - AUTH_SESSION_FLAGS_EPHEMERAL_USER = 2, -} - -impl ::protobuf::Enum for AuthSessionFlags { - const NAME: &'static str = "AuthSessionFlags"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(AuthSessionFlags::AUTH_SESSION_FLAGS_NONE), - 2 => ::std::option::Option::Some(AuthSessionFlags::AUTH_SESSION_FLAGS_EPHEMERAL_USER), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [AuthSessionFlags] = &[ - AuthSessionFlags::AUTH_SESSION_FLAGS_NONE, - AuthSessionFlags::AUTH_SESSION_FLAGS_EPHEMERAL_USER, - ]; -} - -impl ::std::default::Default for AuthSessionFlags { - fn default() -> Self { - AuthSessionFlags::AUTH_SESSION_FLAGS_NONE - } -} - - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:user_data_auth.AuthSessionStatus) -pub enum AuthSessionStatus { - // @@protoc_insertion_point(enum_value:user_data_auth.AuthSessionStatus.AUTH_SESSION_STATUS_NOT_SET) - AUTH_SESSION_STATUS_NOT_SET = 0, - // @@protoc_insertion_point(enum_value:user_data_auth.AuthSessionStatus.AUTH_SESSION_STATUS_FURTHER_FACTOR_REQUIRED) - AUTH_SESSION_STATUS_FURTHER_FACTOR_REQUIRED = 1, - // @@protoc_insertion_point(enum_value:user_data_auth.AuthSessionStatus.AUTH_SESSION_STATUS_AUTHENTICATED) - AUTH_SESSION_STATUS_AUTHENTICATED = 2, - // @@protoc_insertion_point(enum_value:user_data_auth.AuthSessionStatus.AUTH_SESSION_STATUS_INVALID_AUTH_SESSION) - AUTH_SESSION_STATUS_INVALID_AUTH_SESSION = 3, -} - -impl ::protobuf::Enum for AuthSessionStatus { - const NAME: &'static str = "AuthSessionStatus"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(AuthSessionStatus::AUTH_SESSION_STATUS_NOT_SET), - 1 => ::std::option::Option::Some(AuthSessionStatus::AUTH_SESSION_STATUS_FURTHER_FACTOR_REQUIRED), - 2 => ::std::option::Option::Some(AuthSessionStatus::AUTH_SESSION_STATUS_AUTHENTICATED), - 3 => ::std::option::Option::Some(AuthSessionStatus::AUTH_SESSION_STATUS_INVALID_AUTH_SESSION), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [AuthSessionStatus] = &[ - AuthSessionStatus::AUTH_SESSION_STATUS_NOT_SET, - AuthSessionStatus::AUTH_SESSION_STATUS_FURTHER_FACTOR_REQUIRED, - AuthSessionStatus::AUTH_SESSION_STATUS_AUTHENTICATED, - AuthSessionStatus::AUTH_SESSION_STATUS_INVALID_AUTH_SESSION, - ]; -} - -impl ::std::default::Default for AuthSessionStatus { - fn default() -> Self { - AuthSessionStatus::AUTH_SESSION_STATUS_NOT_SET - } -} - - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:user_data_auth.VaultEncryptionType) -pub enum VaultEncryptionType { - // @@protoc_insertion_point(enum_value:user_data_auth.VaultEncryptionType.CRYPTOHOME_VAULT_ENCRYPTION_ANY) - CRYPTOHOME_VAULT_ENCRYPTION_ANY = 0, - // @@protoc_insertion_point(enum_value:user_data_auth.VaultEncryptionType.CRYPTOHOME_VAULT_ENCRYPTION_ECRYPTFS) - CRYPTOHOME_VAULT_ENCRYPTION_ECRYPTFS = 1, - // @@protoc_insertion_point(enum_value:user_data_auth.VaultEncryptionType.CRYPTOHOME_VAULT_ENCRYPTION_FSCRYPT) - CRYPTOHOME_VAULT_ENCRYPTION_FSCRYPT = 2, - // @@protoc_insertion_point(enum_value:user_data_auth.VaultEncryptionType.CRYPTOHOME_VAULT_ENCRYPTION_DMCRYPT) - CRYPTOHOME_VAULT_ENCRYPTION_DMCRYPT = 3, -} - -impl ::protobuf::Enum for VaultEncryptionType { - const NAME: &'static str = "VaultEncryptionType"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(VaultEncryptionType::CRYPTOHOME_VAULT_ENCRYPTION_ANY), - 1 => ::std::option::Option::Some(VaultEncryptionType::CRYPTOHOME_VAULT_ENCRYPTION_ECRYPTFS), - 2 => ::std::option::Option::Some(VaultEncryptionType::CRYPTOHOME_VAULT_ENCRYPTION_FSCRYPT), - 3 => ::std::option::Option::Some(VaultEncryptionType::CRYPTOHOME_VAULT_ENCRYPTION_DMCRYPT), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [VaultEncryptionType] = &[ - VaultEncryptionType::CRYPTOHOME_VAULT_ENCRYPTION_ANY, - VaultEncryptionType::CRYPTOHOME_VAULT_ENCRYPTION_ECRYPTFS, - VaultEncryptionType::CRYPTOHOME_VAULT_ENCRYPTION_FSCRYPT, - VaultEncryptionType::CRYPTOHOME_VAULT_ENCRYPTION_DMCRYPT, - ]; -} - -impl ::std::default::Default for VaultEncryptionType { - fn default() -> Self { - VaultEncryptionType::CRYPTOHOME_VAULT_ENCRYPTION_ANY - } -} - - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:user_data_auth.InstallAttributesState) -pub enum InstallAttributesState { - // @@protoc_insertion_point(enum_value:user_data_auth.InstallAttributesState.UNKNOWN) - UNKNOWN = 0, - // @@protoc_insertion_point(enum_value:user_data_auth.InstallAttributesState.TPM_NOT_OWNED) - TPM_NOT_OWNED = 1, - // @@protoc_insertion_point(enum_value:user_data_auth.InstallAttributesState.FIRST_INSTALL) - FIRST_INSTALL = 2, - // @@protoc_insertion_point(enum_value:user_data_auth.InstallAttributesState.VALID) - VALID = 3, - // @@protoc_insertion_point(enum_value:user_data_auth.InstallAttributesState.INVALID) - INVALID = 4, -} - -impl ::protobuf::Enum for InstallAttributesState { - const NAME: &'static str = "InstallAttributesState"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(InstallAttributesState::UNKNOWN), - 1 => ::std::option::Option::Some(InstallAttributesState::TPM_NOT_OWNED), - 2 => ::std::option::Option::Some(InstallAttributesState::FIRST_INSTALL), - 3 => ::std::option::Option::Some(InstallAttributesState::VALID), - 4 => ::std::option::Option::Some(InstallAttributesState::INVALID), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [InstallAttributesState] = &[ - InstallAttributesState::UNKNOWN, - InstallAttributesState::TPM_NOT_OWNED, - InstallAttributesState::FIRST_INSTALL, - InstallAttributesState::VALID, - InstallAttributesState::INVALID, - ]; -} - -impl ::std::default::Default for InstallAttributesState { - fn default() -> Self { - InstallAttributesState::UNKNOWN - } -} - - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:user_data_auth.FingerprintScanResult) -pub enum FingerprintScanResult { - // @@protoc_insertion_point(enum_value:user_data_auth.FingerprintScanResult.FINGERPRINT_SCAN_RESULT_SUCCESS) - FINGERPRINT_SCAN_RESULT_SUCCESS = 0, - // @@protoc_insertion_point(enum_value:user_data_auth.FingerprintScanResult.FINGERPRINT_SCAN_RESULT_RETRY) - FINGERPRINT_SCAN_RESULT_RETRY = 1, - // @@protoc_insertion_point(enum_value:user_data_auth.FingerprintScanResult.FINGERPRINT_SCAN_RESULT_LOCKOUT) - FINGERPRINT_SCAN_RESULT_LOCKOUT = 2, - // @@protoc_insertion_point(enum_value:user_data_auth.FingerprintScanResult.FINGERPRINT_SCAN_RESULT_FATAL_ERROR) - FINGERPRINT_SCAN_RESULT_FATAL_ERROR = 3, - // @@protoc_insertion_point(enum_value:user_data_auth.FingerprintScanResult.FINGERPRINT_SCAN_RESULT_PARTIAL) - FINGERPRINT_SCAN_RESULT_PARTIAL = 4, - // @@protoc_insertion_point(enum_value:user_data_auth.FingerprintScanResult.FINGERPRINT_SCAN_RESULT_INSUFFICIENT) - FINGERPRINT_SCAN_RESULT_INSUFFICIENT = 5, - // @@protoc_insertion_point(enum_value:user_data_auth.FingerprintScanResult.FINGERPRINT_SCAN_RESULT_SENSOR_DIRTY) - FINGERPRINT_SCAN_RESULT_SENSOR_DIRTY = 6, - // @@protoc_insertion_point(enum_value:user_data_auth.FingerprintScanResult.FINGERPRINT_SCAN_RESULT_TOO_SLOW) - FINGERPRINT_SCAN_RESULT_TOO_SLOW = 7, - // @@protoc_insertion_point(enum_value:user_data_auth.FingerprintScanResult.FINGERPRINT_SCAN_RESULT_TOO_FAST) - FINGERPRINT_SCAN_RESULT_TOO_FAST = 8, - // @@protoc_insertion_point(enum_value:user_data_auth.FingerprintScanResult.FINGERPRINT_SCAN_RESULT_IMMOBILE) - FINGERPRINT_SCAN_RESULT_IMMOBILE = 9, - // @@protoc_insertion_point(enum_value:user_data_auth.FingerprintScanResult.FINGERPRINT_SCAN_RESULT_ENROLL_OTHER) - FINGERPRINT_SCAN_RESULT_ENROLL_OTHER = 10, -} - -impl ::protobuf::Enum for FingerprintScanResult { - const NAME: &'static str = "FingerprintScanResult"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(FingerprintScanResult::FINGERPRINT_SCAN_RESULT_SUCCESS), - 1 => ::std::option::Option::Some(FingerprintScanResult::FINGERPRINT_SCAN_RESULT_RETRY), - 2 => ::std::option::Option::Some(FingerprintScanResult::FINGERPRINT_SCAN_RESULT_LOCKOUT), - 3 => ::std::option::Option::Some(FingerprintScanResult::FINGERPRINT_SCAN_RESULT_FATAL_ERROR), - 4 => ::std::option::Option::Some(FingerprintScanResult::FINGERPRINT_SCAN_RESULT_PARTIAL), - 5 => ::std::option::Option::Some(FingerprintScanResult::FINGERPRINT_SCAN_RESULT_INSUFFICIENT), - 6 => ::std::option::Option::Some(FingerprintScanResult::FINGERPRINT_SCAN_RESULT_SENSOR_DIRTY), - 7 => ::std::option::Option::Some(FingerprintScanResult::FINGERPRINT_SCAN_RESULT_TOO_SLOW), - 8 => ::std::option::Option::Some(FingerprintScanResult::FINGERPRINT_SCAN_RESULT_TOO_FAST), - 9 => ::std::option::Option::Some(FingerprintScanResult::FINGERPRINT_SCAN_RESULT_IMMOBILE), - 10 => ::std::option::Option::Some(FingerprintScanResult::FINGERPRINT_SCAN_RESULT_ENROLL_OTHER), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [FingerprintScanResult] = &[ - FingerprintScanResult::FINGERPRINT_SCAN_RESULT_SUCCESS, - FingerprintScanResult::FINGERPRINT_SCAN_RESULT_RETRY, - FingerprintScanResult::FINGERPRINT_SCAN_RESULT_LOCKOUT, - FingerprintScanResult::FINGERPRINT_SCAN_RESULT_FATAL_ERROR, - FingerprintScanResult::FINGERPRINT_SCAN_RESULT_PARTIAL, - FingerprintScanResult::FINGERPRINT_SCAN_RESULT_INSUFFICIENT, - FingerprintScanResult::FINGERPRINT_SCAN_RESULT_SENSOR_DIRTY, - FingerprintScanResult::FINGERPRINT_SCAN_RESULT_TOO_SLOW, - FingerprintScanResult::FINGERPRINT_SCAN_RESULT_TOO_FAST, - FingerprintScanResult::FINGERPRINT_SCAN_RESULT_IMMOBILE, - FingerprintScanResult::FINGERPRINT_SCAN_RESULT_ENROLL_OTHER, - ]; -} - -impl ::std::default::Default for FingerprintScanResult { - fn default() -> Self { - FingerprintScanResult::FINGERPRINT_SCAN_RESULT_SUCCESS - } -} - diff --git a/system_api/src/protos/auth_factor.rs b/system_api/src/protos/auth_factor.rs deleted file mode 100644 index 5ff8a483b3..0000000000 --- a/system_api/src/protos/auth_factor.rs +++ /dev/null @@ -1,2875 +0,0 @@ -// This file is generated by rust-protobuf 3.2.0. Do not edit -// .proto file is parsed by protoc 3.21.9 -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `auth_factor.proto` -// Generated for lite runtime - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0; - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.PasswordAuthInput) -pub struct PasswordAuthInput { - // message fields - // @@protoc_insertion_point(field:user_data_auth.PasswordAuthInput.secret) - pub secret: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.PasswordAuthInput.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PasswordAuthInput { - fn default() -> &'a PasswordAuthInput { - ::default_instance() - } -} - -impl PasswordAuthInput { - pub fn new() -> PasswordAuthInput { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for PasswordAuthInput { - const NAME: &'static str = "PasswordAuthInput"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.secret = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.secret.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.secret); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.secret.is_empty() { - os.write_bytes(1, &self.secret)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PasswordAuthInput { - PasswordAuthInput::new() - } - - fn clear(&mut self) { - self.secret.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static PasswordAuthInput { - static instance: PasswordAuthInput = PasswordAuthInput { - secret: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.PinAuthInput) -pub struct PinAuthInput { - // message fields - // @@protoc_insertion_point(field:user_data_auth.PinAuthInput.secret) - pub secret: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.PinAuthInput.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PinAuthInput { - fn default() -> &'a PinAuthInput { - ::default_instance() - } -} - -impl PinAuthInput { - pub fn new() -> PinAuthInput { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for PinAuthInput { - const NAME: &'static str = "PinAuthInput"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.secret = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.secret.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.secret); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.secret.is_empty() { - os.write_bytes(1, &self.secret)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PinAuthInput { - PinAuthInput::new() - } - - fn clear(&mut self) { - self.secret.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static PinAuthInput { - static instance: PinAuthInput = PinAuthInput { - secret: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.CryptohomeRecoveryAuthInput) -pub struct CryptohomeRecoveryAuthInput { - // message fields - // @@protoc_insertion_point(field:user_data_auth.CryptohomeRecoveryAuthInput.mediator_pub_key) - pub mediator_pub_key: ::std::vec::Vec, - // @@protoc_insertion_point(field:user_data_auth.CryptohomeRecoveryAuthInput.user_gaia_id) - pub user_gaia_id: ::std::string::String, - // @@protoc_insertion_point(field:user_data_auth.CryptohomeRecoveryAuthInput.device_user_id) - pub device_user_id: ::std::string::String, - // @@protoc_insertion_point(field:user_data_auth.CryptohomeRecoveryAuthInput.epoch_response) - pub epoch_response: ::std::vec::Vec, - // @@protoc_insertion_point(field:user_data_auth.CryptohomeRecoveryAuthInput.recovery_response) - pub recovery_response: ::std::vec::Vec, - // @@protoc_insertion_point(field:user_data_auth.CryptohomeRecoveryAuthInput.ledger_info) - pub ledger_info: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.CryptohomeRecoveryAuthInput.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CryptohomeRecoveryAuthInput { - fn default() -> &'a CryptohomeRecoveryAuthInput { - ::default_instance() - } -} - -impl CryptohomeRecoveryAuthInput { - pub fn new() -> CryptohomeRecoveryAuthInput { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for CryptohomeRecoveryAuthInput { - const NAME: &'static str = "CryptohomeRecoveryAuthInput"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.mediator_pub_key = is.read_bytes()?; - }, - 18 => { - self.user_gaia_id = is.read_string()?; - }, - 26 => { - self.device_user_id = is.read_string()?; - }, - 34 => { - self.epoch_response = is.read_bytes()?; - }, - 42 => { - self.recovery_response = is.read_bytes()?; - }, - 50 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.ledger_info)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.mediator_pub_key.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.mediator_pub_key); - } - if !self.user_gaia_id.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.user_gaia_id); - } - if !self.device_user_id.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.device_user_id); - } - if !self.epoch_response.is_empty() { - my_size += ::protobuf::rt::bytes_size(4, &self.epoch_response); - } - if !self.recovery_response.is_empty() { - my_size += ::protobuf::rt::bytes_size(5, &self.recovery_response); - } - if let Some(v) = self.ledger_info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.mediator_pub_key.is_empty() { - os.write_bytes(1, &self.mediator_pub_key)?; - } - if !self.user_gaia_id.is_empty() { - os.write_string(2, &self.user_gaia_id)?; - } - if !self.device_user_id.is_empty() { - os.write_string(3, &self.device_user_id)?; - } - if !self.epoch_response.is_empty() { - os.write_bytes(4, &self.epoch_response)?; - } - if !self.recovery_response.is_empty() { - os.write_bytes(5, &self.recovery_response)?; - } - if let Some(v) = self.ledger_info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CryptohomeRecoveryAuthInput { - CryptohomeRecoveryAuthInput::new() - } - - fn clear(&mut self) { - self.mediator_pub_key.clear(); - self.user_gaia_id.clear(); - self.device_user_id.clear(); - self.epoch_response.clear(); - self.recovery_response.clear(); - self.ledger_info.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static CryptohomeRecoveryAuthInput { - static instance: CryptohomeRecoveryAuthInput = CryptohomeRecoveryAuthInput { - mediator_pub_key: ::std::vec::Vec::new(), - user_gaia_id: ::std::string::String::new(), - device_user_id: ::std::string::String::new(), - epoch_response: ::std::vec::Vec::new(), - recovery_response: ::std::vec::Vec::new(), - ledger_info: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -/// Nested message and enums of message `CryptohomeRecoveryAuthInput` -pub mod cryptohome_recovery_auth_input { - #[derive(PartialEq,Clone,Default,Debug)] - // @@protoc_insertion_point(message:user_data_auth.CryptohomeRecoveryAuthInput.LedgerInfo) - pub struct LedgerInfo { - // message fields - // @@protoc_insertion_point(field:user_data_auth.CryptohomeRecoveryAuthInput.LedgerInfo.name) - pub name: ::std::string::String, - // @@protoc_insertion_point(field:user_data_auth.CryptohomeRecoveryAuthInput.LedgerInfo.key_hash) - pub key_hash: u32, - // @@protoc_insertion_point(field:user_data_auth.CryptohomeRecoveryAuthInput.LedgerInfo.public_key) - pub public_key: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.CryptohomeRecoveryAuthInput.LedgerInfo.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a LedgerInfo { - fn default() -> &'a LedgerInfo { - ::default_instance() - } - } - - impl LedgerInfo { - pub fn new() -> LedgerInfo { - ::std::default::Default::default() - } - } - - impl ::protobuf::Message for LedgerInfo { - const NAME: &'static str = "LedgerInfo"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.name = is.read_string()?; - }, - 16 => { - self.key_hash = is.read_uint32()?; - }, - 26 => { - self.public_key = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.name.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.name); - } - if self.key_hash != 0 { - my_size += ::protobuf::rt::uint32_size(2, self.key_hash); - } - if !self.public_key.is_empty() { - my_size += ::protobuf::rt::bytes_size(3, &self.public_key); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.name.is_empty() { - os.write_string(1, &self.name)?; - } - if self.key_hash != 0 { - os.write_uint32(2, self.key_hash)?; - } - if !self.public_key.is_empty() { - os.write_bytes(3, &self.public_key)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> LedgerInfo { - LedgerInfo::new() - } - - fn clear(&mut self) { - self.name.clear(); - self.key_hash = 0; - self.public_key.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static LedgerInfo { - static instance: LedgerInfo = LedgerInfo { - name: ::std::string::String::new(), - key_hash: 0, - public_key: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.KioskAuthInput) -pub struct KioskAuthInput { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.KioskAuthInput.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a KioskAuthInput { - fn default() -> &'a KioskAuthInput { - ::default_instance() - } -} - -impl KioskAuthInput { - pub fn new() -> KioskAuthInput { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for KioskAuthInput { - const NAME: &'static str = "KioskAuthInput"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> KioskAuthInput { - KioskAuthInput::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static KioskAuthInput { - static instance: KioskAuthInput = KioskAuthInput { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.SmartCardAuthInput) -pub struct SmartCardAuthInput { - // message fields - // @@protoc_insertion_point(field:user_data_auth.SmartCardAuthInput.signature_algorithms) - pub signature_algorithms: ::std::vec::Vec<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:user_data_auth.SmartCardAuthInput.key_delegate_dbus_service_name) - pub key_delegate_dbus_service_name: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.SmartCardAuthInput.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a SmartCardAuthInput { - fn default() -> &'a SmartCardAuthInput { - ::default_instance() - } -} - -impl SmartCardAuthInput { - pub fn new() -> SmartCardAuthInput { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for SmartCardAuthInput { - const NAME: &'static str = "SmartCardAuthInput"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.signature_algorithms.push(is.read_enum_or_unknown()?); - }, - 10 => { - ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.signature_algorithms)? - }, - 18 => { - self.key_delegate_dbus_service_name = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.signature_algorithms { - my_size += ::protobuf::rt::int32_size(1, value.value()); - }; - if !self.key_delegate_dbus_service_name.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.key_delegate_dbus_service_name); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.signature_algorithms { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(v))?; - }; - if !self.key_delegate_dbus_service_name.is_empty() { - os.write_string(2, &self.key_delegate_dbus_service_name)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SmartCardAuthInput { - SmartCardAuthInput::new() - } - - fn clear(&mut self) { - self.signature_algorithms.clear(); - self.key_delegate_dbus_service_name.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static SmartCardAuthInput { - static instance: SmartCardAuthInput = SmartCardAuthInput { - signature_algorithms: ::std::vec::Vec::new(), - key_delegate_dbus_service_name: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.LegacyFingerprintAuthInput) -pub struct LegacyFingerprintAuthInput { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.LegacyFingerprintAuthInput.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a LegacyFingerprintAuthInput { - fn default() -> &'a LegacyFingerprintAuthInput { - ::default_instance() - } -} - -impl LegacyFingerprintAuthInput { - pub fn new() -> LegacyFingerprintAuthInput { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for LegacyFingerprintAuthInput { - const NAME: &'static str = "LegacyFingerprintAuthInput"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> LegacyFingerprintAuthInput { - LegacyFingerprintAuthInput::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static LegacyFingerprintAuthInput { - static instance: LegacyFingerprintAuthInput = LegacyFingerprintAuthInput { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.FingerprintAuthInput) -pub struct FingerprintAuthInput { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.FingerprintAuthInput.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a FingerprintAuthInput { - fn default() -> &'a FingerprintAuthInput { - ::default_instance() - } -} - -impl FingerprintAuthInput { - pub fn new() -> FingerprintAuthInput { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for FingerprintAuthInput { - const NAME: &'static str = "FingerprintAuthInput"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> FingerprintAuthInput { - FingerprintAuthInput::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static FingerprintAuthInput { - static instance: FingerprintAuthInput = FingerprintAuthInput { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.AuthInput) -pub struct AuthInput { - // message oneof groups - pub input: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.AuthInput.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a AuthInput { - fn default() -> &'a AuthInput { - ::default_instance() - } -} - -impl AuthInput { - pub fn new() -> AuthInput { - ::std::default::Default::default() - } - - // .user_data_auth.PasswordAuthInput password_input = 1; - - pub fn password_input(&self) -> &PasswordAuthInput { - match self.input { - ::std::option::Option::Some(auth_input::Input::PasswordInput(ref v)) => v, - _ => ::default_instance(), - } - } - - pub fn clear_password_input(&mut self) { - self.input = ::std::option::Option::None; - } - - pub fn has_password_input(&self) -> bool { - match self.input { - ::std::option::Option::Some(auth_input::Input::PasswordInput(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_password_input(&mut self, v: PasswordAuthInput) { - self.input = ::std::option::Option::Some(auth_input::Input::PasswordInput(v)) - } - - // Mutable pointer to the field. - pub fn mut_password_input(&mut self) -> &mut PasswordAuthInput { - if let ::std::option::Option::Some(auth_input::Input::PasswordInput(_)) = self.input { - } else { - self.input = ::std::option::Option::Some(auth_input::Input::PasswordInput(PasswordAuthInput::new())); - } - match self.input { - ::std::option::Option::Some(auth_input::Input::PasswordInput(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_password_input(&mut self) -> PasswordAuthInput { - if self.has_password_input() { - match self.input.take() { - ::std::option::Option::Some(auth_input::Input::PasswordInput(v)) => v, - _ => panic!(), - } - } else { - PasswordAuthInput::new() - } - } - - // .user_data_auth.PinAuthInput pin_input = 2; - - pub fn pin_input(&self) -> &PinAuthInput { - match self.input { - ::std::option::Option::Some(auth_input::Input::PinInput(ref v)) => v, - _ => ::default_instance(), - } - } - - pub fn clear_pin_input(&mut self) { - self.input = ::std::option::Option::None; - } - - pub fn has_pin_input(&self) -> bool { - match self.input { - ::std::option::Option::Some(auth_input::Input::PinInput(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_pin_input(&mut self, v: PinAuthInput) { - self.input = ::std::option::Option::Some(auth_input::Input::PinInput(v)) - } - - // Mutable pointer to the field. - pub fn mut_pin_input(&mut self) -> &mut PinAuthInput { - if let ::std::option::Option::Some(auth_input::Input::PinInput(_)) = self.input { - } else { - self.input = ::std::option::Option::Some(auth_input::Input::PinInput(PinAuthInput::new())); - } - match self.input { - ::std::option::Option::Some(auth_input::Input::PinInput(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_pin_input(&mut self) -> PinAuthInput { - if self.has_pin_input() { - match self.input.take() { - ::std::option::Option::Some(auth_input::Input::PinInput(v)) => v, - _ => panic!(), - } - } else { - PinAuthInput::new() - } - } - - // .user_data_auth.CryptohomeRecoveryAuthInput cryptohome_recovery_input = 3; - - pub fn cryptohome_recovery_input(&self) -> &CryptohomeRecoveryAuthInput { - match self.input { - ::std::option::Option::Some(auth_input::Input::CryptohomeRecoveryInput(ref v)) => v, - _ => ::default_instance(), - } - } - - pub fn clear_cryptohome_recovery_input(&mut self) { - self.input = ::std::option::Option::None; - } - - pub fn has_cryptohome_recovery_input(&self) -> bool { - match self.input { - ::std::option::Option::Some(auth_input::Input::CryptohomeRecoveryInput(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_cryptohome_recovery_input(&mut self, v: CryptohomeRecoveryAuthInput) { - self.input = ::std::option::Option::Some(auth_input::Input::CryptohomeRecoveryInput(v)) - } - - // Mutable pointer to the field. - pub fn mut_cryptohome_recovery_input(&mut self) -> &mut CryptohomeRecoveryAuthInput { - if let ::std::option::Option::Some(auth_input::Input::CryptohomeRecoveryInput(_)) = self.input { - } else { - self.input = ::std::option::Option::Some(auth_input::Input::CryptohomeRecoveryInput(CryptohomeRecoveryAuthInput::new())); - } - match self.input { - ::std::option::Option::Some(auth_input::Input::CryptohomeRecoveryInput(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_cryptohome_recovery_input(&mut self) -> CryptohomeRecoveryAuthInput { - if self.has_cryptohome_recovery_input() { - match self.input.take() { - ::std::option::Option::Some(auth_input::Input::CryptohomeRecoveryInput(v)) => v, - _ => panic!(), - } - } else { - CryptohomeRecoveryAuthInput::new() - } - } - - // .user_data_auth.KioskAuthInput kiosk_input = 4; - - pub fn kiosk_input(&self) -> &KioskAuthInput { - match self.input { - ::std::option::Option::Some(auth_input::Input::KioskInput(ref v)) => v, - _ => ::default_instance(), - } - } - - pub fn clear_kiosk_input(&mut self) { - self.input = ::std::option::Option::None; - } - - pub fn has_kiosk_input(&self) -> bool { - match self.input { - ::std::option::Option::Some(auth_input::Input::KioskInput(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_kiosk_input(&mut self, v: KioskAuthInput) { - self.input = ::std::option::Option::Some(auth_input::Input::KioskInput(v)) - } - - // Mutable pointer to the field. - pub fn mut_kiosk_input(&mut self) -> &mut KioskAuthInput { - if let ::std::option::Option::Some(auth_input::Input::KioskInput(_)) = self.input { - } else { - self.input = ::std::option::Option::Some(auth_input::Input::KioskInput(KioskAuthInput::new())); - } - match self.input { - ::std::option::Option::Some(auth_input::Input::KioskInput(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_kiosk_input(&mut self) -> KioskAuthInput { - if self.has_kiosk_input() { - match self.input.take() { - ::std::option::Option::Some(auth_input::Input::KioskInput(v)) => v, - _ => panic!(), - } - } else { - KioskAuthInput::new() - } - } - - // .user_data_auth.SmartCardAuthInput smart_card_input = 5; - - pub fn smart_card_input(&self) -> &SmartCardAuthInput { - match self.input { - ::std::option::Option::Some(auth_input::Input::SmartCardInput(ref v)) => v, - _ => ::default_instance(), - } - } - - pub fn clear_smart_card_input(&mut self) { - self.input = ::std::option::Option::None; - } - - pub fn has_smart_card_input(&self) -> bool { - match self.input { - ::std::option::Option::Some(auth_input::Input::SmartCardInput(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_smart_card_input(&mut self, v: SmartCardAuthInput) { - self.input = ::std::option::Option::Some(auth_input::Input::SmartCardInput(v)) - } - - // Mutable pointer to the field. - pub fn mut_smart_card_input(&mut self) -> &mut SmartCardAuthInput { - if let ::std::option::Option::Some(auth_input::Input::SmartCardInput(_)) = self.input { - } else { - self.input = ::std::option::Option::Some(auth_input::Input::SmartCardInput(SmartCardAuthInput::new())); - } - match self.input { - ::std::option::Option::Some(auth_input::Input::SmartCardInput(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_smart_card_input(&mut self) -> SmartCardAuthInput { - if self.has_smart_card_input() { - match self.input.take() { - ::std::option::Option::Some(auth_input::Input::SmartCardInput(v)) => v, - _ => panic!(), - } - } else { - SmartCardAuthInput::new() - } - } - - // .user_data_auth.LegacyFingerprintAuthInput legacy_fingerprint_input = 6; - - pub fn legacy_fingerprint_input(&self) -> &LegacyFingerprintAuthInput { - match self.input { - ::std::option::Option::Some(auth_input::Input::LegacyFingerprintInput(ref v)) => v, - _ => ::default_instance(), - } - } - - pub fn clear_legacy_fingerprint_input(&mut self) { - self.input = ::std::option::Option::None; - } - - pub fn has_legacy_fingerprint_input(&self) -> bool { - match self.input { - ::std::option::Option::Some(auth_input::Input::LegacyFingerprintInput(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_legacy_fingerprint_input(&mut self, v: LegacyFingerprintAuthInput) { - self.input = ::std::option::Option::Some(auth_input::Input::LegacyFingerprintInput(v)) - } - - // Mutable pointer to the field. - pub fn mut_legacy_fingerprint_input(&mut self) -> &mut LegacyFingerprintAuthInput { - if let ::std::option::Option::Some(auth_input::Input::LegacyFingerprintInput(_)) = self.input { - } else { - self.input = ::std::option::Option::Some(auth_input::Input::LegacyFingerprintInput(LegacyFingerprintAuthInput::new())); - } - match self.input { - ::std::option::Option::Some(auth_input::Input::LegacyFingerprintInput(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_legacy_fingerprint_input(&mut self) -> LegacyFingerprintAuthInput { - if self.has_legacy_fingerprint_input() { - match self.input.take() { - ::std::option::Option::Some(auth_input::Input::LegacyFingerprintInput(v)) => v, - _ => panic!(), - } - } else { - LegacyFingerprintAuthInput::new() - } - } - - // .user_data_auth.FingerprintAuthInput fingerprint_input = 7; - - pub fn fingerprint_input(&self) -> &FingerprintAuthInput { - match self.input { - ::std::option::Option::Some(auth_input::Input::FingerprintInput(ref v)) => v, - _ => ::default_instance(), - } - } - - pub fn clear_fingerprint_input(&mut self) { - self.input = ::std::option::Option::None; - } - - pub fn has_fingerprint_input(&self) -> bool { - match self.input { - ::std::option::Option::Some(auth_input::Input::FingerprintInput(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_fingerprint_input(&mut self, v: FingerprintAuthInput) { - self.input = ::std::option::Option::Some(auth_input::Input::FingerprintInput(v)) - } - - // Mutable pointer to the field. - pub fn mut_fingerprint_input(&mut self) -> &mut FingerprintAuthInput { - if let ::std::option::Option::Some(auth_input::Input::FingerprintInput(_)) = self.input { - } else { - self.input = ::std::option::Option::Some(auth_input::Input::FingerprintInput(FingerprintAuthInput::new())); - } - match self.input { - ::std::option::Option::Some(auth_input::Input::FingerprintInput(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_fingerprint_input(&mut self) -> FingerprintAuthInput { - if self.has_fingerprint_input() { - match self.input.take() { - ::std::option::Option::Some(auth_input::Input::FingerprintInput(v)) => v, - _ => panic!(), - } - } else { - FingerprintAuthInput::new() - } - } -} - -impl ::protobuf::Message for AuthInput { - const NAME: &'static str = "AuthInput"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.input = ::std::option::Option::Some(auth_input::Input::PasswordInput(is.read_message()?)); - }, - 18 => { - self.input = ::std::option::Option::Some(auth_input::Input::PinInput(is.read_message()?)); - }, - 26 => { - self.input = ::std::option::Option::Some(auth_input::Input::CryptohomeRecoveryInput(is.read_message()?)); - }, - 34 => { - self.input = ::std::option::Option::Some(auth_input::Input::KioskInput(is.read_message()?)); - }, - 42 => { - self.input = ::std::option::Option::Some(auth_input::Input::SmartCardInput(is.read_message()?)); - }, - 50 => { - self.input = ::std::option::Option::Some(auth_input::Input::LegacyFingerprintInput(is.read_message()?)); - }, - 58 => { - self.input = ::std::option::Option::Some(auth_input::Input::FingerprintInput(is.read_message()?)); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let ::std::option::Option::Some(ref v) = self.input { - match v { - &auth_input::Input::PasswordInput(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }, - &auth_input::Input::PinInput(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }, - &auth_input::Input::CryptohomeRecoveryInput(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }, - &auth_input::Input::KioskInput(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }, - &auth_input::Input::SmartCardInput(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }, - &auth_input::Input::LegacyFingerprintInput(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }, - &auth_input::Input::FingerprintInput(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }, - }; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let ::std::option::Option::Some(ref v) = self.input { - match v { - &auth_input::Input::PasswordInput(ref v) => { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }, - &auth_input::Input::PinInput(ref v) => { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - }, - &auth_input::Input::CryptohomeRecoveryInput(ref v) => { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - }, - &auth_input::Input::KioskInput(ref v) => { - ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; - }, - &auth_input::Input::SmartCardInput(ref v) => { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - }, - &auth_input::Input::LegacyFingerprintInput(ref v) => { - ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; - }, - &auth_input::Input::FingerprintInput(ref v) => { - ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?; - }, - }; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> AuthInput { - AuthInput::new() - } - - fn clear(&mut self) { - self.input = ::std::option::Option::None; - self.input = ::std::option::Option::None; - self.input = ::std::option::Option::None; - self.input = ::std::option::Option::None; - self.input = ::std::option::Option::None; - self.input = ::std::option::Option::None; - self.input = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static AuthInput { - static instance: AuthInput = AuthInput { - input: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -/// Nested message and enums of message `AuthInput` -pub mod auth_input { - - #[derive(Clone,PartialEq,Debug)] - #[non_exhaustive] - // @@protoc_insertion_point(oneof:user_data_auth.AuthInput.input) - pub enum Input { - // @@protoc_insertion_point(oneof_field:user_data_auth.AuthInput.password_input) - PasswordInput(super::PasswordAuthInput), - // @@protoc_insertion_point(oneof_field:user_data_auth.AuthInput.pin_input) - PinInput(super::PinAuthInput), - // @@protoc_insertion_point(oneof_field:user_data_auth.AuthInput.cryptohome_recovery_input) - CryptohomeRecoveryInput(super::CryptohomeRecoveryAuthInput), - // @@protoc_insertion_point(oneof_field:user_data_auth.AuthInput.kiosk_input) - KioskInput(super::KioskAuthInput), - // @@protoc_insertion_point(oneof_field:user_data_auth.AuthInput.smart_card_input) - SmartCardInput(super::SmartCardAuthInput), - // @@protoc_insertion_point(oneof_field:user_data_auth.AuthInput.legacy_fingerprint_input) - LegacyFingerprintInput(super::LegacyFingerprintAuthInput), - // @@protoc_insertion_point(oneof_field:user_data_auth.AuthInput.fingerprint_input) - FingerprintInput(super::FingerprintAuthInput), - } - - impl ::protobuf::Oneof for Input { - } - - impl Input { - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.PasswordMetadata) -pub struct PasswordMetadata { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.PasswordMetadata.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PasswordMetadata { - fn default() -> &'a PasswordMetadata { - ::default_instance() - } -} - -impl PasswordMetadata { - pub fn new() -> PasswordMetadata { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for PasswordMetadata { - const NAME: &'static str = "PasswordMetadata"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PasswordMetadata { - PasswordMetadata::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static PasswordMetadata { - static instance: PasswordMetadata = PasswordMetadata { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.PinMetadata) -pub struct PinMetadata { - // message fields - // @@protoc_insertion_point(field:user_data_auth.PinMetadata.auth_locked) - pub auth_locked: bool, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.PinMetadata.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PinMetadata { - fn default() -> &'a PinMetadata { - ::default_instance() - } -} - -impl PinMetadata { - pub fn new() -> PinMetadata { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for PinMetadata { - const NAME: &'static str = "PinMetadata"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.auth_locked = is.read_bool()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.auth_locked != false { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.auth_locked != false { - os.write_bool(1, self.auth_locked)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PinMetadata { - PinMetadata::new() - } - - fn clear(&mut self) { - self.auth_locked = false; - self.special_fields.clear(); - } - - fn default_instance() -> &'static PinMetadata { - static instance: PinMetadata = PinMetadata { - auth_locked: false, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.CryptohomeRecoveryMetadata) -pub struct CryptohomeRecoveryMetadata { - // message fields - // @@protoc_insertion_point(field:user_data_auth.CryptohomeRecoveryMetadata.mediator_pub_key) - pub mediator_pub_key: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.CryptohomeRecoveryMetadata.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CryptohomeRecoveryMetadata { - fn default() -> &'a CryptohomeRecoveryMetadata { - ::default_instance() - } -} - -impl CryptohomeRecoveryMetadata { - pub fn new() -> CryptohomeRecoveryMetadata { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for CryptohomeRecoveryMetadata { - const NAME: &'static str = "CryptohomeRecoveryMetadata"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.mediator_pub_key = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.mediator_pub_key.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.mediator_pub_key); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.mediator_pub_key.is_empty() { - os.write_bytes(1, &self.mediator_pub_key)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CryptohomeRecoveryMetadata { - CryptohomeRecoveryMetadata::new() - } - - fn clear(&mut self) { - self.mediator_pub_key.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static CryptohomeRecoveryMetadata { - static instance: CryptohomeRecoveryMetadata = CryptohomeRecoveryMetadata { - mediator_pub_key: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.KioskMetadata) -pub struct KioskMetadata { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.KioskMetadata.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a KioskMetadata { - fn default() -> &'a KioskMetadata { - ::default_instance() - } -} - -impl KioskMetadata { - pub fn new() -> KioskMetadata { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for KioskMetadata { - const NAME: &'static str = "KioskMetadata"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> KioskMetadata { - KioskMetadata::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static KioskMetadata { - static instance: KioskMetadata = KioskMetadata { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.SmartCardMetadata) -pub struct SmartCardMetadata { - // message fields - // @@protoc_insertion_point(field:user_data_auth.SmartCardMetadata.public_key_spki_der) - pub public_key_spki_der: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.SmartCardMetadata.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a SmartCardMetadata { - fn default() -> &'a SmartCardMetadata { - ::default_instance() - } -} - -impl SmartCardMetadata { - pub fn new() -> SmartCardMetadata { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for SmartCardMetadata { - const NAME: &'static str = "SmartCardMetadata"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.public_key_spki_der = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.public_key_spki_der.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.public_key_spki_der); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.public_key_spki_der.is_empty() { - os.write_bytes(1, &self.public_key_spki_der)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SmartCardMetadata { - SmartCardMetadata::new() - } - - fn clear(&mut self) { - self.public_key_spki_der.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static SmartCardMetadata { - static instance: SmartCardMetadata = SmartCardMetadata { - public_key_spki_der: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.CommonMetadata) -pub struct CommonMetadata { - // message fields - // @@protoc_insertion_point(field:user_data_auth.CommonMetadata.chromeos_version_last_updated) - pub chromeos_version_last_updated: ::std::string::String, - // @@protoc_insertion_point(field:user_data_auth.CommonMetadata.chrome_version_last_updated) - pub chrome_version_last_updated: ::std::string::String, - // @@protoc_insertion_point(field:user_data_auth.CommonMetadata.lockout_policy) - pub lockout_policy: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.CommonMetadata.user_specified_name) - pub user_specified_name: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.CommonMetadata.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CommonMetadata { - fn default() -> &'a CommonMetadata { - ::default_instance() - } -} - -impl CommonMetadata { - pub fn new() -> CommonMetadata { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for CommonMetadata { - const NAME: &'static str = "CommonMetadata"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.chromeos_version_last_updated = is.read_string()?; - }, - 18 => { - self.chrome_version_last_updated = is.read_string()?; - }, - 24 => { - self.lockout_policy = is.read_enum_or_unknown()?; - }, - 34 => { - self.user_specified_name = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.chromeos_version_last_updated.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.chromeos_version_last_updated); - } - if !self.chrome_version_last_updated.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.chrome_version_last_updated); - } - if self.lockout_policy != ::protobuf::EnumOrUnknown::new(LockoutPolicy::LOCKOUT_POLICY_UNKNOWN) { - my_size += ::protobuf::rt::int32_size(3, self.lockout_policy.value()); - } - if !self.user_specified_name.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.user_specified_name); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.chromeos_version_last_updated.is_empty() { - os.write_string(1, &self.chromeos_version_last_updated)?; - } - if !self.chrome_version_last_updated.is_empty() { - os.write_string(2, &self.chrome_version_last_updated)?; - } - if self.lockout_policy != ::protobuf::EnumOrUnknown::new(LockoutPolicy::LOCKOUT_POLICY_UNKNOWN) { - os.write_enum(3, ::protobuf::EnumOrUnknown::value(&self.lockout_policy))?; - } - if !self.user_specified_name.is_empty() { - os.write_string(4, &self.user_specified_name)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CommonMetadata { - CommonMetadata::new() - } - - fn clear(&mut self) { - self.chromeos_version_last_updated.clear(); - self.chrome_version_last_updated.clear(); - self.lockout_policy = ::protobuf::EnumOrUnknown::new(LockoutPolicy::LOCKOUT_POLICY_UNKNOWN); - self.user_specified_name.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static CommonMetadata { - static instance: CommonMetadata = CommonMetadata { - chromeos_version_last_updated: ::std::string::String::new(), - chrome_version_last_updated: ::std::string::String::new(), - lockout_policy: ::protobuf::EnumOrUnknown::from_i32(0), - user_specified_name: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.LegacyFingerprintMetadata) -pub struct LegacyFingerprintMetadata { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.LegacyFingerprintMetadata.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a LegacyFingerprintMetadata { - fn default() -> &'a LegacyFingerprintMetadata { - ::default_instance() - } -} - -impl LegacyFingerprintMetadata { - pub fn new() -> LegacyFingerprintMetadata { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for LegacyFingerprintMetadata { - const NAME: &'static str = "LegacyFingerprintMetadata"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> LegacyFingerprintMetadata { - LegacyFingerprintMetadata::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static LegacyFingerprintMetadata { - static instance: LegacyFingerprintMetadata = LegacyFingerprintMetadata { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.FingerprintMetadata) -pub struct FingerprintMetadata { - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.FingerprintMetadata.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a FingerprintMetadata { - fn default() -> &'a FingerprintMetadata { - ::default_instance() - } -} - -impl FingerprintMetadata { - pub fn new() -> FingerprintMetadata { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for FingerprintMetadata { - const NAME: &'static str = "FingerprintMetadata"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> FingerprintMetadata { - FingerprintMetadata::new() - } - - fn clear(&mut self) { - self.special_fields.clear(); - } - - fn default_instance() -> &'static FingerprintMetadata { - static instance: FingerprintMetadata = FingerprintMetadata { - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:user_data_auth.AuthFactor) -pub struct AuthFactor { - // message fields - // @@protoc_insertion_point(field:user_data_auth.AuthFactor.type) - pub type_: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:user_data_auth.AuthFactor.label) - pub label: ::std::string::String, - // @@protoc_insertion_point(field:user_data_auth.AuthFactor.common_metadata) - pub common_metadata: ::protobuf::MessageField, - // message oneof groups - pub metadata: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:user_data_auth.AuthFactor.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a AuthFactor { - fn default() -> &'a AuthFactor { - ::default_instance() - } -} - -impl AuthFactor { - pub fn new() -> AuthFactor { - ::std::default::Default::default() - } - - // .user_data_auth.PasswordMetadata password_metadata = 4; - - pub fn password_metadata(&self) -> &PasswordMetadata { - match self.metadata { - ::std::option::Option::Some(auth_factor::Metadata::PasswordMetadata(ref v)) => v, - _ => ::default_instance(), - } - } - - pub fn clear_password_metadata(&mut self) { - self.metadata = ::std::option::Option::None; - } - - pub fn has_password_metadata(&self) -> bool { - match self.metadata { - ::std::option::Option::Some(auth_factor::Metadata::PasswordMetadata(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_password_metadata(&mut self, v: PasswordMetadata) { - self.metadata = ::std::option::Option::Some(auth_factor::Metadata::PasswordMetadata(v)) - } - - // Mutable pointer to the field. - pub fn mut_password_metadata(&mut self) -> &mut PasswordMetadata { - if let ::std::option::Option::Some(auth_factor::Metadata::PasswordMetadata(_)) = self.metadata { - } else { - self.metadata = ::std::option::Option::Some(auth_factor::Metadata::PasswordMetadata(PasswordMetadata::new())); - } - match self.metadata { - ::std::option::Option::Some(auth_factor::Metadata::PasswordMetadata(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_password_metadata(&mut self) -> PasswordMetadata { - if self.has_password_metadata() { - match self.metadata.take() { - ::std::option::Option::Some(auth_factor::Metadata::PasswordMetadata(v)) => v, - _ => panic!(), - } - } else { - PasswordMetadata::new() - } - } - - // .user_data_auth.PinMetadata pin_metadata = 5; - - pub fn pin_metadata(&self) -> &PinMetadata { - match self.metadata { - ::std::option::Option::Some(auth_factor::Metadata::PinMetadata(ref v)) => v, - _ => ::default_instance(), - } - } - - pub fn clear_pin_metadata(&mut self) { - self.metadata = ::std::option::Option::None; - } - - pub fn has_pin_metadata(&self) -> bool { - match self.metadata { - ::std::option::Option::Some(auth_factor::Metadata::PinMetadata(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_pin_metadata(&mut self, v: PinMetadata) { - self.metadata = ::std::option::Option::Some(auth_factor::Metadata::PinMetadata(v)) - } - - // Mutable pointer to the field. - pub fn mut_pin_metadata(&mut self) -> &mut PinMetadata { - if let ::std::option::Option::Some(auth_factor::Metadata::PinMetadata(_)) = self.metadata { - } else { - self.metadata = ::std::option::Option::Some(auth_factor::Metadata::PinMetadata(PinMetadata::new())); - } - match self.metadata { - ::std::option::Option::Some(auth_factor::Metadata::PinMetadata(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_pin_metadata(&mut self) -> PinMetadata { - if self.has_pin_metadata() { - match self.metadata.take() { - ::std::option::Option::Some(auth_factor::Metadata::PinMetadata(v)) => v, - _ => panic!(), - } - } else { - PinMetadata::new() - } - } - - // .user_data_auth.CryptohomeRecoveryMetadata cryptohome_recovery_metadata = 6; - - pub fn cryptohome_recovery_metadata(&self) -> &CryptohomeRecoveryMetadata { - match self.metadata { - ::std::option::Option::Some(auth_factor::Metadata::CryptohomeRecoveryMetadata(ref v)) => v, - _ => ::default_instance(), - } - } - - pub fn clear_cryptohome_recovery_metadata(&mut self) { - self.metadata = ::std::option::Option::None; - } - - pub fn has_cryptohome_recovery_metadata(&self) -> bool { - match self.metadata { - ::std::option::Option::Some(auth_factor::Metadata::CryptohomeRecoveryMetadata(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_cryptohome_recovery_metadata(&mut self, v: CryptohomeRecoveryMetadata) { - self.metadata = ::std::option::Option::Some(auth_factor::Metadata::CryptohomeRecoveryMetadata(v)) - } - - // Mutable pointer to the field. - pub fn mut_cryptohome_recovery_metadata(&mut self) -> &mut CryptohomeRecoveryMetadata { - if let ::std::option::Option::Some(auth_factor::Metadata::CryptohomeRecoveryMetadata(_)) = self.metadata { - } else { - self.metadata = ::std::option::Option::Some(auth_factor::Metadata::CryptohomeRecoveryMetadata(CryptohomeRecoveryMetadata::new())); - } - match self.metadata { - ::std::option::Option::Some(auth_factor::Metadata::CryptohomeRecoveryMetadata(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_cryptohome_recovery_metadata(&mut self) -> CryptohomeRecoveryMetadata { - if self.has_cryptohome_recovery_metadata() { - match self.metadata.take() { - ::std::option::Option::Some(auth_factor::Metadata::CryptohomeRecoveryMetadata(v)) => v, - _ => panic!(), - } - } else { - CryptohomeRecoveryMetadata::new() - } - } - - // .user_data_auth.KioskMetadata kiosk_metadata = 7; - - pub fn kiosk_metadata(&self) -> &KioskMetadata { - match self.metadata { - ::std::option::Option::Some(auth_factor::Metadata::KioskMetadata(ref v)) => v, - _ => ::default_instance(), - } - } - - pub fn clear_kiosk_metadata(&mut self) { - self.metadata = ::std::option::Option::None; - } - - pub fn has_kiosk_metadata(&self) -> bool { - match self.metadata { - ::std::option::Option::Some(auth_factor::Metadata::KioskMetadata(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_kiosk_metadata(&mut self, v: KioskMetadata) { - self.metadata = ::std::option::Option::Some(auth_factor::Metadata::KioskMetadata(v)) - } - - // Mutable pointer to the field. - pub fn mut_kiosk_metadata(&mut self) -> &mut KioskMetadata { - if let ::std::option::Option::Some(auth_factor::Metadata::KioskMetadata(_)) = self.metadata { - } else { - self.metadata = ::std::option::Option::Some(auth_factor::Metadata::KioskMetadata(KioskMetadata::new())); - } - match self.metadata { - ::std::option::Option::Some(auth_factor::Metadata::KioskMetadata(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_kiosk_metadata(&mut self) -> KioskMetadata { - if self.has_kiosk_metadata() { - match self.metadata.take() { - ::std::option::Option::Some(auth_factor::Metadata::KioskMetadata(v)) => v, - _ => panic!(), - } - } else { - KioskMetadata::new() - } - } - - // .user_data_auth.SmartCardMetadata smart_card_metadata = 8; - - pub fn smart_card_metadata(&self) -> &SmartCardMetadata { - match self.metadata { - ::std::option::Option::Some(auth_factor::Metadata::SmartCardMetadata(ref v)) => v, - _ => ::default_instance(), - } - } - - pub fn clear_smart_card_metadata(&mut self) { - self.metadata = ::std::option::Option::None; - } - - pub fn has_smart_card_metadata(&self) -> bool { - match self.metadata { - ::std::option::Option::Some(auth_factor::Metadata::SmartCardMetadata(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_smart_card_metadata(&mut self, v: SmartCardMetadata) { - self.metadata = ::std::option::Option::Some(auth_factor::Metadata::SmartCardMetadata(v)) - } - - // Mutable pointer to the field. - pub fn mut_smart_card_metadata(&mut self) -> &mut SmartCardMetadata { - if let ::std::option::Option::Some(auth_factor::Metadata::SmartCardMetadata(_)) = self.metadata { - } else { - self.metadata = ::std::option::Option::Some(auth_factor::Metadata::SmartCardMetadata(SmartCardMetadata::new())); - } - match self.metadata { - ::std::option::Option::Some(auth_factor::Metadata::SmartCardMetadata(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_smart_card_metadata(&mut self) -> SmartCardMetadata { - if self.has_smart_card_metadata() { - match self.metadata.take() { - ::std::option::Option::Some(auth_factor::Metadata::SmartCardMetadata(v)) => v, - _ => panic!(), - } - } else { - SmartCardMetadata::new() - } - } - - // .user_data_auth.LegacyFingerprintMetadata legacy_fingerprint_metadata = 11; - - pub fn legacy_fingerprint_metadata(&self) -> &LegacyFingerprintMetadata { - match self.metadata { - ::std::option::Option::Some(auth_factor::Metadata::LegacyFingerprintMetadata(ref v)) => v, - _ => ::default_instance(), - } - } - - pub fn clear_legacy_fingerprint_metadata(&mut self) { - self.metadata = ::std::option::Option::None; - } - - pub fn has_legacy_fingerprint_metadata(&self) -> bool { - match self.metadata { - ::std::option::Option::Some(auth_factor::Metadata::LegacyFingerprintMetadata(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_legacy_fingerprint_metadata(&mut self, v: LegacyFingerprintMetadata) { - self.metadata = ::std::option::Option::Some(auth_factor::Metadata::LegacyFingerprintMetadata(v)) - } - - // Mutable pointer to the field. - pub fn mut_legacy_fingerprint_metadata(&mut self) -> &mut LegacyFingerprintMetadata { - if let ::std::option::Option::Some(auth_factor::Metadata::LegacyFingerprintMetadata(_)) = self.metadata { - } else { - self.metadata = ::std::option::Option::Some(auth_factor::Metadata::LegacyFingerprintMetadata(LegacyFingerprintMetadata::new())); - } - match self.metadata { - ::std::option::Option::Some(auth_factor::Metadata::LegacyFingerprintMetadata(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_legacy_fingerprint_metadata(&mut self) -> LegacyFingerprintMetadata { - if self.has_legacy_fingerprint_metadata() { - match self.metadata.take() { - ::std::option::Option::Some(auth_factor::Metadata::LegacyFingerprintMetadata(v)) => v, - _ => panic!(), - } - } else { - LegacyFingerprintMetadata::new() - } - } - - // .user_data_auth.FingerprintMetadata fingerprint_metadata = 12; - - pub fn fingerprint_metadata(&self) -> &FingerprintMetadata { - match self.metadata { - ::std::option::Option::Some(auth_factor::Metadata::FingerprintMetadata(ref v)) => v, - _ => ::default_instance(), - } - } - - pub fn clear_fingerprint_metadata(&mut self) { - self.metadata = ::std::option::Option::None; - } - - pub fn has_fingerprint_metadata(&self) -> bool { - match self.metadata { - ::std::option::Option::Some(auth_factor::Metadata::FingerprintMetadata(..)) => true, - _ => false, - } - } - - // Param is passed by value, moved - pub fn set_fingerprint_metadata(&mut self, v: FingerprintMetadata) { - self.metadata = ::std::option::Option::Some(auth_factor::Metadata::FingerprintMetadata(v)) - } - - // Mutable pointer to the field. - pub fn mut_fingerprint_metadata(&mut self) -> &mut FingerprintMetadata { - if let ::std::option::Option::Some(auth_factor::Metadata::FingerprintMetadata(_)) = self.metadata { - } else { - self.metadata = ::std::option::Option::Some(auth_factor::Metadata::FingerprintMetadata(FingerprintMetadata::new())); - } - match self.metadata { - ::std::option::Option::Some(auth_factor::Metadata::FingerprintMetadata(ref mut v)) => v, - _ => panic!(), - } - } - - // Take field - pub fn take_fingerprint_metadata(&mut self) -> FingerprintMetadata { - if self.has_fingerprint_metadata() { - match self.metadata.take() { - ::std::option::Option::Some(auth_factor::Metadata::FingerprintMetadata(v)) => v, - _ => panic!(), - } - } else { - FingerprintMetadata::new() - } - } -} - -impl ::protobuf::Message for AuthFactor { - const NAME: &'static str = "AuthFactor"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.type_ = is.read_enum_or_unknown()?; - }, - 18 => { - self.label = is.read_string()?; - }, - 74 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.common_metadata)?; - }, - 34 => { - self.metadata = ::std::option::Option::Some(auth_factor::Metadata::PasswordMetadata(is.read_message()?)); - }, - 42 => { - self.metadata = ::std::option::Option::Some(auth_factor::Metadata::PinMetadata(is.read_message()?)); - }, - 50 => { - self.metadata = ::std::option::Option::Some(auth_factor::Metadata::CryptohomeRecoveryMetadata(is.read_message()?)); - }, - 58 => { - self.metadata = ::std::option::Option::Some(auth_factor::Metadata::KioskMetadata(is.read_message()?)); - }, - 66 => { - self.metadata = ::std::option::Option::Some(auth_factor::Metadata::SmartCardMetadata(is.read_message()?)); - }, - 90 => { - self.metadata = ::std::option::Option::Some(auth_factor::Metadata::LegacyFingerprintMetadata(is.read_message()?)); - }, - 98 => { - self.metadata = ::std::option::Option::Some(auth_factor::Metadata::FingerprintMetadata(is.read_message()?)); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.type_ != ::protobuf::EnumOrUnknown::new(AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED) { - my_size += ::protobuf::rt::int32_size(1, self.type_.value()); - } - if !self.label.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.label); - } - if let Some(v) = self.common_metadata.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let ::std::option::Option::Some(ref v) = self.metadata { - match v { - &auth_factor::Metadata::PasswordMetadata(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }, - &auth_factor::Metadata::PinMetadata(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }, - &auth_factor::Metadata::CryptohomeRecoveryMetadata(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }, - &auth_factor::Metadata::KioskMetadata(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }, - &auth_factor::Metadata::SmartCardMetadata(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }, - &auth_factor::Metadata::LegacyFingerprintMetadata(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }, - &auth_factor::Metadata::FingerprintMetadata(ref v) => { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }, - }; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.type_ != ::protobuf::EnumOrUnknown::new(AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.type_))?; - } - if !self.label.is_empty() { - os.write_string(2, &self.label)?; - } - if let Some(v) = self.common_metadata.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(9, v, os)?; - } - if let ::std::option::Option::Some(ref v) = self.metadata { - match v { - &auth_factor::Metadata::PasswordMetadata(ref v) => { - ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; - }, - &auth_factor::Metadata::PinMetadata(ref v) => { - ::protobuf::rt::write_message_field_with_cached_size(5, v, os)?; - }, - &auth_factor::Metadata::CryptohomeRecoveryMetadata(ref v) => { - ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; - }, - &auth_factor::Metadata::KioskMetadata(ref v) => { - ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?; - }, - &auth_factor::Metadata::SmartCardMetadata(ref v) => { - ::protobuf::rt::write_message_field_with_cached_size(8, v, os)?; - }, - &auth_factor::Metadata::LegacyFingerprintMetadata(ref v) => { - ::protobuf::rt::write_message_field_with_cached_size(11, v, os)?; - }, - &auth_factor::Metadata::FingerprintMetadata(ref v) => { - ::protobuf::rt::write_message_field_with_cached_size(12, v, os)?; - }, - }; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> AuthFactor { - AuthFactor::new() - } - - fn clear(&mut self) { - self.type_ = ::protobuf::EnumOrUnknown::new(AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED); - self.label.clear(); - self.common_metadata.clear(); - self.metadata = ::std::option::Option::None; - self.metadata = ::std::option::Option::None; - self.metadata = ::std::option::Option::None; - self.metadata = ::std::option::Option::None; - self.metadata = ::std::option::Option::None; - self.metadata = ::std::option::Option::None; - self.metadata = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static AuthFactor { - static instance: AuthFactor = AuthFactor { - type_: ::protobuf::EnumOrUnknown::from_i32(0), - label: ::std::string::String::new(), - common_metadata: ::protobuf::MessageField::none(), - metadata: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -/// Nested message and enums of message `AuthFactor` -pub mod auth_factor { - - #[derive(Clone,PartialEq,Debug)] - #[non_exhaustive] - // @@protoc_insertion_point(oneof:user_data_auth.AuthFactor.metadata) - pub enum Metadata { - // @@protoc_insertion_point(oneof_field:user_data_auth.AuthFactor.password_metadata) - PasswordMetadata(super::PasswordMetadata), - // @@protoc_insertion_point(oneof_field:user_data_auth.AuthFactor.pin_metadata) - PinMetadata(super::PinMetadata), - // @@protoc_insertion_point(oneof_field:user_data_auth.AuthFactor.cryptohome_recovery_metadata) - CryptohomeRecoveryMetadata(super::CryptohomeRecoveryMetadata), - // @@protoc_insertion_point(oneof_field:user_data_auth.AuthFactor.kiosk_metadata) - KioskMetadata(super::KioskMetadata), - // @@protoc_insertion_point(oneof_field:user_data_auth.AuthFactor.smart_card_metadata) - SmartCardMetadata(super::SmartCardMetadata), - // @@protoc_insertion_point(oneof_field:user_data_auth.AuthFactor.legacy_fingerprint_metadata) - LegacyFingerprintMetadata(super::LegacyFingerprintMetadata), - // @@protoc_insertion_point(oneof_field:user_data_auth.AuthFactor.fingerprint_metadata) - FingerprintMetadata(super::FingerprintMetadata), - } - - impl ::protobuf::Oneof for Metadata { - } - - impl Metadata { - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:user_data_auth.AuthFactorType) -pub enum AuthFactorType { - // @@protoc_insertion_point(enum_value:user_data_auth.AuthFactorType.AUTH_FACTOR_TYPE_UNSPECIFIED) - AUTH_FACTOR_TYPE_UNSPECIFIED = 0, - // @@protoc_insertion_point(enum_value:user_data_auth.AuthFactorType.AUTH_FACTOR_TYPE_PASSWORD) - AUTH_FACTOR_TYPE_PASSWORD = 1, - // @@protoc_insertion_point(enum_value:user_data_auth.AuthFactorType.AUTH_FACTOR_TYPE_PIN) - AUTH_FACTOR_TYPE_PIN = 2, - // @@protoc_insertion_point(enum_value:user_data_auth.AuthFactorType.AUTH_FACTOR_TYPE_CRYPTOHOME_RECOVERY) - AUTH_FACTOR_TYPE_CRYPTOHOME_RECOVERY = 3, - // @@protoc_insertion_point(enum_value:user_data_auth.AuthFactorType.AUTH_FACTOR_TYPE_KIOSK) - AUTH_FACTOR_TYPE_KIOSK = 4, - // @@protoc_insertion_point(enum_value:user_data_auth.AuthFactorType.AUTH_FACTOR_TYPE_SMART_CARD) - AUTH_FACTOR_TYPE_SMART_CARD = 5, - // @@protoc_insertion_point(enum_value:user_data_auth.AuthFactorType.AUTH_FACTOR_TYPE_LEGACY_FINGERPRINT) - AUTH_FACTOR_TYPE_LEGACY_FINGERPRINT = 6, - // @@protoc_insertion_point(enum_value:user_data_auth.AuthFactorType.AUTH_FACTOR_TYPE_FINGERPRINT) - AUTH_FACTOR_TYPE_FINGERPRINT = 7, -} - -impl ::protobuf::Enum for AuthFactorType { - const NAME: &'static str = "AuthFactorType"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED), - 1 => ::std::option::Option::Some(AuthFactorType::AUTH_FACTOR_TYPE_PASSWORD), - 2 => ::std::option::Option::Some(AuthFactorType::AUTH_FACTOR_TYPE_PIN), - 3 => ::std::option::Option::Some(AuthFactorType::AUTH_FACTOR_TYPE_CRYPTOHOME_RECOVERY), - 4 => ::std::option::Option::Some(AuthFactorType::AUTH_FACTOR_TYPE_KIOSK), - 5 => ::std::option::Option::Some(AuthFactorType::AUTH_FACTOR_TYPE_SMART_CARD), - 6 => ::std::option::Option::Some(AuthFactorType::AUTH_FACTOR_TYPE_LEGACY_FINGERPRINT), - 7 => ::std::option::Option::Some(AuthFactorType::AUTH_FACTOR_TYPE_FINGERPRINT), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [AuthFactorType] = &[ - AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED, - AuthFactorType::AUTH_FACTOR_TYPE_PASSWORD, - AuthFactorType::AUTH_FACTOR_TYPE_PIN, - AuthFactorType::AUTH_FACTOR_TYPE_CRYPTOHOME_RECOVERY, - AuthFactorType::AUTH_FACTOR_TYPE_KIOSK, - AuthFactorType::AUTH_FACTOR_TYPE_SMART_CARD, - AuthFactorType::AUTH_FACTOR_TYPE_LEGACY_FINGERPRINT, - AuthFactorType::AUTH_FACTOR_TYPE_FINGERPRINT, - ]; -} - -impl ::std::default::Default for AuthFactorType { - fn default() -> Self { - AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED - } -} - - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:user_data_auth.AuthFactorPreparePurpose) -pub enum AuthFactorPreparePurpose { - // @@protoc_insertion_point(enum_value:user_data_auth.AuthFactorPreparePurpose.PURPOSE_UNSPECIFIED) - PURPOSE_UNSPECIFIED = 0, - // @@protoc_insertion_point(enum_value:user_data_auth.AuthFactorPreparePurpose.PURPOSE_ADD_AUTH_FACTOR) - PURPOSE_ADD_AUTH_FACTOR = 1, - // @@protoc_insertion_point(enum_value:user_data_auth.AuthFactorPreparePurpose.PURPOSE_AUTHENTICATE_AUTH_FACTOR) - PURPOSE_AUTHENTICATE_AUTH_FACTOR = 2, -} - -impl ::protobuf::Enum for AuthFactorPreparePurpose { - const NAME: &'static str = "AuthFactorPreparePurpose"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(AuthFactorPreparePurpose::PURPOSE_UNSPECIFIED), - 1 => ::std::option::Option::Some(AuthFactorPreparePurpose::PURPOSE_ADD_AUTH_FACTOR), - 2 => ::std::option::Option::Some(AuthFactorPreparePurpose::PURPOSE_AUTHENTICATE_AUTH_FACTOR), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [AuthFactorPreparePurpose] = &[ - AuthFactorPreparePurpose::PURPOSE_UNSPECIFIED, - AuthFactorPreparePurpose::PURPOSE_ADD_AUTH_FACTOR, - AuthFactorPreparePurpose::PURPOSE_AUTHENTICATE_AUTH_FACTOR, - ]; -} - -impl ::std::default::Default for AuthFactorPreparePurpose { - fn default() -> Self { - AuthFactorPreparePurpose::PURPOSE_UNSPECIFIED - } -} - - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:user_data_auth.SmartCardSignatureAlgorithm) -pub enum SmartCardSignatureAlgorithm { - // @@protoc_insertion_point(enum_value:user_data_auth.SmartCardSignatureAlgorithm.CHALLENGE_NOT_SPECIFIED) - CHALLENGE_NOT_SPECIFIED = 0, - // @@protoc_insertion_point(enum_value:user_data_auth.SmartCardSignatureAlgorithm.CHALLENGE_RSASSA_PKCS1_V1_5_SHA1) - CHALLENGE_RSASSA_PKCS1_V1_5_SHA1 = 1, - // @@protoc_insertion_point(enum_value:user_data_auth.SmartCardSignatureAlgorithm.CHALLENGE_RSASSA_PKCS1_V1_5_SHA256) - CHALLENGE_RSASSA_PKCS1_V1_5_SHA256 = 2, - // @@protoc_insertion_point(enum_value:user_data_auth.SmartCardSignatureAlgorithm.CHALLENGE_RSASSA_PKCS1_V1_5_SHA384) - CHALLENGE_RSASSA_PKCS1_V1_5_SHA384 = 3, - // @@protoc_insertion_point(enum_value:user_data_auth.SmartCardSignatureAlgorithm.CHALLENGE_RSASSA_PKCS1_V1_5_SHA512) - CHALLENGE_RSASSA_PKCS1_V1_5_SHA512 = 4, -} - -impl ::protobuf::Enum for SmartCardSignatureAlgorithm { - const NAME: &'static str = "SmartCardSignatureAlgorithm"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(SmartCardSignatureAlgorithm::CHALLENGE_NOT_SPECIFIED), - 1 => ::std::option::Option::Some(SmartCardSignatureAlgorithm::CHALLENGE_RSASSA_PKCS1_V1_5_SHA1), - 2 => ::std::option::Option::Some(SmartCardSignatureAlgorithm::CHALLENGE_RSASSA_PKCS1_V1_5_SHA256), - 3 => ::std::option::Option::Some(SmartCardSignatureAlgorithm::CHALLENGE_RSASSA_PKCS1_V1_5_SHA384), - 4 => ::std::option::Option::Some(SmartCardSignatureAlgorithm::CHALLENGE_RSASSA_PKCS1_V1_5_SHA512), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [SmartCardSignatureAlgorithm] = &[ - SmartCardSignatureAlgorithm::CHALLENGE_NOT_SPECIFIED, - SmartCardSignatureAlgorithm::CHALLENGE_RSASSA_PKCS1_V1_5_SHA1, - SmartCardSignatureAlgorithm::CHALLENGE_RSASSA_PKCS1_V1_5_SHA256, - SmartCardSignatureAlgorithm::CHALLENGE_RSASSA_PKCS1_V1_5_SHA384, - SmartCardSignatureAlgorithm::CHALLENGE_RSASSA_PKCS1_V1_5_SHA512, - ]; -} - -impl ::std::default::Default for SmartCardSignatureAlgorithm { - fn default() -> Self { - SmartCardSignatureAlgorithm::CHALLENGE_NOT_SPECIFIED - } -} - - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:user_data_auth.AuthIntent) -pub enum AuthIntent { - // @@protoc_insertion_point(enum_value:user_data_auth.AuthIntent.AUTH_INTENT_UNSPECIFIED) - AUTH_INTENT_UNSPECIFIED = 0, - // @@protoc_insertion_point(enum_value:user_data_auth.AuthIntent.AUTH_INTENT_DECRYPT) - AUTH_INTENT_DECRYPT = 1, - // @@protoc_insertion_point(enum_value:user_data_auth.AuthIntent.AUTH_INTENT_VERIFY_ONLY) - AUTH_INTENT_VERIFY_ONLY = 2, - // @@protoc_insertion_point(enum_value:user_data_auth.AuthIntent.AUTH_INTENT_WEBAUTHN) - AUTH_INTENT_WEBAUTHN = 3, -} - -impl ::protobuf::Enum for AuthIntent { - const NAME: &'static str = "AuthIntent"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(AuthIntent::AUTH_INTENT_UNSPECIFIED), - 1 => ::std::option::Option::Some(AuthIntent::AUTH_INTENT_DECRYPT), - 2 => ::std::option::Option::Some(AuthIntent::AUTH_INTENT_VERIFY_ONLY), - 3 => ::std::option::Option::Some(AuthIntent::AUTH_INTENT_WEBAUTHN), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [AuthIntent] = &[ - AuthIntent::AUTH_INTENT_UNSPECIFIED, - AuthIntent::AUTH_INTENT_DECRYPT, - AuthIntent::AUTH_INTENT_VERIFY_ONLY, - AuthIntent::AUTH_INTENT_WEBAUTHN, - ]; -} - -impl ::std::default::Default for AuthIntent { - fn default() -> Self { - AuthIntent::AUTH_INTENT_UNSPECIFIED - } -} - - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:user_data_auth.LockoutPolicy) -pub enum LockoutPolicy { - // @@protoc_insertion_point(enum_value:user_data_auth.LockoutPolicy.LOCKOUT_POLICY_UNKNOWN) - LOCKOUT_POLICY_UNKNOWN = 0, - // @@protoc_insertion_point(enum_value:user_data_auth.LockoutPolicy.LOCKOUT_POLICY_NONE) - LOCKOUT_POLICY_NONE = 1, - // @@protoc_insertion_point(enum_value:user_data_auth.LockoutPolicy.LOCKOUT_POLICY_ATTEMPT_LIMITED) - LOCKOUT_POLICY_ATTEMPT_LIMITED = 2, - // @@protoc_insertion_point(enum_value:user_data_auth.LockoutPolicy.LOCKOUT_POLICY_TIME_LIMITED) - LOCKOUT_POLICY_TIME_LIMITED = 3, -} - -impl ::protobuf::Enum for LockoutPolicy { - const NAME: &'static str = "LockoutPolicy"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(LockoutPolicy::LOCKOUT_POLICY_UNKNOWN), - 1 => ::std::option::Option::Some(LockoutPolicy::LOCKOUT_POLICY_NONE), - 2 => ::std::option::Option::Some(LockoutPolicy::LOCKOUT_POLICY_ATTEMPT_LIMITED), - 3 => ::std::option::Option::Some(LockoutPolicy::LOCKOUT_POLICY_TIME_LIMITED), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [LockoutPolicy] = &[ - LockoutPolicy::LOCKOUT_POLICY_UNKNOWN, - LockoutPolicy::LOCKOUT_POLICY_NONE, - LockoutPolicy::LOCKOUT_POLICY_ATTEMPT_LIMITED, - LockoutPolicy::LOCKOUT_POLICY_TIME_LIMITED, - ]; -} - -impl ::std::default::Default for LockoutPolicy { - fn default() -> Self { - LockoutPolicy::LOCKOUT_POLICY_UNKNOWN - } -} - diff --git a/system_api/src/protos/fido.rs b/system_api/src/protos/fido.rs deleted file mode 100644 index 688c9a707e..0000000000 --- a/system_api/src/protos/fido.rs +++ /dev/null @@ -1,2137 +0,0 @@ -// This file is generated by rust-protobuf 3.2.0. Do not edit -// .proto file is parsed by protoc 3.21.9 -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `fido.proto` -// Generated for lite runtime - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0; - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.fido.Url) -pub struct Url { - // message fields - // @@protoc_insertion_point(field:cryptohome.fido.Url.url) - pub url: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.fido.Url.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Url { - fn default() -> &'a Url { - ::default_instance() - } -} - -impl Url { - pub fn new() -> Url { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for Url { - const NAME: &'static str = "Url"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.url = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.url.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.url); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.url.is_empty() { - os.write_string(1, &self.url)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Url { - Url::new() - } - - fn clear(&mut self) { - self.url.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static Url { - static instance: Url = Url { - url: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.fido.CommonCredentialInfo) -pub struct CommonCredentialInfo { - // message fields - // @@protoc_insertion_point(field:cryptohome.fido.CommonCredentialInfo.id) - pub id: ::std::string::String, - // @@protoc_insertion_point(field:cryptohome.fido.CommonCredentialInfo.raw_id) - pub raw_id: ::std::vec::Vec, - // @@protoc_insertion_point(field:cryptohome.fido.CommonCredentialInfo.client_data_json) - pub client_data_json: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.fido.CommonCredentialInfo.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CommonCredentialInfo { - fn default() -> &'a CommonCredentialInfo { - ::default_instance() - } -} - -impl CommonCredentialInfo { - pub fn new() -> CommonCredentialInfo { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for CommonCredentialInfo { - const NAME: &'static str = "CommonCredentialInfo"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_string()?; - }, - 18 => { - self.raw_id = is.read_bytes()?; - }, - 26 => { - self.client_data_json = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - if !self.raw_id.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.raw_id); - } - if !self.client_data_json.is_empty() { - my_size += ::protobuf::rt::bytes_size(3, &self.client_data_json); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_string(1, &self.id)?; - } - if !self.raw_id.is_empty() { - os.write_bytes(2, &self.raw_id)?; - } - if !self.client_data_json.is_empty() { - os.write_bytes(3, &self.client_data_json)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CommonCredentialInfo { - CommonCredentialInfo::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.raw_id.clear(); - self.client_data_json.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static CommonCredentialInfo { - static instance: CommonCredentialInfo = CommonCredentialInfo { - id: ::std::string::String::new(), - raw_id: ::std::vec::Vec::new(), - client_data_json: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.fido.MakeCredentialAuthenticatorResponse) -pub struct MakeCredentialAuthenticatorResponse { - // message fields - // @@protoc_insertion_point(field:cryptohome.fido.MakeCredentialAuthenticatorResponse.info) - pub info: ::protobuf::MessageField, - // @@protoc_insertion_point(field:cryptohome.fido.MakeCredentialAuthenticatorResponse.attestation_object) - pub attestation_object: ::std::vec::Vec, - // @@protoc_insertion_point(field:cryptohome.fido.MakeCredentialAuthenticatorResponse.transports) - pub transports: ::std::vec::Vec<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:cryptohome.fido.MakeCredentialAuthenticatorResponse.echo_hmac_create_secret) - pub echo_hmac_create_secret: bool, - // @@protoc_insertion_point(field:cryptohome.fido.MakeCredentialAuthenticatorResponse.hmac_create_secret) - pub hmac_create_secret: bool, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.fido.MakeCredentialAuthenticatorResponse.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a MakeCredentialAuthenticatorResponse { - fn default() -> &'a MakeCredentialAuthenticatorResponse { - ::default_instance() - } -} - -impl MakeCredentialAuthenticatorResponse { - pub fn new() -> MakeCredentialAuthenticatorResponse { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for MakeCredentialAuthenticatorResponse { - const NAME: &'static str = "MakeCredentialAuthenticatorResponse"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.info)?; - }, - 18 => { - self.attestation_object = is.read_bytes()?; - }, - 24 => { - self.transports.push(is.read_enum_or_unknown()?); - }, - 26 => { - ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.transports)? - }, - 32 => { - self.echo_hmac_create_secret = is.read_bool()?; - }, - 40 => { - self.hmac_create_secret = is.read_bool()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if !self.attestation_object.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.attestation_object); - } - for value in &self.transports { - my_size += ::protobuf::rt::int32_size(3, value.value()); - }; - if self.echo_hmac_create_secret != false { - my_size += 1 + 1; - } - if self.hmac_create_secret != false { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if !self.attestation_object.is_empty() { - os.write_bytes(2, &self.attestation_object)?; - } - for v in &self.transports { - os.write_enum(3, ::protobuf::EnumOrUnknown::value(v))?; - }; - if self.echo_hmac_create_secret != false { - os.write_bool(4, self.echo_hmac_create_secret)?; - } - if self.hmac_create_secret != false { - os.write_bool(5, self.hmac_create_secret)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> MakeCredentialAuthenticatorResponse { - MakeCredentialAuthenticatorResponse::new() - } - - fn clear(&mut self) { - self.info.clear(); - self.attestation_object.clear(); - self.transports.clear(); - self.echo_hmac_create_secret = false; - self.hmac_create_secret = false; - self.special_fields.clear(); - } - - fn default_instance() -> &'static MakeCredentialAuthenticatorResponse { - static instance: MakeCredentialAuthenticatorResponse = MakeCredentialAuthenticatorResponse { - info: ::protobuf::MessageField::none(), - attestation_object: ::std::vec::Vec::new(), - transports: ::std::vec::Vec::new(), - echo_hmac_create_secret: false, - hmac_create_secret: false, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.fido.GetAssertionAuthenticatorResponse) -pub struct GetAssertionAuthenticatorResponse { - // message fields - // @@protoc_insertion_point(field:cryptohome.fido.GetAssertionAuthenticatorResponse.info) - pub info: ::protobuf::MessageField, - // @@protoc_insertion_point(field:cryptohome.fido.GetAssertionAuthenticatorResponse.authenticator_data) - pub authenticator_data: ::std::vec::Vec, - // @@protoc_insertion_point(field:cryptohome.fido.GetAssertionAuthenticatorResponse.signature) - pub signature: ::std::vec::Vec, - // @@protoc_insertion_point(field:cryptohome.fido.GetAssertionAuthenticatorResponse.user_handle) - pub user_handle: ::std::vec::Vec, - // @@protoc_insertion_point(field:cryptohome.fido.GetAssertionAuthenticatorResponse.echo_appid_extension) - pub echo_appid_extension: bool, - // @@protoc_insertion_point(field:cryptohome.fido.GetAssertionAuthenticatorResponse.appid_extension) - pub appid_extension: bool, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.fido.GetAssertionAuthenticatorResponse.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a GetAssertionAuthenticatorResponse { - fn default() -> &'a GetAssertionAuthenticatorResponse { - ::default_instance() - } -} - -impl GetAssertionAuthenticatorResponse { - pub fn new() -> GetAssertionAuthenticatorResponse { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for GetAssertionAuthenticatorResponse { - const NAME: &'static str = "GetAssertionAuthenticatorResponse"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.info)?; - }, - 18 => { - self.authenticator_data = is.read_bytes()?; - }, - 26 => { - self.signature = is.read_bytes()?; - }, - 34 => { - self.user_handle = is.read_bytes()?; - }, - 40 => { - self.echo_appid_extension = is.read_bool()?; - }, - 48 => { - self.appid_extension = is.read_bool()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.info.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if !self.authenticator_data.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.authenticator_data); - } - if !self.signature.is_empty() { - my_size += ::protobuf::rt::bytes_size(3, &self.signature); - } - if !self.user_handle.is_empty() { - my_size += ::protobuf::rt::bytes_size(4, &self.user_handle); - } - if self.echo_appid_extension != false { - my_size += 1 + 1; - } - if self.appid_extension != false { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.info.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if !self.authenticator_data.is_empty() { - os.write_bytes(2, &self.authenticator_data)?; - } - if !self.signature.is_empty() { - os.write_bytes(3, &self.signature)?; - } - if !self.user_handle.is_empty() { - os.write_bytes(4, &self.user_handle)?; - } - if self.echo_appid_extension != false { - os.write_bool(5, self.echo_appid_extension)?; - } - if self.appid_extension != false { - os.write_bool(6, self.appid_extension)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> GetAssertionAuthenticatorResponse { - GetAssertionAuthenticatorResponse::new() - } - - fn clear(&mut self) { - self.info.clear(); - self.authenticator_data.clear(); - self.signature.clear(); - self.user_handle.clear(); - self.echo_appid_extension = false; - self.appid_extension = false; - self.special_fields.clear(); - } - - fn default_instance() -> &'static GetAssertionAuthenticatorResponse { - static instance: GetAssertionAuthenticatorResponse = GetAssertionAuthenticatorResponse { - info: ::protobuf::MessageField::none(), - authenticator_data: ::std::vec::Vec::new(), - signature: ::std::vec::Vec::new(), - user_handle: ::std::vec::Vec::new(), - echo_appid_extension: false, - appid_extension: false, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.fido.PublicKeyCredentialRpEntity) -pub struct PublicKeyCredentialRpEntity { - // message fields - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialRpEntity.id) - pub id: ::std::string::String, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialRpEntity.name) - pub name: ::std::string::String, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialRpEntity.icon) - pub icon: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.fido.PublicKeyCredentialRpEntity.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PublicKeyCredentialRpEntity { - fn default() -> &'a PublicKeyCredentialRpEntity { - ::default_instance() - } -} - -impl PublicKeyCredentialRpEntity { - pub fn new() -> PublicKeyCredentialRpEntity { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for PublicKeyCredentialRpEntity { - const NAME: &'static str = "PublicKeyCredentialRpEntity"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_string()?; - }, - 18 => { - self.name = is.read_string()?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.icon)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::string_size(1, &self.id); - } - if !self.name.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.name); - } - if let Some(v) = self.icon.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_string(1, &self.id)?; - } - if !self.name.is_empty() { - os.write_string(2, &self.name)?; - } - if let Some(v) = self.icon.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PublicKeyCredentialRpEntity { - PublicKeyCredentialRpEntity::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.name.clear(); - self.icon.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static PublicKeyCredentialRpEntity { - static instance: PublicKeyCredentialRpEntity = PublicKeyCredentialRpEntity { - id: ::std::string::String::new(), - name: ::std::string::String::new(), - icon: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.fido.PublicKeyCredentialUserEntity) -pub struct PublicKeyCredentialUserEntity { - // message fields - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialUserEntity.id) - pub id: ::std::vec::Vec, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialUserEntity.name) - pub name: ::std::string::String, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialUserEntity.icon) - pub icon: ::protobuf::MessageField, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialUserEntity.display_name) - pub display_name: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.fido.PublicKeyCredentialUserEntity.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PublicKeyCredentialUserEntity { - fn default() -> &'a PublicKeyCredentialUserEntity { - ::default_instance() - } -} - -impl PublicKeyCredentialUserEntity { - pub fn new() -> PublicKeyCredentialUserEntity { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for PublicKeyCredentialUserEntity { - const NAME: &'static str = "PublicKeyCredentialUserEntity"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.id = is.read_bytes()?; - }, - 18 => { - self.name = is.read_string()?; - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.icon)?; - }, - 34 => { - self.display_name = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.id.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.id); - } - if !self.name.is_empty() { - my_size += ::protobuf::rt::string_size(2, &self.name); - } - if let Some(v) = self.icon.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if !self.display_name.is_empty() { - my_size += ::protobuf::rt::string_size(4, &self.display_name); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.id.is_empty() { - os.write_bytes(1, &self.id)?; - } - if !self.name.is_empty() { - os.write_string(2, &self.name)?; - } - if let Some(v) = self.icon.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - if !self.display_name.is_empty() { - os.write_string(4, &self.display_name)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PublicKeyCredentialUserEntity { - PublicKeyCredentialUserEntity::new() - } - - fn clear(&mut self) { - self.id.clear(); - self.name.clear(); - self.icon.clear(); - self.display_name.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static PublicKeyCredentialUserEntity { - static instance: PublicKeyCredentialUserEntity = PublicKeyCredentialUserEntity { - id: ::std::vec::Vec::new(), - name: ::std::string::String::new(), - icon: ::protobuf::MessageField::none(), - display_name: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.fido.PublicKeyCredentialParameters) -pub struct PublicKeyCredentialParameters { - // message fields - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialParameters.type) - pub type_: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialParameters.algorithm_identifier) - pub algorithm_identifier: i32, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.fido.PublicKeyCredentialParameters.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PublicKeyCredentialParameters { - fn default() -> &'a PublicKeyCredentialParameters { - ::default_instance() - } -} - -impl PublicKeyCredentialParameters { - pub fn new() -> PublicKeyCredentialParameters { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for PublicKeyCredentialParameters { - const NAME: &'static str = "PublicKeyCredentialParameters"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.type_ = is.read_enum_or_unknown()?; - }, - 16 => { - self.algorithm_identifier = is.read_int32()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.type_ != ::protobuf::EnumOrUnknown::new(PublicKeyCredentialType::PUBLIC_KEY) { - my_size += ::protobuf::rt::int32_size(1, self.type_.value()); - } - if self.algorithm_identifier != 0 { - my_size += ::protobuf::rt::int32_size(2, self.algorithm_identifier); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.type_ != ::protobuf::EnumOrUnknown::new(PublicKeyCredentialType::PUBLIC_KEY) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.type_))?; - } - if self.algorithm_identifier != 0 { - os.write_int32(2, self.algorithm_identifier)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PublicKeyCredentialParameters { - PublicKeyCredentialParameters::new() - } - - fn clear(&mut self) { - self.type_ = ::protobuf::EnumOrUnknown::new(PublicKeyCredentialType::PUBLIC_KEY); - self.algorithm_identifier = 0; - self.special_fields.clear(); - } - - fn default_instance() -> &'static PublicKeyCredentialParameters { - static instance: PublicKeyCredentialParameters = PublicKeyCredentialParameters { - type_: ::protobuf::EnumOrUnknown::from_i32(0), - algorithm_identifier: 0, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.fido.CableAuthentication) -pub struct CableAuthentication { - // message fields - // @@protoc_insertion_point(field:cryptohome.fido.CableAuthentication.version) - pub version: u32, - // @@protoc_insertion_point(field:cryptohome.fido.CableAuthentication.client_eid) - pub client_eid: ::std::vec::Vec, - // @@protoc_insertion_point(field:cryptohome.fido.CableAuthentication.authenticator_eid) - pub authenticator_eid: ::std::vec::Vec, - // @@protoc_insertion_point(field:cryptohome.fido.CableAuthentication.session_pre_key) - pub session_pre_key: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.fido.CableAuthentication.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CableAuthentication { - fn default() -> &'a CableAuthentication { - ::default_instance() - } -} - -impl CableAuthentication { - pub fn new() -> CableAuthentication { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for CableAuthentication { - const NAME: &'static str = "CableAuthentication"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.version = is.read_uint32()?; - }, - 18 => { - self.client_eid = is.read_bytes()?; - }, - 26 => { - self.authenticator_eid = is.read_bytes()?; - }, - 34 => { - self.session_pre_key = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.version != 0 { - my_size += ::protobuf::rt::uint32_size(1, self.version); - } - if !self.client_eid.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.client_eid); - } - if !self.authenticator_eid.is_empty() { - my_size += ::protobuf::rt::bytes_size(3, &self.authenticator_eid); - } - if !self.session_pre_key.is_empty() { - my_size += ::protobuf::rt::bytes_size(4, &self.session_pre_key); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.version != 0 { - os.write_uint32(1, self.version)?; - } - if !self.client_eid.is_empty() { - os.write_bytes(2, &self.client_eid)?; - } - if !self.authenticator_eid.is_empty() { - os.write_bytes(3, &self.authenticator_eid)?; - } - if !self.session_pre_key.is_empty() { - os.write_bytes(4, &self.session_pre_key)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CableAuthentication { - CableAuthentication::new() - } - - fn clear(&mut self) { - self.version = 0; - self.client_eid.clear(); - self.authenticator_eid.clear(); - self.session_pre_key.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static CableAuthentication { - static instance: CableAuthentication = CableAuthentication { - version: 0, - client_eid: ::std::vec::Vec::new(), - authenticator_eid: ::std::vec::Vec::new(), - session_pre_key: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.fido.CableRegistration) -pub struct CableRegistration { - // message fields - // @@protoc_insertion_point(field:cryptohome.fido.CableRegistration.versions) - pub versions: ::std::vec::Vec, - // @@protoc_insertion_point(field:cryptohome.fido.CableRegistration.relying_party_public_key) - pub relying_party_public_key: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.fido.CableRegistration.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a CableRegistration { - fn default() -> &'a CableRegistration { - ::default_instance() - } -} - -impl CableRegistration { - pub fn new() -> CableRegistration { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for CableRegistration { - const NAME: &'static str = "CableRegistration"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.versions = is.read_bytes()?; - }, - 18 => { - self.relying_party_public_key = is.read_bytes()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.versions.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.versions); - } - if !self.relying_party_public_key.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.relying_party_public_key); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.versions.is_empty() { - os.write_bytes(1, &self.versions)?; - } - if !self.relying_party_public_key.is_empty() { - os.write_bytes(2, &self.relying_party_public_key)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> CableRegistration { - CableRegistration::new() - } - - fn clear(&mut self) { - self.versions.clear(); - self.relying_party_public_key.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static CableRegistration { - static instance: CableRegistration = CableRegistration { - versions: ::std::vec::Vec::new(), - relying_party_public_key: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.fido.PublicKeyCredentialRequestOptions) -pub struct PublicKeyCredentialRequestOptions { - // message fields - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialRequestOptions.challenge) - pub challenge: ::std::vec::Vec, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialRequestOptions.adjusted_timeout) - pub adjusted_timeout: i64, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialRequestOptions.relying_party_id) - pub relying_party_id: ::std::string::String, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialRequestOptions.allow_credentials) - pub allow_credentials: ::std::vec::Vec, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialRequestOptions.user_verification) - pub user_verification: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialRequestOptions.appid) - pub appid: ::std::string::String, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialRequestOptions.cable_authentication_data) - pub cable_authentication_data: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.fido.PublicKeyCredentialRequestOptions.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PublicKeyCredentialRequestOptions { - fn default() -> &'a PublicKeyCredentialRequestOptions { - ::default_instance() - } -} - -impl PublicKeyCredentialRequestOptions { - pub fn new() -> PublicKeyCredentialRequestOptions { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for PublicKeyCredentialRequestOptions { - const NAME: &'static str = "PublicKeyCredentialRequestOptions"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.challenge = is.read_bytes()?; - }, - 16 => { - self.adjusted_timeout = is.read_int64()?; - }, - 26 => { - self.relying_party_id = is.read_string()?; - }, - 34 => { - self.allow_credentials.push(is.read_message()?); - }, - 40 => { - self.user_verification = is.read_enum_or_unknown()?; - }, - 50 => { - self.appid = is.read_string()?; - }, - 58 => { - self.cable_authentication_data.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if !self.challenge.is_empty() { - my_size += ::protobuf::rt::bytes_size(1, &self.challenge); - } - if self.adjusted_timeout != 0 { - my_size += ::protobuf::rt::int64_size(2, self.adjusted_timeout); - } - if !self.relying_party_id.is_empty() { - my_size += ::protobuf::rt::string_size(3, &self.relying_party_id); - } - for value in &self.allow_credentials { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if self.user_verification != ::protobuf::EnumOrUnknown::new(UserVerificationRequirement::REQUIRED) { - my_size += ::protobuf::rt::int32_size(5, self.user_verification.value()); - } - if !self.appid.is_empty() { - my_size += ::protobuf::rt::string_size(6, &self.appid); - } - for value in &self.cable_authentication_data { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if !self.challenge.is_empty() { - os.write_bytes(1, &self.challenge)?; - } - if self.adjusted_timeout != 0 { - os.write_int64(2, self.adjusted_timeout)?; - } - if !self.relying_party_id.is_empty() { - os.write_string(3, &self.relying_party_id)?; - } - for v in &self.allow_credentials { - ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; - }; - if self.user_verification != ::protobuf::EnumOrUnknown::new(UserVerificationRequirement::REQUIRED) { - os.write_enum(5, ::protobuf::EnumOrUnknown::value(&self.user_verification))?; - } - if !self.appid.is_empty() { - os.write_string(6, &self.appid)?; - } - for v in &self.cable_authentication_data { - ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PublicKeyCredentialRequestOptions { - PublicKeyCredentialRequestOptions::new() - } - - fn clear(&mut self) { - self.challenge.clear(); - self.adjusted_timeout = 0; - self.relying_party_id.clear(); - self.allow_credentials.clear(); - self.user_verification = ::protobuf::EnumOrUnknown::new(UserVerificationRequirement::REQUIRED); - self.appid.clear(); - self.cable_authentication_data.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static PublicKeyCredentialRequestOptions { - static instance: PublicKeyCredentialRequestOptions = PublicKeyCredentialRequestOptions { - challenge: ::std::vec::Vec::new(), - adjusted_timeout: 0, - relying_party_id: ::std::string::String::new(), - allow_credentials: ::std::vec::Vec::new(), - user_verification: ::protobuf::EnumOrUnknown::from_i32(0), - appid: ::std::string::String::new(), - cable_authentication_data: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.fido.AuthenticatorSelectionCriteria) -pub struct AuthenticatorSelectionCriteria { - // message fields - // @@protoc_insertion_point(field:cryptohome.fido.AuthenticatorSelectionCriteria.authenticator_attachment) - pub authenticator_attachment: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:cryptohome.fido.AuthenticatorSelectionCriteria.require_resident_key) - pub require_resident_key: bool, - // @@protoc_insertion_point(field:cryptohome.fido.AuthenticatorSelectionCriteria.user_verification) - pub user_verification: ::protobuf::EnumOrUnknown, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.fido.AuthenticatorSelectionCriteria.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a AuthenticatorSelectionCriteria { - fn default() -> &'a AuthenticatorSelectionCriteria { - ::default_instance() - } -} - -impl AuthenticatorSelectionCriteria { - pub fn new() -> AuthenticatorSelectionCriteria { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for AuthenticatorSelectionCriteria { - const NAME: &'static str = "AuthenticatorSelectionCriteria"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.authenticator_attachment = is.read_enum_or_unknown()?; - }, - 16 => { - self.require_resident_key = is.read_bool()?; - }, - 24 => { - self.user_verification = is.read_enum_or_unknown()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.authenticator_attachment != ::protobuf::EnumOrUnknown::new(AuthenticatorAttachment::NO_PREFERENCE) { - my_size += ::protobuf::rt::int32_size(1, self.authenticator_attachment.value()); - } - if self.require_resident_key != false { - my_size += 1 + 1; - } - if self.user_verification != ::protobuf::EnumOrUnknown::new(UserVerificationRequirement::REQUIRED) { - my_size += ::protobuf::rt::int32_size(3, self.user_verification.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.authenticator_attachment != ::protobuf::EnumOrUnknown::new(AuthenticatorAttachment::NO_PREFERENCE) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.authenticator_attachment))?; - } - if self.require_resident_key != false { - os.write_bool(2, self.require_resident_key)?; - } - if self.user_verification != ::protobuf::EnumOrUnknown::new(UserVerificationRequirement::REQUIRED) { - os.write_enum(3, ::protobuf::EnumOrUnknown::value(&self.user_verification))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> AuthenticatorSelectionCriteria { - AuthenticatorSelectionCriteria::new() - } - - fn clear(&mut self) { - self.authenticator_attachment = ::protobuf::EnumOrUnknown::new(AuthenticatorAttachment::NO_PREFERENCE); - self.require_resident_key = false; - self.user_verification = ::protobuf::EnumOrUnknown::new(UserVerificationRequirement::REQUIRED); - self.special_fields.clear(); - } - - fn default_instance() -> &'static AuthenticatorSelectionCriteria { - static instance: AuthenticatorSelectionCriteria = AuthenticatorSelectionCriteria { - authenticator_attachment: ::protobuf::EnumOrUnknown::from_i32(0), - require_resident_key: false, - user_verification: ::protobuf::EnumOrUnknown::from_i32(0), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.fido.PublicKeyCredentialCreationOptions) -pub struct PublicKeyCredentialCreationOptions { - // message fields - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialCreationOptions.relying_party) - pub relying_party: ::protobuf::MessageField, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialCreationOptions.user) - pub user: ::protobuf::MessageField, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialCreationOptions.challenge) - pub challenge: ::std::vec::Vec, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialCreationOptions.public_key_parameters) - pub public_key_parameters: ::std::vec::Vec, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialCreationOptions.adjusted_timeout) - pub adjusted_timeout: i64, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialCreationOptions.exclude_credentials) - pub exclude_credentials: ::std::vec::Vec, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialCreationOptions.authenticator_selection) - pub authenticator_selection: ::protobuf::MessageField, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialCreationOptions.attestation) - pub attestation: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialCreationOptions.cable_registration_data) - pub cable_registration_data: ::protobuf::MessageField, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialCreationOptions.hmac_create_secret) - pub hmac_create_secret: bool, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialCreationOptions.protection_policy) - pub protection_policy: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialCreationOptions.enforce_protection_policy) - pub enforce_protection_policy: bool, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialCreationOptions.appid_exclude) - pub appid_exclude: ::std::string::String, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.fido.PublicKeyCredentialCreationOptions.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PublicKeyCredentialCreationOptions { - fn default() -> &'a PublicKeyCredentialCreationOptions { - ::default_instance() - } -} - -impl PublicKeyCredentialCreationOptions { - pub fn new() -> PublicKeyCredentialCreationOptions { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for PublicKeyCredentialCreationOptions { - const NAME: &'static str = "PublicKeyCredentialCreationOptions"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.relying_party)?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.user)?; - }, - 26 => { - self.challenge = is.read_bytes()?; - }, - 34 => { - self.public_key_parameters.push(is.read_message()?); - }, - 40 => { - self.adjusted_timeout = is.read_int64()?; - }, - 50 => { - self.exclude_credentials.push(is.read_message()?); - }, - 58 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.authenticator_selection)?; - }, - 64 => { - self.attestation = is.read_enum_or_unknown()?; - }, - 74 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.cable_registration_data)?; - }, - 80 => { - self.hmac_create_secret = is.read_bool()?; - }, - 88 => { - self.protection_policy = is.read_enum_or_unknown()?; - }, - 96 => { - self.enforce_protection_policy = is.read_bool()?; - }, - 106 => { - self.appid_exclude = is.read_string()?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.relying_party.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.user.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if !self.challenge.is_empty() { - my_size += ::protobuf::rt::bytes_size(3, &self.challenge); - } - for value in &self.public_key_parameters { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if self.adjusted_timeout != 0 { - my_size += ::protobuf::rt::int64_size(5, self.adjusted_timeout); - } - for value in &self.exclude_credentials { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.authenticator_selection.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if self.attestation != ::protobuf::EnumOrUnknown::new(AttestationConveyancePreference::NONE_ATTESTATION_PREFERENCE) { - my_size += ::protobuf::rt::int32_size(8, self.attestation.value()); - } - if let Some(v) = self.cable_registration_data.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if self.hmac_create_secret != false { - my_size += 1 + 1; - } - if self.protection_policy != ::protobuf::EnumOrUnknown::new(ProtectionPolicy::UNSPECIFIED) { - my_size += ::protobuf::rt::int32_size(11, self.protection_policy.value()); - } - if self.enforce_protection_policy != false { - my_size += 1 + 1; - } - if !self.appid_exclude.is_empty() { - my_size += ::protobuf::rt::string_size(13, &self.appid_exclude); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.relying_party.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if let Some(v) = self.user.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - if !self.challenge.is_empty() { - os.write_bytes(3, &self.challenge)?; - } - for v in &self.public_key_parameters { - ::protobuf::rt::write_message_field_with_cached_size(4, v, os)?; - }; - if self.adjusted_timeout != 0 { - os.write_int64(5, self.adjusted_timeout)?; - } - for v in &self.exclude_credentials { - ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; - }; - if let Some(v) = self.authenticator_selection.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?; - } - if self.attestation != ::protobuf::EnumOrUnknown::new(AttestationConveyancePreference::NONE_ATTESTATION_PREFERENCE) { - os.write_enum(8, ::protobuf::EnumOrUnknown::value(&self.attestation))?; - } - if let Some(v) = self.cable_registration_data.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(9, v, os)?; - } - if self.hmac_create_secret != false { - os.write_bool(10, self.hmac_create_secret)?; - } - if self.protection_policy != ::protobuf::EnumOrUnknown::new(ProtectionPolicy::UNSPECIFIED) { - os.write_enum(11, ::protobuf::EnumOrUnknown::value(&self.protection_policy))?; - } - if self.enforce_protection_policy != false { - os.write_bool(12, self.enforce_protection_policy)?; - } - if !self.appid_exclude.is_empty() { - os.write_string(13, &self.appid_exclude)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PublicKeyCredentialCreationOptions { - PublicKeyCredentialCreationOptions::new() - } - - fn clear(&mut self) { - self.relying_party.clear(); - self.user.clear(); - self.challenge.clear(); - self.public_key_parameters.clear(); - self.adjusted_timeout = 0; - self.exclude_credentials.clear(); - self.authenticator_selection.clear(); - self.attestation = ::protobuf::EnumOrUnknown::new(AttestationConveyancePreference::NONE_ATTESTATION_PREFERENCE); - self.cable_registration_data.clear(); - self.hmac_create_secret = false; - self.protection_policy = ::protobuf::EnumOrUnknown::new(ProtectionPolicy::UNSPECIFIED); - self.enforce_protection_policy = false; - self.appid_exclude.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static PublicKeyCredentialCreationOptions { - static instance: PublicKeyCredentialCreationOptions = PublicKeyCredentialCreationOptions { - relying_party: ::protobuf::MessageField::none(), - user: ::protobuf::MessageField::none(), - challenge: ::std::vec::Vec::new(), - public_key_parameters: ::std::vec::Vec::new(), - adjusted_timeout: 0, - exclude_credentials: ::std::vec::Vec::new(), - authenticator_selection: ::protobuf::MessageField::none(), - attestation: ::protobuf::EnumOrUnknown::from_i32(0), - cable_registration_data: ::protobuf::MessageField::none(), - hmac_create_secret: false, - protection_policy: ::protobuf::EnumOrUnknown::from_i32(0), - enforce_protection_policy: false, - appid_exclude: ::std::string::String::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.fido.PublicKeyCredentialDescriptor) -pub struct PublicKeyCredentialDescriptor { - // message fields - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialDescriptor.type) - pub type_: ::protobuf::EnumOrUnknown, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialDescriptor.id) - pub id: ::std::vec::Vec, - // @@protoc_insertion_point(field:cryptohome.fido.PublicKeyCredentialDescriptor.transports) - pub transports: ::std::vec::Vec<::protobuf::EnumOrUnknown>, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.fido.PublicKeyCredentialDescriptor.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a PublicKeyCredentialDescriptor { - fn default() -> &'a PublicKeyCredentialDescriptor { - ::default_instance() - } -} - -impl PublicKeyCredentialDescriptor { - pub fn new() -> PublicKeyCredentialDescriptor { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for PublicKeyCredentialDescriptor { - const NAME: &'static str = "PublicKeyCredentialDescriptor"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.type_ = is.read_enum_or_unknown()?; - }, - 18 => { - self.id = is.read_bytes()?; - }, - 24 => { - self.transports.push(is.read_enum_or_unknown()?); - }, - 26 => { - ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.transports)? - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if self.type_ != ::protobuf::EnumOrUnknown::new(PublicKeyCredentialType::PUBLIC_KEY) { - my_size += ::protobuf::rt::int32_size(1, self.type_.value()); - } - if !self.id.is_empty() { - my_size += ::protobuf::rt::bytes_size(2, &self.id); - } - for value in &self.transports { - my_size += ::protobuf::rt::int32_size(3, value.value()); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if self.type_ != ::protobuf::EnumOrUnknown::new(PublicKeyCredentialType::PUBLIC_KEY) { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&self.type_))?; - } - if !self.id.is_empty() { - os.write_bytes(2, &self.id)?; - } - for v in &self.transports { - os.write_enum(3, ::protobuf::EnumOrUnknown::value(v))?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> PublicKeyCredentialDescriptor { - PublicKeyCredentialDescriptor::new() - } - - fn clear(&mut self) { - self.type_ = ::protobuf::EnumOrUnknown::new(PublicKeyCredentialType::PUBLIC_KEY); - self.id.clear(); - self.transports.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static PublicKeyCredentialDescriptor { - static instance: PublicKeyCredentialDescriptor = PublicKeyCredentialDescriptor { - type_: ::protobuf::EnumOrUnknown::from_i32(0), - id: ::std::vec::Vec::new(), - transports: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:cryptohome.fido.AuthenticatorStatus) -pub enum AuthenticatorStatus { - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorStatus.SUCCESS) - SUCCESS = 0, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorStatus.PENDING_REQUEST) - PENDING_REQUEST = 1, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorStatus.NOT_ALLOWED_ERROR) - NOT_ALLOWED_ERROR = 2, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorStatus.INVALID_DOMAIN) - INVALID_DOMAIN = 3, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorStatus.INVALID_ICON_URL) - INVALID_ICON_URL = 4, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorStatus.CREDENTIAL_EXCLUDED) - CREDENTIAL_EXCLUDED = 5, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorStatus.CREDENTIAL_NOT_RECOGNIZED) - CREDENTIAL_NOT_RECOGNIZED = 6, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorStatus.NOT_IMPLEMENTED) - NOT_IMPLEMENTED = 7, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorStatus.NOT_FOCUSED) - NOT_FOCUSED = 8, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorStatus.RESIDENT_CREDENTIALS_UNSUPPORTED) - RESIDENT_CREDENTIALS_UNSUPPORTED = 9, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorStatus.USER_VERIFICATION_UNSUPPORTED) - USER_VERIFICATION_UNSUPPORTED = 10, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorStatus.ALGORITHM_UNSUPPORTED) - ALGORITHM_UNSUPPORTED = 11, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorStatus.EMPTY_ALLOW_CREDENTIALS) - EMPTY_ALLOW_CREDENTIALS = 12, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorStatus.ANDROID_NOT_SUPPORTED_ERROR) - ANDROID_NOT_SUPPORTED_ERROR = 13, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorStatus.PROTECTION_POLICY_INCONSISTENT) - PROTECTION_POLICY_INCONSISTENT = 14, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorStatus.ABORT_ERROR) - ABORT_ERROR = 15, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorStatus.OPAQUE_DOMAIN) - OPAQUE_DOMAIN = 16, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorStatus.INVALID_PROTOCOL) - INVALID_PROTOCOL = 17, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorStatus.BAD_RELYING_PARTY_ID) - BAD_RELYING_PARTY_ID = 18, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorStatus.UNKNOWN_ERROR) - UNKNOWN_ERROR = 19, -} - -impl ::protobuf::Enum for AuthenticatorStatus { - const NAME: &'static str = "AuthenticatorStatus"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(AuthenticatorStatus::SUCCESS), - 1 => ::std::option::Option::Some(AuthenticatorStatus::PENDING_REQUEST), - 2 => ::std::option::Option::Some(AuthenticatorStatus::NOT_ALLOWED_ERROR), - 3 => ::std::option::Option::Some(AuthenticatorStatus::INVALID_DOMAIN), - 4 => ::std::option::Option::Some(AuthenticatorStatus::INVALID_ICON_URL), - 5 => ::std::option::Option::Some(AuthenticatorStatus::CREDENTIAL_EXCLUDED), - 6 => ::std::option::Option::Some(AuthenticatorStatus::CREDENTIAL_NOT_RECOGNIZED), - 7 => ::std::option::Option::Some(AuthenticatorStatus::NOT_IMPLEMENTED), - 8 => ::std::option::Option::Some(AuthenticatorStatus::NOT_FOCUSED), - 9 => ::std::option::Option::Some(AuthenticatorStatus::RESIDENT_CREDENTIALS_UNSUPPORTED), - 10 => ::std::option::Option::Some(AuthenticatorStatus::USER_VERIFICATION_UNSUPPORTED), - 11 => ::std::option::Option::Some(AuthenticatorStatus::ALGORITHM_UNSUPPORTED), - 12 => ::std::option::Option::Some(AuthenticatorStatus::EMPTY_ALLOW_CREDENTIALS), - 13 => ::std::option::Option::Some(AuthenticatorStatus::ANDROID_NOT_SUPPORTED_ERROR), - 14 => ::std::option::Option::Some(AuthenticatorStatus::PROTECTION_POLICY_INCONSISTENT), - 15 => ::std::option::Option::Some(AuthenticatorStatus::ABORT_ERROR), - 16 => ::std::option::Option::Some(AuthenticatorStatus::OPAQUE_DOMAIN), - 17 => ::std::option::Option::Some(AuthenticatorStatus::INVALID_PROTOCOL), - 18 => ::std::option::Option::Some(AuthenticatorStatus::BAD_RELYING_PARTY_ID), - 19 => ::std::option::Option::Some(AuthenticatorStatus::UNKNOWN_ERROR), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [AuthenticatorStatus] = &[ - AuthenticatorStatus::SUCCESS, - AuthenticatorStatus::PENDING_REQUEST, - AuthenticatorStatus::NOT_ALLOWED_ERROR, - AuthenticatorStatus::INVALID_DOMAIN, - AuthenticatorStatus::INVALID_ICON_URL, - AuthenticatorStatus::CREDENTIAL_EXCLUDED, - AuthenticatorStatus::CREDENTIAL_NOT_RECOGNIZED, - AuthenticatorStatus::NOT_IMPLEMENTED, - AuthenticatorStatus::NOT_FOCUSED, - AuthenticatorStatus::RESIDENT_CREDENTIALS_UNSUPPORTED, - AuthenticatorStatus::USER_VERIFICATION_UNSUPPORTED, - AuthenticatorStatus::ALGORITHM_UNSUPPORTED, - AuthenticatorStatus::EMPTY_ALLOW_CREDENTIALS, - AuthenticatorStatus::ANDROID_NOT_SUPPORTED_ERROR, - AuthenticatorStatus::PROTECTION_POLICY_INCONSISTENT, - AuthenticatorStatus::ABORT_ERROR, - AuthenticatorStatus::OPAQUE_DOMAIN, - AuthenticatorStatus::INVALID_PROTOCOL, - AuthenticatorStatus::BAD_RELYING_PARTY_ID, - AuthenticatorStatus::UNKNOWN_ERROR, - ]; -} - -impl ::std::default::Default for AuthenticatorStatus { - fn default() -> Self { - AuthenticatorStatus::SUCCESS - } -} - - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:cryptohome.fido.AuthenticatorTransport) -pub enum AuthenticatorTransport { - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorTransport.USB) - USB = 0, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorTransport.NFC) - NFC = 1, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorTransport.BLE) - BLE = 2, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorTransport.CABLE) - CABLE = 3, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorTransport.INTERNAL) - INTERNAL = 4, -} - -impl ::protobuf::Enum for AuthenticatorTransport { - const NAME: &'static str = "AuthenticatorTransport"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(AuthenticatorTransport::USB), - 1 => ::std::option::Option::Some(AuthenticatorTransport::NFC), - 2 => ::std::option::Option::Some(AuthenticatorTransport::BLE), - 3 => ::std::option::Option::Some(AuthenticatorTransport::CABLE), - 4 => ::std::option::Option::Some(AuthenticatorTransport::INTERNAL), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [AuthenticatorTransport] = &[ - AuthenticatorTransport::USB, - AuthenticatorTransport::NFC, - AuthenticatorTransport::BLE, - AuthenticatorTransport::CABLE, - AuthenticatorTransport::INTERNAL, - ]; -} - -impl ::std::default::Default for AuthenticatorTransport { - fn default() -> Self { - AuthenticatorTransport::USB - } -} - - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:cryptohome.fido.UserVerificationRequirement) -pub enum UserVerificationRequirement { - // @@protoc_insertion_point(enum_value:cryptohome.fido.UserVerificationRequirement.REQUIRED) - REQUIRED = 0, - // @@protoc_insertion_point(enum_value:cryptohome.fido.UserVerificationRequirement.PREFERRED) - PREFERRED = 1, - // @@protoc_insertion_point(enum_value:cryptohome.fido.UserVerificationRequirement.DISCOURAGED) - DISCOURAGED = 2, -} - -impl ::protobuf::Enum for UserVerificationRequirement { - const NAME: &'static str = "UserVerificationRequirement"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(UserVerificationRequirement::REQUIRED), - 1 => ::std::option::Option::Some(UserVerificationRequirement::PREFERRED), - 2 => ::std::option::Option::Some(UserVerificationRequirement::DISCOURAGED), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [UserVerificationRequirement] = &[ - UserVerificationRequirement::REQUIRED, - UserVerificationRequirement::PREFERRED, - UserVerificationRequirement::DISCOURAGED, - ]; -} - -impl ::std::default::Default for UserVerificationRequirement { - fn default() -> Self { - UserVerificationRequirement::REQUIRED - } -} - - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:cryptohome.fido.AttestationConveyancePreference) -pub enum AttestationConveyancePreference { - // @@protoc_insertion_point(enum_value:cryptohome.fido.AttestationConveyancePreference.NONE_ATTESTATION_PREFERENCE) - NONE_ATTESTATION_PREFERENCE = 0, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AttestationConveyancePreference.INDIRECT) - INDIRECT = 1, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AttestationConveyancePreference.DIRECT) - DIRECT = 2, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AttestationConveyancePreference.ENTERPRISE) - ENTERPRISE = 3, -} - -impl ::protobuf::Enum for AttestationConveyancePreference { - const NAME: &'static str = "AttestationConveyancePreference"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(AttestationConveyancePreference::NONE_ATTESTATION_PREFERENCE), - 1 => ::std::option::Option::Some(AttestationConveyancePreference::INDIRECT), - 2 => ::std::option::Option::Some(AttestationConveyancePreference::DIRECT), - 3 => ::std::option::Option::Some(AttestationConveyancePreference::ENTERPRISE), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [AttestationConveyancePreference] = &[ - AttestationConveyancePreference::NONE_ATTESTATION_PREFERENCE, - AttestationConveyancePreference::INDIRECT, - AttestationConveyancePreference::DIRECT, - AttestationConveyancePreference::ENTERPRISE, - ]; -} - -impl ::std::default::Default for AttestationConveyancePreference { - fn default() -> Self { - AttestationConveyancePreference::NONE_ATTESTATION_PREFERENCE - } -} - - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:cryptohome.fido.AuthenticatorAttachment) -pub enum AuthenticatorAttachment { - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorAttachment.NO_PREFERENCE) - NO_PREFERENCE = 0, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorAttachment.PLATFORM) - PLATFORM = 1, - // @@protoc_insertion_point(enum_value:cryptohome.fido.AuthenticatorAttachment.CROSS_PLATFORM) - CROSS_PLATFORM = 2, -} - -impl ::protobuf::Enum for AuthenticatorAttachment { - const NAME: &'static str = "AuthenticatorAttachment"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(AuthenticatorAttachment::NO_PREFERENCE), - 1 => ::std::option::Option::Some(AuthenticatorAttachment::PLATFORM), - 2 => ::std::option::Option::Some(AuthenticatorAttachment::CROSS_PLATFORM), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [AuthenticatorAttachment] = &[ - AuthenticatorAttachment::NO_PREFERENCE, - AuthenticatorAttachment::PLATFORM, - AuthenticatorAttachment::CROSS_PLATFORM, - ]; -} - -impl ::std::default::Default for AuthenticatorAttachment { - fn default() -> Self { - AuthenticatorAttachment::NO_PREFERENCE - } -} - - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:cryptohome.fido.ProtectionPolicy) -pub enum ProtectionPolicy { - // @@protoc_insertion_point(enum_value:cryptohome.fido.ProtectionPolicy.UNSPECIFIED) - UNSPECIFIED = 0, - // @@protoc_insertion_point(enum_value:cryptohome.fido.ProtectionPolicy.NONE_PROTECTION_POLICY) - NONE_PROTECTION_POLICY = 1, - // @@protoc_insertion_point(enum_value:cryptohome.fido.ProtectionPolicy.UV_OR_CRED_ID_REQUIRED) - UV_OR_CRED_ID_REQUIRED = 2, - // @@protoc_insertion_point(enum_value:cryptohome.fido.ProtectionPolicy.UV_REQUIRED) - UV_REQUIRED = 3, -} - -impl ::protobuf::Enum for ProtectionPolicy { - const NAME: &'static str = "ProtectionPolicy"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(ProtectionPolicy::UNSPECIFIED), - 1 => ::std::option::Option::Some(ProtectionPolicy::NONE_PROTECTION_POLICY), - 2 => ::std::option::Option::Some(ProtectionPolicy::UV_OR_CRED_ID_REQUIRED), - 3 => ::std::option::Option::Some(ProtectionPolicy::UV_REQUIRED), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [ProtectionPolicy] = &[ - ProtectionPolicy::UNSPECIFIED, - ProtectionPolicy::NONE_PROTECTION_POLICY, - ProtectionPolicy::UV_OR_CRED_ID_REQUIRED, - ProtectionPolicy::UV_REQUIRED, - ]; -} - -impl ::std::default::Default for ProtectionPolicy { - fn default() -> Self { - ProtectionPolicy::UNSPECIFIED - } -} - - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:cryptohome.fido.PublicKeyCredentialType) -pub enum PublicKeyCredentialType { - // @@protoc_insertion_point(enum_value:cryptohome.fido.PublicKeyCredentialType.PUBLIC_KEY) - PUBLIC_KEY = 0, -} - -impl ::protobuf::Enum for PublicKeyCredentialType { - const NAME: &'static str = "PublicKeyCredentialType"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(PublicKeyCredentialType::PUBLIC_KEY), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [PublicKeyCredentialType] = &[ - PublicKeyCredentialType::PUBLIC_KEY, - ]; -} - -impl ::std::default::Default for PublicKeyCredentialType { - fn default() -> Self { - PublicKeyCredentialType::PUBLIC_KEY - } -} - diff --git a/system_api/src/protos/include_protos.rs b/system_api/src/protos/include_protos.rs index 3e9765c6e2..7611bce69f 100644 --- a/system_api/src/protos/include_protos.rs +++ b/system_api/src/protos/include_protos.rs @@ -2,10 +2,5 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -pub mod UserDataAuth; -pub mod auth_factor; -pub mod fido; -pub mod key; -pub mod rpc; pub mod spaced; pub mod vtpm_interface; diff --git a/system_api/src/protos/key.rs b/system_api/src/protos/key.rs deleted file mode 100644 index a1834345ef..0000000000 --- a/system_api/src/protos/key.rs +++ /dev/null @@ -1,1267 +0,0 @@ -// This file is generated by rust-protobuf 3.2.0. Do not edit -// .proto file is parsed by protoc 3.21.9 -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `key.proto` -// Generated for lite runtime - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0; - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.KeyPrivileges) -pub struct KeyPrivileges { - // message fields - // @@protoc_insertion_point(field:cryptohome.KeyPrivileges.add) - pub add: ::std::option::Option, - // @@protoc_insertion_point(field:cryptohome.KeyPrivileges.remove) - pub remove: ::std::option::Option, - // @@protoc_insertion_point(field:cryptohome.KeyPrivileges.update) - pub update: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.KeyPrivileges.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a KeyPrivileges { - fn default() -> &'a KeyPrivileges { - ::default_instance() - } -} - -impl KeyPrivileges { - pub fn new() -> KeyPrivileges { - ::std::default::Default::default() - } - - // optional bool add = 2; - - pub fn add(&self) -> bool { - self.add.unwrap_or(true) - } - - pub fn clear_add(&mut self) { - self.add = ::std::option::Option::None; - } - - pub fn has_add(&self) -> bool { - self.add.is_some() - } - - // Param is passed by value, moved - pub fn set_add(&mut self, v: bool) { - self.add = ::std::option::Option::Some(v); - } - - // optional bool remove = 3; - - pub fn remove(&self) -> bool { - self.remove.unwrap_or(true) - } - - pub fn clear_remove(&mut self) { - self.remove = ::std::option::Option::None; - } - - pub fn has_remove(&self) -> bool { - self.remove.is_some() - } - - // Param is passed by value, moved - pub fn set_remove(&mut self, v: bool) { - self.remove = ::std::option::Option::Some(v); - } - - // optional bool update = 4; - - pub fn update(&self) -> bool { - self.update.unwrap_or(true) - } - - pub fn clear_update(&mut self) { - self.update = ::std::option::Option::None; - } - - pub fn has_update(&self) -> bool { - self.update.is_some() - } - - // Param is passed by value, moved - pub fn set_update(&mut self, v: bool) { - self.update = ::std::option::Option::Some(v); - } -} - -impl ::protobuf::Message for KeyPrivileges { - const NAME: &'static str = "KeyPrivileges"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 16 => { - self.add = ::std::option::Option::Some(is.read_bool()?); - }, - 24 => { - self.remove = ::std::option::Option::Some(is.read_bool()?); - }, - 32 => { - self.update = ::std::option::Option::Some(is.read_bool()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.add { - my_size += 1 + 1; - } - if let Some(v) = self.remove { - my_size += 1 + 1; - } - if let Some(v) = self.update { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.add { - os.write_bool(2, v)?; - } - if let Some(v) = self.remove { - os.write_bool(3, v)?; - } - if let Some(v) = self.update { - os.write_bool(4, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> KeyPrivileges { - KeyPrivileges::new() - } - - fn clear(&mut self) { - self.add = ::std::option::Option::None; - self.remove = ::std::option::Option::None; - self.update = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static KeyPrivileges { - static instance: KeyPrivileges = KeyPrivileges { - add: ::std::option::Option::None, - remove: ::std::option::Option::None, - update: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.KeyProviderData) -pub struct KeyProviderData { - // message fields - // @@protoc_insertion_point(field:cryptohome.KeyProviderData.entry) - pub entry: ::std::vec::Vec, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.KeyProviderData.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a KeyProviderData { - fn default() -> &'a KeyProviderData { - ::default_instance() - } -} - -impl KeyProviderData { - pub fn new() -> KeyProviderData { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for KeyProviderData { - const NAME: &'static str = "KeyProviderData"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.entry.push(is.read_message()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - for value in &self.entry { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - for v in &self.entry { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> KeyProviderData { - KeyProviderData::new() - } - - fn clear(&mut self) { - self.entry.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static KeyProviderData { - static instance: KeyProviderData = KeyProviderData { - entry: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -/// Nested message and enums of message `KeyProviderData` -pub mod key_provider_data { - #[derive(PartialEq,Clone,Default,Debug)] - // @@protoc_insertion_point(message:cryptohome.KeyProviderData.Entry) - pub struct Entry { - // message fields - // @@protoc_insertion_point(field:cryptohome.KeyProviderData.Entry.name) - pub name: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:cryptohome.KeyProviderData.Entry.number) - pub number: ::std::option::Option, - // @@protoc_insertion_point(field:cryptohome.KeyProviderData.Entry.bytes) - pub bytes: ::std::option::Option<::std::vec::Vec>, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.KeyProviderData.Entry.special_fields) - pub special_fields: ::protobuf::SpecialFields, - } - - impl<'a> ::std::default::Default for &'a Entry { - fn default() -> &'a Entry { - ::default_instance() - } - } - - impl Entry { - pub fn new() -> Entry { - ::std::default::Default::default() - } - - // optional string name = 1; - - pub fn name(&self) -> &str { - match self.name.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_name(&mut self) { - self.name = ::std::option::Option::None; - } - - pub fn has_name(&self) -> bool { - self.name.is_some() - } - - // Param is passed by value, moved - pub fn set_name(&mut self, v: ::std::string::String) { - self.name = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_name(&mut self) -> &mut ::std::string::String { - if self.name.is_none() { - self.name = ::std::option::Option::Some(::std::string::String::new()); - } - self.name.as_mut().unwrap() - } - - // Take field - pub fn take_name(&mut self) -> ::std::string::String { - self.name.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional int64 number = 2; - - pub fn number(&self) -> i64 { - self.number.unwrap_or(0) - } - - pub fn clear_number(&mut self) { - self.number = ::std::option::Option::None; - } - - pub fn has_number(&self) -> bool { - self.number.is_some() - } - - // Param is passed by value, moved - pub fn set_number(&mut self, v: i64) { - self.number = ::std::option::Option::Some(v); - } - - // optional bytes bytes = 3; - - pub fn bytes(&self) -> &[u8] { - match self.bytes.as_ref() { - Some(v) => v, - None => &[], - } - } - - pub fn clear_bytes(&mut self) { - self.bytes = ::std::option::Option::None; - } - - pub fn has_bytes(&self) -> bool { - self.bytes.is_some() - } - - // Param is passed by value, moved - pub fn set_bytes(&mut self, v: ::std::vec::Vec) { - self.bytes = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_bytes(&mut self) -> &mut ::std::vec::Vec { - if self.bytes.is_none() { - self.bytes = ::std::option::Option::Some(::std::vec::Vec::new()); - } - self.bytes.as_mut().unwrap() - } - - // Take field - pub fn take_bytes(&mut self) -> ::std::vec::Vec { - self.bytes.take().unwrap_or_else(|| ::std::vec::Vec::new()) - } - } - - impl ::protobuf::Message for Entry { - const NAME: &'static str = "Entry"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.name = ::std::option::Option::Some(is.read_string()?); - }, - 16 => { - self.number = ::std::option::Option::Some(is.read_int64()?); - }, - 26 => { - self.bytes = ::std::option::Option::Some(is.read_bytes()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.name.as_ref() { - my_size += ::protobuf::rt::string_size(1, &v); - } - if let Some(v) = self.number { - my_size += ::protobuf::rt::int64_size(2, v); - } - if let Some(v) = self.bytes.as_ref() { - my_size += ::protobuf::rt::bytes_size(3, &v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.name.as_ref() { - os.write_string(1, v)?; - } - if let Some(v) = self.number { - os.write_int64(2, v)?; - } - if let Some(v) = self.bytes.as_ref() { - os.write_bytes(3, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Entry { - Entry::new() - } - - fn clear(&mut self) { - self.name = ::std::option::Option::None; - self.number = ::std::option::Option::None; - self.bytes = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static Entry { - static instance: Entry = Entry { - name: ::std::option::Option::None, - number: ::std::option::Option::None, - bytes: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.ChallengePublicKeyInfo) -pub struct ChallengePublicKeyInfo { - // message fields - // @@protoc_insertion_point(field:cryptohome.ChallengePublicKeyInfo.public_key_spki_der) - pub public_key_spki_der: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:cryptohome.ChallengePublicKeyInfo.signature_algorithm) - pub signature_algorithm: ::std::vec::Vec<::protobuf::EnumOrUnknown>, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.ChallengePublicKeyInfo.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a ChallengePublicKeyInfo { - fn default() -> &'a ChallengePublicKeyInfo { - ::default_instance() - } -} - -impl ChallengePublicKeyInfo { - pub fn new() -> ChallengePublicKeyInfo { - ::std::default::Default::default() - } - - // optional bytes public_key_spki_der = 1; - - pub fn public_key_spki_der(&self) -> &[u8] { - match self.public_key_spki_der.as_ref() { - Some(v) => v, - None => &[], - } - } - - pub fn clear_public_key_spki_der(&mut self) { - self.public_key_spki_der = ::std::option::Option::None; - } - - pub fn has_public_key_spki_der(&self) -> bool { - self.public_key_spki_der.is_some() - } - - // Param is passed by value, moved - pub fn set_public_key_spki_der(&mut self, v: ::std::vec::Vec) { - self.public_key_spki_der = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_public_key_spki_der(&mut self) -> &mut ::std::vec::Vec { - if self.public_key_spki_der.is_none() { - self.public_key_spki_der = ::std::option::Option::Some(::std::vec::Vec::new()); - } - self.public_key_spki_der.as_mut().unwrap() - } - - // Take field - pub fn take_public_key_spki_der(&mut self) -> ::std::vec::Vec { - self.public_key_spki_der.take().unwrap_or_else(|| ::std::vec::Vec::new()) - } -} - -impl ::protobuf::Message for ChallengePublicKeyInfo { - const NAME: &'static str = "ChallengePublicKeyInfo"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.public_key_spki_der = ::std::option::Option::Some(is.read_bytes()?); - }, - 16 => { - self.signature_algorithm.push(is.read_enum_or_unknown()?); - }, - 18 => { - ::protobuf::rt::read_repeated_packed_enum_or_unknown_into(is, &mut self.signature_algorithm)? - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.public_key_spki_der.as_ref() { - my_size += ::protobuf::rt::bytes_size(1, &v); - } - for value in &self.signature_algorithm { - my_size += ::protobuf::rt::int32_size(2, value.value()); - }; - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.public_key_spki_der.as_ref() { - os.write_bytes(1, v)?; - } - for v in &self.signature_algorithm { - os.write_enum(2, ::protobuf::EnumOrUnknown::value(v))?; - }; - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> ChallengePublicKeyInfo { - ChallengePublicKeyInfo::new() - } - - fn clear(&mut self) { - self.public_key_spki_der = ::std::option::Option::None; - self.signature_algorithm.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static ChallengePublicKeyInfo { - static instance: ChallengePublicKeyInfo = ChallengePublicKeyInfo { - public_key_spki_der: ::std::option::Option::None, - signature_algorithm: ::std::vec::Vec::new(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.KeyPolicy) -pub struct KeyPolicy { - // message fields - // @@protoc_insertion_point(field:cryptohome.KeyPolicy.low_entropy_credential) - pub low_entropy_credential: ::std::option::Option, - // @@protoc_insertion_point(field:cryptohome.KeyPolicy.auth_locked) - pub auth_locked: ::std::option::Option, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.KeyPolicy.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a KeyPolicy { - fn default() -> &'a KeyPolicy { - ::default_instance() - } -} - -impl KeyPolicy { - pub fn new() -> KeyPolicy { - ::std::default::Default::default() - } - - // optional bool low_entropy_credential = 1; - - pub fn low_entropy_credential(&self) -> bool { - self.low_entropy_credential.unwrap_or(false) - } - - pub fn clear_low_entropy_credential(&mut self) { - self.low_entropy_credential = ::std::option::Option::None; - } - - pub fn has_low_entropy_credential(&self) -> bool { - self.low_entropy_credential.is_some() - } - - // Param is passed by value, moved - pub fn set_low_entropy_credential(&mut self, v: bool) { - self.low_entropy_credential = ::std::option::Option::Some(v); - } - - // optional bool auth_locked = 2; - - pub fn auth_locked(&self) -> bool { - self.auth_locked.unwrap_or(false) - } - - pub fn clear_auth_locked(&mut self) { - self.auth_locked = ::std::option::Option::None; - } - - pub fn has_auth_locked(&self) -> bool { - self.auth_locked.is_some() - } - - // Param is passed by value, moved - pub fn set_auth_locked(&mut self, v: bool) { - self.auth_locked = ::std::option::Option::Some(v); - } -} - -impl ::protobuf::Message for KeyPolicy { - const NAME: &'static str = "KeyPolicy"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.low_entropy_credential = ::std::option::Option::Some(is.read_bool()?); - }, - 16 => { - self.auth_locked = ::std::option::Option::Some(is.read_bool()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.low_entropy_credential { - my_size += 1 + 1; - } - if let Some(v) = self.auth_locked { - my_size += 1 + 1; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.low_entropy_credential { - os.write_bool(1, v)?; - } - if let Some(v) = self.auth_locked { - os.write_bool(2, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> KeyPolicy { - KeyPolicy::new() - } - - fn clear(&mut self) { - self.low_entropy_credential = ::std::option::Option::None; - self.auth_locked = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static KeyPolicy { - static instance: KeyPolicy = KeyPolicy { - low_entropy_credential: ::std::option::Option::None, - auth_locked: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.KeyData) -pub struct KeyData { - // message fields - // @@protoc_insertion_point(field:cryptohome.KeyData.type) - pub type_: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:cryptohome.KeyData.label) - pub label: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:cryptohome.KeyData.privileges) - pub privileges: ::protobuf::MessageField, - // @@protoc_insertion_point(field:cryptohome.KeyData.revision) - pub revision: ::std::option::Option, - // @@protoc_insertion_point(field:cryptohome.KeyData.provider_data) - pub provider_data: ::protobuf::MessageField, - // @@protoc_insertion_point(field:cryptohome.KeyData.challenge_response_key) - pub challenge_response_key: ::std::vec::Vec, - // @@protoc_insertion_point(field:cryptohome.KeyData.policy) - pub policy: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.KeyData.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a KeyData { - fn default() -> &'a KeyData { - ::default_instance() - } -} - -impl KeyData { - pub fn new() -> KeyData { - ::std::default::Default::default() - } - - // optional .cryptohome.KeyData.KeyType type = 1; - - pub fn type_(&self) -> key_data::KeyType { - match self.type_ { - Some(e) => e.enum_value_or(key_data::KeyType::KEY_TYPE_PASSWORD), - None => key_data::KeyType::KEY_TYPE_PASSWORD, - } - } - - pub fn clear_type_(&mut self) { - self.type_ = ::std::option::Option::None; - } - - pub fn has_type(&self) -> bool { - self.type_.is_some() - } - - // Param is passed by value, moved - pub fn set_type(&mut self, v: key_data::KeyType) { - self.type_ = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } - - // optional string label = 2; - - pub fn label(&self) -> &str { - match self.label.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_label(&mut self) { - self.label = ::std::option::Option::None; - } - - pub fn has_label(&self) -> bool { - self.label.is_some() - } - - // Param is passed by value, moved - pub fn set_label(&mut self, v: ::std::string::String) { - self.label = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_label(&mut self) -> &mut ::std::string::String { - if self.label.is_none() { - self.label = ::std::option::Option::Some(::std::string::String::new()); - } - self.label.as_mut().unwrap() - } - - // Take field - pub fn take_label(&mut self) -> ::std::string::String { - self.label.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional int64 revision = 4; - - pub fn revision(&self) -> i64 { - self.revision.unwrap_or(0) - } - - pub fn clear_revision(&mut self) { - self.revision = ::std::option::Option::None; - } - - pub fn has_revision(&self) -> bool { - self.revision.is_some() - } - - // Param is passed by value, moved - pub fn set_revision(&mut self, v: i64) { - self.revision = ::std::option::Option::Some(v); - } -} - -impl ::protobuf::Message for KeyData { - const NAME: &'static str = "KeyData"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.type_ = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 18 => { - self.label = ::std::option::Option::Some(is.read_string()?); - }, - 26 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.privileges)?; - }, - 32 => { - self.revision = ::std::option::Option::Some(is.read_int64()?); - }, - 50 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.provider_data)?; - }, - 58 => { - self.challenge_response_key.push(is.read_message()?); - }, - 66 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.policy)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.type_ { - my_size += ::protobuf::rt::int32_size(1, v.value()); - } - if let Some(v) = self.label.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - if let Some(v) = self.privileges.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.revision { - my_size += ::protobuf::rt::int64_size(4, v); - } - if let Some(v) = self.provider_data.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - for value in &self.challenge_response_key { - let len = value.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - }; - if let Some(v) = self.policy.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.type_ { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?; - } - if let Some(v) = self.label.as_ref() { - os.write_string(2, v)?; - } - if let Some(v) = self.privileges.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(3, v, os)?; - } - if let Some(v) = self.revision { - os.write_int64(4, v)?; - } - if let Some(v) = self.provider_data.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(6, v, os)?; - } - for v in &self.challenge_response_key { - ::protobuf::rt::write_message_field_with_cached_size(7, v, os)?; - }; - if let Some(v) = self.policy.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(8, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> KeyData { - KeyData::new() - } - - fn clear(&mut self) { - self.type_ = ::std::option::Option::None; - self.label = ::std::option::Option::None; - self.privileges.clear(); - self.revision = ::std::option::Option::None; - self.provider_data.clear(); - self.challenge_response_key.clear(); - self.policy.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static KeyData { - static instance: KeyData = KeyData { - type_: ::std::option::Option::None, - label: ::std::option::Option::None, - privileges: ::protobuf::MessageField::none(), - revision: ::std::option::Option::None, - provider_data: ::protobuf::MessageField::none(), - challenge_response_key: ::std::vec::Vec::new(), - policy: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -/// Nested message and enums of message `KeyData` -pub mod key_data { - #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] - // @@protoc_insertion_point(enum:cryptohome.KeyData.KeyType) - pub enum KeyType { - // @@protoc_insertion_point(enum_value:cryptohome.KeyData.KeyType.KEY_TYPE_PASSWORD) - KEY_TYPE_PASSWORD = 0, - // @@protoc_insertion_point(enum_value:cryptohome.KeyData.KeyType.KEY_TYPE_CHALLENGE_RESPONSE) - KEY_TYPE_CHALLENGE_RESPONSE = 1, - // @@protoc_insertion_point(enum_value:cryptohome.KeyData.KeyType.KEY_TYPE_FINGERPRINT) - KEY_TYPE_FINGERPRINT = 2, - // @@protoc_insertion_point(enum_value:cryptohome.KeyData.KeyType.KEY_TYPE_KIOSK) - KEY_TYPE_KIOSK = 3, - } - - impl ::protobuf::Enum for KeyType { - const NAME: &'static str = "KeyType"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(KeyType::KEY_TYPE_PASSWORD), - 1 => ::std::option::Option::Some(KeyType::KEY_TYPE_CHALLENGE_RESPONSE), - 2 => ::std::option::Option::Some(KeyType::KEY_TYPE_FINGERPRINT), - 3 => ::std::option::Option::Some(KeyType::KEY_TYPE_KIOSK), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [KeyType] = &[ - KeyType::KEY_TYPE_PASSWORD, - KeyType::KEY_TYPE_CHALLENGE_RESPONSE, - KeyType::KEY_TYPE_FINGERPRINT, - KeyType::KEY_TYPE_KIOSK, - ]; - } - - impl ::std::default::Default for KeyType { - fn default() -> Self { - KeyType::KEY_TYPE_PASSWORD - } - } - -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.Key) -pub struct Key { - // message fields - // @@protoc_insertion_point(field:cryptohome.Key.data) - pub data: ::protobuf::MessageField, - // @@protoc_insertion_point(field:cryptohome.Key.secret) - pub secret: ::std::option::Option<::std::vec::Vec>, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.Key.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a Key { - fn default() -> &'a Key { - ::default_instance() - } -} - -impl Key { - pub fn new() -> Key { - ::std::default::Default::default() - } - - // optional bytes secret = 2; - - pub fn secret(&self) -> &[u8] { - match self.secret.as_ref() { - Some(v) => v, - None => &[], - } - } - - pub fn clear_secret(&mut self) { - self.secret = ::std::option::Option::None; - } - - pub fn has_secret(&self) -> bool { - self.secret.is_some() - } - - // Param is passed by value, moved - pub fn set_secret(&mut self, v: ::std::vec::Vec) { - self.secret = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_secret(&mut self) -> &mut ::std::vec::Vec { - if self.secret.is_none() { - self.secret = ::std::option::Option::Some(::std::vec::Vec::new()); - } - self.secret.as_mut().unwrap() - } - - // Take field - pub fn take_secret(&mut self) -> ::std::vec::Vec { - self.secret.take().unwrap_or_else(|| ::std::vec::Vec::new()) - } -} - -impl ::protobuf::Message for Key { - const NAME: &'static str = "Key"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.data)?; - }, - 18 => { - self.secret = ::std::option::Option::Some(is.read_bytes()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.data.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.secret.as_ref() { - my_size += ::protobuf::rt::bytes_size(2, &v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.data.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if let Some(v) = self.secret.as_ref() { - os.write_bytes(2, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> Key { - Key::new() - } - - fn clear(&mut self) { - self.data.clear(); - self.secret = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static Key { - static instance: Key = Key { - data: ::protobuf::MessageField::none(), - secret: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:cryptohome.ChallengeSignatureAlgorithm) -pub enum ChallengeSignatureAlgorithm { - // @@protoc_insertion_point(enum_value:cryptohome.ChallengeSignatureAlgorithm.CHALLENGE_RSASSA_PKCS1_V1_5_SHA1) - CHALLENGE_RSASSA_PKCS1_V1_5_SHA1 = 1, - // @@protoc_insertion_point(enum_value:cryptohome.ChallengeSignatureAlgorithm.CHALLENGE_RSASSA_PKCS1_V1_5_SHA256) - CHALLENGE_RSASSA_PKCS1_V1_5_SHA256 = 2, - // @@protoc_insertion_point(enum_value:cryptohome.ChallengeSignatureAlgorithm.CHALLENGE_RSASSA_PKCS1_V1_5_SHA384) - CHALLENGE_RSASSA_PKCS1_V1_5_SHA384 = 3, - // @@protoc_insertion_point(enum_value:cryptohome.ChallengeSignatureAlgorithm.CHALLENGE_RSASSA_PKCS1_V1_5_SHA512) - CHALLENGE_RSASSA_PKCS1_V1_5_SHA512 = 4, -} - -impl ::protobuf::Enum for ChallengeSignatureAlgorithm { - const NAME: &'static str = "ChallengeSignatureAlgorithm"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 1 => ::std::option::Option::Some(ChallengeSignatureAlgorithm::CHALLENGE_RSASSA_PKCS1_V1_5_SHA1), - 2 => ::std::option::Option::Some(ChallengeSignatureAlgorithm::CHALLENGE_RSASSA_PKCS1_V1_5_SHA256), - 3 => ::std::option::Option::Some(ChallengeSignatureAlgorithm::CHALLENGE_RSASSA_PKCS1_V1_5_SHA384), - 4 => ::std::option::Option::Some(ChallengeSignatureAlgorithm::CHALLENGE_RSASSA_PKCS1_V1_5_SHA512), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [ChallengeSignatureAlgorithm] = &[ - ChallengeSignatureAlgorithm::CHALLENGE_RSASSA_PKCS1_V1_5_SHA1, - ChallengeSignatureAlgorithm::CHALLENGE_RSASSA_PKCS1_V1_5_SHA256, - ChallengeSignatureAlgorithm::CHALLENGE_RSASSA_PKCS1_V1_5_SHA384, - ChallengeSignatureAlgorithm::CHALLENGE_RSASSA_PKCS1_V1_5_SHA512, - ]; -} - -// Note, `Default` is implemented although default value is not 0 -impl ::std::default::Default for ChallengeSignatureAlgorithm { - fn default() -> Self { - ChallengeSignatureAlgorithm::CHALLENGE_RSASSA_PKCS1_V1_5_SHA1 - } -} - diff --git a/system_api/src/protos/rpc.rs b/system_api/src/protos/rpc.rs deleted file mode 100644 index 24be699c42..0000000000 --- a/system_api/src/protos/rpc.rs +++ /dev/null @@ -1,1406 +0,0 @@ -// This file is generated by rust-protobuf 3.2.0. Do not edit -// .proto file is parsed by protoc 3.21.9 -// @generated - -// https://github.com/rust-lang/rust-clippy/issues/702 -#![allow(unknown_lints)] -#![allow(clippy::all)] - -#![allow(unused_attributes)] -#![cfg_attr(rustfmt, rustfmt::skip)] - -#![allow(box_pointers)] -#![allow(dead_code)] -#![allow(missing_docs)] -#![allow(non_camel_case_types)] -#![allow(non_snake_case)] -#![allow(non_upper_case_globals)] -#![allow(trivial_casts)] -#![allow(unused_results)] -#![allow(unused_mut)] - -//! Generated file from `rpc.proto` -// Generated for lite runtime - -/// Generated files are compatible only with the same version -/// of protobuf runtime. -const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_3_2_0; - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.AccountIdentifier) -pub struct AccountIdentifier { - // message fields - // @@protoc_insertion_point(field:cryptohome.AccountIdentifier.email) - pub email: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:cryptohome.AccountIdentifier.account_id) - pub account_id: ::std::option::Option<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.AccountIdentifier.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a AccountIdentifier { - fn default() -> &'a AccountIdentifier { - ::default_instance() - } -} - -impl AccountIdentifier { - pub fn new() -> AccountIdentifier { - ::std::default::Default::default() - } - - // optional string email = 1; - - pub fn email(&self) -> &str { - match self.email.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_email(&mut self) { - self.email = ::std::option::Option::None; - } - - pub fn has_email(&self) -> bool { - self.email.is_some() - } - - // Param is passed by value, moved - pub fn set_email(&mut self, v: ::std::string::String) { - self.email = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_email(&mut self) -> &mut ::std::string::String { - if self.email.is_none() { - self.email = ::std::option::Option::Some(::std::string::String::new()); - } - self.email.as_mut().unwrap() - } - - // Take field - pub fn take_email(&mut self) -> ::std::string::String { - self.email.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string account_id = 2; - - pub fn account_id(&self) -> &str { - match self.account_id.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_account_id(&mut self) { - self.account_id = ::std::option::Option::None; - } - - pub fn has_account_id(&self) -> bool { - self.account_id.is_some() - } - - // Param is passed by value, moved - pub fn set_account_id(&mut self, v: ::std::string::String) { - self.account_id = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_account_id(&mut self) -> &mut ::std::string::String { - if self.account_id.is_none() { - self.account_id = ::std::option::Option::Some(::std::string::String::new()); - } - self.account_id.as_mut().unwrap() - } - - // Take field - pub fn take_account_id(&mut self) -> ::std::string::String { - self.account_id.take().unwrap_or_else(|| ::std::string::String::new()) - } -} - -impl ::protobuf::Message for AccountIdentifier { - const NAME: &'static str = "AccountIdentifier"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.email = ::std::option::Option::Some(is.read_string()?); - }, - 18 => { - self.account_id = ::std::option::Option::Some(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.email.as_ref() { - my_size += ::protobuf::rt::string_size(1, &v); - } - if let Some(v) = self.account_id.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.email.as_ref() { - os.write_string(1, v)?; - } - if let Some(v) = self.account_id.as_ref() { - os.write_string(2, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> AccountIdentifier { - AccountIdentifier::new() - } - - fn clear(&mut self) { - self.email = ::std::option::Option::None; - self.account_id = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static AccountIdentifier { - static instance: AccountIdentifier = AccountIdentifier { - email: ::std::option::Option::None, - account_id: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.KeyDelegate) -pub struct KeyDelegate { - // message fields - // @@protoc_insertion_point(field:cryptohome.KeyDelegate.dbus_service_name) - pub dbus_service_name: ::std::option::Option<::std::string::String>, - // @@protoc_insertion_point(field:cryptohome.KeyDelegate.dbus_object_path) - pub dbus_object_path: ::std::option::Option<::std::string::String>, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.KeyDelegate.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a KeyDelegate { - fn default() -> &'a KeyDelegate { - ::default_instance() - } -} - -impl KeyDelegate { - pub fn new() -> KeyDelegate { - ::std::default::Default::default() - } - - // optional string dbus_service_name = 1; - - pub fn dbus_service_name(&self) -> &str { - match self.dbus_service_name.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_dbus_service_name(&mut self) { - self.dbus_service_name = ::std::option::Option::None; - } - - pub fn has_dbus_service_name(&self) -> bool { - self.dbus_service_name.is_some() - } - - // Param is passed by value, moved - pub fn set_dbus_service_name(&mut self, v: ::std::string::String) { - self.dbus_service_name = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_dbus_service_name(&mut self) -> &mut ::std::string::String { - if self.dbus_service_name.is_none() { - self.dbus_service_name = ::std::option::Option::Some(::std::string::String::new()); - } - self.dbus_service_name.as_mut().unwrap() - } - - // Take field - pub fn take_dbus_service_name(&mut self) -> ::std::string::String { - self.dbus_service_name.take().unwrap_or_else(|| ::std::string::String::new()) - } - - // optional string dbus_object_path = 2; - - pub fn dbus_object_path(&self) -> &str { - match self.dbus_object_path.as_ref() { - Some(v) => v, - None => "", - } - } - - pub fn clear_dbus_object_path(&mut self) { - self.dbus_object_path = ::std::option::Option::None; - } - - pub fn has_dbus_object_path(&self) -> bool { - self.dbus_object_path.is_some() - } - - // Param is passed by value, moved - pub fn set_dbus_object_path(&mut self, v: ::std::string::String) { - self.dbus_object_path = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_dbus_object_path(&mut self) -> &mut ::std::string::String { - if self.dbus_object_path.is_none() { - self.dbus_object_path = ::std::option::Option::Some(::std::string::String::new()); - } - self.dbus_object_path.as_mut().unwrap() - } - - // Take field - pub fn take_dbus_object_path(&mut self) -> ::std::string::String { - self.dbus_object_path.take().unwrap_or_else(|| ::std::string::String::new()) - } -} - -impl ::protobuf::Message for KeyDelegate { - const NAME: &'static str = "KeyDelegate"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.dbus_service_name = ::std::option::Option::Some(is.read_string()?); - }, - 18 => { - self.dbus_object_path = ::std::option::Option::Some(is.read_string()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.dbus_service_name.as_ref() { - my_size += ::protobuf::rt::string_size(1, &v); - } - if let Some(v) = self.dbus_object_path.as_ref() { - my_size += ::protobuf::rt::string_size(2, &v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.dbus_service_name.as_ref() { - os.write_string(1, v)?; - } - if let Some(v) = self.dbus_object_path.as_ref() { - os.write_string(2, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> KeyDelegate { - KeyDelegate::new() - } - - fn clear(&mut self) { - self.dbus_service_name = ::std::option::Option::None; - self.dbus_object_path = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static KeyDelegate { - static instance: KeyDelegate = KeyDelegate { - dbus_service_name: ::std::option::Option::None, - dbus_object_path: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.AuthorizationRequest) -pub struct AuthorizationRequest { - // message fields - // @@protoc_insertion_point(field:cryptohome.AuthorizationRequest.key) - pub key: ::protobuf::MessageField, - // @@protoc_insertion_point(field:cryptohome.AuthorizationRequest.key_delegate) - pub key_delegate: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.AuthorizationRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a AuthorizationRequest { - fn default() -> &'a AuthorizationRequest { - ::default_instance() - } -} - -impl AuthorizationRequest { - pub fn new() -> AuthorizationRequest { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for AuthorizationRequest { - const NAME: &'static str = "AuthorizationRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.key)?; - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.key_delegate)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.key.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - if let Some(v) = self.key_delegate.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.key.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - if let Some(v) = self.key_delegate.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> AuthorizationRequest { - AuthorizationRequest::new() - } - - fn clear(&mut self) { - self.key.clear(); - self.key_delegate.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static AuthorizationRequest { - static instance: AuthorizationRequest = AuthorizationRequest { - key: ::protobuf::MessageField::none(), - key_delegate: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.KeyChallengeRequest) -pub struct KeyChallengeRequest { - // message fields - // @@protoc_insertion_point(field:cryptohome.KeyChallengeRequest.challenge_type) - pub challenge_type: ::std::option::Option<::protobuf::EnumOrUnknown>, - // @@protoc_insertion_point(field:cryptohome.KeyChallengeRequest.signature_request_data) - pub signature_request_data: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.KeyChallengeRequest.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a KeyChallengeRequest { - fn default() -> &'a KeyChallengeRequest { - ::default_instance() - } -} - -impl KeyChallengeRequest { - pub fn new() -> KeyChallengeRequest { - ::std::default::Default::default() - } - - // optional .cryptohome.KeyChallengeRequest.ChallengeType challenge_type = 1; - - pub fn challenge_type(&self) -> key_challenge_request::ChallengeType { - match self.challenge_type { - Some(e) => e.enum_value_or(key_challenge_request::ChallengeType::CHALLENGE_TYPE_SIGNATURE), - None => key_challenge_request::ChallengeType::CHALLENGE_TYPE_SIGNATURE, - } - } - - pub fn clear_challenge_type(&mut self) { - self.challenge_type = ::std::option::Option::None; - } - - pub fn has_challenge_type(&self) -> bool { - self.challenge_type.is_some() - } - - // Param is passed by value, moved - pub fn set_challenge_type(&mut self, v: key_challenge_request::ChallengeType) { - self.challenge_type = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } -} - -impl ::protobuf::Message for KeyChallengeRequest { - const NAME: &'static str = "KeyChallengeRequest"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 8 => { - self.challenge_type = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - 18 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.signature_request_data)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.challenge_type { - my_size += ::protobuf::rt::int32_size(1, v.value()); - } - if let Some(v) = self.signature_request_data.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.challenge_type { - os.write_enum(1, ::protobuf::EnumOrUnknown::value(&v))?; - } - if let Some(v) = self.signature_request_data.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(2, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> KeyChallengeRequest { - KeyChallengeRequest::new() - } - - fn clear(&mut self) { - self.challenge_type = ::std::option::Option::None; - self.signature_request_data.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static KeyChallengeRequest { - static instance: KeyChallengeRequest = KeyChallengeRequest { - challenge_type: ::std::option::Option::None, - signature_request_data: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -/// Nested message and enums of message `KeyChallengeRequest` -pub mod key_challenge_request { - #[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] - // @@protoc_insertion_point(enum:cryptohome.KeyChallengeRequest.ChallengeType) - pub enum ChallengeType { - // @@protoc_insertion_point(enum_value:cryptohome.KeyChallengeRequest.ChallengeType.CHALLENGE_TYPE_SIGNATURE) - CHALLENGE_TYPE_SIGNATURE = 1, - } - - impl ::protobuf::Enum for ChallengeType { - const NAME: &'static str = "ChallengeType"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 1 => ::std::option::Option::Some(ChallengeType::CHALLENGE_TYPE_SIGNATURE), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [ChallengeType] = &[ - ChallengeType::CHALLENGE_TYPE_SIGNATURE, - ]; - } - - // Note, `Default` is implemented although default value is not 0 - impl ::std::default::Default for ChallengeType { - fn default() -> Self { - ChallengeType::CHALLENGE_TYPE_SIGNATURE - } - } - -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.SignatureKeyChallengeRequestData) -pub struct SignatureKeyChallengeRequestData { - // message fields - // @@protoc_insertion_point(field:cryptohome.SignatureKeyChallengeRequestData.data_to_sign) - pub data_to_sign: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:cryptohome.SignatureKeyChallengeRequestData.public_key_spki_der) - pub public_key_spki_der: ::std::option::Option<::std::vec::Vec>, - // @@protoc_insertion_point(field:cryptohome.SignatureKeyChallengeRequestData.signature_algorithm) - pub signature_algorithm: ::std::option::Option<::protobuf::EnumOrUnknown>, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.SignatureKeyChallengeRequestData.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a SignatureKeyChallengeRequestData { - fn default() -> &'a SignatureKeyChallengeRequestData { - ::default_instance() - } -} - -impl SignatureKeyChallengeRequestData { - pub fn new() -> SignatureKeyChallengeRequestData { - ::std::default::Default::default() - } - - // optional bytes data_to_sign = 1; - - pub fn data_to_sign(&self) -> &[u8] { - match self.data_to_sign.as_ref() { - Some(v) => v, - None => &[], - } - } - - pub fn clear_data_to_sign(&mut self) { - self.data_to_sign = ::std::option::Option::None; - } - - pub fn has_data_to_sign(&self) -> bool { - self.data_to_sign.is_some() - } - - // Param is passed by value, moved - pub fn set_data_to_sign(&mut self, v: ::std::vec::Vec) { - self.data_to_sign = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_data_to_sign(&mut self) -> &mut ::std::vec::Vec { - if self.data_to_sign.is_none() { - self.data_to_sign = ::std::option::Option::Some(::std::vec::Vec::new()); - } - self.data_to_sign.as_mut().unwrap() - } - - // Take field - pub fn take_data_to_sign(&mut self) -> ::std::vec::Vec { - self.data_to_sign.take().unwrap_or_else(|| ::std::vec::Vec::new()) - } - - // optional bytes public_key_spki_der = 2; - - pub fn public_key_spki_der(&self) -> &[u8] { - match self.public_key_spki_der.as_ref() { - Some(v) => v, - None => &[], - } - } - - pub fn clear_public_key_spki_der(&mut self) { - self.public_key_spki_der = ::std::option::Option::None; - } - - pub fn has_public_key_spki_der(&self) -> bool { - self.public_key_spki_der.is_some() - } - - // Param is passed by value, moved - pub fn set_public_key_spki_der(&mut self, v: ::std::vec::Vec) { - self.public_key_spki_der = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_public_key_spki_der(&mut self) -> &mut ::std::vec::Vec { - if self.public_key_spki_der.is_none() { - self.public_key_spki_der = ::std::option::Option::Some(::std::vec::Vec::new()); - } - self.public_key_spki_der.as_mut().unwrap() - } - - // Take field - pub fn take_public_key_spki_der(&mut self) -> ::std::vec::Vec { - self.public_key_spki_der.take().unwrap_or_else(|| ::std::vec::Vec::new()) - } - - // optional .cryptohome.ChallengeSignatureAlgorithm signature_algorithm = 3; - - pub fn signature_algorithm(&self) -> super::key::ChallengeSignatureAlgorithm { - match self.signature_algorithm { - Some(e) => e.enum_value_or(super::key::ChallengeSignatureAlgorithm::CHALLENGE_RSASSA_PKCS1_V1_5_SHA1), - None => super::key::ChallengeSignatureAlgorithm::CHALLENGE_RSASSA_PKCS1_V1_5_SHA1, - } - } - - pub fn clear_signature_algorithm(&mut self) { - self.signature_algorithm = ::std::option::Option::None; - } - - pub fn has_signature_algorithm(&self) -> bool { - self.signature_algorithm.is_some() - } - - // Param is passed by value, moved - pub fn set_signature_algorithm(&mut self, v: super::key::ChallengeSignatureAlgorithm) { - self.signature_algorithm = ::std::option::Option::Some(::protobuf::EnumOrUnknown::new(v)); - } -} - -impl ::protobuf::Message for SignatureKeyChallengeRequestData { - const NAME: &'static str = "SignatureKeyChallengeRequestData"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.data_to_sign = ::std::option::Option::Some(is.read_bytes()?); - }, - 18 => { - self.public_key_spki_der = ::std::option::Option::Some(is.read_bytes()?); - }, - 24 => { - self.signature_algorithm = ::std::option::Option::Some(is.read_enum_or_unknown()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.data_to_sign.as_ref() { - my_size += ::protobuf::rt::bytes_size(1, &v); - } - if let Some(v) = self.public_key_spki_der.as_ref() { - my_size += ::protobuf::rt::bytes_size(2, &v); - } - if let Some(v) = self.signature_algorithm { - my_size += ::protobuf::rt::int32_size(3, v.value()); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.data_to_sign.as_ref() { - os.write_bytes(1, v)?; - } - if let Some(v) = self.public_key_spki_der.as_ref() { - os.write_bytes(2, v)?; - } - if let Some(v) = self.signature_algorithm { - os.write_enum(3, ::protobuf::EnumOrUnknown::value(&v))?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SignatureKeyChallengeRequestData { - SignatureKeyChallengeRequestData::new() - } - - fn clear(&mut self) { - self.data_to_sign = ::std::option::Option::None; - self.public_key_spki_der = ::std::option::Option::None; - self.signature_algorithm = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static SignatureKeyChallengeRequestData { - static instance: SignatureKeyChallengeRequestData = SignatureKeyChallengeRequestData { - data_to_sign: ::std::option::Option::None, - public_key_spki_der: ::std::option::Option::None, - signature_algorithm: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.KeyChallengeResponse) -pub struct KeyChallengeResponse { - // message fields - // @@protoc_insertion_point(field:cryptohome.KeyChallengeResponse.signature_response_data) - pub signature_response_data: ::protobuf::MessageField, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.KeyChallengeResponse.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a KeyChallengeResponse { - fn default() -> &'a KeyChallengeResponse { - ::default_instance() - } -} - -impl KeyChallengeResponse { - pub fn new() -> KeyChallengeResponse { - ::std::default::Default::default() - } -} - -impl ::protobuf::Message for KeyChallengeResponse { - const NAME: &'static str = "KeyChallengeResponse"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - ::protobuf::rt::read_singular_message_into_field(is, &mut self.signature_response_data)?; - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.signature_response_data.as_ref() { - let len = v.compute_size(); - my_size += 1 + ::protobuf::rt::compute_raw_varint64_size(len) + len; - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.signature_response_data.as_ref() { - ::protobuf::rt::write_message_field_with_cached_size(1, v, os)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> KeyChallengeResponse { - KeyChallengeResponse::new() - } - - fn clear(&mut self) { - self.signature_response_data.clear(); - self.special_fields.clear(); - } - - fn default_instance() -> &'static KeyChallengeResponse { - static instance: KeyChallengeResponse = KeyChallengeResponse { - signature_response_data: ::protobuf::MessageField::none(), - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(PartialEq,Clone,Default,Debug)] -// @@protoc_insertion_point(message:cryptohome.SignatureKeyChallengeResponseData) -pub struct SignatureKeyChallengeResponseData { - // message fields - // @@protoc_insertion_point(field:cryptohome.SignatureKeyChallengeResponseData.signature) - pub signature: ::std::option::Option<::std::vec::Vec>, - // special fields - // @@protoc_insertion_point(special_field:cryptohome.SignatureKeyChallengeResponseData.special_fields) - pub special_fields: ::protobuf::SpecialFields, -} - -impl<'a> ::std::default::Default for &'a SignatureKeyChallengeResponseData { - fn default() -> &'a SignatureKeyChallengeResponseData { - ::default_instance() - } -} - -impl SignatureKeyChallengeResponseData { - pub fn new() -> SignatureKeyChallengeResponseData { - ::std::default::Default::default() - } - - // optional bytes signature = 1; - - pub fn signature(&self) -> &[u8] { - match self.signature.as_ref() { - Some(v) => v, - None => &[], - } - } - - pub fn clear_signature(&mut self) { - self.signature = ::std::option::Option::None; - } - - pub fn has_signature(&self) -> bool { - self.signature.is_some() - } - - // Param is passed by value, moved - pub fn set_signature(&mut self, v: ::std::vec::Vec) { - self.signature = ::std::option::Option::Some(v); - } - - // Mutable pointer to the field. - // If field is not initialized, it is initialized with default value first. - pub fn mut_signature(&mut self) -> &mut ::std::vec::Vec { - if self.signature.is_none() { - self.signature = ::std::option::Option::Some(::std::vec::Vec::new()); - } - self.signature.as_mut().unwrap() - } - - // Take field - pub fn take_signature(&mut self) -> ::std::vec::Vec { - self.signature.take().unwrap_or_else(|| ::std::vec::Vec::new()) - } -} - -impl ::protobuf::Message for SignatureKeyChallengeResponseData { - const NAME: &'static str = "SignatureKeyChallengeResponseData"; - - fn is_initialized(&self) -> bool { - true - } - - fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::Result<()> { - while let Some(tag) = is.read_raw_tag_or_eof()? { - match tag { - 10 => { - self.signature = ::std::option::Option::Some(is.read_bytes()?); - }, - tag => { - ::protobuf::rt::read_unknown_or_skip_group(tag, is, self.special_fields.mut_unknown_fields())?; - }, - }; - } - ::std::result::Result::Ok(()) - } - - // Compute sizes of nested messages - #[allow(unused_variables)] - fn compute_size(&self) -> u64 { - let mut my_size = 0; - if let Some(v) = self.signature.as_ref() { - my_size += ::protobuf::rt::bytes_size(1, &v); - } - my_size += ::protobuf::rt::unknown_fields_size(self.special_fields.unknown_fields()); - self.special_fields.cached_size().set(my_size as u32); - my_size - } - - fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::Result<()> { - if let Some(v) = self.signature.as_ref() { - os.write_bytes(1, v)?; - } - os.write_unknown_fields(self.special_fields.unknown_fields())?; - ::std::result::Result::Ok(()) - } - - fn special_fields(&self) -> &::protobuf::SpecialFields { - &self.special_fields - } - - fn mut_special_fields(&mut self) -> &mut ::protobuf::SpecialFields { - &mut self.special_fields - } - - fn new() -> SignatureKeyChallengeResponseData { - SignatureKeyChallengeResponseData::new() - } - - fn clear(&mut self) { - self.signature = ::std::option::Option::None; - self.special_fields.clear(); - } - - fn default_instance() -> &'static SignatureKeyChallengeResponseData { - static instance: SignatureKeyChallengeResponseData = SignatureKeyChallengeResponseData { - signature: ::std::option::Option::None, - special_fields: ::protobuf::SpecialFields::new(), - }; - &instance - } -} - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:cryptohome.CryptohomeErrorCode) -pub enum CryptohomeErrorCode { - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_NOT_SET) - CRYPTOHOME_ERROR_NOT_SET = 0, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_ACCOUNT_NOT_FOUND) - CRYPTOHOME_ERROR_ACCOUNT_NOT_FOUND = 1, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_AUTHORIZATION_KEY_NOT_FOUND) - CRYPTOHOME_ERROR_AUTHORIZATION_KEY_NOT_FOUND = 2, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_AUTHORIZATION_KEY_FAILED) - CRYPTOHOME_ERROR_AUTHORIZATION_KEY_FAILED = 3, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_NOT_IMPLEMENTED) - CRYPTOHOME_ERROR_NOT_IMPLEMENTED = 4, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_MOUNT_FATAL) - CRYPTOHOME_ERROR_MOUNT_FATAL = 5, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_MOUNT_MOUNT_POINT_BUSY) - CRYPTOHOME_ERROR_MOUNT_MOUNT_POINT_BUSY = 6, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_TPM_COMM_ERROR) - CRYPTOHOME_ERROR_TPM_COMM_ERROR = 7, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_TPM_DEFEND_LOCK) - CRYPTOHOME_ERROR_TPM_DEFEND_LOCK = 8, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_TPM_NEEDS_REBOOT) - CRYPTOHOME_ERROR_TPM_NEEDS_REBOOT = 9, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_AUTHORIZATION_KEY_DENIED) - CRYPTOHOME_ERROR_AUTHORIZATION_KEY_DENIED = 10, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_KEY_QUOTA_EXCEEDED) - CRYPTOHOME_ERROR_KEY_QUOTA_EXCEEDED = 11, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_KEY_LABEL_EXISTS) - CRYPTOHOME_ERROR_KEY_LABEL_EXISTS = 12, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_BACKING_STORE_FAILURE) - CRYPTOHOME_ERROR_BACKING_STORE_FAILURE = 13, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_UPDATE_SIGNATURE_INVALID) - CRYPTOHOME_ERROR_UPDATE_SIGNATURE_INVALID = 14, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_KEY_NOT_FOUND) - CRYPTOHOME_ERROR_KEY_NOT_FOUND = 15, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_LOCKBOX_SIGNATURE_INVALID) - CRYPTOHOME_ERROR_LOCKBOX_SIGNATURE_INVALID = 16, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_LOCKBOX_CANNOT_SIGN) - CRYPTOHOME_ERROR_LOCKBOX_CANNOT_SIGN = 17, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_BOOT_ATTRIBUTE_NOT_FOUND) - CRYPTOHOME_ERROR_BOOT_ATTRIBUTE_NOT_FOUND = 18, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_BOOT_ATTRIBUTES_CANNOT_SIGN) - CRYPTOHOME_ERROR_BOOT_ATTRIBUTES_CANNOT_SIGN = 19, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_TPM_EK_NOT_AVAILABLE) - CRYPTOHOME_ERROR_TPM_EK_NOT_AVAILABLE = 20, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_ATTESTATION_NOT_READY) - CRYPTOHOME_ERROR_ATTESTATION_NOT_READY = 21, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_CANNOT_CONNECT_TO_CA) - CRYPTOHOME_ERROR_CANNOT_CONNECT_TO_CA = 22, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_CA_REFUSED_ENROLLMENT) - CRYPTOHOME_ERROR_CA_REFUSED_ENROLLMENT = 23, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_CA_REFUSED_CERTIFICATE) - CRYPTOHOME_ERROR_CA_REFUSED_CERTIFICATE = 24, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_INTERNAL_ATTESTATION_ERROR) - CRYPTOHOME_ERROR_INTERNAL_ATTESTATION_ERROR = 25, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_INVALID) - CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_INVALID = 26, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_CANNOT_STORE) - CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_CANNOT_STORE = 27, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_CANNOT_REMOVE) - CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_CANNOT_REMOVE = 28, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_MOUNT_OLD_ENCRYPTION) - CRYPTOHOME_ERROR_MOUNT_OLD_ENCRYPTION = 29, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_MOUNT_PREVIOUS_MIGRATION_INCOMPLETE) - CRYPTOHOME_ERROR_MOUNT_PREVIOUS_MIGRATION_INCOMPLETE = 30, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_MIGRATE_KEY_FAILED) - CRYPTOHOME_ERROR_MIGRATE_KEY_FAILED = 31, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_REMOVE_FAILED) - CRYPTOHOME_ERROR_REMOVE_FAILED = 32, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_INVALID_ARGUMENT) - CRYPTOHOME_ERROR_INVALID_ARGUMENT = 33, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_GET_FAILED) - CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_GET_FAILED = 34, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_SET_FAILED) - CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_SET_FAILED = 35, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_FINALIZE_FAILED) - CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_FINALIZE_FAILED = 36, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_UPDATE_USER_ACTIVITY_TIMESTAMP_FAILED) - CRYPTOHOME_ERROR_UPDATE_USER_ACTIVITY_TIMESTAMP_FAILED = 37, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_FAILED_TO_READ_PCR) - CRYPTOHOME_ERROR_FAILED_TO_READ_PCR = 38, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_PCR_ALREADY_EXTENDED) - CRYPTOHOME_ERROR_PCR_ALREADY_EXTENDED = 39, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_FAILED_TO_EXTEND_PCR) - CRYPTOHOME_ERROR_FAILED_TO_EXTEND_PCR = 40, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_TPM_UPDATE_REQUIRED) - CRYPTOHOME_ERROR_TPM_UPDATE_REQUIRED = 41, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_FINGERPRINT_ERROR_INTERNAL) - CRYPTOHOME_ERROR_FINGERPRINT_ERROR_INTERNAL = 42, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_FINGERPRINT_RETRY_REQUIRED) - CRYPTOHOME_ERROR_FINGERPRINT_RETRY_REQUIRED = 43, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_FINGERPRINT_DENIED) - CRYPTOHOME_ERROR_FINGERPRINT_DENIED = 44, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_VAULT_UNRECOVERABLE) - CRYPTOHOME_ERROR_VAULT_UNRECOVERABLE = 45, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_FIDO_MAKE_CREDENTIAL_FAILED) - CRYPTOHOME_ERROR_FIDO_MAKE_CREDENTIAL_FAILED = 46, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_FIDO_GET_ASSERTION_FAILED) - CRYPTOHOME_ERROR_FIDO_GET_ASSERTION_FAILED = 47, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_TOKEN_SERIALIZATION_FAILED) - CRYPTOHOME_TOKEN_SERIALIZATION_FAILED = 48, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_INVALID_AUTH_SESSION_TOKEN) - CRYPTOHOME_INVALID_AUTH_SESSION_TOKEN = 49, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ADD_CREDENTIALS_FAILED) - CRYPTOHOME_ADD_CREDENTIALS_FAILED = 50, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_UNAUTHENTICATED_AUTH_SESSION) - CRYPTOHOME_ERROR_UNAUTHENTICATED_AUTH_SESSION = 51, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_UNKNOWN_LEGACY) - CRYPTOHOME_ERROR_UNKNOWN_LEGACY = 52, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_UNUSABLE_VAULT) - CRYPTOHOME_ERROR_UNUSABLE_VAULT = 53, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_REMOVE_CREDENTIALS_FAILED) - CRYPTOHOME_REMOVE_CREDENTIALS_FAILED = 54, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_UPDATE_CREDENTIALS_FAILED) - CRYPTOHOME_UPDATE_CREDENTIALS_FAILED = 55, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_RECOVERY_TRANSIENT) - CRYPTOHOME_ERROR_RECOVERY_TRANSIENT = 56, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_RECOVERY_FATAL) - CRYPTOHOME_ERROR_RECOVERY_FATAL = 57, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_BIOMETRICS_BUSY) - CRYPTOHOME_ERROR_BIOMETRICS_BUSY = 58, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_CREDENTIAL_LOCKED) - CRYPTOHOME_ERROR_CREDENTIAL_LOCKED = 59, - // @@protoc_insertion_point(enum_value:cryptohome.CryptohomeErrorCode.CRYPTOHOME_ERROR_CREDENTIAL_EXPIRED) - CRYPTOHOME_ERROR_CREDENTIAL_EXPIRED = 60, -} - -impl ::protobuf::Enum for CryptohomeErrorCode { - const NAME: &'static str = "CryptohomeErrorCode"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET), - 1 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_ACCOUNT_NOT_FOUND), - 2 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_AUTHORIZATION_KEY_NOT_FOUND), - 3 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_AUTHORIZATION_KEY_FAILED), - 4 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_IMPLEMENTED), - 5 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_MOUNT_FATAL), - 6 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_MOUNT_MOUNT_POINT_BUSY), - 7 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_TPM_COMM_ERROR), - 8 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_TPM_DEFEND_LOCK), - 9 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_TPM_NEEDS_REBOOT), - 10 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_AUTHORIZATION_KEY_DENIED), - 11 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_KEY_QUOTA_EXCEEDED), - 12 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_KEY_LABEL_EXISTS), - 13 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_BACKING_STORE_FAILURE), - 14 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_UPDATE_SIGNATURE_INVALID), - 15 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_KEY_NOT_FOUND), - 16 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_LOCKBOX_SIGNATURE_INVALID), - 17 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_LOCKBOX_CANNOT_SIGN), - 18 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_BOOT_ATTRIBUTE_NOT_FOUND), - 19 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_BOOT_ATTRIBUTES_CANNOT_SIGN), - 20 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_TPM_EK_NOT_AVAILABLE), - 21 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_ATTESTATION_NOT_READY), - 22 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_CANNOT_CONNECT_TO_CA), - 23 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_CA_REFUSED_ENROLLMENT), - 24 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_CA_REFUSED_CERTIFICATE), - 25 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_INTERNAL_ATTESTATION_ERROR), - 26 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_INVALID), - 27 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_CANNOT_STORE), - 28 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_CANNOT_REMOVE), - 29 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_MOUNT_OLD_ENCRYPTION), - 30 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_MOUNT_PREVIOUS_MIGRATION_INCOMPLETE), - 31 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_MIGRATE_KEY_FAILED), - 32 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_REMOVE_FAILED), - 33 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_INVALID_ARGUMENT), - 34 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_GET_FAILED), - 35 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_SET_FAILED), - 36 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_FINALIZE_FAILED), - 37 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_UPDATE_USER_ACTIVITY_TIMESTAMP_FAILED), - 38 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_FAILED_TO_READ_PCR), - 39 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_PCR_ALREADY_EXTENDED), - 40 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_FAILED_TO_EXTEND_PCR), - 41 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_TPM_UPDATE_REQUIRED), - 42 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_FINGERPRINT_ERROR_INTERNAL), - 43 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_FINGERPRINT_RETRY_REQUIRED), - 44 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_FINGERPRINT_DENIED), - 45 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_VAULT_UNRECOVERABLE), - 46 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_FIDO_MAKE_CREDENTIAL_FAILED), - 47 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_FIDO_GET_ASSERTION_FAILED), - 48 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_TOKEN_SERIALIZATION_FAILED), - 49 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_INVALID_AUTH_SESSION_TOKEN), - 50 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ADD_CREDENTIALS_FAILED), - 51 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_UNAUTHENTICATED_AUTH_SESSION), - 52 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_UNKNOWN_LEGACY), - 53 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_UNUSABLE_VAULT), - 54 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_REMOVE_CREDENTIALS_FAILED), - 55 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_UPDATE_CREDENTIALS_FAILED), - 56 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_RECOVERY_TRANSIENT), - 57 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_RECOVERY_FATAL), - 58 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_BIOMETRICS_BUSY), - 59 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_CREDENTIAL_LOCKED), - 60 => ::std::option::Option::Some(CryptohomeErrorCode::CRYPTOHOME_ERROR_CREDENTIAL_EXPIRED), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [CryptohomeErrorCode] = &[ - CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET, - CryptohomeErrorCode::CRYPTOHOME_ERROR_ACCOUNT_NOT_FOUND, - CryptohomeErrorCode::CRYPTOHOME_ERROR_AUTHORIZATION_KEY_NOT_FOUND, - CryptohomeErrorCode::CRYPTOHOME_ERROR_AUTHORIZATION_KEY_FAILED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_IMPLEMENTED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_MOUNT_FATAL, - CryptohomeErrorCode::CRYPTOHOME_ERROR_MOUNT_MOUNT_POINT_BUSY, - CryptohomeErrorCode::CRYPTOHOME_ERROR_TPM_COMM_ERROR, - CryptohomeErrorCode::CRYPTOHOME_ERROR_TPM_DEFEND_LOCK, - CryptohomeErrorCode::CRYPTOHOME_ERROR_TPM_NEEDS_REBOOT, - CryptohomeErrorCode::CRYPTOHOME_ERROR_AUTHORIZATION_KEY_DENIED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_KEY_QUOTA_EXCEEDED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_KEY_LABEL_EXISTS, - CryptohomeErrorCode::CRYPTOHOME_ERROR_BACKING_STORE_FAILURE, - CryptohomeErrorCode::CRYPTOHOME_ERROR_UPDATE_SIGNATURE_INVALID, - CryptohomeErrorCode::CRYPTOHOME_ERROR_KEY_NOT_FOUND, - CryptohomeErrorCode::CRYPTOHOME_ERROR_LOCKBOX_SIGNATURE_INVALID, - CryptohomeErrorCode::CRYPTOHOME_ERROR_LOCKBOX_CANNOT_SIGN, - CryptohomeErrorCode::CRYPTOHOME_ERROR_BOOT_ATTRIBUTE_NOT_FOUND, - CryptohomeErrorCode::CRYPTOHOME_ERROR_BOOT_ATTRIBUTES_CANNOT_SIGN, - CryptohomeErrorCode::CRYPTOHOME_ERROR_TPM_EK_NOT_AVAILABLE, - CryptohomeErrorCode::CRYPTOHOME_ERROR_ATTESTATION_NOT_READY, - CryptohomeErrorCode::CRYPTOHOME_ERROR_CANNOT_CONNECT_TO_CA, - CryptohomeErrorCode::CRYPTOHOME_ERROR_CA_REFUSED_ENROLLMENT, - CryptohomeErrorCode::CRYPTOHOME_ERROR_CA_REFUSED_CERTIFICATE, - CryptohomeErrorCode::CRYPTOHOME_ERROR_INTERNAL_ATTESTATION_ERROR, - CryptohomeErrorCode::CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_INVALID, - CryptohomeErrorCode::CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_CANNOT_STORE, - CryptohomeErrorCode::CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_CANNOT_REMOVE, - CryptohomeErrorCode::CRYPTOHOME_ERROR_MOUNT_OLD_ENCRYPTION, - CryptohomeErrorCode::CRYPTOHOME_ERROR_MOUNT_PREVIOUS_MIGRATION_INCOMPLETE, - CryptohomeErrorCode::CRYPTOHOME_ERROR_MIGRATE_KEY_FAILED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_REMOVE_FAILED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_INVALID_ARGUMENT, - CryptohomeErrorCode::CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_GET_FAILED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_SET_FAILED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_FINALIZE_FAILED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_UPDATE_USER_ACTIVITY_TIMESTAMP_FAILED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_FAILED_TO_READ_PCR, - CryptohomeErrorCode::CRYPTOHOME_ERROR_PCR_ALREADY_EXTENDED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_FAILED_TO_EXTEND_PCR, - CryptohomeErrorCode::CRYPTOHOME_ERROR_TPM_UPDATE_REQUIRED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_FINGERPRINT_ERROR_INTERNAL, - CryptohomeErrorCode::CRYPTOHOME_ERROR_FINGERPRINT_RETRY_REQUIRED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_FINGERPRINT_DENIED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_VAULT_UNRECOVERABLE, - CryptohomeErrorCode::CRYPTOHOME_ERROR_FIDO_MAKE_CREDENTIAL_FAILED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_FIDO_GET_ASSERTION_FAILED, - CryptohomeErrorCode::CRYPTOHOME_TOKEN_SERIALIZATION_FAILED, - CryptohomeErrorCode::CRYPTOHOME_INVALID_AUTH_SESSION_TOKEN, - CryptohomeErrorCode::CRYPTOHOME_ADD_CREDENTIALS_FAILED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_UNAUTHENTICATED_AUTH_SESSION, - CryptohomeErrorCode::CRYPTOHOME_ERROR_UNKNOWN_LEGACY, - CryptohomeErrorCode::CRYPTOHOME_ERROR_UNUSABLE_VAULT, - CryptohomeErrorCode::CRYPTOHOME_REMOVE_CREDENTIALS_FAILED, - CryptohomeErrorCode::CRYPTOHOME_UPDATE_CREDENTIALS_FAILED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_RECOVERY_TRANSIENT, - CryptohomeErrorCode::CRYPTOHOME_ERROR_RECOVERY_FATAL, - CryptohomeErrorCode::CRYPTOHOME_ERROR_BIOMETRICS_BUSY, - CryptohomeErrorCode::CRYPTOHOME_ERROR_CREDENTIAL_LOCKED, - CryptohomeErrorCode::CRYPTOHOME_ERROR_CREDENTIAL_EXPIRED, - ]; -} - -impl ::std::default::Default for CryptohomeErrorCode { - fn default() -> Self { - CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET - } -} - - -#[derive(Clone,Copy,PartialEq,Eq,Debug,Hash)] -// @@protoc_insertion_point(enum:cryptohome.FirmwareManagementParametersFlags) -pub enum FirmwareManagementParametersFlags { - // @@protoc_insertion_point(enum_value:cryptohome.FirmwareManagementParametersFlags.NONE) - NONE = 0, - // @@protoc_insertion_point(enum_value:cryptohome.FirmwareManagementParametersFlags.DEVELOPER_DISABLE_BOOT) - DEVELOPER_DISABLE_BOOT = 1, - // @@protoc_insertion_point(enum_value:cryptohome.FirmwareManagementParametersFlags.DEVELOPER_DISABLE_RECOVERY_INSTALL) - DEVELOPER_DISABLE_RECOVERY_INSTALL = 2, - // @@protoc_insertion_point(enum_value:cryptohome.FirmwareManagementParametersFlags.DEVELOPER_DISABLE_RECOVERY_ROOTFS) - DEVELOPER_DISABLE_RECOVERY_ROOTFS = 4, - // @@protoc_insertion_point(enum_value:cryptohome.FirmwareManagementParametersFlags.DEVELOPER_ENABLE_USB) - DEVELOPER_ENABLE_USB = 8, - // @@protoc_insertion_point(enum_value:cryptohome.FirmwareManagementParametersFlags.DEVELOPER_ENABLE_LEGACY) - DEVELOPER_ENABLE_LEGACY = 16, - // @@protoc_insertion_point(enum_value:cryptohome.FirmwareManagementParametersFlags.DEVELOPER_USE_KEY_HASH) - DEVELOPER_USE_KEY_HASH = 32, - // @@protoc_insertion_point(enum_value:cryptohome.FirmwareManagementParametersFlags.DEVELOPER_DISABLE_CASE_CLOSED_DEBUGGING_UNLOCK) - DEVELOPER_DISABLE_CASE_CLOSED_DEBUGGING_UNLOCK = 64, -} - -impl ::protobuf::Enum for FirmwareManagementParametersFlags { - const NAME: &'static str = "FirmwareManagementParametersFlags"; - - fn value(&self) -> i32 { - *self as i32 - } - - fn from_i32(value: i32) -> ::std::option::Option { - match value { - 0 => ::std::option::Option::Some(FirmwareManagementParametersFlags::NONE), - 1 => ::std::option::Option::Some(FirmwareManagementParametersFlags::DEVELOPER_DISABLE_BOOT), - 2 => ::std::option::Option::Some(FirmwareManagementParametersFlags::DEVELOPER_DISABLE_RECOVERY_INSTALL), - 4 => ::std::option::Option::Some(FirmwareManagementParametersFlags::DEVELOPER_DISABLE_RECOVERY_ROOTFS), - 8 => ::std::option::Option::Some(FirmwareManagementParametersFlags::DEVELOPER_ENABLE_USB), - 16 => ::std::option::Option::Some(FirmwareManagementParametersFlags::DEVELOPER_ENABLE_LEGACY), - 32 => ::std::option::Option::Some(FirmwareManagementParametersFlags::DEVELOPER_USE_KEY_HASH), - 64 => ::std::option::Option::Some(FirmwareManagementParametersFlags::DEVELOPER_DISABLE_CASE_CLOSED_DEBUGGING_UNLOCK), - _ => ::std::option::Option::None - } - } - - const VALUES: &'static [FirmwareManagementParametersFlags] = &[ - FirmwareManagementParametersFlags::NONE, - FirmwareManagementParametersFlags::DEVELOPER_DISABLE_BOOT, - FirmwareManagementParametersFlags::DEVELOPER_DISABLE_RECOVERY_INSTALL, - FirmwareManagementParametersFlags::DEVELOPER_DISABLE_RECOVERY_ROOTFS, - FirmwareManagementParametersFlags::DEVELOPER_ENABLE_USB, - FirmwareManagementParametersFlags::DEVELOPER_ENABLE_LEGACY, - FirmwareManagementParametersFlags::DEVELOPER_USE_KEY_HASH, - FirmwareManagementParametersFlags::DEVELOPER_DISABLE_CASE_CLOSED_DEBUGGING_UNLOCK, - ]; -} - -impl ::std::default::Default for FirmwareManagementParametersFlags { - fn default() -> Self { - FirmwareManagementParametersFlags::NONE - } -} - diff --git a/system_api/update_bindings.sh b/system_api/update_bindings.sh index 46593246dd..7e1a2202b4 100755 --- a/system_api/update_bindings.sh +++ b/system_api/update_bindings.sh @@ -15,14 +15,8 @@ fi FILES=( "src/bindings/client/org_chromium_spaced.rs" - "src/bindings/client/org_chromium_userdataauth.rs" "src/bindings/client/org_chromium_vtpm.rs" - "src/protos/auth_factor.rs" - "src/protos/fido.rs" - "src/protos/key.rs" - "src/protos/rpc.rs" "src/protos/spaced.rs" - "src/protos/UserDataAuth.rs" "src/protos/vtpm_interface.rs" )