From 891455563bdc19089bebbca4859f1fbc363744d5 Mon Sep 17 00:00:00 2001 From: Dennis Kempin Date: Mon, 26 Sep 2022 21:20:48 +0000 Subject: [PATCH] system_api: Add copy of ChromeOS's system_api Adds a script that copies the bindings we need upstream. We cannot use the original repository, as it's part of the large platform2 git repository, and the original build.rs depends on ChromeOS tooling to generate these bindings. So instead, this change adds a script that can be called from a chromiumos checkout of crosvm to update the upstream bindings. This allows us to enable certain features that talk to ChromeOS dbus services. They won't be functional upstream, but at least we can compile and test the code. To make things more consistent, we no longer replace the crate with the ChromeOS version when building for ChromeOS. BUG=b:244618505 TEST=presubmit Change-Id: I504cbf6d12b0cb50d9935f5e49b7fa72b692d45c Reviewed-on: https://chromium-review.googlesource.com/c/crosvm/crosvm/+/3919814 Reviewed-by: Daniel Verkamp --- Cargo.lock | 4 + Cargo.toml | 2 +- devices/Cargo.toml | 2 +- {system_api_stub => system_api}/Cargo.toml | 4 + system_api/README.md | 15 + .../client/org_chromium_userdataauth.rs | 473 + .../src/bindings/client/org_chromium_vtpm.rs | 17 + system_api/src/bindings/include_modules.rs | 6 + system_api/src/protos/UserDataAuth.rs | 24762 ++++++++++++++++ system_api/src/protos/auth_factor.rs | 3098 ++ system_api/src/protos/fido.rs | 3754 +++ .../src/protos/include_protos.rs | 6 +- system_api/src/protos/key.rs | 1651 ++ system_api/src/protos/rpc.rs | 1621 + system_api/src/protos/vtpm_interface.rs | 316 + system_api/src/system_api.rs | 8 + system_api/update_bindings.sh | 31 + system_api_stub/README.md | 11 - tools/health-check | 2 + 19 files changed, 35769 insertions(+), 14 deletions(-) rename {system_api_stub => system_api}/Cargo.toml (67%) create mode 100644 system_api/README.md create mode 100644 system_api/src/bindings/client/org_chromium_userdataauth.rs create mode 100644 system_api/src/bindings/client/org_chromium_vtpm.rs create mode 100644 system_api/src/bindings/include_modules.rs create mode 100644 system_api/src/protos/UserDataAuth.rs create mode 100644 system_api/src/protos/auth_factor.rs create mode 100644 system_api/src/protos/fido.rs rename system_api_stub/src/system_api.rs => system_api/src/protos/include_protos.rs (63%) create mode 100644 system_api/src/protos/key.rs create mode 100644 system_api/src/protos/rpc.rs create mode 100644 system_api/src/protos/vtpm_interface.rs create mode 100644 system_api/src/system_api.rs create mode 100755 system_api/update_bindings.sh delete mode 100644 system_api_stub/README.md diff --git a/Cargo.lock b/Cargo.lock index 9e9d8d870..14a9a8bb3 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1688,6 +1688,10 @@ dependencies = [ [[package]] name = "system_api" version = "0.1.0" +dependencies = [ + "dbus", + "protobuf", +] [[package]] name = "tempfile" diff --git a/Cargo.toml b/Cargo.toml index 51f9b31c4..4318e20ae 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -78,6 +78,7 @@ members = [ "resources", "rutabaga_gfx", "serde_keyvalue", + "system_api", "tpm2", "tpm2-sys", "tracing", @@ -262,6 +263,5 @@ data_model = { path = "common/data_model" } libcras = { path = "libcras_stub" } # ignored by ebuild p9 = { path = "common/p9" } # ignored by ebuild sync = { path = "common/sync" } -system_api = { path = "system_api_stub" } # ignored by ebuild wire_format_derive = { path = "common/p9/wire_format_derive" } # ignored by ebuild minijail = { path = "third_party/minijail/rust/minijail" } # ignored by ebuild diff --git a/devices/Cargo.toml b/devices/Cargo.toml index 6499ac193..cdf19f161 100644 --- a/devices/Cargo.toml +++ b/devices/Cargo.toml @@ -66,7 +66,7 @@ serde_json = "1" serde_keyvalue = { path = "../serde_keyvalue", features = ["argh_derive"] } smallvec = "1.6.1" sync = { path = "../common/sync" } -system_api = { version = "*", optional = true } +system_api = { path = "../system_api", optional = true } thiserror = "1.0.20" tpm2 = { path = "../tpm2", optional = true } tracing = { path = "../tracing" } diff --git a/system_api_stub/Cargo.toml b/system_api/Cargo.toml similarity index 67% rename from system_api_stub/Cargo.toml rename to system_api/Cargo.toml index 764a68c7b..b8d86cf05 100644 --- a/system_api_stub/Cargo.toml +++ b/system_api/Cargo.toml @@ -6,3 +6,7 @@ edition = "2021" [lib] path = "src/system_api.rs" + +[target.'cfg(unix)'.dependencies] +dbus = "0.9" +protobuf = "2.24" diff --git a/system_api/README.md b/system_api/README.md new file mode 100644 index 000000000..d6ef281ef --- /dev/null +++ b/system_api/README.md @@ -0,0 +1,15 @@ +# Crosvm version of ChromeOS's system_api + +system_api is used by ChromeOS to interact with other system services and mainly contains +automatically generated bindings for dbus services and proto types. + +The ground truth for this crate is in the ChromeOS codebase at [platform2/system_api]. + +To allow us to build ChromeOS features in upstream crosvm, we need to copy a subset of the generated +files into this repository. The `update_bindings.sh` script can be used to update them. + +Note: Originally, the ChromeOS build would replace this crate with the ChromeOS +[platform2/system_api] crate. This is no longer the case and crosvm will always be built against the +version in this directory. + +[platform2/system_api]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform2/system_api/ diff --git a/system_api/src/bindings/client/org_chromium_userdataauth.rs b/system_api/src/bindings/client/org_chromium_userdataauth.rs new file mode 100644 index 000000000..d918de161 --- /dev/null +++ b/system_api/src/bindings/client/org_chromium_userdataauth.rs @@ -0,0 +1,473 @@ +// 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 mount(&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_key_data(&self, request: Vec) -> Result, dbus::Error>; + fn check_key(&self, request: Vec) -> Result, dbus::Error>; + fn add_key(&self, request: Vec) -> Result, dbus::Error>; + fn remove_key(&self, request: Vec) -> Result, dbus::Error>; + fn mass_remove_keys(&self, request: Vec) -> Result, dbus::Error>; + fn migrate_key(&self, request: Vec) -> Result, dbus::Error>; + fn start_fingerprint_auth_session(&self, request: Vec) -> Result, dbus::Error>; + fn end_fingerprint_auth_session(&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 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 add_credentials(&self, request: Vec) -> Result, dbus::Error>; + fn update_credential(&self, request: Vec) -> Result, dbus::Error>; + fn authenticate_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 remove_auth_factor(&self, request: Vec) -> Result, dbus::Error>; + fn list_auth_factors(&self, request: Vec) -> Result, dbus::Error>; + fn prepare_async_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>; +} + +#[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 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"; +} + +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 mount(&self, request: Vec) -> Result, dbus::Error> { + self.method_call("org.chromium.UserDataAuthInterface", "Mount", (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_key_data(&self, request: Vec) -> Result, dbus::Error> { + self.method_call("org.chromium.UserDataAuthInterface", "GetKeyData", (request, )) + .and_then(|r: (Vec, )| Ok(r.0, )) + } + + fn check_key(&self, request: Vec) -> Result, dbus::Error> { + self.method_call("org.chromium.UserDataAuthInterface", "CheckKey", (request, )) + .and_then(|r: (Vec, )| Ok(r.0, )) + } + + fn add_key(&self, request: Vec) -> Result, dbus::Error> { + self.method_call("org.chromium.UserDataAuthInterface", "AddKey", (request, )) + .and_then(|r: (Vec, )| Ok(r.0, )) + } + + fn remove_key(&self, request: Vec) -> Result, dbus::Error> { + self.method_call("org.chromium.UserDataAuthInterface", "RemoveKey", (request, )) + .and_then(|r: (Vec, )| Ok(r.0, )) + } + + fn mass_remove_keys(&self, request: Vec) -> Result, dbus::Error> { + self.method_call("org.chromium.UserDataAuthInterface", "MassRemoveKeys", (request, )) + .and_then(|r: (Vec, )| Ok(r.0, )) + } + + fn migrate_key(&self, request: Vec) -> Result, dbus::Error> { + self.method_call("org.chromium.UserDataAuthInterface", "MigrateKey", (request, )) + .and_then(|r: (Vec, )| Ok(r.0, )) + } + + fn start_fingerprint_auth_session(&self, request: Vec) -> Result, dbus::Error> { + self.method_call("org.chromium.UserDataAuthInterface", "StartFingerprintAuthSession", (request, )) + .and_then(|r: (Vec, )| Ok(r.0, )) + } + + fn end_fingerprint_auth_session(&self, request: Vec) -> Result, dbus::Error> { + self.method_call("org.chromium.UserDataAuthInterface", "EndFingerprintAuthSession", (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 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 add_credentials(&self, request: Vec) -> Result, dbus::Error> { + self.method_call("org.chromium.UserDataAuthInterface", "AddCredentials", (request, )) + .and_then(|r: (Vec, )| Ok(r.0, )) + } + + fn update_credential(&self, request: Vec) -> Result, dbus::Error> { + self.method_call("org.chromium.UserDataAuthInterface", "UpdateCredential", (request, )) + .and_then(|r: (Vec, )| Ok(r.0, )) + } + + fn authenticate_auth_session(&self, request: Vec) -> Result, dbus::Error> { + self.method_call("org.chromium.UserDataAuthInterface", "AuthenticateAuthSession", (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 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 prepare_async_auth_factor(&self, request: Vec) -> Result, dbus::Error> { + self.method_call("org.chromium.UserDataAuthInterface", "PrepareAsyncAuthFactor", (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, )) + } +} + +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 get_status_string(&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>; + fn check_health(&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 get_status_string(&self, request: Vec) -> Result, dbus::Error> { + self.method_call("org.chromium.CryptohomeMiscInterface", "GetStatusString", (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, )) + } + + fn check_health(&self, request: Vec) -> Result, dbus::Error> { + self.method_call("org.chromium.CryptohomeMiscInterface", "CheckHealth", (request, )) + .and_then(|r: (Vec, )| Ok(r.0, )) + } +} diff --git a/system_api/src/bindings/client/org_chromium_vtpm.rs b/system_api/src/bindings/client/org_chromium_vtpm.rs new file mode 100644 index 000000000..af5e92bee --- /dev/null +++ b/system_api/src/bindings/client/org_chromium_vtpm.rs @@ -0,0 +1,17 @@ +// 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 OrgChromiumVtpm { + fn send_command(&self, request: Vec) -> Result, dbus::Error>; +} + +impl<'a, T: blocking::BlockingSender, C: ::std::ops::Deref> OrgChromiumVtpm for blocking::Proxy<'a, C> { + + fn send_command(&self, request: Vec) -> Result, dbus::Error> { + self.method_call("org.chromium.Vtpm", "SendCommand", (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 new file mode 100644 index 000000000..8357835b1 --- /dev/null +++ b/system_api/src/bindings/include_modules.rs @@ -0,0 +1,6 @@ +#[allow(unused_imports)] +#[allow(clippy::all)] +pub mod client { + pub mod org_chromium_userdataauth; + pub use org_chromium_userdataauth::*; +} diff --git a/system_api/src/protos/UserDataAuth.rs b/system_api/src/protos/UserDataAuth.rs new file mode 100644 index 000000000..d9c1de644 --- /dev/null +++ b/system_api/src/protos/UserDataAuth.rs @@ -0,0 +1,24762 @@ +// This file is generated by rust-protobuf 2.27.1. Do not edit +// @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_imports)] +#![allow(unused_results)] +//! Generated file from `UserDataAuth.proto` + +/// Generated files are compatible only with the same version +/// of protobuf runtime. +// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_27_1; + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct CreateRequest { + // message fields + pub keys: ::protobuf::RepeatedField, + pub copy_authorization_key: bool, + pub force_ecryptfs: bool, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CreateRequest { + fn default() -> &'a CreateRequest { + ::default_instance() + } +} + +impl CreateRequest { + pub fn new() -> CreateRequest { + ::std::default::Default::default() + } + + // repeated .cryptohome.Key keys = 1; + + + pub fn get_keys(&self) -> &[super::key::Key] { + &self.keys + } + pub fn clear_keys(&mut self) { + self.keys.clear(); + } + + // Param is passed by value, moved + pub fn set_keys(&mut self, v: ::protobuf::RepeatedField) { + self.keys = v; + } + + // Mutable pointer to the field. + pub fn mut_keys(&mut self) -> &mut ::protobuf::RepeatedField { + &mut self.keys + } + + // Take field + pub fn take_keys(&mut self) -> ::protobuf::RepeatedField { + ::std::mem::replace(&mut self.keys, ::protobuf::RepeatedField::new()) + } + + // bool copy_authorization_key = 2; + + + pub fn get_copy_authorization_key(&self) -> bool { + self.copy_authorization_key + } + pub fn clear_copy_authorization_key(&mut self) { + self.copy_authorization_key = false; + } + + // Param is passed by value, moved + pub fn set_copy_authorization_key(&mut self, v: bool) { + self.copy_authorization_key = v; + } + + // bool force_ecryptfs = 3; + + + pub fn get_force_ecryptfs(&self) -> bool { + self.force_ecryptfs + } + pub fn clear_force_ecryptfs(&mut self) { + self.force_ecryptfs = false; + } + + // Param is passed by value, moved + pub fn set_force_ecryptfs(&mut self, v: bool) { + self.force_ecryptfs = v; + } +} + +impl ::protobuf::Message for CreateRequest { + fn is_initialized(&self) -> bool { + for v in &self.keys { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.keys)?; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.copy_authorization_key = tmp; + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.force_ecryptfs = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + for value in &self.keys { + let len = value.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + }; + if self.copy_authorization_key != false { + my_size += 2; + } + if self.force_ecryptfs != false { + my_size += 2; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + for v in &self.keys { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }; + if self.copy_authorization_key != false { + os.write_bool(2, self.copy_authorization_key)?; + } + if self.force_ecryptfs != false { + os.write_bool(3, self.force_ecryptfs)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> CreateRequest { + CreateRequest::new() + } + + fn default_instance() -> &'static CreateRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(CreateRequest::new) + } +} + +impl ::protobuf::Clear for CreateRequest { + fn clear(&mut self) { + self.keys.clear(); + self.copy_authorization_key = false; + self.force_ecryptfs = false; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for CreateRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct CryptohomeErrorInfo { + // message fields + pub error_id: ::std::string::String, + pub readable_error_id: ::std::string::String, + pub primary_action: PrimaryAction, + pub possible_actions: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CryptohomeErrorInfo { + fn default() -> &'a CryptohomeErrorInfo { + ::default_instance() + } +} + +impl CryptohomeErrorInfo { + pub fn new() -> CryptohomeErrorInfo { + ::std::default::Default::default() + } + + // string error_id = 1; + + + pub fn get_error_id(&self) -> &str { + &self.error_id + } + pub fn clear_error_id(&mut self) { + self.error_id.clear(); + } + + // Param is passed by value, moved + pub fn set_error_id(&mut self, v: ::std::string::String) { + self.error_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_id(&mut self) -> &mut ::std::string::String { + &mut self.error_id + } + + // Take field + pub fn take_error_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.error_id, ::std::string::String::new()) + } + + // string readable_error_id = 2; + + + pub fn get_readable_error_id(&self) -> &str { + &self.readable_error_id + } + pub fn clear_readable_error_id(&mut self) { + self.readable_error_id.clear(); + } + + // Param is passed by value, moved + pub fn set_readable_error_id(&mut self, v: ::std::string::String) { + self.readable_error_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_readable_error_id(&mut self) -> &mut ::std::string::String { + &mut self.readable_error_id + } + + // Take field + pub fn take_readable_error_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.readable_error_id, ::std::string::String::new()) + } + + // .user_data_auth.PrimaryAction primary_action = 3; + + + pub fn get_primary_action(&self) -> PrimaryAction { + self.primary_action + } + pub fn clear_primary_action(&mut self) { + self.primary_action = PrimaryAction::PRIMARY_NO_ERROR; + } + + // Param is passed by value, moved + pub fn set_primary_action(&mut self, v: PrimaryAction) { + self.primary_action = v; + } + + // repeated .user_data_auth.PossibleAction possible_actions = 4; + + + pub fn get_possible_actions(&self) -> &[PossibleAction] { + &self.possible_actions + } + pub fn clear_possible_actions(&mut self) { + self.possible_actions.clear(); + } + + // Param is passed by value, moved + pub fn set_possible_actions(&mut self, v: ::std::vec::Vec) { + self.possible_actions = v; + } + + // Mutable pointer to the field. + pub fn mut_possible_actions(&mut self) -> &mut ::std::vec::Vec { + &mut self.possible_actions + } + + // Take field + pub fn take_possible_actions(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.possible_actions, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for CryptohomeErrorInfo { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.error_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.readable_error_id)?; + }, + 3 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.primary_action, 3, &mut self.unknown_fields)? + }, + 4 => { + ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.possible_actions, 4, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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 != PrimaryAction::PRIMARY_NO_ERROR { + my_size += ::protobuf::rt::enum_size(3, self.primary_action); + } + for value in &self.possible_actions { + my_size += ::protobuf::rt::enum_size(4, *value); + }; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + 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 != PrimaryAction::PRIMARY_NO_ERROR { + os.write_enum(3, ::protobuf::ProtobufEnum::value(&self.primary_action))?; + } + for v in &self.possible_actions { + os.write_enum(4, ::protobuf::ProtobufEnum::value(v))?; + }; + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> CryptohomeErrorInfo { + CryptohomeErrorInfo::new() + } + + fn default_instance() -> &'static CryptohomeErrorInfo { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(CryptohomeErrorInfo::new) + } +} + +impl ::protobuf::Clear for CryptohomeErrorInfo { + fn clear(&mut self) { + self.error_id.clear(); + self.readable_error_id.clear(); + self.primary_action = PrimaryAction::PRIMARY_NO_ERROR; + self.possible_actions.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for CryptohomeErrorInfo { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct IsMountedRequest { + // message fields + pub username: ::std::string::String, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a IsMountedRequest { + fn default() -> &'a IsMountedRequest { + ::default_instance() + } +} + +impl IsMountedRequest { + pub fn new() -> IsMountedRequest { + ::std::default::Default::default() + } + + // string username = 1; + + + pub fn get_username(&self) -> &str { + &self.username + } + pub fn clear_username(&mut self) { + self.username.clear(); + } + + // Param is passed by value, moved + pub fn set_username(&mut self, v: ::std::string::String) { + self.username = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_username(&mut self) -> &mut ::std::string::String { + &mut self.username + } + + // Take field + pub fn take_username(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.username, ::std::string::String::new()) + } +} + +impl ::protobuf::Message for IsMountedRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.username)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.username.is_empty() { + os.write_string(1, &self.username)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> IsMountedRequest { + IsMountedRequest::new() + } + + fn default_instance() -> &'static IsMountedRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(IsMountedRequest::new) + } +} + +impl ::protobuf::Clear for IsMountedRequest { + fn clear(&mut self) { + self.username.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for IsMountedRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct IsMountedReply { + // message fields + pub is_mounted: bool, + pub is_ephemeral_mount: bool, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a IsMountedReply { + fn default() -> &'a IsMountedReply { + ::default_instance() + } +} + +impl IsMountedReply { + pub fn new() -> IsMountedReply { + ::std::default::Default::default() + } + + // bool is_mounted = 1; + + + pub fn get_is_mounted(&self) -> bool { + self.is_mounted + } + pub fn clear_is_mounted(&mut self) { + self.is_mounted = false; + } + + // Param is passed by value, moved + pub fn set_is_mounted(&mut self, v: bool) { + self.is_mounted = v; + } + + // bool is_ephemeral_mount = 2; + + + pub fn get_is_ephemeral_mount(&self) -> bool { + self.is_ephemeral_mount + } + pub fn clear_is_ephemeral_mount(&mut self) { + self.is_ephemeral_mount = false; + } + + // Param is passed by value, moved + pub fn set_is_ephemeral_mount(&mut self, v: bool) { + self.is_ephemeral_mount = v; + } +} + +impl ::protobuf::Message for IsMountedReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.is_mounted = tmp; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.is_ephemeral_mount = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.is_mounted != false { + my_size += 2; + } + if self.is_ephemeral_mount != false { + my_size += 2; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + 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.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> IsMountedReply { + IsMountedReply::new() + } + + fn default_instance() -> &'static IsMountedReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(IsMountedReply::new) + } +} + +impl ::protobuf::Clear for IsMountedReply { + fn clear(&mut self) { + self.is_mounted = false; + self.is_ephemeral_mount = false; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for IsMountedReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct UnmountRequest { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> UnmountRequest { + UnmountRequest::new() + } + + fn default_instance() -> &'static UnmountRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(UnmountRequest::new) + } +} + +impl ::protobuf::Clear for UnmountRequest { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for UnmountRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct UnmountReply { + // message fields + pub error: CryptohomeErrorCode, + pub error_info: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a UnmountReply { + fn default() -> &'a UnmountReply { + ::default_instance() + } +} + +impl UnmountReply { + pub fn new() -> UnmountReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // .user_data_auth.CryptohomeErrorInfo error_info = 2; + + + pub fn get_error_info(&self) -> &CryptohomeErrorInfo { + self.error_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_error_info(&mut self) { + self.error_info.clear(); + } + + pub fn has_error_info(&self) -> bool { + self.error_info.is_some() + } + + // Param is passed by value, moved + pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { + self.error_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { + if self.error_info.is_none() { + self.error_info.set_default(); + } + self.error_info.as_mut().unwrap() + } + + // Take field + pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { + self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) + } +} + +impl ::protobuf::Message for UnmountReply { + fn is_initialized(&self) -> bool { + for v in &self.error_info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if let Some(ref v) = self.error_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if let Some(ref v) = self.error_info.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> UnmountReply { + UnmountReply::new() + } + + fn default_instance() -> &'static UnmountReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(UnmountReply::new) + } +} + +impl ::protobuf::Clear for UnmountReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.error_info.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for UnmountReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct MountRequest { + // message fields + pub account: ::protobuf::SingularPtrField, + pub authorization: ::protobuf::SingularPtrField, + pub require_ephemeral: bool, + pub create: ::protobuf::SingularPtrField, + pub force_dircrypto_if_available: bool, + pub to_migrate_from_ecryptfs: bool, + pub public_mount: bool, + pub guest_mount: bool, + pub auth_session_id: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a MountRequest { + fn default() -> &'a MountRequest { + ::default_instance() + } +} + +impl MountRequest { + pub fn new() -> MountRequest { + ::std::default::Default::default() + } + + // .cryptohome.AccountIdentifier account = 1; + + + pub fn get_account(&self) -> &super::rpc::AccountIdentifier { + self.account.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_account(&mut self) { + self.account.clear(); + } + + pub fn has_account(&self) -> bool { + self.account.is_some() + } + + // Param is passed by value, moved + pub fn set_account(&mut self, v: super::rpc::AccountIdentifier) { + self.account = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_account(&mut self) -> &mut super::rpc::AccountIdentifier { + if self.account.is_none() { + self.account.set_default(); + } + self.account.as_mut().unwrap() + } + + // Take field + pub fn take_account(&mut self) -> super::rpc::AccountIdentifier { + self.account.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) + } + + // .cryptohome.AuthorizationRequest authorization = 2; + + + pub fn get_authorization(&self) -> &super::rpc::AuthorizationRequest { + self.authorization.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_authorization(&mut self) { + self.authorization.clear(); + } + + pub fn has_authorization(&self) -> bool { + self.authorization.is_some() + } + + // Param is passed by value, moved + pub fn set_authorization(&mut self, v: super::rpc::AuthorizationRequest) { + self.authorization = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_authorization(&mut self) -> &mut super::rpc::AuthorizationRequest { + if self.authorization.is_none() { + self.authorization.set_default(); + } + self.authorization.as_mut().unwrap() + } + + // Take field + pub fn take_authorization(&mut self) -> super::rpc::AuthorizationRequest { + self.authorization.take().unwrap_or_else(|| super::rpc::AuthorizationRequest::new()) + } + + // bool require_ephemeral = 3; + + + pub fn get_require_ephemeral(&self) -> bool { + self.require_ephemeral + } + pub fn clear_require_ephemeral(&mut self) { + self.require_ephemeral = false; + } + + // Param is passed by value, moved + pub fn set_require_ephemeral(&mut self, v: bool) { + self.require_ephemeral = v; + } + + // .user_data_auth.CreateRequest create = 4; + + + pub fn get_create(&self) -> &CreateRequest { + self.create.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_create(&mut self) { + self.create.clear(); + } + + pub fn has_create(&self) -> bool { + self.create.is_some() + } + + // Param is passed by value, moved + pub fn set_create(&mut self, v: CreateRequest) { + self.create = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_create(&mut self) -> &mut CreateRequest { + if self.create.is_none() { + self.create.set_default(); + } + self.create.as_mut().unwrap() + } + + // Take field + pub fn take_create(&mut self) -> CreateRequest { + self.create.take().unwrap_or_else(|| CreateRequest::new()) + } + + // bool force_dircrypto_if_available = 5; + + + pub fn get_force_dircrypto_if_available(&self) -> bool { + self.force_dircrypto_if_available + } + pub fn clear_force_dircrypto_if_available(&mut self) { + self.force_dircrypto_if_available = false; + } + + // Param is passed by value, moved + pub fn set_force_dircrypto_if_available(&mut self, v: bool) { + self.force_dircrypto_if_available = v; + } + + // bool to_migrate_from_ecryptfs = 6; + + + pub fn get_to_migrate_from_ecryptfs(&self) -> bool { + self.to_migrate_from_ecryptfs + } + pub fn clear_to_migrate_from_ecryptfs(&mut self) { + self.to_migrate_from_ecryptfs = false; + } + + // Param is passed by value, moved + pub fn set_to_migrate_from_ecryptfs(&mut self, v: bool) { + self.to_migrate_from_ecryptfs = v; + } + + // bool public_mount = 7; + + + pub fn get_public_mount(&self) -> bool { + self.public_mount + } + pub fn clear_public_mount(&mut self) { + self.public_mount = false; + } + + // Param is passed by value, moved + pub fn set_public_mount(&mut self, v: bool) { + self.public_mount = v; + } + + // bool guest_mount = 8; + + + pub fn get_guest_mount(&self) -> bool { + self.guest_mount + } + pub fn clear_guest_mount(&mut self) { + self.guest_mount = false; + } + + // Param is passed by value, moved + pub fn set_guest_mount(&mut self, v: bool) { + self.guest_mount = v; + } + + // bytes auth_session_id = 9; + + + pub fn get_auth_session_id(&self) -> &[u8] { + &self.auth_session_id + } + pub fn clear_auth_session_id(&mut self) { + self.auth_session_id.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec) { + self.auth_session_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.auth_session_id + } + + // Take field + pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for MountRequest { + fn is_initialized(&self) -> bool { + for v in &self.account { + if !v.is_initialized() { + return false; + } + }; + for v in &self.authorization { + if !v.is_initialized() { + return false; + } + }; + for v in &self.create { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account)?; + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.authorization)?; + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.require_ephemeral = tmp; + }, + 4 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.create)?; + }, + 5 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.force_dircrypto_if_available = tmp; + }, + 6 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.to_migrate_from_ecryptfs = tmp; + }, + 7 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.public_mount = tmp; + }, + 8 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.guest_mount = tmp; + }, + 9 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.account.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.authorization.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if self.require_ephemeral != false { + my_size += 2; + } + if let Some(ref v) = self.create.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if self.force_dircrypto_if_available != false { + my_size += 2; + } + if self.to_migrate_from_ecryptfs != false { + my_size += 2; + } + if self.public_mount != false { + my_size += 2; + } + if self.guest_mount != false { + my_size += 2; + } + if !self.auth_session_id.is_empty() { + my_size += ::protobuf::rt::bytes_size(9, &self.auth_session_id); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.account.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if let Some(ref v) = self.authorization.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if self.require_ephemeral != false { + os.write_bool(3, self.require_ephemeral)?; + } + if let Some(ref v) = self.create.as_ref() { + os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if self.force_dircrypto_if_available != false { + os.write_bool(5, self.force_dircrypto_if_available)?; + } + if self.to_migrate_from_ecryptfs != false { + os.write_bool(6, self.to_migrate_from_ecryptfs)?; + } + if self.public_mount != false { + os.write_bool(7, self.public_mount)?; + } + if self.guest_mount != false { + os.write_bool(8, self.guest_mount)?; + } + if !self.auth_session_id.is_empty() { + os.write_bytes(9, &self.auth_session_id)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> MountRequest { + MountRequest::new() + } + + fn default_instance() -> &'static MountRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(MountRequest::new) + } +} + +impl ::protobuf::Clear for MountRequest { + fn clear(&mut self) { + self.account.clear(); + self.authorization.clear(); + self.require_ephemeral = false; + self.create.clear(); + self.force_dircrypto_if_available = false; + self.to_migrate_from_ecryptfs = false; + self.public_mount = false; + self.guest_mount = false; + self.auth_session_id.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for MountRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct MountReply { + // message fields + pub error: CryptohomeErrorCode, + pub recreated: bool, + pub sanitized_username: ::std::string::String, + pub error_info: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a MountReply { + fn default() -> &'a MountReply { + ::default_instance() + } +} + +impl MountReply { + pub fn new() -> MountReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // bool recreated = 2; + + + pub fn get_recreated(&self) -> bool { + self.recreated + } + pub fn clear_recreated(&mut self) { + self.recreated = false; + } + + // Param is passed by value, moved + pub fn set_recreated(&mut self, v: bool) { + self.recreated = v; + } + + // string sanitized_username = 3; + + + pub fn get_sanitized_username(&self) -> &str { + &self.sanitized_username + } + pub fn clear_sanitized_username(&mut self) { + self.sanitized_username.clear(); + } + + // Param is passed by value, moved + pub fn set_sanitized_username(&mut self, v: ::std::string::String) { + self.sanitized_username = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_sanitized_username(&mut self) -> &mut ::std::string::String { + &mut self.sanitized_username + } + + // Take field + pub fn take_sanitized_username(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.sanitized_username, ::std::string::String::new()) + } + + // .user_data_auth.CryptohomeErrorInfo error_info = 4; + + + pub fn get_error_info(&self) -> &CryptohomeErrorInfo { + self.error_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_error_info(&mut self) { + self.error_info.clear(); + } + + pub fn has_error_info(&self) -> bool { + self.error_info.is_some() + } + + // Param is passed by value, moved + pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { + self.error_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { + if self.error_info.is_none() { + self.error_info.set_default(); + } + self.error_info.as_mut().unwrap() + } + + // Take field + pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { + self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) + } +} + +impl ::protobuf::Message for MountReply { + fn is_initialized(&self) -> bool { + for v in &self.error_info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.recreated = tmp; + }, + 3 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sanitized_username)?; + }, + 4 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if self.recreated != false { + my_size += 2; + } + if !self.sanitized_username.is_empty() { + my_size += ::protobuf::rt::string_size(3, &self.sanitized_username); + } + if let Some(ref v) = self.error_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if self.recreated != false { + os.write_bool(2, self.recreated)?; + } + if !self.sanitized_username.is_empty() { + os.write_string(3, &self.sanitized_username)?; + } + if let Some(ref v) = self.error_info.as_ref() { + os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> MountReply { + MountReply::new() + } + + fn default_instance() -> &'static MountReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(MountReply::new) + } +} + +impl ::protobuf::Clear for MountReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.recreated = false; + self.sanitized_username.clear(); + self.error_info.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for MountReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct RemoveRequest { + // message fields + pub identifier: ::protobuf::SingularPtrField, + pub auth_session_id: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a RemoveRequest { + fn default() -> &'a RemoveRequest { + ::default_instance() + } +} + +impl RemoveRequest { + pub fn new() -> RemoveRequest { + ::std::default::Default::default() + } + + // .cryptohome.AccountIdentifier identifier = 1; + + + pub fn get_identifier(&self) -> &super::rpc::AccountIdentifier { + self.identifier.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_identifier(&mut self) { + self.identifier.clear(); + } + + pub fn has_identifier(&self) -> bool { + self.identifier.is_some() + } + + // Param is passed by value, moved + pub fn set_identifier(&mut self, v: super::rpc::AccountIdentifier) { + self.identifier = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_identifier(&mut self) -> &mut super::rpc::AccountIdentifier { + if self.identifier.is_none() { + self.identifier.set_default(); + } + self.identifier.as_mut().unwrap() + } + + // Take field + pub fn take_identifier(&mut self) -> super::rpc::AccountIdentifier { + self.identifier.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) + } + + // bytes auth_session_id = 2; + + + pub fn get_auth_session_id(&self) -> &[u8] { + &self.auth_session_id + } + pub fn clear_auth_session_id(&mut self) { + self.auth_session_id.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec) { + self.auth_session_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.auth_session_id + } + + // Take field + pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for RemoveRequest { + fn is_initialized(&self) -> bool { + for v in &self.identifier { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.identifier)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.identifier.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.identifier.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if !self.auth_session_id.is_empty() { + os.write_bytes(2, &self.auth_session_id)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> RemoveRequest { + RemoveRequest::new() + } + + fn default_instance() -> &'static RemoveRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RemoveRequest::new) + } +} + +impl ::protobuf::Clear for RemoveRequest { + fn clear(&mut self) { + self.identifier.clear(); + self.auth_session_id.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for RemoveRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct RemoveReply { + // message fields + pub error: CryptohomeErrorCode, + pub error_info: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a RemoveReply { + fn default() -> &'a RemoveReply { + ::default_instance() + } +} + +impl RemoveReply { + pub fn new() -> RemoveReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // .user_data_auth.CryptohomeErrorInfo error_info = 2; + + + pub fn get_error_info(&self) -> &CryptohomeErrorInfo { + self.error_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_error_info(&mut self) { + self.error_info.clear(); + } + + pub fn has_error_info(&self) -> bool { + self.error_info.is_some() + } + + // Param is passed by value, moved + pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { + self.error_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { + if self.error_info.is_none() { + self.error_info.set_default(); + } + self.error_info.as_mut().unwrap() + } + + // Take field + pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { + self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) + } +} + +impl ::protobuf::Message for RemoveReply { + fn is_initialized(&self) -> bool { + for v in &self.error_info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if let Some(ref v) = self.error_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if let Some(ref v) = self.error_info.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> RemoveReply { + RemoveReply::new() + } + + fn default_instance() -> &'static RemoveReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RemoveReply::new) + } +} + +impl ::protobuf::Clear for RemoveReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.error_info.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for RemoveReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ListKeysRequest { + // message fields + pub account_id: ::protobuf::SingularPtrField, + pub authorization_request: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ListKeysRequest { + fn default() -> &'a ListKeysRequest { + ::default_instance() + } +} + +impl ListKeysRequest { + pub fn new() -> ListKeysRequest { + ::std::default::Default::default() + } + + // .cryptohome.AccountIdentifier account_id = 1; + + + pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { + self.account_id.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_account_id(&mut self) { + self.account_id.clear(); + } + + 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: super::rpc::AccountIdentifier) { + self.account_id = ::protobuf::SingularPtrField::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 super::rpc::AccountIdentifier { + if self.account_id.is_none() { + self.account_id.set_default(); + } + self.account_id.as_mut().unwrap() + } + + // Take field + pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { + self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) + } + + // .cryptohome.AuthorizationRequest authorization_request = 2; + + + pub fn get_authorization_request(&self) -> &super::rpc::AuthorizationRequest { + self.authorization_request.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_authorization_request(&mut self) { + self.authorization_request.clear(); + } + + pub fn has_authorization_request(&self) -> bool { + self.authorization_request.is_some() + } + + // Param is passed by value, moved + pub fn set_authorization_request(&mut self, v: super::rpc::AuthorizationRequest) { + self.authorization_request = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_authorization_request(&mut self) -> &mut super::rpc::AuthorizationRequest { + if self.authorization_request.is_none() { + self.authorization_request.set_default(); + } + self.authorization_request.as_mut().unwrap() + } + + // Take field + pub fn take_authorization_request(&mut self) -> super::rpc::AuthorizationRequest { + self.authorization_request.take().unwrap_or_else(|| super::rpc::AuthorizationRequest::new()) + } +} + +impl ::protobuf::Message for ListKeysRequest { + fn is_initialized(&self) -> bool { + for v in &self.account_id { + if !v.is_initialized() { + return false; + } + }; + for v in &self.authorization_request { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.authorization_request)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.account_id.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.authorization_request.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.account_id.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if let Some(ref v) = self.authorization_request.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> ListKeysRequest { + ListKeysRequest::new() + } + + fn default_instance() -> &'static ListKeysRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ListKeysRequest::new) + } +} + +impl ::protobuf::Clear for ListKeysRequest { + fn clear(&mut self) { + self.account_id.clear(); + self.authorization_request.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for ListKeysRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ListKeysReply { + // message fields + pub error: CryptohomeErrorCode, + pub labels: ::protobuf::RepeatedField<::std::string::String>, + pub error_info: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ListKeysReply { + fn default() -> &'a ListKeysReply { + ::default_instance() + } +} + +impl ListKeysReply { + pub fn new() -> ListKeysReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // repeated string labels = 2; + + + pub fn get_labels(&self) -> &[::std::string::String] { + &self.labels + } + pub fn clear_labels(&mut self) { + self.labels.clear(); + } + + // Param is passed by value, moved + pub fn set_labels(&mut self, v: ::protobuf::RepeatedField<::std::string::String>) { + self.labels = v; + } + + // Mutable pointer to the field. + pub fn mut_labels(&mut self) -> &mut ::protobuf::RepeatedField<::std::string::String> { + &mut self.labels + } + + // Take field + pub fn take_labels(&mut self) -> ::protobuf::RepeatedField<::std::string::String> { + ::std::mem::replace(&mut self.labels, ::protobuf::RepeatedField::new()) + } + + // .user_data_auth.CryptohomeErrorInfo error_info = 3; + + + pub fn get_error_info(&self) -> &CryptohomeErrorInfo { + self.error_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_error_info(&mut self) { + self.error_info.clear(); + } + + pub fn has_error_info(&self) -> bool { + self.error_info.is_some() + } + + // Param is passed by value, moved + pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { + self.error_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { + if self.error_info.is_none() { + self.error_info.set_default(); + } + self.error_info.as_mut().unwrap() + } + + // Take field + pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { + self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) + } +} + +impl ::protobuf::Message for ListKeysReply { + fn is_initialized(&self) -> bool { + for v in &self.error_info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_repeated_string_into(wire_type, is, &mut self.labels)?; + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + for value in &self.labels { + my_size += ::protobuf::rt::string_size(2, &value); + }; + if let Some(ref v) = self.error_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + for v in &self.labels { + os.write_string(2, &v)?; + }; + if let Some(ref v) = self.error_info.as_ref() { + os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> ListKeysReply { + ListKeysReply::new() + } + + fn default_instance() -> &'static ListKeysReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ListKeysReply::new) + } +} + +impl ::protobuf::Clear for ListKeysReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.labels.clear(); + self.error_info.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for ListKeysReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetKeyDataRequest { + // message fields + pub account_id: ::protobuf::SingularPtrField, + pub authorization_request: ::protobuf::SingularPtrField, + pub key: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetKeyDataRequest { + fn default() -> &'a GetKeyDataRequest { + ::default_instance() + } +} + +impl GetKeyDataRequest { + pub fn new() -> GetKeyDataRequest { + ::std::default::Default::default() + } + + // .cryptohome.AccountIdentifier account_id = 1; + + + pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { + self.account_id.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_account_id(&mut self) { + self.account_id.clear(); + } + + 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: super::rpc::AccountIdentifier) { + self.account_id = ::protobuf::SingularPtrField::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 super::rpc::AccountIdentifier { + if self.account_id.is_none() { + self.account_id.set_default(); + } + self.account_id.as_mut().unwrap() + } + + // Take field + pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { + self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) + } + + // .cryptohome.AuthorizationRequest authorization_request = 2; + + + pub fn get_authorization_request(&self) -> &super::rpc::AuthorizationRequest { + self.authorization_request.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_authorization_request(&mut self) { + self.authorization_request.clear(); + } + + pub fn has_authorization_request(&self) -> bool { + self.authorization_request.is_some() + } + + // Param is passed by value, moved + pub fn set_authorization_request(&mut self, v: super::rpc::AuthorizationRequest) { + self.authorization_request = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_authorization_request(&mut self) -> &mut super::rpc::AuthorizationRequest { + if self.authorization_request.is_none() { + self.authorization_request.set_default(); + } + self.authorization_request.as_mut().unwrap() + } + + // Take field + pub fn take_authorization_request(&mut self) -> super::rpc::AuthorizationRequest { + self.authorization_request.take().unwrap_or_else(|| super::rpc::AuthorizationRequest::new()) + } + + // .cryptohome.Key key = 3; + + + pub fn get_key(&self) -> &super::key::Key { + self.key.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_key(&mut self) { + self.key.clear(); + } + + pub fn has_key(&self) -> bool { + self.key.is_some() + } + + // Param is passed by value, moved + pub fn set_key(&mut self, v: super::key::Key) { + self.key = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_key(&mut self) -> &mut super::key::Key { + if self.key.is_none() { + self.key.set_default(); + } + self.key.as_mut().unwrap() + } + + // Take field + pub fn take_key(&mut self) -> super::key::Key { + self.key.take().unwrap_or_else(|| super::key::Key::new()) + } +} + +impl ::protobuf::Message for GetKeyDataRequest { + fn is_initialized(&self) -> bool { + for v in &self.account_id { + if !v.is_initialized() { + return false; + } + }; + for v in &self.authorization_request { + if !v.is_initialized() { + return false; + } + }; + for v in &self.key { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.authorization_request)?; + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.key)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.account_id.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.authorization_request.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.key.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.account_id.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if let Some(ref v) = self.authorization_request.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if let Some(ref v) = self.key.as_ref() { + os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetKeyDataRequest { + GetKeyDataRequest::new() + } + + fn default_instance() -> &'static GetKeyDataRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetKeyDataRequest::new) + } +} + +impl ::protobuf::Clear for GetKeyDataRequest { + fn clear(&mut self) { + self.account_id.clear(); + self.authorization_request.clear(); + self.key.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetKeyDataRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetKeyDataReply { + // message fields + pub error: CryptohomeErrorCode, + pub key_data: ::protobuf::RepeatedField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetKeyDataReply { + fn default() -> &'a GetKeyDataReply { + ::default_instance() + } +} + +impl GetKeyDataReply { + pub fn new() -> GetKeyDataReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // repeated .cryptohome.KeyData key_data = 2; + + + pub fn get_key_data(&self) -> &[super::key::KeyData] { + &self.key_data + } + pub fn clear_key_data(&mut self) { + self.key_data.clear(); + } + + // Param is passed by value, moved + pub fn set_key_data(&mut self, v: ::protobuf::RepeatedField) { + self.key_data = v; + } + + // Mutable pointer to the field. + pub fn mut_key_data(&mut self) -> &mut ::protobuf::RepeatedField { + &mut self.key_data + } + + // Take field + pub fn take_key_data(&mut self) -> ::protobuf::RepeatedField { + ::std::mem::replace(&mut self.key_data, ::protobuf::RepeatedField::new()) + } +} + +impl ::protobuf::Message for GetKeyDataReply { + fn is_initialized(&self) -> bool { + for v in &self.key_data { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.key_data)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + for value in &self.key_data { + let len = value.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + }; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + for v in &self.key_data { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }; + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetKeyDataReply { + GetKeyDataReply::new() + } + + fn default_instance() -> &'static GetKeyDataReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetKeyDataReply::new) + } +} + +impl ::protobuf::Clear for GetKeyDataReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.key_data.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetKeyDataReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct CheckKeyRequest { + // message fields + pub account_id: ::protobuf::SingularPtrField, + pub authorization_request: ::protobuf::SingularPtrField, + pub unlock_webauthn_secret: bool, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CheckKeyRequest { + fn default() -> &'a CheckKeyRequest { + ::default_instance() + } +} + +impl CheckKeyRequest { + pub fn new() -> CheckKeyRequest { + ::std::default::Default::default() + } + + // .cryptohome.AccountIdentifier account_id = 1; + + + pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { + self.account_id.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_account_id(&mut self) { + self.account_id.clear(); + } + + 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: super::rpc::AccountIdentifier) { + self.account_id = ::protobuf::SingularPtrField::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 super::rpc::AccountIdentifier { + if self.account_id.is_none() { + self.account_id.set_default(); + } + self.account_id.as_mut().unwrap() + } + + // Take field + pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { + self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) + } + + // .cryptohome.AuthorizationRequest authorization_request = 2; + + + pub fn get_authorization_request(&self) -> &super::rpc::AuthorizationRequest { + self.authorization_request.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_authorization_request(&mut self) { + self.authorization_request.clear(); + } + + pub fn has_authorization_request(&self) -> bool { + self.authorization_request.is_some() + } + + // Param is passed by value, moved + pub fn set_authorization_request(&mut self, v: super::rpc::AuthorizationRequest) { + self.authorization_request = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_authorization_request(&mut self) -> &mut super::rpc::AuthorizationRequest { + if self.authorization_request.is_none() { + self.authorization_request.set_default(); + } + self.authorization_request.as_mut().unwrap() + } + + // Take field + pub fn take_authorization_request(&mut self) -> super::rpc::AuthorizationRequest { + self.authorization_request.take().unwrap_or_else(|| super::rpc::AuthorizationRequest::new()) + } + + // bool unlock_webauthn_secret = 3; + + + pub fn get_unlock_webauthn_secret(&self) -> bool { + self.unlock_webauthn_secret + } + pub fn clear_unlock_webauthn_secret(&mut self) { + self.unlock_webauthn_secret = false; + } + + // Param is passed by value, moved + pub fn set_unlock_webauthn_secret(&mut self, v: bool) { + self.unlock_webauthn_secret = v; + } +} + +impl ::protobuf::Message for CheckKeyRequest { + fn is_initialized(&self) -> bool { + for v in &self.account_id { + if !v.is_initialized() { + return false; + } + }; + for v in &self.authorization_request { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.authorization_request)?; + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.unlock_webauthn_secret = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.account_id.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.authorization_request.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if self.unlock_webauthn_secret != false { + my_size += 2; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.account_id.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if let Some(ref v) = self.authorization_request.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if self.unlock_webauthn_secret != false { + os.write_bool(3, self.unlock_webauthn_secret)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> CheckKeyRequest { + CheckKeyRequest::new() + } + + fn default_instance() -> &'static CheckKeyRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(CheckKeyRequest::new) + } +} + +impl ::protobuf::Clear for CheckKeyRequest { + fn clear(&mut self) { + self.account_id.clear(); + self.authorization_request.clear(); + self.unlock_webauthn_secret = false; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for CheckKeyRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct CheckKeyReply { + // message fields + pub error: CryptohomeErrorCode, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CheckKeyReply { + fn default() -> &'a CheckKeyReply { + ::default_instance() + } +} + +impl CheckKeyReply { + pub fn new() -> CheckKeyReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } +} + +impl ::protobuf::Message for CheckKeyReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> CheckKeyReply { + CheckKeyReply::new() + } + + fn default_instance() -> &'static CheckKeyReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(CheckKeyReply::new) + } +} + +impl ::protobuf::Clear for CheckKeyReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for CheckKeyReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct AddKeyRequest { + // message fields + pub account_id: ::protobuf::SingularPtrField, + pub authorization_request: ::protobuf::SingularPtrField, + pub key: ::protobuf::SingularPtrField, + pub clobber_if_exists: bool, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AddKeyRequest { + fn default() -> &'a AddKeyRequest { + ::default_instance() + } +} + +impl AddKeyRequest { + pub fn new() -> AddKeyRequest { + ::std::default::Default::default() + } + + // .cryptohome.AccountIdentifier account_id = 1; + + + pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { + self.account_id.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_account_id(&mut self) { + self.account_id.clear(); + } + + 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: super::rpc::AccountIdentifier) { + self.account_id = ::protobuf::SingularPtrField::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 super::rpc::AccountIdentifier { + if self.account_id.is_none() { + self.account_id.set_default(); + } + self.account_id.as_mut().unwrap() + } + + // Take field + pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { + self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) + } + + // .cryptohome.AuthorizationRequest authorization_request = 2; + + + pub fn get_authorization_request(&self) -> &super::rpc::AuthorizationRequest { + self.authorization_request.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_authorization_request(&mut self) { + self.authorization_request.clear(); + } + + pub fn has_authorization_request(&self) -> bool { + self.authorization_request.is_some() + } + + // Param is passed by value, moved + pub fn set_authorization_request(&mut self, v: super::rpc::AuthorizationRequest) { + self.authorization_request = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_authorization_request(&mut self) -> &mut super::rpc::AuthorizationRequest { + if self.authorization_request.is_none() { + self.authorization_request.set_default(); + } + self.authorization_request.as_mut().unwrap() + } + + // Take field + pub fn take_authorization_request(&mut self) -> super::rpc::AuthorizationRequest { + self.authorization_request.take().unwrap_or_else(|| super::rpc::AuthorizationRequest::new()) + } + + // .cryptohome.Key key = 3; + + + pub fn get_key(&self) -> &super::key::Key { + self.key.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_key(&mut self) { + self.key.clear(); + } + + pub fn has_key(&self) -> bool { + self.key.is_some() + } + + // Param is passed by value, moved + pub fn set_key(&mut self, v: super::key::Key) { + self.key = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_key(&mut self) -> &mut super::key::Key { + if self.key.is_none() { + self.key.set_default(); + } + self.key.as_mut().unwrap() + } + + // Take field + pub fn take_key(&mut self) -> super::key::Key { + self.key.take().unwrap_or_else(|| super::key::Key::new()) + } + + // bool clobber_if_exists = 4; + + + pub fn get_clobber_if_exists(&self) -> bool { + self.clobber_if_exists + } + pub fn clear_clobber_if_exists(&mut self) { + self.clobber_if_exists = false; + } + + // Param is passed by value, moved + pub fn set_clobber_if_exists(&mut self, v: bool) { + self.clobber_if_exists = v; + } +} + +impl ::protobuf::Message for AddKeyRequest { + fn is_initialized(&self) -> bool { + for v in &self.account_id { + if !v.is_initialized() { + return false; + } + }; + for v in &self.authorization_request { + if !v.is_initialized() { + return false; + } + }; + for v in &self.key { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.authorization_request)?; + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.key)?; + }, + 4 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.clobber_if_exists = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.account_id.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.authorization_request.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.key.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if self.clobber_if_exists != false { + my_size += 2; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.account_id.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if let Some(ref v) = self.authorization_request.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if let Some(ref v) = self.key.as_ref() { + os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if self.clobber_if_exists != false { + os.write_bool(4, self.clobber_if_exists)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> AddKeyRequest { + AddKeyRequest::new() + } + + fn default_instance() -> &'static AddKeyRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(AddKeyRequest::new) + } +} + +impl ::protobuf::Clear for AddKeyRequest { + fn clear(&mut self) { + self.account_id.clear(); + self.authorization_request.clear(); + self.key.clear(); + self.clobber_if_exists = false; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for AddKeyRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct AddKeyReply { + // message fields + pub error: CryptohomeErrorCode, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AddKeyReply { + fn default() -> &'a AddKeyReply { + ::default_instance() + } +} + +impl AddKeyReply { + pub fn new() -> AddKeyReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } +} + +impl ::protobuf::Message for AddKeyReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> AddKeyReply { + AddKeyReply::new() + } + + fn default_instance() -> &'static AddKeyReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(AddKeyReply::new) + } +} + +impl ::protobuf::Clear for AddKeyReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for AddKeyReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct RemoveKeyRequest { + // message fields + pub account_id: ::protobuf::SingularPtrField, + pub authorization_request: ::protobuf::SingularPtrField, + pub key: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a RemoveKeyRequest { + fn default() -> &'a RemoveKeyRequest { + ::default_instance() + } +} + +impl RemoveKeyRequest { + pub fn new() -> RemoveKeyRequest { + ::std::default::Default::default() + } + + // .cryptohome.AccountIdentifier account_id = 1; + + + pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { + self.account_id.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_account_id(&mut self) { + self.account_id.clear(); + } + + 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: super::rpc::AccountIdentifier) { + self.account_id = ::protobuf::SingularPtrField::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 super::rpc::AccountIdentifier { + if self.account_id.is_none() { + self.account_id.set_default(); + } + self.account_id.as_mut().unwrap() + } + + // Take field + pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { + self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) + } + + // .cryptohome.AuthorizationRequest authorization_request = 2; + + + pub fn get_authorization_request(&self) -> &super::rpc::AuthorizationRequest { + self.authorization_request.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_authorization_request(&mut self) { + self.authorization_request.clear(); + } + + pub fn has_authorization_request(&self) -> bool { + self.authorization_request.is_some() + } + + // Param is passed by value, moved + pub fn set_authorization_request(&mut self, v: super::rpc::AuthorizationRequest) { + self.authorization_request = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_authorization_request(&mut self) -> &mut super::rpc::AuthorizationRequest { + if self.authorization_request.is_none() { + self.authorization_request.set_default(); + } + self.authorization_request.as_mut().unwrap() + } + + // Take field + pub fn take_authorization_request(&mut self) -> super::rpc::AuthorizationRequest { + self.authorization_request.take().unwrap_or_else(|| super::rpc::AuthorizationRequest::new()) + } + + // .cryptohome.Key key = 3; + + + pub fn get_key(&self) -> &super::key::Key { + self.key.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_key(&mut self) { + self.key.clear(); + } + + pub fn has_key(&self) -> bool { + self.key.is_some() + } + + // Param is passed by value, moved + pub fn set_key(&mut self, v: super::key::Key) { + self.key = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_key(&mut self) -> &mut super::key::Key { + if self.key.is_none() { + self.key.set_default(); + } + self.key.as_mut().unwrap() + } + + // Take field + pub fn take_key(&mut self) -> super::key::Key { + self.key.take().unwrap_or_else(|| super::key::Key::new()) + } +} + +impl ::protobuf::Message for RemoveKeyRequest { + fn is_initialized(&self) -> bool { + for v in &self.account_id { + if !v.is_initialized() { + return false; + } + }; + for v in &self.authorization_request { + if !v.is_initialized() { + return false; + } + }; + for v in &self.key { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.authorization_request)?; + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.key)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.account_id.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.authorization_request.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.key.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.account_id.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if let Some(ref v) = self.authorization_request.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if let Some(ref v) = self.key.as_ref() { + os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> RemoveKeyRequest { + RemoveKeyRequest::new() + } + + fn default_instance() -> &'static RemoveKeyRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RemoveKeyRequest::new) + } +} + +impl ::protobuf::Clear for RemoveKeyRequest { + fn clear(&mut self) { + self.account_id.clear(); + self.authorization_request.clear(); + self.key.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for RemoveKeyRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct RemoveKeyReply { + // message fields + pub error: CryptohomeErrorCode, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a RemoveKeyReply { + fn default() -> &'a RemoveKeyReply { + ::default_instance() + } +} + +impl RemoveKeyReply { + pub fn new() -> RemoveKeyReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } +} + +impl ::protobuf::Message for RemoveKeyReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> RemoveKeyReply { + RemoveKeyReply::new() + } + + fn default_instance() -> &'static RemoveKeyReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RemoveKeyReply::new) + } +} + +impl ::protobuf::Clear for RemoveKeyReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for RemoveKeyReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct MassRemoveKeysRequest { + // message fields + pub account_id: ::protobuf::SingularPtrField, + pub authorization_request: ::protobuf::SingularPtrField, + pub exempt_key_data: ::protobuf::RepeatedField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a MassRemoveKeysRequest { + fn default() -> &'a MassRemoveKeysRequest { + ::default_instance() + } +} + +impl MassRemoveKeysRequest { + pub fn new() -> MassRemoveKeysRequest { + ::std::default::Default::default() + } + + // .cryptohome.AccountIdentifier account_id = 1; + + + pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { + self.account_id.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_account_id(&mut self) { + self.account_id.clear(); + } + + 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: super::rpc::AccountIdentifier) { + self.account_id = ::protobuf::SingularPtrField::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 super::rpc::AccountIdentifier { + if self.account_id.is_none() { + self.account_id.set_default(); + } + self.account_id.as_mut().unwrap() + } + + // Take field + pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { + self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) + } + + // .cryptohome.AuthorizationRequest authorization_request = 2; + + + pub fn get_authorization_request(&self) -> &super::rpc::AuthorizationRequest { + self.authorization_request.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_authorization_request(&mut self) { + self.authorization_request.clear(); + } + + pub fn has_authorization_request(&self) -> bool { + self.authorization_request.is_some() + } + + // Param is passed by value, moved + pub fn set_authorization_request(&mut self, v: super::rpc::AuthorizationRequest) { + self.authorization_request = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_authorization_request(&mut self) -> &mut super::rpc::AuthorizationRequest { + if self.authorization_request.is_none() { + self.authorization_request.set_default(); + } + self.authorization_request.as_mut().unwrap() + } + + // Take field + pub fn take_authorization_request(&mut self) -> super::rpc::AuthorizationRequest { + self.authorization_request.take().unwrap_or_else(|| super::rpc::AuthorizationRequest::new()) + } + + // repeated .cryptohome.KeyData exempt_key_data = 3; + + + pub fn get_exempt_key_data(&self) -> &[super::key::KeyData] { + &self.exempt_key_data + } + pub fn clear_exempt_key_data(&mut self) { + self.exempt_key_data.clear(); + } + + // Param is passed by value, moved + pub fn set_exempt_key_data(&mut self, v: ::protobuf::RepeatedField) { + self.exempt_key_data = v; + } + + // Mutable pointer to the field. + pub fn mut_exempt_key_data(&mut self) -> &mut ::protobuf::RepeatedField { + &mut self.exempt_key_data + } + + // Take field + pub fn take_exempt_key_data(&mut self) -> ::protobuf::RepeatedField { + ::std::mem::replace(&mut self.exempt_key_data, ::protobuf::RepeatedField::new()) + } +} + +impl ::protobuf::Message for MassRemoveKeysRequest { + fn is_initialized(&self) -> bool { + for v in &self.account_id { + if !v.is_initialized() { + return false; + } + }; + for v in &self.authorization_request { + if !v.is_initialized() { + return false; + } + }; + for v in &self.exempt_key_data { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.authorization_request)?; + }, + 3 => { + ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.exempt_key_data)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.account_id.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.authorization_request.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + for value in &self.exempt_key_data { + let len = value.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + }; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.account_id.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if let Some(ref v) = self.authorization_request.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + for v in &self.exempt_key_data { + os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }; + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> MassRemoveKeysRequest { + MassRemoveKeysRequest::new() + } + + fn default_instance() -> &'static MassRemoveKeysRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(MassRemoveKeysRequest::new) + } +} + +impl ::protobuf::Clear for MassRemoveKeysRequest { + fn clear(&mut self) { + self.account_id.clear(); + self.authorization_request.clear(); + self.exempt_key_data.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for MassRemoveKeysRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct MassRemoveKeysReply { + // message fields + pub error: CryptohomeErrorCode, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a MassRemoveKeysReply { + fn default() -> &'a MassRemoveKeysReply { + ::default_instance() + } +} + +impl MassRemoveKeysReply { + pub fn new() -> MassRemoveKeysReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } +} + +impl ::protobuf::Message for MassRemoveKeysReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> MassRemoveKeysReply { + MassRemoveKeysReply::new() + } + + fn default_instance() -> &'static MassRemoveKeysReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(MassRemoveKeysReply::new) + } +} + +impl ::protobuf::Clear for MassRemoveKeysReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for MassRemoveKeysReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct MigrateKeyRequest { + // message fields + pub account_id: ::protobuf::SingularPtrField, + pub authorization_request: ::protobuf::SingularPtrField, + pub secret: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a MigrateKeyRequest { + fn default() -> &'a MigrateKeyRequest { + ::default_instance() + } +} + +impl MigrateKeyRequest { + pub fn new() -> MigrateKeyRequest { + ::std::default::Default::default() + } + + // .cryptohome.AccountIdentifier account_id = 1; + + + pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { + self.account_id.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_account_id(&mut self) { + self.account_id.clear(); + } + + 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: super::rpc::AccountIdentifier) { + self.account_id = ::protobuf::SingularPtrField::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 super::rpc::AccountIdentifier { + if self.account_id.is_none() { + self.account_id.set_default(); + } + self.account_id.as_mut().unwrap() + } + + // Take field + pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { + self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) + } + + // .cryptohome.AuthorizationRequest authorization_request = 2; + + + pub fn get_authorization_request(&self) -> &super::rpc::AuthorizationRequest { + self.authorization_request.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_authorization_request(&mut self) { + self.authorization_request.clear(); + } + + pub fn has_authorization_request(&self) -> bool { + self.authorization_request.is_some() + } + + // Param is passed by value, moved + pub fn set_authorization_request(&mut self, v: super::rpc::AuthorizationRequest) { + self.authorization_request = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_authorization_request(&mut self) -> &mut super::rpc::AuthorizationRequest { + if self.authorization_request.is_none() { + self.authorization_request.set_default(); + } + self.authorization_request.as_mut().unwrap() + } + + // Take field + pub fn take_authorization_request(&mut self) -> super::rpc::AuthorizationRequest { + self.authorization_request.take().unwrap_or_else(|| super::rpc::AuthorizationRequest::new()) + } + + // bytes secret = 3; + + + pub fn get_secret(&self) -> &[u8] { + &self.secret + } + pub fn clear_secret(&mut self) { + self.secret.clear(); + } + + // Param is passed by value, moved + pub fn set_secret(&mut self, v: ::std::vec::Vec) { + self.secret = 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 { + &mut self.secret + } + + // Take field + pub fn take_secret(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.secret, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for MigrateKeyRequest { + fn is_initialized(&self) -> bool { + for v in &self.account_id { + if !v.is_initialized() { + return false; + } + }; + for v in &self.authorization_request { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.authorization_request)?; + }, + 3 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.secret)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.account_id.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.authorization_request.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if !self.secret.is_empty() { + my_size += ::protobuf::rt::bytes_size(3, &self.secret); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.account_id.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if let Some(ref v) = self.authorization_request.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if !self.secret.is_empty() { + os.write_bytes(3, &self.secret)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> MigrateKeyRequest { + MigrateKeyRequest::new() + } + + fn default_instance() -> &'static MigrateKeyRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(MigrateKeyRequest::new) + } +} + +impl ::protobuf::Clear for MigrateKeyRequest { + fn clear(&mut self) { + self.account_id.clear(); + self.authorization_request.clear(); + self.secret.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for MigrateKeyRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct MigrateKeyReply { + // message fields + pub error: CryptohomeErrorCode, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a MigrateKeyReply { + fn default() -> &'a MigrateKeyReply { + ::default_instance() + } +} + +impl MigrateKeyReply { + pub fn new() -> MigrateKeyReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } +} + +impl ::protobuf::Message for MigrateKeyReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> MigrateKeyReply { + MigrateKeyReply::new() + } + + fn default_instance() -> &'static MigrateKeyReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(MigrateKeyReply::new) + } +} + +impl ::protobuf::Clear for MigrateKeyReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for MigrateKeyReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct StartFingerprintAuthSessionRequest { + // message fields + pub account_id: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a StartFingerprintAuthSessionRequest { + fn default() -> &'a StartFingerprintAuthSessionRequest { + ::default_instance() + } +} + +impl StartFingerprintAuthSessionRequest { + pub fn new() -> StartFingerprintAuthSessionRequest { + ::std::default::Default::default() + } + + // .cryptohome.AccountIdentifier account_id = 1; + + + pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { + self.account_id.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_account_id(&mut self) { + self.account_id.clear(); + } + + 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: super::rpc::AccountIdentifier) { + self.account_id = ::protobuf::SingularPtrField::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 super::rpc::AccountIdentifier { + if self.account_id.is_none() { + self.account_id.set_default(); + } + self.account_id.as_mut().unwrap() + } + + // Take field + pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { + self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) + } +} + +impl ::protobuf::Message for StartFingerprintAuthSessionRequest { + fn is_initialized(&self) -> bool { + for v in &self.account_id { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.account_id.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.account_id.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> StartFingerprintAuthSessionRequest { + StartFingerprintAuthSessionRequest::new() + } + + fn default_instance() -> &'static StartFingerprintAuthSessionRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(StartFingerprintAuthSessionRequest::new) + } +} + +impl ::protobuf::Clear for StartFingerprintAuthSessionRequest { + fn clear(&mut self) { + self.account_id.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for StartFingerprintAuthSessionRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct StartFingerprintAuthSessionReply { + // message fields + pub error: CryptohomeErrorCode, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a StartFingerprintAuthSessionReply { + fn default() -> &'a StartFingerprintAuthSessionReply { + ::default_instance() + } +} + +impl StartFingerprintAuthSessionReply { + pub fn new() -> StartFingerprintAuthSessionReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } +} + +impl ::protobuf::Message for StartFingerprintAuthSessionReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> StartFingerprintAuthSessionReply { + StartFingerprintAuthSessionReply::new() + } + + fn default_instance() -> &'static StartFingerprintAuthSessionReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(StartFingerprintAuthSessionReply::new) + } +} + +impl ::protobuf::Clear for StartFingerprintAuthSessionReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for StartFingerprintAuthSessionReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct EndFingerprintAuthSessionRequest { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> EndFingerprintAuthSessionRequest { + EndFingerprintAuthSessionRequest::new() + } + + fn default_instance() -> &'static EndFingerprintAuthSessionRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(EndFingerprintAuthSessionRequest::new) + } +} + +impl ::protobuf::Clear for EndFingerprintAuthSessionRequest { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for EndFingerprintAuthSessionRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct EndFingerprintAuthSessionReply { + // message fields + pub error: CryptohomeErrorCode, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a EndFingerprintAuthSessionReply { + fn default() -> &'a EndFingerprintAuthSessionReply { + ::default_instance() + } +} + +impl EndFingerprintAuthSessionReply { + pub fn new() -> EndFingerprintAuthSessionReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } +} + +impl ::protobuf::Message for EndFingerprintAuthSessionReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> EndFingerprintAuthSessionReply { + EndFingerprintAuthSessionReply::new() + } + + fn default_instance() -> &'static EndFingerprintAuthSessionReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(EndFingerprintAuthSessionReply::new) + } +} + +impl ::protobuf::Clear for EndFingerprintAuthSessionReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for EndFingerprintAuthSessionReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetWebAuthnSecretRequest { + // message fields + pub account_id: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetWebAuthnSecretRequest { + fn default() -> &'a GetWebAuthnSecretRequest { + ::default_instance() + } +} + +impl GetWebAuthnSecretRequest { + pub fn new() -> GetWebAuthnSecretRequest { + ::std::default::Default::default() + } + + // .cryptohome.AccountIdentifier account_id = 1; + + + pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { + self.account_id.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_account_id(&mut self) { + self.account_id.clear(); + } + + 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: super::rpc::AccountIdentifier) { + self.account_id = ::protobuf::SingularPtrField::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 super::rpc::AccountIdentifier { + if self.account_id.is_none() { + self.account_id.set_default(); + } + self.account_id.as_mut().unwrap() + } + + // Take field + pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { + self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) + } +} + +impl ::protobuf::Message for GetWebAuthnSecretRequest { + fn is_initialized(&self) -> bool { + for v in &self.account_id { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.account_id.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.account_id.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetWebAuthnSecretRequest { + GetWebAuthnSecretRequest::new() + } + + fn default_instance() -> &'static GetWebAuthnSecretRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetWebAuthnSecretRequest::new) + } +} + +impl ::protobuf::Clear for GetWebAuthnSecretRequest { + fn clear(&mut self) { + self.account_id.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetWebAuthnSecretRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetWebAuthnSecretReply { + // message fields + pub error: CryptohomeErrorCode, + pub webauthn_secret: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetWebAuthnSecretReply { + fn default() -> &'a GetWebAuthnSecretReply { + ::default_instance() + } +} + +impl GetWebAuthnSecretReply { + pub fn new() -> GetWebAuthnSecretReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // bytes webauthn_secret = 2; + + + pub fn get_webauthn_secret(&self) -> &[u8] { + &self.webauthn_secret + } + pub fn clear_webauthn_secret(&mut self) { + self.webauthn_secret.clear(); + } + + // Param is passed by value, moved + pub fn set_webauthn_secret(&mut self, v: ::std::vec::Vec) { + self.webauthn_secret = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_webauthn_secret(&mut self) -> &mut ::std::vec::Vec { + &mut self.webauthn_secret + } + + // Take field + pub fn take_webauthn_secret(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.webauthn_secret, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for GetWebAuthnSecretReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.webauthn_secret)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if !self.webauthn_secret.is_empty() { + my_size += ::protobuf::rt::bytes_size(2, &self.webauthn_secret); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if !self.webauthn_secret.is_empty() { + os.write_bytes(2, &self.webauthn_secret)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetWebAuthnSecretReply { + GetWebAuthnSecretReply::new() + } + + fn default_instance() -> &'static GetWebAuthnSecretReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetWebAuthnSecretReply::new) + } +} + +impl ::protobuf::Clear for GetWebAuthnSecretReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.webauthn_secret.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetWebAuthnSecretReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetWebAuthnSecretHashRequest { + // message fields + pub account_id: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetWebAuthnSecretHashRequest { + fn default() -> &'a GetWebAuthnSecretHashRequest { + ::default_instance() + } +} + +impl GetWebAuthnSecretHashRequest { + pub fn new() -> GetWebAuthnSecretHashRequest { + ::std::default::Default::default() + } + + // .cryptohome.AccountIdentifier account_id = 1; + + + pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { + self.account_id.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_account_id(&mut self) { + self.account_id.clear(); + } + + 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: super::rpc::AccountIdentifier) { + self.account_id = ::protobuf::SingularPtrField::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 super::rpc::AccountIdentifier { + if self.account_id.is_none() { + self.account_id.set_default(); + } + self.account_id.as_mut().unwrap() + } + + // Take field + pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { + self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) + } +} + +impl ::protobuf::Message for GetWebAuthnSecretHashRequest { + fn is_initialized(&self) -> bool { + for v in &self.account_id { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.account_id.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.account_id.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetWebAuthnSecretHashRequest { + GetWebAuthnSecretHashRequest::new() + } + + fn default_instance() -> &'static GetWebAuthnSecretHashRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetWebAuthnSecretHashRequest::new) + } +} + +impl ::protobuf::Clear for GetWebAuthnSecretHashRequest { + fn clear(&mut self) { + self.account_id.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetWebAuthnSecretHashRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetWebAuthnSecretHashReply { + // message fields + pub error: CryptohomeErrorCode, + pub webauthn_secret_hash: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetWebAuthnSecretHashReply { + fn default() -> &'a GetWebAuthnSecretHashReply { + ::default_instance() + } +} + +impl GetWebAuthnSecretHashReply { + pub fn new() -> GetWebAuthnSecretHashReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // bytes webauthn_secret_hash = 2; + + + pub fn get_webauthn_secret_hash(&self) -> &[u8] { + &self.webauthn_secret_hash + } + pub fn clear_webauthn_secret_hash(&mut self) { + self.webauthn_secret_hash.clear(); + } + + // Param is passed by value, moved + pub fn set_webauthn_secret_hash(&mut self, v: ::std::vec::Vec) { + self.webauthn_secret_hash = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_webauthn_secret_hash(&mut self) -> &mut ::std::vec::Vec { + &mut self.webauthn_secret_hash + } + + // Take field + pub fn take_webauthn_secret_hash(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.webauthn_secret_hash, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for GetWebAuthnSecretHashReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.webauthn_secret_hash)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if !self.webauthn_secret_hash.is_empty() { + os.write_bytes(2, &self.webauthn_secret_hash)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetWebAuthnSecretHashReply { + GetWebAuthnSecretHashReply::new() + } + + fn default_instance() -> &'static GetWebAuthnSecretHashReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetWebAuthnSecretHashReply::new) + } +} + +impl ::protobuf::Clear for GetWebAuthnSecretHashReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.webauthn_secret_hash.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetWebAuthnSecretHashReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetHibernateSecretRequest { + // message fields + pub account_id: ::protobuf::SingularPtrField, + pub auth_session_id: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetHibernateSecretRequest { + fn default() -> &'a GetHibernateSecretRequest { + ::default_instance() + } +} + +impl GetHibernateSecretRequest { + pub fn new() -> GetHibernateSecretRequest { + ::std::default::Default::default() + } + + // .cryptohome.AccountIdentifier account_id = 1; + + + pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { + self.account_id.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_account_id(&mut self) { + self.account_id.clear(); + } + + 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: super::rpc::AccountIdentifier) { + self.account_id = ::protobuf::SingularPtrField::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 super::rpc::AccountIdentifier { + if self.account_id.is_none() { + self.account_id.set_default(); + } + self.account_id.as_mut().unwrap() + } + + // Take field + pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { + self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) + } + + // bytes auth_session_id = 2; + + + pub fn get_auth_session_id(&self) -> &[u8] { + &self.auth_session_id + } + pub fn clear_auth_session_id(&mut self) { + self.auth_session_id.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec) { + self.auth_session_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.auth_session_id + } + + // Take field + pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for GetHibernateSecretRequest { + fn is_initialized(&self) -> bool { + for v in &self.account_id { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.account_id.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.account_id.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if !self.auth_session_id.is_empty() { + os.write_bytes(2, &self.auth_session_id)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetHibernateSecretRequest { + GetHibernateSecretRequest::new() + } + + fn default_instance() -> &'static GetHibernateSecretRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetHibernateSecretRequest::new) + } +} + +impl ::protobuf::Clear for GetHibernateSecretRequest { + fn clear(&mut self) { + self.account_id.clear(); + self.auth_session_id.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetHibernateSecretRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetHibernateSecretReply { + // message fields + pub error: CryptohomeErrorCode, + pub hibernate_secret: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetHibernateSecretReply { + fn default() -> &'a GetHibernateSecretReply { + ::default_instance() + } +} + +impl GetHibernateSecretReply { + pub fn new() -> GetHibernateSecretReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // bytes hibernate_secret = 2; + + + pub fn get_hibernate_secret(&self) -> &[u8] { + &self.hibernate_secret + } + pub fn clear_hibernate_secret(&mut self) { + self.hibernate_secret.clear(); + } + + // Param is passed by value, moved + pub fn set_hibernate_secret(&mut self, v: ::std::vec::Vec) { + self.hibernate_secret = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_hibernate_secret(&mut self) -> &mut ::std::vec::Vec { + &mut self.hibernate_secret + } + + // Take field + pub fn take_hibernate_secret(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.hibernate_secret, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for GetHibernateSecretReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.hibernate_secret)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if !self.hibernate_secret.is_empty() { + my_size += ::protobuf::rt::bytes_size(2, &self.hibernate_secret); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if !self.hibernate_secret.is_empty() { + os.write_bytes(2, &self.hibernate_secret)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetHibernateSecretReply { + GetHibernateSecretReply::new() + } + + fn default_instance() -> &'static GetHibernateSecretReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetHibernateSecretReply::new) + } +} + +impl ::protobuf::Clear for GetHibernateSecretReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.hibernate_secret.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetHibernateSecretReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct StartMigrateToDircryptoRequest { + // message fields + pub account_id: ::protobuf::SingularPtrField, + pub minimal_migration: bool, + pub auth_session_id: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a StartMigrateToDircryptoRequest { + fn default() -> &'a StartMigrateToDircryptoRequest { + ::default_instance() + } +} + +impl StartMigrateToDircryptoRequest { + pub fn new() -> StartMigrateToDircryptoRequest { + ::std::default::Default::default() + } + + // .cryptohome.AccountIdentifier account_id = 1; + + + pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { + self.account_id.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_account_id(&mut self) { + self.account_id.clear(); + } + + 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: super::rpc::AccountIdentifier) { + self.account_id = ::protobuf::SingularPtrField::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 super::rpc::AccountIdentifier { + if self.account_id.is_none() { + self.account_id.set_default(); + } + self.account_id.as_mut().unwrap() + } + + // Take field + pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { + self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) + } + + // bool minimal_migration = 2; + + + pub fn get_minimal_migration(&self) -> bool { + self.minimal_migration + } + pub fn clear_minimal_migration(&mut self) { + self.minimal_migration = false; + } + + // Param is passed by value, moved + pub fn set_minimal_migration(&mut self, v: bool) { + self.minimal_migration = v; + } + + // bytes auth_session_id = 3; + + + pub fn get_auth_session_id(&self) -> &[u8] { + &self.auth_session_id + } + pub fn clear_auth_session_id(&mut self) { + self.auth_session_id.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec) { + self.auth_session_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.auth_session_id + } + + // Take field + pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for StartMigrateToDircryptoRequest { + fn is_initialized(&self) -> bool { + for v in &self.account_id { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.minimal_migration = tmp; + }, + 3 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.account_id.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if self.minimal_migration != false { + my_size += 2; + } + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.account_id.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(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.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> StartMigrateToDircryptoRequest { + StartMigrateToDircryptoRequest::new() + } + + fn default_instance() -> &'static StartMigrateToDircryptoRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(StartMigrateToDircryptoRequest::new) + } +} + +impl ::protobuf::Clear for StartMigrateToDircryptoRequest { + fn clear(&mut self) { + self.account_id.clear(); + self.minimal_migration = false; + self.auth_session_id.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for StartMigrateToDircryptoRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct StartMigrateToDircryptoReply { + // message fields + pub error: CryptohomeErrorCode, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a StartMigrateToDircryptoReply { + fn default() -> &'a StartMigrateToDircryptoReply { + ::default_instance() + } +} + +impl StartMigrateToDircryptoReply { + pub fn new() -> StartMigrateToDircryptoReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } +} + +impl ::protobuf::Message for StartMigrateToDircryptoReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> StartMigrateToDircryptoReply { + StartMigrateToDircryptoReply::new() + } + + fn default_instance() -> &'static StartMigrateToDircryptoReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(StartMigrateToDircryptoReply::new) + } +} + +impl ::protobuf::Clear for StartMigrateToDircryptoReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for StartMigrateToDircryptoReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct DircryptoMigrationProgress { + // message fields + pub status: DircryptoMigrationStatus, + pub current_bytes: u64, + pub total_bytes: u64, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a DircryptoMigrationProgress { + fn default() -> &'a DircryptoMigrationProgress { + ::default_instance() + } +} + +impl DircryptoMigrationProgress { + pub fn new() -> DircryptoMigrationProgress { + ::std::default::Default::default() + } + + // .user_data_auth.DircryptoMigrationStatus status = 1; + + + pub fn get_status(&self) -> DircryptoMigrationStatus { + self.status + } + pub fn clear_status(&mut self) { + self.status = DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_SUCCESS; + } + + // Param is passed by value, moved + pub fn set_status(&mut self, v: DircryptoMigrationStatus) { + self.status = v; + } + + // uint64 current_bytes = 2; + + + pub fn get_current_bytes(&self) -> u64 { + self.current_bytes + } + pub fn clear_current_bytes(&mut self) { + self.current_bytes = 0; + } + + // Param is passed by value, moved + pub fn set_current_bytes(&mut self, v: u64) { + self.current_bytes = v; + } + + // uint64 total_bytes = 3; + + + pub fn get_total_bytes(&self) -> u64 { + self.total_bytes + } + pub fn clear_total_bytes(&mut self) { + self.total_bytes = 0; + } + + // Param is passed by value, moved + pub fn set_total_bytes(&mut self, v: u64) { + self.total_bytes = v; + } +} + +impl ::protobuf::Message for DircryptoMigrationProgress { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.status, 1, &mut self.unknown_fields)? + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_uint64()?; + self.current_bytes = tmp; + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_uint64()?; + self.total_bytes = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.status != DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_SUCCESS { + my_size += ::protobuf::rt::enum_size(1, self.status); + } + if self.current_bytes != 0 { + my_size += ::protobuf::rt::value_size(2, self.current_bytes, ::protobuf::wire_format::WireTypeVarint); + } + if self.total_bytes != 0 { + my_size += ::protobuf::rt::value_size(3, self.total_bytes, ::protobuf::wire_format::WireTypeVarint); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.status != DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_SUCCESS { + os.write_enum(1, ::protobuf::ProtobufEnum::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.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> DircryptoMigrationProgress { + DircryptoMigrationProgress::new() + } + + fn default_instance() -> &'static DircryptoMigrationProgress { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(DircryptoMigrationProgress::new) + } +} + +impl ::protobuf::Clear for DircryptoMigrationProgress { + fn clear(&mut self) { + self.status = DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_SUCCESS; + self.current_bytes = 0; + self.total_bytes = 0; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for DircryptoMigrationProgress { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct NeedsDircryptoMigrationRequest { + // message fields + pub account_id: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a NeedsDircryptoMigrationRequest { + fn default() -> &'a NeedsDircryptoMigrationRequest { + ::default_instance() + } +} + +impl NeedsDircryptoMigrationRequest { + pub fn new() -> NeedsDircryptoMigrationRequest { + ::std::default::Default::default() + } + + // .cryptohome.AccountIdentifier account_id = 1; + + + pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { + self.account_id.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_account_id(&mut self) { + self.account_id.clear(); + } + + 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: super::rpc::AccountIdentifier) { + self.account_id = ::protobuf::SingularPtrField::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 super::rpc::AccountIdentifier { + if self.account_id.is_none() { + self.account_id.set_default(); + } + self.account_id.as_mut().unwrap() + } + + // Take field + pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { + self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) + } +} + +impl ::protobuf::Message for NeedsDircryptoMigrationRequest { + fn is_initialized(&self) -> bool { + for v in &self.account_id { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.account_id.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.account_id.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> NeedsDircryptoMigrationRequest { + NeedsDircryptoMigrationRequest::new() + } + + fn default_instance() -> &'static NeedsDircryptoMigrationRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(NeedsDircryptoMigrationRequest::new) + } +} + +impl ::protobuf::Clear for NeedsDircryptoMigrationRequest { + fn clear(&mut self) { + self.account_id.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for NeedsDircryptoMigrationRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct NeedsDircryptoMigrationReply { + // message fields + pub error: CryptohomeErrorCode, + pub needs_dircrypto_migration: bool, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a NeedsDircryptoMigrationReply { + fn default() -> &'a NeedsDircryptoMigrationReply { + ::default_instance() + } +} + +impl NeedsDircryptoMigrationReply { + pub fn new() -> NeedsDircryptoMigrationReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // bool needs_dircrypto_migration = 2; + + + pub fn get_needs_dircrypto_migration(&self) -> bool { + self.needs_dircrypto_migration + } + pub fn clear_needs_dircrypto_migration(&mut self) { + self.needs_dircrypto_migration = false; + } + + // Param is passed by value, moved + pub fn set_needs_dircrypto_migration(&mut self, v: bool) { + self.needs_dircrypto_migration = v; + } +} + +impl ::protobuf::Message for NeedsDircryptoMigrationReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.needs_dircrypto_migration = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if self.needs_dircrypto_migration != false { + my_size += 2; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if self.needs_dircrypto_migration != false { + os.write_bool(2, self.needs_dircrypto_migration)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> NeedsDircryptoMigrationReply { + NeedsDircryptoMigrationReply::new() + } + + fn default_instance() -> &'static NeedsDircryptoMigrationReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(NeedsDircryptoMigrationReply::new) + } +} + +impl ::protobuf::Clear for NeedsDircryptoMigrationReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.needs_dircrypto_migration = false; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for NeedsDircryptoMigrationReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetSupportedKeyPoliciesRequest { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetSupportedKeyPoliciesRequest { + GetSupportedKeyPoliciesRequest::new() + } + + fn default_instance() -> &'static GetSupportedKeyPoliciesRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetSupportedKeyPoliciesRequest::new) + } +} + +impl ::protobuf::Clear for GetSupportedKeyPoliciesRequest { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetSupportedKeyPoliciesRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetSupportedKeyPoliciesReply { + // message fields + pub low_entropy_credentials_supported: bool, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetSupportedKeyPoliciesReply { + fn default() -> &'a GetSupportedKeyPoliciesReply { + ::default_instance() + } +} + +impl GetSupportedKeyPoliciesReply { + pub fn new() -> GetSupportedKeyPoliciesReply { + ::std::default::Default::default() + } + + // bool low_entropy_credentials_supported = 1; + + + pub fn get_low_entropy_credentials_supported(&self) -> bool { + self.low_entropy_credentials_supported + } + pub fn clear_low_entropy_credentials_supported(&mut self) { + self.low_entropy_credentials_supported = false; + } + + // Param is passed by value, moved + pub fn set_low_entropy_credentials_supported(&mut self, v: bool) { + self.low_entropy_credentials_supported = v; + } +} + +impl ::protobuf::Message for GetSupportedKeyPoliciesReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.low_entropy_credentials_supported = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.low_entropy_credentials_supported != false { + my_size += 2; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.low_entropy_credentials_supported != false { + os.write_bool(1, self.low_entropy_credentials_supported)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetSupportedKeyPoliciesReply { + GetSupportedKeyPoliciesReply::new() + } + + fn default_instance() -> &'static GetSupportedKeyPoliciesReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetSupportedKeyPoliciesReply::new) + } +} + +impl ::protobuf::Clear for GetSupportedKeyPoliciesReply { + fn clear(&mut self) { + self.low_entropy_credentials_supported = false; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetSupportedKeyPoliciesReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetAccountDiskUsageRequest { + // message fields + pub identifier: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetAccountDiskUsageRequest { + fn default() -> &'a GetAccountDiskUsageRequest { + ::default_instance() + } +} + +impl GetAccountDiskUsageRequest { + pub fn new() -> GetAccountDiskUsageRequest { + ::std::default::Default::default() + } + + // .cryptohome.AccountIdentifier identifier = 1; + + + pub fn get_identifier(&self) -> &super::rpc::AccountIdentifier { + self.identifier.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_identifier(&mut self) { + self.identifier.clear(); + } + + pub fn has_identifier(&self) -> bool { + self.identifier.is_some() + } + + // Param is passed by value, moved + pub fn set_identifier(&mut self, v: super::rpc::AccountIdentifier) { + self.identifier = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_identifier(&mut self) -> &mut super::rpc::AccountIdentifier { + if self.identifier.is_none() { + self.identifier.set_default(); + } + self.identifier.as_mut().unwrap() + } + + // Take field + pub fn take_identifier(&mut self) -> super::rpc::AccountIdentifier { + self.identifier.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) + } +} + +impl ::protobuf::Message for GetAccountDiskUsageRequest { + fn is_initialized(&self) -> bool { + for v in &self.identifier { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.identifier)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.identifier.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.identifier.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetAccountDiskUsageRequest { + GetAccountDiskUsageRequest::new() + } + + fn default_instance() -> &'static GetAccountDiskUsageRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetAccountDiskUsageRequest::new) + } +} + +impl ::protobuf::Clear for GetAccountDiskUsageRequest { + fn clear(&mut self) { + self.identifier.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetAccountDiskUsageRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetAccountDiskUsageReply { + // message fields + pub error: CryptohomeErrorCode, + pub size: i64, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetAccountDiskUsageReply { + fn default() -> &'a GetAccountDiskUsageReply { + ::default_instance() + } +} + +impl GetAccountDiskUsageReply { + pub fn new() -> GetAccountDiskUsageReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // int64 size = 2; + + + pub fn get_size(&self) -> i64 { + self.size + } + pub fn clear_size(&mut self) { + self.size = 0; + } + + // Param is passed by value, moved + pub fn set_size(&mut self, v: i64) { + self.size = v; + } +} + +impl ::protobuf::Message for GetAccountDiskUsageReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int64()?; + self.size = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if self.size != 0 { + my_size += ::protobuf::rt::value_size(2, self.size, ::protobuf::wire_format::WireTypeVarint); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if self.size != 0 { + os.write_int64(2, self.size)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetAccountDiskUsageReply { + GetAccountDiskUsageReply::new() + } + + fn default_instance() -> &'static GetAccountDiskUsageReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetAccountDiskUsageReply::new) + } +} + +impl ::protobuf::Clear for GetAccountDiskUsageReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.size = 0; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetAccountDiskUsageReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct LowDiskSpace { + // message fields + pub disk_free_bytes: u64, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a LowDiskSpace { + fn default() -> &'a LowDiskSpace { + ::default_instance() + } +} + +impl LowDiskSpace { + pub fn new() -> LowDiskSpace { + ::std::default::Default::default() + } + + // uint64 disk_free_bytes = 1; + + + pub fn get_disk_free_bytes(&self) -> u64 { + self.disk_free_bytes + } + pub fn clear_disk_free_bytes(&mut self) { + self.disk_free_bytes = 0; + } + + // Param is passed by value, moved + pub fn set_disk_free_bytes(&mut self, v: u64) { + self.disk_free_bytes = v; + } +} + +impl ::protobuf::Message for LowDiskSpace { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_uint64()?; + self.disk_free_bytes = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.disk_free_bytes != 0 { + my_size += ::protobuf::rt::value_size(1, self.disk_free_bytes, ::protobuf::wire_format::WireTypeVarint); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.disk_free_bytes != 0 { + os.write_uint64(1, self.disk_free_bytes)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> LowDiskSpace { + LowDiskSpace::new() + } + + fn default_instance() -> &'static LowDiskSpace { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(LowDiskSpace::new) + } +} + +impl ::protobuf::Clear for LowDiskSpace { + fn clear(&mut self) { + self.disk_free_bytes = 0; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for LowDiskSpace { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct StartAuthSessionRequest { + // message fields + pub account_id: ::protobuf::SingularPtrField, + pub flags: u32, + pub intent: super::auth_factor::AuthIntent, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a StartAuthSessionRequest { + fn default() -> &'a StartAuthSessionRequest { + ::default_instance() + } +} + +impl StartAuthSessionRequest { + pub fn new() -> StartAuthSessionRequest { + ::std::default::Default::default() + } + + // .cryptohome.AccountIdentifier account_id = 1; + + + pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { + self.account_id.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_account_id(&mut self) { + self.account_id.clear(); + } + + 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: super::rpc::AccountIdentifier) { + self.account_id = ::protobuf::SingularPtrField::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 super::rpc::AccountIdentifier { + if self.account_id.is_none() { + self.account_id.set_default(); + } + self.account_id.as_mut().unwrap() + } + + // Take field + pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { + self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) + } + + // uint32 flags = 2; + + + pub fn get_flags(&self) -> u32 { + self.flags + } + pub fn clear_flags(&mut self) { + self.flags = 0; + } + + // Param is passed by value, moved + pub fn set_flags(&mut self, v: u32) { + self.flags = v; + } + + // .user_data_auth.AuthIntent intent = 3; + + + pub fn get_intent(&self) -> super::auth_factor::AuthIntent { + self.intent + } + pub fn clear_intent(&mut self) { + self.intent = super::auth_factor::AuthIntent::AUTH_INTENT_UNSPECIFIED; + } + + // Param is passed by value, moved + pub fn set_intent(&mut self, v: super::auth_factor::AuthIntent) { + self.intent = v; + } +} + +impl ::protobuf::Message for StartAuthSessionRequest { + fn is_initialized(&self) -> bool { + for v in &self.account_id { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_uint32()?; + self.flags = tmp; + }, + 3 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.intent, 3, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.account_id.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if self.flags != 0 { + my_size += ::protobuf::rt::value_size(2, self.flags, ::protobuf::wire_format::WireTypeVarint); + } + if self.intent != super::auth_factor::AuthIntent::AUTH_INTENT_UNSPECIFIED { + my_size += ::protobuf::rt::enum_size(3, self.intent); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.account_id.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if self.flags != 0 { + os.write_uint32(2, self.flags)?; + } + if self.intent != super::auth_factor::AuthIntent::AUTH_INTENT_UNSPECIFIED { + os.write_enum(3, ::protobuf::ProtobufEnum::value(&self.intent))?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> StartAuthSessionRequest { + StartAuthSessionRequest::new() + } + + fn default_instance() -> &'static StartAuthSessionRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(StartAuthSessionRequest::new) + } +} + +impl ::protobuf::Clear for StartAuthSessionRequest { + fn clear(&mut self) { + self.account_id.clear(); + self.flags = 0; + self.intent = super::auth_factor::AuthIntent::AUTH_INTENT_UNSPECIFIED; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for StartAuthSessionRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct AuthFactorWithStatus { + // message fields + pub auth_factor: ::protobuf::SingularPtrField, + pub available_for_intents: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AuthFactorWithStatus { + fn default() -> &'a AuthFactorWithStatus { + ::default_instance() + } +} + +impl AuthFactorWithStatus { + pub fn new() -> AuthFactorWithStatus { + ::std::default::Default::default() + } + + // .user_data_auth.AuthFactor auth_factor = 1; + + + pub fn get_auth_factor(&self) -> &super::auth_factor::AuthFactor { + self.auth_factor.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_auth_factor(&mut self) { + self.auth_factor.clear(); + } + + pub fn has_auth_factor(&self) -> bool { + self.auth_factor.is_some() + } + + // Param is passed by value, moved + pub fn set_auth_factor(&mut self, v: super::auth_factor::AuthFactor) { + self.auth_factor = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_factor(&mut self) -> &mut super::auth_factor::AuthFactor { + if self.auth_factor.is_none() { + self.auth_factor.set_default(); + } + self.auth_factor.as_mut().unwrap() + } + + // Take field + pub fn take_auth_factor(&mut self) -> super::auth_factor::AuthFactor { + self.auth_factor.take().unwrap_or_else(|| super::auth_factor::AuthFactor::new()) + } + + // repeated .user_data_auth.AuthIntent available_for_intents = 2; + + + pub fn get_available_for_intents(&self) -> &[super::auth_factor::AuthIntent] { + &self.available_for_intents + } + pub fn clear_available_for_intents(&mut self) { + self.available_for_intents.clear(); + } + + // Param is passed by value, moved + pub fn set_available_for_intents(&mut self, v: ::std::vec::Vec) { + self.available_for_intents = v; + } + + // Mutable pointer to the field. + pub fn mut_available_for_intents(&mut self) -> &mut ::std::vec::Vec { + &mut self.available_for_intents + } + + // Take field + pub fn take_available_for_intents(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.available_for_intents, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for AuthFactorWithStatus { + fn is_initialized(&self) -> bool { + for v in &self.auth_factor { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.auth_factor)?; + }, + 2 => { + ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.available_for_intents, 2, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.auth_factor.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + for value in &self.available_for_intents { + my_size += ::protobuf::rt::enum_size(2, *value); + }; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.auth_factor.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + for v in &self.available_for_intents { + os.write_enum(2, ::protobuf::ProtobufEnum::value(v))?; + }; + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> AuthFactorWithStatus { + AuthFactorWithStatus::new() + } + + fn default_instance() -> &'static AuthFactorWithStatus { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(AuthFactorWithStatus::new) + } +} + +impl ::protobuf::Clear for AuthFactorWithStatus { + fn clear(&mut self) { + self.auth_factor.clear(); + self.available_for_intents.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for AuthFactorWithStatus { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct StartAuthSessionReply { + // message fields + pub error: CryptohomeErrorCode, + pub auth_session_id: ::std::vec::Vec, + pub user_exists: bool, + pub key_label_data: ::std::collections::HashMap<::std::string::String, super::key::KeyData>, + pub auth_factors: ::protobuf::RepeatedField, + pub error_info: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a StartAuthSessionReply { + fn default() -> &'a StartAuthSessionReply { + ::default_instance() + } +} + +impl StartAuthSessionReply { + pub fn new() -> StartAuthSessionReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // bytes auth_session_id = 2; + + + pub fn get_auth_session_id(&self) -> &[u8] { + &self.auth_session_id + } + pub fn clear_auth_session_id(&mut self) { + self.auth_session_id.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec) { + self.auth_session_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.auth_session_id + } + + // Take field + pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) + } + + // bool user_exists = 3; + + + pub fn get_user_exists(&self) -> bool { + self.user_exists + } + pub fn clear_user_exists(&mut self) { + self.user_exists = false; + } + + // Param is passed by value, moved + pub fn set_user_exists(&mut self, v: bool) { + self.user_exists = v; + } + + // repeated .user_data_auth.StartAuthSessionReply.KeyLabelDataEntry key_label_data = 4; + + + pub fn get_key_label_data(&self) -> &::std::collections::HashMap<::std::string::String, super::key::KeyData> { + &self.key_label_data + } + pub fn clear_key_label_data(&mut self) { + self.key_label_data.clear(); + } + + // Param is passed by value, moved + pub fn set_key_label_data(&mut self, v: ::std::collections::HashMap<::std::string::String, super::key::KeyData>) { + self.key_label_data = v; + } + + // Mutable pointer to the field. + pub fn mut_key_label_data(&mut self) -> &mut ::std::collections::HashMap<::std::string::String, super::key::KeyData> { + &mut self.key_label_data + } + + // Take field + pub fn take_key_label_data(&mut self) -> ::std::collections::HashMap<::std::string::String, super::key::KeyData> { + ::std::mem::replace(&mut self.key_label_data, ::std::collections::HashMap::new()) + } + + // repeated .user_data_auth.AuthFactor auth_factors = 5; + + + pub fn get_auth_factors(&self) -> &[super::auth_factor::AuthFactor] { + &self.auth_factors + } + pub fn clear_auth_factors(&mut self) { + self.auth_factors.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_factors(&mut self, v: ::protobuf::RepeatedField) { + self.auth_factors = v; + } + + // Mutable pointer to the field. + pub fn mut_auth_factors(&mut self) -> &mut ::protobuf::RepeatedField { + &mut self.auth_factors + } + + // Take field + pub fn take_auth_factors(&mut self) -> ::protobuf::RepeatedField { + ::std::mem::replace(&mut self.auth_factors, ::protobuf::RepeatedField::new()) + } + + // .user_data_auth.CryptohomeErrorInfo error_info = 6; + + + pub fn get_error_info(&self) -> &CryptohomeErrorInfo { + self.error_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_error_info(&mut self) { + self.error_info.clear(); + } + + pub fn has_error_info(&self) -> bool { + self.error_info.is_some() + } + + // Param is passed by value, moved + pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { + self.error_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { + if self.error_info.is_none() { + self.error_info.set_default(); + } + self.error_info.as_mut().unwrap() + } + + // Take field + pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { + self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) + } +} + +impl ::protobuf::Message for StartAuthSessionReply { + fn is_initialized(&self) -> bool { + for v in &self.auth_factors { + if !v.is_initialized() { + return false; + } + }; + for v in &self.error_info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.user_exists = tmp; + }, + 4 => { + ::protobuf::rt::read_map_into::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage>(wire_type, is, &mut self.key_label_data)?; + }, + 5 => { + ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.auth_factors)?; + }, + 6 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if !self.auth_session_id.is_empty() { + my_size += ::protobuf::rt::bytes_size(2, &self.auth_session_id); + } + if self.user_exists != false { + my_size += 2; + } + my_size += ::protobuf::rt::compute_map_size::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage>(4, &self.key_label_data); + for value in &self.auth_factors { + let len = value.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + }; + if let Some(ref v) = self.error_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if !self.auth_session_id.is_empty() { + os.write_bytes(2, &self.auth_session_id)?; + } + if self.user_exists != false { + os.write_bool(3, self.user_exists)?; + } + ::protobuf::rt::write_map_with_cached_sizes::<::protobuf::types::ProtobufTypeString, ::protobuf::types::ProtobufTypeMessage>(4, &self.key_label_data, os)?; + for v in &self.auth_factors { + os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }; + if let Some(ref v) = self.error_info.as_ref() { + os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> StartAuthSessionReply { + StartAuthSessionReply::new() + } + + fn default_instance() -> &'static StartAuthSessionReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(StartAuthSessionReply::new) + } +} + +impl ::protobuf::Clear for StartAuthSessionReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.auth_session_id.clear(); + self.user_exists = false; + self.key_label_data.clear(); + self.auth_factors.clear(); + self.error_info.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for StartAuthSessionReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct AddCredentialsRequest { + // message fields + pub auth_session_id: ::std::vec::Vec, + pub authorization: ::protobuf::SingularPtrField, + pub add_more_credentials: bool, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AddCredentialsRequest { + fn default() -> &'a AddCredentialsRequest { + ::default_instance() + } +} + +impl AddCredentialsRequest { + pub fn new() -> AddCredentialsRequest { + ::std::default::Default::default() + } + + // bytes auth_session_id = 1; + + + pub fn get_auth_session_id(&self) -> &[u8] { + &self.auth_session_id + } + pub fn clear_auth_session_id(&mut self) { + self.auth_session_id.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec) { + self.auth_session_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.auth_session_id + } + + // Take field + pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) + } + + // .cryptohome.AuthorizationRequest authorization = 2; + + + pub fn get_authorization(&self) -> &super::rpc::AuthorizationRequest { + self.authorization.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_authorization(&mut self) { + self.authorization.clear(); + } + + pub fn has_authorization(&self) -> bool { + self.authorization.is_some() + } + + // Param is passed by value, moved + pub fn set_authorization(&mut self, v: super::rpc::AuthorizationRequest) { + self.authorization = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_authorization(&mut self) -> &mut super::rpc::AuthorizationRequest { + if self.authorization.is_none() { + self.authorization.set_default(); + } + self.authorization.as_mut().unwrap() + } + + // Take field + pub fn take_authorization(&mut self) -> super::rpc::AuthorizationRequest { + self.authorization.take().unwrap_or_else(|| super::rpc::AuthorizationRequest::new()) + } + + // bool add_more_credentials = 3; + + + pub fn get_add_more_credentials(&self) -> bool { + self.add_more_credentials + } + pub fn clear_add_more_credentials(&mut self) { + self.add_more_credentials = false; + } + + // Param is passed by value, moved + pub fn set_add_more_credentials(&mut self, v: bool) { + self.add_more_credentials = v; + } +} + +impl ::protobuf::Message for AddCredentialsRequest { + fn is_initialized(&self) -> bool { + for v in &self.authorization { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.authorization)?; + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.add_more_credentials = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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(ref v) = self.authorization.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if self.add_more_credentials != false { + my_size += 2; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.auth_session_id.is_empty() { + os.write_bytes(1, &self.auth_session_id)?; + } + if let Some(ref v) = self.authorization.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if self.add_more_credentials != false { + os.write_bool(3, self.add_more_credentials)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> AddCredentialsRequest { + AddCredentialsRequest::new() + } + + fn default_instance() -> &'static AddCredentialsRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(AddCredentialsRequest::new) + } +} + +impl ::protobuf::Clear for AddCredentialsRequest { + fn clear(&mut self) { + self.auth_session_id.clear(); + self.authorization.clear(); + self.add_more_credentials = false; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for AddCredentialsRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct AddCredentialsReply { + // message fields + pub error: CryptohomeErrorCode, + pub error_info: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AddCredentialsReply { + fn default() -> &'a AddCredentialsReply { + ::default_instance() + } +} + +impl AddCredentialsReply { + pub fn new() -> AddCredentialsReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // .user_data_auth.CryptohomeErrorInfo error_info = 2; + + + pub fn get_error_info(&self) -> &CryptohomeErrorInfo { + self.error_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_error_info(&mut self) { + self.error_info.clear(); + } + + pub fn has_error_info(&self) -> bool { + self.error_info.is_some() + } + + // Param is passed by value, moved + pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { + self.error_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { + if self.error_info.is_none() { + self.error_info.set_default(); + } + self.error_info.as_mut().unwrap() + } + + // Take field + pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { + self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) + } +} + +impl ::protobuf::Message for AddCredentialsReply { + fn is_initialized(&self) -> bool { + for v in &self.error_info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if let Some(ref v) = self.error_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if let Some(ref v) = self.error_info.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> AddCredentialsReply { + AddCredentialsReply::new() + } + + fn default_instance() -> &'static AddCredentialsReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(AddCredentialsReply::new) + } +} + +impl ::protobuf::Clear for AddCredentialsReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.error_info.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for AddCredentialsReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct AuthenticateAuthSessionRequest { + // message fields + pub auth_session_id: ::std::vec::Vec, + pub authorization: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AuthenticateAuthSessionRequest { + fn default() -> &'a AuthenticateAuthSessionRequest { + ::default_instance() + } +} + +impl AuthenticateAuthSessionRequest { + pub fn new() -> AuthenticateAuthSessionRequest { + ::std::default::Default::default() + } + + // bytes auth_session_id = 1; + + + pub fn get_auth_session_id(&self) -> &[u8] { + &self.auth_session_id + } + pub fn clear_auth_session_id(&mut self) { + self.auth_session_id.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec) { + self.auth_session_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.auth_session_id + } + + // Take field + pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) + } + + // .cryptohome.AuthorizationRequest authorization = 2; + + + pub fn get_authorization(&self) -> &super::rpc::AuthorizationRequest { + self.authorization.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_authorization(&mut self) { + self.authorization.clear(); + } + + pub fn has_authorization(&self) -> bool { + self.authorization.is_some() + } + + // Param is passed by value, moved + pub fn set_authorization(&mut self, v: super::rpc::AuthorizationRequest) { + self.authorization = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_authorization(&mut self) -> &mut super::rpc::AuthorizationRequest { + if self.authorization.is_none() { + self.authorization.set_default(); + } + self.authorization.as_mut().unwrap() + } + + // Take field + pub fn take_authorization(&mut self) -> super::rpc::AuthorizationRequest { + self.authorization.take().unwrap_or_else(|| super::rpc::AuthorizationRequest::new()) + } +} + +impl ::protobuf::Message for AuthenticateAuthSessionRequest { + fn is_initialized(&self) -> bool { + for v in &self.authorization { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.authorization)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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(ref v) = self.authorization.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.auth_session_id.is_empty() { + os.write_bytes(1, &self.auth_session_id)?; + } + if let Some(ref v) = self.authorization.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> AuthenticateAuthSessionRequest { + AuthenticateAuthSessionRequest::new() + } + + fn default_instance() -> &'static AuthenticateAuthSessionRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(AuthenticateAuthSessionRequest::new) + } +} + +impl ::protobuf::Clear for AuthenticateAuthSessionRequest { + fn clear(&mut self) { + self.auth_session_id.clear(); + self.authorization.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for AuthenticateAuthSessionRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct AuthenticateAuthSessionReply { + // message fields + pub error: CryptohomeErrorCode, + pub authenticated: bool, + pub error_info: ::protobuf::SingularPtrField, + // message oneof groups + pub _seconds_left: ::std::option::Option, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AuthenticateAuthSessionReply { + fn default() -> &'a AuthenticateAuthSessionReply { + ::default_instance() + } +} + +#[derive(Clone,PartialEq,Debug)] +pub enum AuthenticateAuthSessionReply_oneof__seconds_left { + seconds_left(u32), +} + +impl AuthenticateAuthSessionReply { + pub fn new() -> AuthenticateAuthSessionReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // bool authenticated = 2; + + + pub fn get_authenticated(&self) -> bool { + self.authenticated + } + pub fn clear_authenticated(&mut self) { + self.authenticated = false; + } + + // Param is passed by value, moved + pub fn set_authenticated(&mut self, v: bool) { + self.authenticated = v; + } + + // .user_data_auth.CryptohomeErrorInfo error_info = 3; + + + pub fn get_error_info(&self) -> &CryptohomeErrorInfo { + self.error_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_error_info(&mut self) { + self.error_info.clear(); + } + + pub fn has_error_info(&self) -> bool { + self.error_info.is_some() + } + + // Param is passed by value, moved + pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { + self.error_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { + if self.error_info.is_none() { + self.error_info.set_default(); + } + self.error_info.as_mut().unwrap() + } + + // Take field + pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { + self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) + } + + // uint32 seconds_left = 4; + + + pub fn get_seconds_left(&self) -> u32 { + match self._seconds_left { + ::std::option::Option::Some(AuthenticateAuthSessionReply_oneof__seconds_left::seconds_left(v)) => v, + _ => 0, + } + } + pub fn clear_seconds_left(&mut self) { + self._seconds_left = ::std::option::Option::None; + } + + pub fn has_seconds_left(&self) -> bool { + match self._seconds_left { + ::std::option::Option::Some(AuthenticateAuthSessionReply_oneof__seconds_left::seconds_left(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_seconds_left(&mut self, v: u32) { + self._seconds_left = ::std::option::Option::Some(AuthenticateAuthSessionReply_oneof__seconds_left::seconds_left(v)) + } +} + +impl ::protobuf::Message for AuthenticateAuthSessionReply { + fn is_initialized(&self) -> bool { + for v in &self.error_info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.authenticated = tmp; + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; + }, + 4 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self._seconds_left = ::std::option::Option::Some(AuthenticateAuthSessionReply_oneof__seconds_left::seconds_left(is.read_uint32()?)); + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if self.authenticated != false { + my_size += 2; + } + if let Some(ref v) = self.error_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let ::std::option::Option::Some(ref v) = self._seconds_left { + match v { + &AuthenticateAuthSessionReply_oneof__seconds_left::seconds_left(v) => { + my_size += ::protobuf::rt::value_size(4, v, ::protobuf::wire_format::WireTypeVarint); + }, + }; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if self.authenticated != false { + os.write_bool(2, self.authenticated)?; + } + if let Some(ref v) = self.error_info.as_ref() { + os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if let ::std::option::Option::Some(ref v) = self._seconds_left { + match v { + &AuthenticateAuthSessionReply_oneof__seconds_left::seconds_left(v) => { + os.write_uint32(4, v)?; + }, + }; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> AuthenticateAuthSessionReply { + AuthenticateAuthSessionReply::new() + } + + fn default_instance() -> &'static AuthenticateAuthSessionReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(AuthenticateAuthSessionReply::new) + } +} + +impl ::protobuf::Clear for AuthenticateAuthSessionReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.authenticated = false; + self.error_info.clear(); + self._seconds_left = ::std::option::Option::None; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for AuthenticateAuthSessionReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct InvalidateAuthSessionRequest { + // message fields + pub auth_session_id: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a InvalidateAuthSessionRequest { + fn default() -> &'a InvalidateAuthSessionRequest { + ::default_instance() + } +} + +impl InvalidateAuthSessionRequest { + pub fn new() -> InvalidateAuthSessionRequest { + ::std::default::Default::default() + } + + // bytes auth_session_id = 1; + + + pub fn get_auth_session_id(&self) -> &[u8] { + &self.auth_session_id + } + pub fn clear_auth_session_id(&mut self) { + self.auth_session_id.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec) { + self.auth_session_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.auth_session_id + } + + // Take field + pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for InvalidateAuthSessionRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.auth_session_id.is_empty() { + os.write_bytes(1, &self.auth_session_id)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> InvalidateAuthSessionRequest { + InvalidateAuthSessionRequest::new() + } + + fn default_instance() -> &'static InvalidateAuthSessionRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(InvalidateAuthSessionRequest::new) + } +} + +impl ::protobuf::Clear for InvalidateAuthSessionRequest { + fn clear(&mut self) { + self.auth_session_id.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for InvalidateAuthSessionRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct InvalidateAuthSessionReply { + // message fields + pub error: CryptohomeErrorCode, + pub error_info: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a InvalidateAuthSessionReply { + fn default() -> &'a InvalidateAuthSessionReply { + ::default_instance() + } +} + +impl InvalidateAuthSessionReply { + pub fn new() -> InvalidateAuthSessionReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // .user_data_auth.CryptohomeErrorInfo error_info = 2; + + + pub fn get_error_info(&self) -> &CryptohomeErrorInfo { + self.error_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_error_info(&mut self) { + self.error_info.clear(); + } + + pub fn has_error_info(&self) -> bool { + self.error_info.is_some() + } + + // Param is passed by value, moved + pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { + self.error_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { + if self.error_info.is_none() { + self.error_info.set_default(); + } + self.error_info.as_mut().unwrap() + } + + // Take field + pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { + self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) + } +} + +impl ::protobuf::Message for InvalidateAuthSessionReply { + fn is_initialized(&self) -> bool { + for v in &self.error_info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if let Some(ref v) = self.error_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if let Some(ref v) = self.error_info.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> InvalidateAuthSessionReply { + InvalidateAuthSessionReply::new() + } + + fn default_instance() -> &'static InvalidateAuthSessionReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(InvalidateAuthSessionReply::new) + } +} + +impl ::protobuf::Clear for InvalidateAuthSessionReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.error_info.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for InvalidateAuthSessionReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ExtendAuthSessionRequest { + // message fields + pub auth_session_id: ::std::vec::Vec, + pub extension_duration: u32, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ExtendAuthSessionRequest { + fn default() -> &'a ExtendAuthSessionRequest { + ::default_instance() + } +} + +impl ExtendAuthSessionRequest { + pub fn new() -> ExtendAuthSessionRequest { + ::std::default::Default::default() + } + + // bytes auth_session_id = 1; + + + pub fn get_auth_session_id(&self) -> &[u8] { + &self.auth_session_id + } + pub fn clear_auth_session_id(&mut self) { + self.auth_session_id.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec) { + self.auth_session_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.auth_session_id + } + + // Take field + pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) + } + + // uint32 extension_duration = 2; + + + pub fn get_extension_duration(&self) -> u32 { + self.extension_duration + } + pub fn clear_extension_duration(&mut self) { + self.extension_duration = 0; + } + + // Param is passed by value, moved + pub fn set_extension_duration(&mut self, v: u32) { + self.extension_duration = v; + } +} + +impl ::protobuf::Message for ExtendAuthSessionRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_uint32()?; + self.extension_duration = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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::value_size(2, self.extension_duration, ::protobuf::wire_format::WireTypeVarint); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + 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.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> ExtendAuthSessionRequest { + ExtendAuthSessionRequest::new() + } + + fn default_instance() -> &'static ExtendAuthSessionRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ExtendAuthSessionRequest::new) + } +} + +impl ::protobuf::Clear for ExtendAuthSessionRequest { + fn clear(&mut self) { + self.auth_session_id.clear(); + self.extension_duration = 0; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for ExtendAuthSessionRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ExtendAuthSessionReply { + // message fields + pub error: CryptohomeErrorCode, + pub error_info: ::protobuf::SingularPtrField, + // message oneof groups + pub _seconds_left: ::std::option::Option, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ExtendAuthSessionReply { + fn default() -> &'a ExtendAuthSessionReply { + ::default_instance() + } +} + +#[derive(Clone,PartialEq,Debug)] +pub enum ExtendAuthSessionReply_oneof__seconds_left { + seconds_left(u32), +} + +impl ExtendAuthSessionReply { + pub fn new() -> ExtendAuthSessionReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // .user_data_auth.CryptohomeErrorInfo error_info = 2; + + + pub fn get_error_info(&self) -> &CryptohomeErrorInfo { + self.error_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_error_info(&mut self) { + self.error_info.clear(); + } + + pub fn has_error_info(&self) -> bool { + self.error_info.is_some() + } + + // Param is passed by value, moved + pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { + self.error_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { + if self.error_info.is_none() { + self.error_info.set_default(); + } + self.error_info.as_mut().unwrap() + } + + // Take field + pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { + self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) + } + + // uint32 seconds_left = 3; + + + pub fn get_seconds_left(&self) -> u32 { + match self._seconds_left { + ::std::option::Option::Some(ExtendAuthSessionReply_oneof__seconds_left::seconds_left(v)) => v, + _ => 0, + } + } + pub fn clear_seconds_left(&mut self) { + self._seconds_left = ::std::option::Option::None; + } + + pub fn has_seconds_left(&self) -> bool { + match self._seconds_left { + ::std::option::Option::Some(ExtendAuthSessionReply_oneof__seconds_left::seconds_left(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_seconds_left(&mut self, v: u32) { + self._seconds_left = ::std::option::Option::Some(ExtendAuthSessionReply_oneof__seconds_left::seconds_left(v)) + } +} + +impl ::protobuf::Message for ExtendAuthSessionReply { + fn is_initialized(&self) -> bool { + for v in &self.error_info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self._seconds_left = ::std::option::Option::Some(ExtendAuthSessionReply_oneof__seconds_left::seconds_left(is.read_uint32()?)); + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if let Some(ref v) = self.error_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let ::std::option::Option::Some(ref v) = self._seconds_left { + match v { + &ExtendAuthSessionReply_oneof__seconds_left::seconds_left(v) => { + my_size += ::protobuf::rt::value_size(3, v, ::protobuf::wire_format::WireTypeVarint); + }, + }; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if let Some(ref v) = self.error_info.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if let ::std::option::Option::Some(ref v) = self._seconds_left { + match v { + &ExtendAuthSessionReply_oneof__seconds_left::seconds_left(v) => { + os.write_uint32(3, v)?; + }, + }; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> ExtendAuthSessionReply { + ExtendAuthSessionReply::new() + } + + fn default_instance() -> &'static ExtendAuthSessionReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ExtendAuthSessionReply::new) + } +} + +impl ::protobuf::Clear for ExtendAuthSessionReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.error_info.clear(); + self._seconds_left = ::std::option::Option::None; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for ExtendAuthSessionReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct UpdateCredentialRequest { + // message fields + pub auth_session_id: ::std::vec::Vec, + pub old_credential_label: ::std::string::String, + pub authorization: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a UpdateCredentialRequest { + fn default() -> &'a UpdateCredentialRequest { + ::default_instance() + } +} + +impl UpdateCredentialRequest { + pub fn new() -> UpdateCredentialRequest { + ::std::default::Default::default() + } + + // bytes auth_session_id = 1; + + + pub fn get_auth_session_id(&self) -> &[u8] { + &self.auth_session_id + } + pub fn clear_auth_session_id(&mut self) { + self.auth_session_id.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec) { + self.auth_session_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.auth_session_id + } + + // Take field + pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) + } + + // string old_credential_label = 2; + + + pub fn get_old_credential_label(&self) -> &str { + &self.old_credential_label + } + pub fn clear_old_credential_label(&mut self) { + self.old_credential_label.clear(); + } + + // Param is passed by value, moved + pub fn set_old_credential_label(&mut self, v: ::std::string::String) { + self.old_credential_label = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_old_credential_label(&mut self) -> &mut ::std::string::String { + &mut self.old_credential_label + } + + // Take field + pub fn take_old_credential_label(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.old_credential_label, ::std::string::String::new()) + } + + // .cryptohome.AuthorizationRequest authorization = 3; + + + pub fn get_authorization(&self) -> &super::rpc::AuthorizationRequest { + self.authorization.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_authorization(&mut self) { + self.authorization.clear(); + } + + pub fn has_authorization(&self) -> bool { + self.authorization.is_some() + } + + // Param is passed by value, moved + pub fn set_authorization(&mut self, v: super::rpc::AuthorizationRequest) { + self.authorization = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_authorization(&mut self) -> &mut super::rpc::AuthorizationRequest { + if self.authorization.is_none() { + self.authorization.set_default(); + } + self.authorization.as_mut().unwrap() + } + + // Take field + pub fn take_authorization(&mut self) -> super::rpc::AuthorizationRequest { + self.authorization.take().unwrap_or_else(|| super::rpc::AuthorizationRequest::new()) + } +} + +impl ::protobuf::Message for UpdateCredentialRequest { + fn is_initialized(&self) -> bool { + for v in &self.authorization { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.old_credential_label)?; + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.authorization)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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.old_credential_label.is_empty() { + my_size += ::protobuf::rt::string_size(2, &self.old_credential_label); + } + if let Some(ref v) = self.authorization.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.auth_session_id.is_empty() { + os.write_bytes(1, &self.auth_session_id)?; + } + if !self.old_credential_label.is_empty() { + os.write_string(2, &self.old_credential_label)?; + } + if let Some(ref v) = self.authorization.as_ref() { + os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> UpdateCredentialRequest { + UpdateCredentialRequest::new() + } + + fn default_instance() -> &'static UpdateCredentialRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(UpdateCredentialRequest::new) + } +} + +impl ::protobuf::Clear for UpdateCredentialRequest { + fn clear(&mut self) { + self.auth_session_id.clear(); + self.old_credential_label.clear(); + self.authorization.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for UpdateCredentialRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct UpdateCredentialReply { + // message fields + pub error: CryptohomeErrorCode, + pub error_info: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a UpdateCredentialReply { + fn default() -> &'a UpdateCredentialReply { + ::default_instance() + } +} + +impl UpdateCredentialReply { + pub fn new() -> UpdateCredentialReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // .user_data_auth.CryptohomeErrorInfo error_info = 2; + + + pub fn get_error_info(&self) -> &CryptohomeErrorInfo { + self.error_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_error_info(&mut self) { + self.error_info.clear(); + } + + pub fn has_error_info(&self) -> bool { + self.error_info.is_some() + } + + // Param is passed by value, moved + pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { + self.error_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { + if self.error_info.is_none() { + self.error_info.set_default(); + } + self.error_info.as_mut().unwrap() + } + + // Take field + pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { + self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) + } +} + +impl ::protobuf::Message for UpdateCredentialReply { + fn is_initialized(&self) -> bool { + for v in &self.error_info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if let Some(ref v) = self.error_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if let Some(ref v) = self.error_info.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> UpdateCredentialReply { + UpdateCredentialReply::new() + } + + fn default_instance() -> &'static UpdateCredentialReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(UpdateCredentialReply::new) + } +} + +impl ::protobuf::Clear for UpdateCredentialReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.error_info.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for UpdateCredentialReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct CreatePersistentUserRequest { + // message fields + pub auth_session_id: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CreatePersistentUserRequest { + fn default() -> &'a CreatePersistentUserRequest { + ::default_instance() + } +} + +impl CreatePersistentUserRequest { + pub fn new() -> CreatePersistentUserRequest { + ::std::default::Default::default() + } + + // bytes auth_session_id = 1; + + + pub fn get_auth_session_id(&self) -> &[u8] { + &self.auth_session_id + } + pub fn clear_auth_session_id(&mut self) { + self.auth_session_id.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec) { + self.auth_session_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.auth_session_id + } + + // Take field + pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for CreatePersistentUserRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.auth_session_id.is_empty() { + os.write_bytes(1, &self.auth_session_id)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> CreatePersistentUserRequest { + CreatePersistentUserRequest::new() + } + + fn default_instance() -> &'static CreatePersistentUserRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(CreatePersistentUserRequest::new) + } +} + +impl ::protobuf::Clear for CreatePersistentUserRequest { + fn clear(&mut self) { + self.auth_session_id.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for CreatePersistentUserRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct CreatePersistentUserReply { + // message fields + pub error: CryptohomeErrorCode, + pub sanitized_username: ::std::string::String, + pub error_info: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CreatePersistentUserReply { + fn default() -> &'a CreatePersistentUserReply { + ::default_instance() + } +} + +impl CreatePersistentUserReply { + pub fn new() -> CreatePersistentUserReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // string sanitized_username = 2; + + + pub fn get_sanitized_username(&self) -> &str { + &self.sanitized_username + } + pub fn clear_sanitized_username(&mut self) { + self.sanitized_username.clear(); + } + + // Param is passed by value, moved + pub fn set_sanitized_username(&mut self, v: ::std::string::String) { + self.sanitized_username = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_sanitized_username(&mut self) -> &mut ::std::string::String { + &mut self.sanitized_username + } + + // Take field + pub fn take_sanitized_username(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.sanitized_username, ::std::string::String::new()) + } + + // .user_data_auth.CryptohomeErrorInfo error_info = 3; + + + pub fn get_error_info(&self) -> &CryptohomeErrorInfo { + self.error_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_error_info(&mut self) { + self.error_info.clear(); + } + + pub fn has_error_info(&self) -> bool { + self.error_info.is_some() + } + + // Param is passed by value, moved + pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { + self.error_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { + if self.error_info.is_none() { + self.error_info.set_default(); + } + self.error_info.as_mut().unwrap() + } + + // Take field + pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { + self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) + } +} + +impl ::protobuf::Message for CreatePersistentUserReply { + fn is_initialized(&self) -> bool { + for v in &self.error_info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sanitized_username)?; + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if !self.sanitized_username.is_empty() { + my_size += ::protobuf::rt::string_size(2, &self.sanitized_username); + } + if let Some(ref v) = self.error_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if !self.sanitized_username.is_empty() { + os.write_string(2, &self.sanitized_username)?; + } + if let Some(ref v) = self.error_info.as_ref() { + os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> CreatePersistentUserReply { + CreatePersistentUserReply::new() + } + + fn default_instance() -> &'static CreatePersistentUserReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(CreatePersistentUserReply::new) + } +} + +impl ::protobuf::Clear for CreatePersistentUserReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.sanitized_username.clear(); + self.error_info.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for CreatePersistentUserReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct PrepareGuestVaultRequest { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> PrepareGuestVaultRequest { + PrepareGuestVaultRequest::new() + } + + fn default_instance() -> &'static PrepareGuestVaultRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PrepareGuestVaultRequest::new) + } +} + +impl ::protobuf::Clear for PrepareGuestVaultRequest { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for PrepareGuestVaultRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct PrepareGuestVaultReply { + // message fields + pub error: CryptohomeErrorCode, + pub sanitized_username: ::std::string::String, + pub error_info: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PrepareGuestVaultReply { + fn default() -> &'a PrepareGuestVaultReply { + ::default_instance() + } +} + +impl PrepareGuestVaultReply { + pub fn new() -> PrepareGuestVaultReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // string sanitized_username = 2; + + + pub fn get_sanitized_username(&self) -> &str { + &self.sanitized_username + } + pub fn clear_sanitized_username(&mut self) { + self.sanitized_username.clear(); + } + + // Param is passed by value, moved + pub fn set_sanitized_username(&mut self, v: ::std::string::String) { + self.sanitized_username = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_sanitized_username(&mut self) -> &mut ::std::string::String { + &mut self.sanitized_username + } + + // Take field + pub fn take_sanitized_username(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.sanitized_username, ::std::string::String::new()) + } + + // .user_data_auth.CryptohomeErrorInfo error_info = 3; + + + pub fn get_error_info(&self) -> &CryptohomeErrorInfo { + self.error_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_error_info(&mut self) { + self.error_info.clear(); + } + + pub fn has_error_info(&self) -> bool { + self.error_info.is_some() + } + + // Param is passed by value, moved + pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { + self.error_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { + if self.error_info.is_none() { + self.error_info.set_default(); + } + self.error_info.as_mut().unwrap() + } + + // Take field + pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { + self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) + } +} + +impl ::protobuf::Message for PrepareGuestVaultReply { + fn is_initialized(&self) -> bool { + for v in &self.error_info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sanitized_username)?; + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if !self.sanitized_username.is_empty() { + my_size += ::protobuf::rt::string_size(2, &self.sanitized_username); + } + if let Some(ref v) = self.error_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if !self.sanitized_username.is_empty() { + os.write_string(2, &self.sanitized_username)?; + } + if let Some(ref v) = self.error_info.as_ref() { + os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> PrepareGuestVaultReply { + PrepareGuestVaultReply::new() + } + + fn default_instance() -> &'static PrepareGuestVaultReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PrepareGuestVaultReply::new) + } +} + +impl ::protobuf::Clear for PrepareGuestVaultReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.sanitized_username.clear(); + self.error_info.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for PrepareGuestVaultReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct PrepareEphemeralVaultRequest { + // message fields + pub auth_session_id: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PrepareEphemeralVaultRequest { + fn default() -> &'a PrepareEphemeralVaultRequest { + ::default_instance() + } +} + +impl PrepareEphemeralVaultRequest { + pub fn new() -> PrepareEphemeralVaultRequest { + ::std::default::Default::default() + } + + // bytes auth_session_id = 1; + + + pub fn get_auth_session_id(&self) -> &[u8] { + &self.auth_session_id + } + pub fn clear_auth_session_id(&mut self) { + self.auth_session_id.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec) { + self.auth_session_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.auth_session_id + } + + // Take field + pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for PrepareEphemeralVaultRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.auth_session_id.is_empty() { + os.write_bytes(1, &self.auth_session_id)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> PrepareEphemeralVaultRequest { + PrepareEphemeralVaultRequest::new() + } + + fn default_instance() -> &'static PrepareEphemeralVaultRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PrepareEphemeralVaultRequest::new) + } +} + +impl ::protobuf::Clear for PrepareEphemeralVaultRequest { + fn clear(&mut self) { + self.auth_session_id.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for PrepareEphemeralVaultRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct PrepareEphemeralVaultReply { + // message fields + pub error: CryptohomeErrorCode, + pub sanitized_username: ::std::string::String, + pub error_info: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PrepareEphemeralVaultReply { + fn default() -> &'a PrepareEphemeralVaultReply { + ::default_instance() + } +} + +impl PrepareEphemeralVaultReply { + pub fn new() -> PrepareEphemeralVaultReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // string sanitized_username = 2; + + + pub fn get_sanitized_username(&self) -> &str { + &self.sanitized_username + } + pub fn clear_sanitized_username(&mut self) { + self.sanitized_username.clear(); + } + + // Param is passed by value, moved + pub fn set_sanitized_username(&mut self, v: ::std::string::String) { + self.sanitized_username = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_sanitized_username(&mut self) -> &mut ::std::string::String { + &mut self.sanitized_username + } + + // Take field + pub fn take_sanitized_username(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.sanitized_username, ::std::string::String::new()) + } + + // .user_data_auth.CryptohomeErrorInfo error_info = 3; + + + pub fn get_error_info(&self) -> &CryptohomeErrorInfo { + self.error_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_error_info(&mut self) { + self.error_info.clear(); + } + + pub fn has_error_info(&self) -> bool { + self.error_info.is_some() + } + + // Param is passed by value, moved + pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { + self.error_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { + if self.error_info.is_none() { + self.error_info.set_default(); + } + self.error_info.as_mut().unwrap() + } + + // Take field + pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { + self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) + } +} + +impl ::protobuf::Message for PrepareEphemeralVaultReply { + fn is_initialized(&self) -> bool { + for v in &self.error_info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sanitized_username)?; + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if !self.sanitized_username.is_empty() { + my_size += ::protobuf::rt::string_size(2, &self.sanitized_username); + } + if let Some(ref v) = self.error_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if !self.sanitized_username.is_empty() { + os.write_string(2, &self.sanitized_username)?; + } + if let Some(ref v) = self.error_info.as_ref() { + os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> PrepareEphemeralVaultReply { + PrepareEphemeralVaultReply::new() + } + + fn default_instance() -> &'static PrepareEphemeralVaultReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PrepareEphemeralVaultReply::new) + } +} + +impl ::protobuf::Clear for PrepareEphemeralVaultReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.sanitized_username.clear(); + self.error_info.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for PrepareEphemeralVaultReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetAuthSessionStatusRequest { + // message fields + pub auth_session_id: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetAuthSessionStatusRequest { + fn default() -> &'a GetAuthSessionStatusRequest { + ::default_instance() + } +} + +impl GetAuthSessionStatusRequest { + pub fn new() -> GetAuthSessionStatusRequest { + ::std::default::Default::default() + } + + // bytes auth_session_id = 1; + + + pub fn get_auth_session_id(&self) -> &[u8] { + &self.auth_session_id + } + pub fn clear_auth_session_id(&mut self) { + self.auth_session_id.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec) { + self.auth_session_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.auth_session_id + } + + // Take field + pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for GetAuthSessionStatusRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.auth_session_id.is_empty() { + os.write_bytes(1, &self.auth_session_id)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetAuthSessionStatusRequest { + GetAuthSessionStatusRequest::new() + } + + fn default_instance() -> &'static GetAuthSessionStatusRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetAuthSessionStatusRequest::new) + } +} + +impl ::protobuf::Clear for GetAuthSessionStatusRequest { + fn clear(&mut self) { + self.auth_session_id.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetAuthSessionStatusRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetAuthSessionStatusReply { + // message fields + pub error: CryptohomeErrorCode, + pub status: AuthSessionStatus, + pub time_left: u32, + pub authorized_for: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetAuthSessionStatusReply { + fn default() -> &'a GetAuthSessionStatusReply { + ::default_instance() + } +} + +impl GetAuthSessionStatusReply { + pub fn new() -> GetAuthSessionStatusReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // .user_data_auth.AuthSessionStatus status = 2; + + + pub fn get_status(&self) -> AuthSessionStatus { + self.status + } + pub fn clear_status(&mut self) { + self.status = AuthSessionStatus::AUTH_SESSION_STATUS_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_status(&mut self, v: AuthSessionStatus) { + self.status = v; + } + + // uint32 time_left = 3; + + + pub fn get_time_left(&self) -> u32 { + self.time_left + } + pub fn clear_time_left(&mut self) { + self.time_left = 0; + } + + // Param is passed by value, moved + pub fn set_time_left(&mut self, v: u32) { + self.time_left = v; + } + + // repeated .user_data_auth.AuthIntent authorized_for = 4; + + + pub fn get_authorized_for(&self) -> &[super::auth_factor::AuthIntent] { + &self.authorized_for + } + pub fn clear_authorized_for(&mut self) { + self.authorized_for.clear(); + } + + // Param is passed by value, moved + pub fn set_authorized_for(&mut self, v: ::std::vec::Vec) { + self.authorized_for = v; + } + + // Mutable pointer to the field. + pub fn mut_authorized_for(&mut self) -> &mut ::std::vec::Vec { + &mut self.authorized_for + } + + // Take field + pub fn take_authorized_for(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.authorized_for, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for GetAuthSessionStatusReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.status, 2, &mut self.unknown_fields)? + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_uint32()?; + self.time_left = tmp; + }, + 4 => { + ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.authorized_for, 4, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if self.status != AuthSessionStatus::AUTH_SESSION_STATUS_NOT_SET { + my_size += ::protobuf::rt::enum_size(2, self.status); + } + if self.time_left != 0 { + my_size += ::protobuf::rt::value_size(3, self.time_left, ::protobuf::wire_format::WireTypeVarint); + } + for value in &self.authorized_for { + my_size += ::protobuf::rt::enum_size(4, *value); + }; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if self.status != AuthSessionStatus::AUTH_SESSION_STATUS_NOT_SET { + os.write_enum(2, ::protobuf::ProtobufEnum::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::ProtobufEnum::value(v))?; + }; + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetAuthSessionStatusReply { + GetAuthSessionStatusReply::new() + } + + fn default_instance() -> &'static GetAuthSessionStatusReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetAuthSessionStatusReply::new) + } +} + +impl ::protobuf::Clear for GetAuthSessionStatusReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.status = AuthSessionStatus::AUTH_SESSION_STATUS_NOT_SET; + self.time_left = 0; + self.authorized_for.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetAuthSessionStatusReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct PreparePersistentVaultRequest { + // message fields + pub auth_session_id: ::std::vec::Vec, + pub block_ecryptfs: bool, + pub encryption_type: VaultEncryptionType, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PreparePersistentVaultRequest { + fn default() -> &'a PreparePersistentVaultRequest { + ::default_instance() + } +} + +impl PreparePersistentVaultRequest { + pub fn new() -> PreparePersistentVaultRequest { + ::std::default::Default::default() + } + + // bytes auth_session_id = 1; + + + pub fn get_auth_session_id(&self) -> &[u8] { + &self.auth_session_id + } + pub fn clear_auth_session_id(&mut self) { + self.auth_session_id.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec) { + self.auth_session_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.auth_session_id + } + + // Take field + pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) + } + + // bool block_ecryptfs = 2; + + + pub fn get_block_ecryptfs(&self) -> bool { + self.block_ecryptfs + } + pub fn clear_block_ecryptfs(&mut self) { + self.block_ecryptfs = false; + } + + // Param is passed by value, moved + pub fn set_block_ecryptfs(&mut self, v: bool) { + self.block_ecryptfs = v; + } + + // .user_data_auth.VaultEncryptionType encryption_type = 3; + + + pub fn get_encryption_type(&self) -> VaultEncryptionType { + self.encryption_type + } + pub fn clear_encryption_type(&mut self) { + self.encryption_type = VaultEncryptionType::CRYPTOHOME_VAULT_ENCRYPTION_ANY; + } + + // Param is passed by value, moved + pub fn set_encryption_type(&mut self, v: VaultEncryptionType) { + self.encryption_type = v; + } +} + +impl ::protobuf::Message for PreparePersistentVaultRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.block_ecryptfs = tmp; + }, + 3 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.encryption_type, 3, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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 += 2; + } + if self.encryption_type != VaultEncryptionType::CRYPTOHOME_VAULT_ENCRYPTION_ANY { + my_size += ::protobuf::rt::enum_size(3, self.encryption_type); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + 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 != VaultEncryptionType::CRYPTOHOME_VAULT_ENCRYPTION_ANY { + os.write_enum(3, ::protobuf::ProtobufEnum::value(&self.encryption_type))?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> PreparePersistentVaultRequest { + PreparePersistentVaultRequest::new() + } + + fn default_instance() -> &'static PreparePersistentVaultRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PreparePersistentVaultRequest::new) + } +} + +impl ::protobuf::Clear for PreparePersistentVaultRequest { + fn clear(&mut self) { + self.auth_session_id.clear(); + self.block_ecryptfs = false; + self.encryption_type = VaultEncryptionType::CRYPTOHOME_VAULT_ENCRYPTION_ANY; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for PreparePersistentVaultRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct PreparePersistentVaultReply { + // message fields + pub error: CryptohomeErrorCode, + pub sanitized_username: ::std::string::String, + pub error_info: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PreparePersistentVaultReply { + fn default() -> &'a PreparePersistentVaultReply { + ::default_instance() + } +} + +impl PreparePersistentVaultReply { + pub fn new() -> PreparePersistentVaultReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // string sanitized_username = 2; + + + pub fn get_sanitized_username(&self) -> &str { + &self.sanitized_username + } + pub fn clear_sanitized_username(&mut self) { + self.sanitized_username.clear(); + } + + // Param is passed by value, moved + pub fn set_sanitized_username(&mut self, v: ::std::string::String) { + self.sanitized_username = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_sanitized_username(&mut self) -> &mut ::std::string::String { + &mut self.sanitized_username + } + + // Take field + pub fn take_sanitized_username(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.sanitized_username, ::std::string::String::new()) + } + + // .user_data_auth.CryptohomeErrorInfo error_info = 3; + + + pub fn get_error_info(&self) -> &CryptohomeErrorInfo { + self.error_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_error_info(&mut self) { + self.error_info.clear(); + } + + pub fn has_error_info(&self) -> bool { + self.error_info.is_some() + } + + // Param is passed by value, moved + pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { + self.error_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { + if self.error_info.is_none() { + self.error_info.set_default(); + } + self.error_info.as_mut().unwrap() + } + + // Take field + pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { + self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) + } +} + +impl ::protobuf::Message for PreparePersistentVaultReply { + fn is_initialized(&self) -> bool { + for v in &self.error_info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sanitized_username)?; + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if !self.sanitized_username.is_empty() { + my_size += ::protobuf::rt::string_size(2, &self.sanitized_username); + } + if let Some(ref v) = self.error_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if !self.sanitized_username.is_empty() { + os.write_string(2, &self.sanitized_username)?; + } + if let Some(ref v) = self.error_info.as_ref() { + os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> PreparePersistentVaultReply { + PreparePersistentVaultReply::new() + } + + fn default_instance() -> &'static PreparePersistentVaultReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PreparePersistentVaultReply::new) + } +} + +impl ::protobuf::Clear for PreparePersistentVaultReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.sanitized_username.clear(); + self.error_info.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for PreparePersistentVaultReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct PrepareVaultForMigrationRequest { + // message fields + pub auth_session_id: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PrepareVaultForMigrationRequest { + fn default() -> &'a PrepareVaultForMigrationRequest { + ::default_instance() + } +} + +impl PrepareVaultForMigrationRequest { + pub fn new() -> PrepareVaultForMigrationRequest { + ::std::default::Default::default() + } + + // bytes auth_session_id = 1; + + + pub fn get_auth_session_id(&self) -> &[u8] { + &self.auth_session_id + } + pub fn clear_auth_session_id(&mut self) { + self.auth_session_id.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec) { + self.auth_session_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.auth_session_id + } + + // Take field + pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for PrepareVaultForMigrationRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.auth_session_id.is_empty() { + os.write_bytes(1, &self.auth_session_id)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> PrepareVaultForMigrationRequest { + PrepareVaultForMigrationRequest::new() + } + + fn default_instance() -> &'static PrepareVaultForMigrationRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PrepareVaultForMigrationRequest::new) + } +} + +impl ::protobuf::Clear for PrepareVaultForMigrationRequest { + fn clear(&mut self) { + self.auth_session_id.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for PrepareVaultForMigrationRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct PrepareVaultForMigrationReply { + // message fields + pub error: CryptohomeErrorCode, + pub sanitized_username: ::std::string::String, + pub error_info: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PrepareVaultForMigrationReply { + fn default() -> &'a PrepareVaultForMigrationReply { + ::default_instance() + } +} + +impl PrepareVaultForMigrationReply { + pub fn new() -> PrepareVaultForMigrationReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // string sanitized_username = 2; + + + pub fn get_sanitized_username(&self) -> &str { + &self.sanitized_username + } + pub fn clear_sanitized_username(&mut self) { + self.sanitized_username.clear(); + } + + // Param is passed by value, moved + pub fn set_sanitized_username(&mut self, v: ::std::string::String) { + self.sanitized_username = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_sanitized_username(&mut self) -> &mut ::std::string::String { + &mut self.sanitized_username + } + + // Take field + pub fn take_sanitized_username(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.sanitized_username, ::std::string::String::new()) + } + + // .user_data_auth.CryptohomeErrorInfo error_info = 3; + + + pub fn get_error_info(&self) -> &CryptohomeErrorInfo { + self.error_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_error_info(&mut self) { + self.error_info.clear(); + } + + pub fn has_error_info(&self) -> bool { + self.error_info.is_some() + } + + // Param is passed by value, moved + pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { + self.error_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { + if self.error_info.is_none() { + self.error_info.set_default(); + } + self.error_info.as_mut().unwrap() + } + + // Take field + pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { + self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) + } +} + +impl ::protobuf::Message for PrepareVaultForMigrationReply { + fn is_initialized(&self) -> bool { + for v in &self.error_info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sanitized_username)?; + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if !self.sanitized_username.is_empty() { + my_size += ::protobuf::rt::string_size(2, &self.sanitized_username); + } + if let Some(ref v) = self.error_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if !self.sanitized_username.is_empty() { + os.write_string(2, &self.sanitized_username)?; + } + if let Some(ref v) = self.error_info.as_ref() { + os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> PrepareVaultForMigrationReply { + PrepareVaultForMigrationReply::new() + } + + fn default_instance() -> &'static PrepareVaultForMigrationReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PrepareVaultForMigrationReply::new) + } +} + +impl ::protobuf::Clear for PrepareVaultForMigrationReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.sanitized_username.clear(); + self.error_info.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for PrepareVaultForMigrationReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetArcDiskFeaturesRequest { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetArcDiskFeaturesRequest { + GetArcDiskFeaturesRequest::new() + } + + fn default_instance() -> &'static GetArcDiskFeaturesRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetArcDiskFeaturesRequest::new) + } +} + +impl ::protobuf::Clear for GetArcDiskFeaturesRequest { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetArcDiskFeaturesRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetArcDiskFeaturesReply { + // message fields + pub quota_supported: bool, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetArcDiskFeaturesReply { + fn default() -> &'a GetArcDiskFeaturesReply { + ::default_instance() + } +} + +impl GetArcDiskFeaturesReply { + pub fn new() -> GetArcDiskFeaturesReply { + ::std::default::Default::default() + } + + // bool quota_supported = 1; + + + pub fn get_quota_supported(&self) -> bool { + self.quota_supported + } + pub fn clear_quota_supported(&mut self) { + self.quota_supported = false; + } + + // Param is passed by value, moved + pub fn set_quota_supported(&mut self, v: bool) { + self.quota_supported = v; + } +} + +impl ::protobuf::Message for GetArcDiskFeaturesReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.quota_supported = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.quota_supported != false { + my_size += 2; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.quota_supported != false { + os.write_bool(1, self.quota_supported)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetArcDiskFeaturesReply { + GetArcDiskFeaturesReply::new() + } + + fn default_instance() -> &'static GetArcDiskFeaturesReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetArcDiskFeaturesReply::new) + } +} + +impl ::protobuf::Clear for GetArcDiskFeaturesReply { + fn clear(&mut self) { + self.quota_supported = false; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetArcDiskFeaturesReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetCurrentSpaceForArcUidRequest { + // message fields + pub uid: u32, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetCurrentSpaceForArcUidRequest { + fn default() -> &'a GetCurrentSpaceForArcUidRequest { + ::default_instance() + } +} + +impl GetCurrentSpaceForArcUidRequest { + pub fn new() -> GetCurrentSpaceForArcUidRequest { + ::std::default::Default::default() + } + + // uint32 uid = 1; + + + pub fn get_uid(&self) -> u32 { + self.uid + } + pub fn clear_uid(&mut self) { + self.uid = 0; + } + + // Param is passed by value, moved + pub fn set_uid(&mut self, v: u32) { + self.uid = v; + } +} + +impl ::protobuf::Message for GetCurrentSpaceForArcUidRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_uint32()?; + self.uid = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.uid != 0 { + my_size += ::protobuf::rt::value_size(1, self.uid, ::protobuf::wire_format::WireTypeVarint); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.uid != 0 { + os.write_uint32(1, self.uid)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetCurrentSpaceForArcUidRequest { + GetCurrentSpaceForArcUidRequest::new() + } + + fn default_instance() -> &'static GetCurrentSpaceForArcUidRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetCurrentSpaceForArcUidRequest::new) + } +} + +impl ::protobuf::Clear for GetCurrentSpaceForArcUidRequest { + fn clear(&mut self) { + self.uid = 0; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetCurrentSpaceForArcUidRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetCurrentSpaceForArcUidReply { + // message fields + pub cur_space: i64, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetCurrentSpaceForArcUidReply { + fn default() -> &'a GetCurrentSpaceForArcUidReply { + ::default_instance() + } +} + +impl GetCurrentSpaceForArcUidReply { + pub fn new() -> GetCurrentSpaceForArcUidReply { + ::std::default::Default::default() + } + + // int64 cur_space = 1; + + + pub fn get_cur_space(&self) -> i64 { + self.cur_space + } + pub fn clear_cur_space(&mut self) { + self.cur_space = 0; + } + + // Param is passed by value, moved + pub fn set_cur_space(&mut self, v: i64) { + self.cur_space = v; + } +} + +impl ::protobuf::Message for GetCurrentSpaceForArcUidReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int64()?; + self.cur_space = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.cur_space != 0 { + my_size += ::protobuf::rt::value_size(1, self.cur_space, ::protobuf::wire_format::WireTypeVarint); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.cur_space != 0 { + os.write_int64(1, self.cur_space)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetCurrentSpaceForArcUidReply { + GetCurrentSpaceForArcUidReply::new() + } + + fn default_instance() -> &'static GetCurrentSpaceForArcUidReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetCurrentSpaceForArcUidReply::new) + } +} + +impl ::protobuf::Clear for GetCurrentSpaceForArcUidReply { + fn clear(&mut self) { + self.cur_space = 0; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetCurrentSpaceForArcUidReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetCurrentSpaceForArcGidRequest { + // message fields + pub gid: u32, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetCurrentSpaceForArcGidRequest { + fn default() -> &'a GetCurrentSpaceForArcGidRequest { + ::default_instance() + } +} + +impl GetCurrentSpaceForArcGidRequest { + pub fn new() -> GetCurrentSpaceForArcGidRequest { + ::std::default::Default::default() + } + + // uint32 gid = 1; + + + pub fn get_gid(&self) -> u32 { + self.gid + } + pub fn clear_gid(&mut self) { + self.gid = 0; + } + + // Param is passed by value, moved + pub fn set_gid(&mut self, v: u32) { + self.gid = v; + } +} + +impl ::protobuf::Message for GetCurrentSpaceForArcGidRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_uint32()?; + self.gid = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.gid != 0 { + my_size += ::protobuf::rt::value_size(1, self.gid, ::protobuf::wire_format::WireTypeVarint); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.gid != 0 { + os.write_uint32(1, self.gid)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetCurrentSpaceForArcGidRequest { + GetCurrentSpaceForArcGidRequest::new() + } + + fn default_instance() -> &'static GetCurrentSpaceForArcGidRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetCurrentSpaceForArcGidRequest::new) + } +} + +impl ::protobuf::Clear for GetCurrentSpaceForArcGidRequest { + fn clear(&mut self) { + self.gid = 0; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetCurrentSpaceForArcGidRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetCurrentSpaceForArcGidReply { + // message fields + pub cur_space: i64, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetCurrentSpaceForArcGidReply { + fn default() -> &'a GetCurrentSpaceForArcGidReply { + ::default_instance() + } +} + +impl GetCurrentSpaceForArcGidReply { + pub fn new() -> GetCurrentSpaceForArcGidReply { + ::std::default::Default::default() + } + + // int64 cur_space = 1; + + + pub fn get_cur_space(&self) -> i64 { + self.cur_space + } + pub fn clear_cur_space(&mut self) { + self.cur_space = 0; + } + + // Param is passed by value, moved + pub fn set_cur_space(&mut self, v: i64) { + self.cur_space = v; + } +} + +impl ::protobuf::Message for GetCurrentSpaceForArcGidReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int64()?; + self.cur_space = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.cur_space != 0 { + my_size += ::protobuf::rt::value_size(1, self.cur_space, ::protobuf::wire_format::WireTypeVarint); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.cur_space != 0 { + os.write_int64(1, self.cur_space)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetCurrentSpaceForArcGidReply { + GetCurrentSpaceForArcGidReply::new() + } + + fn default_instance() -> &'static GetCurrentSpaceForArcGidReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetCurrentSpaceForArcGidReply::new) + } +} + +impl ::protobuf::Clear for GetCurrentSpaceForArcGidReply { + fn clear(&mut self) { + self.cur_space = 0; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetCurrentSpaceForArcGidReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetCurrentSpaceForArcProjectIdRequest { + // message fields + pub project_id: u32, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetCurrentSpaceForArcProjectIdRequest { + fn default() -> &'a GetCurrentSpaceForArcProjectIdRequest { + ::default_instance() + } +} + +impl GetCurrentSpaceForArcProjectIdRequest { + pub fn new() -> GetCurrentSpaceForArcProjectIdRequest { + ::std::default::Default::default() + } + + // uint32 project_id = 1; + + + pub fn get_project_id(&self) -> u32 { + self.project_id + } + pub fn clear_project_id(&mut self) { + self.project_id = 0; + } + + // Param is passed by value, moved + pub fn set_project_id(&mut self, v: u32) { + self.project_id = v; + } +} + +impl ::protobuf::Message for GetCurrentSpaceForArcProjectIdRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_uint32()?; + self.project_id = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.project_id != 0 { + my_size += ::protobuf::rt::value_size(1, self.project_id, ::protobuf::wire_format::WireTypeVarint); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.project_id != 0 { + os.write_uint32(1, self.project_id)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetCurrentSpaceForArcProjectIdRequest { + GetCurrentSpaceForArcProjectIdRequest::new() + } + + fn default_instance() -> &'static GetCurrentSpaceForArcProjectIdRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetCurrentSpaceForArcProjectIdRequest::new) + } +} + +impl ::protobuf::Clear for GetCurrentSpaceForArcProjectIdRequest { + fn clear(&mut self) { + self.project_id = 0; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetCurrentSpaceForArcProjectIdRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetCurrentSpaceForArcProjectIdReply { + // message fields + pub cur_space: i64, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetCurrentSpaceForArcProjectIdReply { + fn default() -> &'a GetCurrentSpaceForArcProjectIdReply { + ::default_instance() + } +} + +impl GetCurrentSpaceForArcProjectIdReply { + pub fn new() -> GetCurrentSpaceForArcProjectIdReply { + ::std::default::Default::default() + } + + // int64 cur_space = 1; + + + pub fn get_cur_space(&self) -> i64 { + self.cur_space + } + pub fn clear_cur_space(&mut self) { + self.cur_space = 0; + } + + // Param is passed by value, moved + pub fn set_cur_space(&mut self, v: i64) { + self.cur_space = v; + } +} + +impl ::protobuf::Message for GetCurrentSpaceForArcProjectIdReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int64()?; + self.cur_space = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.cur_space != 0 { + my_size += ::protobuf::rt::value_size(1, self.cur_space, ::protobuf::wire_format::WireTypeVarint); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.cur_space != 0 { + os.write_int64(1, self.cur_space)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetCurrentSpaceForArcProjectIdReply { + GetCurrentSpaceForArcProjectIdReply::new() + } + + fn default_instance() -> &'static GetCurrentSpaceForArcProjectIdReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetCurrentSpaceForArcProjectIdReply::new) + } +} + +impl ::protobuf::Clear for GetCurrentSpaceForArcProjectIdReply { + fn clear(&mut self) { + self.cur_space = 0; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetCurrentSpaceForArcProjectIdReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct SetMediaRWDataFileProjectIdRequest { + // message fields + pub project_id: u32, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a SetMediaRWDataFileProjectIdRequest { + fn default() -> &'a SetMediaRWDataFileProjectIdRequest { + ::default_instance() + } +} + +impl SetMediaRWDataFileProjectIdRequest { + pub fn new() -> SetMediaRWDataFileProjectIdRequest { + ::std::default::Default::default() + } + + // uint32 project_id = 1; + + + pub fn get_project_id(&self) -> u32 { + self.project_id + } + pub fn clear_project_id(&mut self) { + self.project_id = 0; + } + + // Param is passed by value, moved + pub fn set_project_id(&mut self, v: u32) { + self.project_id = v; + } +} + +impl ::protobuf::Message for SetMediaRWDataFileProjectIdRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_uint32()?; + self.project_id = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.project_id != 0 { + my_size += ::protobuf::rt::value_size(1, self.project_id, ::protobuf::wire_format::WireTypeVarint); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.project_id != 0 { + os.write_uint32(1, self.project_id)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> SetMediaRWDataFileProjectIdRequest { + SetMediaRWDataFileProjectIdRequest::new() + } + + fn default_instance() -> &'static SetMediaRWDataFileProjectIdRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(SetMediaRWDataFileProjectIdRequest::new) + } +} + +impl ::protobuf::Clear for SetMediaRWDataFileProjectIdRequest { + fn clear(&mut self) { + self.project_id = 0; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for SetMediaRWDataFileProjectIdRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct SetMediaRWDataFileProjectIdReply { + // message fields + pub success: bool, + pub error: i32, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a SetMediaRWDataFileProjectIdReply { + fn default() -> &'a SetMediaRWDataFileProjectIdReply { + ::default_instance() + } +} + +impl SetMediaRWDataFileProjectIdReply { + pub fn new() -> SetMediaRWDataFileProjectIdReply { + ::std::default::Default::default() + } + + // bool success = 1; + + + pub fn get_success(&self) -> bool { + self.success + } + pub fn clear_success(&mut self) { + self.success = false; + } + + // Param is passed by value, moved + pub fn set_success(&mut self, v: bool) { + self.success = v; + } + + // int32 error = 2; + + + pub fn get_error(&self) -> i32 { + self.error + } + pub fn clear_error(&mut self) { + self.error = 0; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: i32) { + self.error = v; + } +} + +impl ::protobuf::Message for SetMediaRWDataFileProjectIdReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.success = tmp; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int32()?; + self.error = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.success != false { + my_size += 2; + } + if self.error != 0 { + my_size += ::protobuf::rt::value_size(2, self.error, ::protobuf::wire_format::WireTypeVarint); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + 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.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> SetMediaRWDataFileProjectIdReply { + SetMediaRWDataFileProjectIdReply::new() + } + + fn default_instance() -> &'static SetMediaRWDataFileProjectIdReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(SetMediaRWDataFileProjectIdReply::new) + } +} + +impl ::protobuf::Clear for SetMediaRWDataFileProjectIdReply { + fn clear(&mut self) { + self.success = false; + self.error = 0; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for SetMediaRWDataFileProjectIdReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct SetMediaRWDataFileProjectInheritanceFlagRequest { + // message fields + pub enable: bool, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a SetMediaRWDataFileProjectInheritanceFlagRequest { + fn default() -> &'a SetMediaRWDataFileProjectInheritanceFlagRequest { + ::default_instance() + } +} + +impl SetMediaRWDataFileProjectInheritanceFlagRequest { + pub fn new() -> SetMediaRWDataFileProjectInheritanceFlagRequest { + ::std::default::Default::default() + } + + // bool enable = 1; + + + pub fn get_enable(&self) -> bool { + self.enable + } + pub fn clear_enable(&mut self) { + self.enable = false; + } + + // Param is passed by value, moved + pub fn set_enable(&mut self, v: bool) { + self.enable = v; + } +} + +impl ::protobuf::Message for SetMediaRWDataFileProjectInheritanceFlagRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.enable = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.enable != false { + my_size += 2; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.enable != false { + os.write_bool(1, self.enable)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> SetMediaRWDataFileProjectInheritanceFlagRequest { + SetMediaRWDataFileProjectInheritanceFlagRequest::new() + } + + fn default_instance() -> &'static SetMediaRWDataFileProjectInheritanceFlagRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(SetMediaRWDataFileProjectInheritanceFlagRequest::new) + } +} + +impl ::protobuf::Clear for SetMediaRWDataFileProjectInheritanceFlagRequest { + fn clear(&mut self) { + self.enable = false; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for SetMediaRWDataFileProjectInheritanceFlagRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct SetMediaRWDataFileProjectInheritanceFlagReply { + // message fields + pub success: bool, + pub error: i32, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a SetMediaRWDataFileProjectInheritanceFlagReply { + fn default() -> &'a SetMediaRWDataFileProjectInheritanceFlagReply { + ::default_instance() + } +} + +impl SetMediaRWDataFileProjectInheritanceFlagReply { + pub fn new() -> SetMediaRWDataFileProjectInheritanceFlagReply { + ::std::default::Default::default() + } + + // bool success = 1; + + + pub fn get_success(&self) -> bool { + self.success + } + pub fn clear_success(&mut self) { + self.success = false; + } + + // Param is passed by value, moved + pub fn set_success(&mut self, v: bool) { + self.success = v; + } + + // int32 error = 2; + + + pub fn get_error(&self) -> i32 { + self.error + } + pub fn clear_error(&mut self) { + self.error = 0; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: i32) { + self.error = v; + } +} + +impl ::protobuf::Message for SetMediaRWDataFileProjectInheritanceFlagReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.success = tmp; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int32()?; + self.error = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.success != false { + my_size += 2; + } + if self.error != 0 { + my_size += ::protobuf::rt::value_size(2, self.error, ::protobuf::wire_format::WireTypeVarint); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + 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.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> SetMediaRWDataFileProjectInheritanceFlagReply { + SetMediaRWDataFileProjectInheritanceFlagReply::new() + } + + fn default_instance() -> &'static SetMediaRWDataFileProjectInheritanceFlagReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(SetMediaRWDataFileProjectInheritanceFlagReply::new) + } +} + +impl ::protobuf::Clear for SetMediaRWDataFileProjectInheritanceFlagReply { + fn clear(&mut self) { + self.success = false; + self.error = 0; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for SetMediaRWDataFileProjectInheritanceFlagReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct TpmTokenInfo { + // message fields + pub label: ::std::string::String, + pub user_pin: ::std::string::String, + pub slot: i32, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a TpmTokenInfo { + fn default() -> &'a TpmTokenInfo { + ::default_instance() + } +} + +impl TpmTokenInfo { + pub fn new() -> TpmTokenInfo { + ::std::default::Default::default() + } + + // string label = 1; + + + pub fn get_label(&self) -> &str { + &self.label + } + pub fn clear_label(&mut self) { + self.label.clear(); + } + + // Param is passed by value, moved + pub fn set_label(&mut self, v: ::std::string::String) { + self.label = 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 { + &mut self.label + } + + // Take field + pub fn take_label(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.label, ::std::string::String::new()) + } + + // string user_pin = 2; + + + pub fn get_user_pin(&self) -> &str { + &self.user_pin + } + pub fn clear_user_pin(&mut self) { + self.user_pin.clear(); + } + + // Param is passed by value, moved + pub fn set_user_pin(&mut self, v: ::std::string::String) { + self.user_pin = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_user_pin(&mut self) -> &mut ::std::string::String { + &mut self.user_pin + } + + // Take field + pub fn take_user_pin(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.user_pin, ::std::string::String::new()) + } + + // int32 slot = 3; + + + pub fn get_slot(&self) -> i32 { + self.slot + } + pub fn clear_slot(&mut self) { + self.slot = 0; + } + + // Param is passed by value, moved + pub fn set_slot(&mut self, v: i32) { + self.slot = v; + } +} + +impl ::protobuf::Message for TpmTokenInfo { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.label)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.user_pin)?; + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int32()?; + self.slot = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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::value_size(3, self.slot, ::protobuf::wire_format::WireTypeVarint); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + 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.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> TpmTokenInfo { + TpmTokenInfo::new() + } + + fn default_instance() -> &'static TpmTokenInfo { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(TpmTokenInfo::new) + } +} + +impl ::protobuf::Clear for TpmTokenInfo { + fn clear(&mut self) { + self.label.clear(); + self.user_pin.clear(); + self.slot = 0; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for TpmTokenInfo { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct Pkcs11IsTpmTokenReadyRequest { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> Pkcs11IsTpmTokenReadyRequest { + Pkcs11IsTpmTokenReadyRequest::new() + } + + fn default_instance() -> &'static Pkcs11IsTpmTokenReadyRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(Pkcs11IsTpmTokenReadyRequest::new) + } +} + +impl ::protobuf::Clear for Pkcs11IsTpmTokenReadyRequest { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for Pkcs11IsTpmTokenReadyRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct Pkcs11IsTpmTokenReadyReply { + // message fields + pub ready: bool, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Pkcs11IsTpmTokenReadyReply { + fn default() -> &'a Pkcs11IsTpmTokenReadyReply { + ::default_instance() + } +} + +impl Pkcs11IsTpmTokenReadyReply { + pub fn new() -> Pkcs11IsTpmTokenReadyReply { + ::std::default::Default::default() + } + + // bool ready = 1; + + + pub fn get_ready(&self) -> bool { + self.ready + } + pub fn clear_ready(&mut self) { + self.ready = false; + } + + // Param is passed by value, moved + pub fn set_ready(&mut self, v: bool) { + self.ready = v; + } +} + +impl ::protobuf::Message for Pkcs11IsTpmTokenReadyReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.ready = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.ready != false { + my_size += 2; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.ready != false { + os.write_bool(1, self.ready)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> Pkcs11IsTpmTokenReadyReply { + Pkcs11IsTpmTokenReadyReply::new() + } + + fn default_instance() -> &'static Pkcs11IsTpmTokenReadyReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(Pkcs11IsTpmTokenReadyReply::new) + } +} + +impl ::protobuf::Clear for Pkcs11IsTpmTokenReadyReply { + fn clear(&mut self) { + self.ready = false; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for Pkcs11IsTpmTokenReadyReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct Pkcs11GetTpmTokenInfoRequest { + // message fields + pub username: ::std::string::String, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Pkcs11GetTpmTokenInfoRequest { + fn default() -> &'a Pkcs11GetTpmTokenInfoRequest { + ::default_instance() + } +} + +impl Pkcs11GetTpmTokenInfoRequest { + pub fn new() -> Pkcs11GetTpmTokenInfoRequest { + ::std::default::Default::default() + } + + // string username = 1; + + + pub fn get_username(&self) -> &str { + &self.username + } + pub fn clear_username(&mut self) { + self.username.clear(); + } + + // Param is passed by value, moved + pub fn set_username(&mut self, v: ::std::string::String) { + self.username = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_username(&mut self) -> &mut ::std::string::String { + &mut self.username + } + + // Take field + pub fn take_username(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.username, ::std::string::String::new()) + } +} + +impl ::protobuf::Message for Pkcs11GetTpmTokenInfoRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.username)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.username.is_empty() { + os.write_string(1, &self.username)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> Pkcs11GetTpmTokenInfoRequest { + Pkcs11GetTpmTokenInfoRequest::new() + } + + fn default_instance() -> &'static Pkcs11GetTpmTokenInfoRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(Pkcs11GetTpmTokenInfoRequest::new) + } +} + +impl ::protobuf::Clear for Pkcs11GetTpmTokenInfoRequest { + fn clear(&mut self) { + self.username.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for Pkcs11GetTpmTokenInfoRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct Pkcs11GetTpmTokenInfoReply { + // message fields + pub token_info: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Pkcs11GetTpmTokenInfoReply { + fn default() -> &'a Pkcs11GetTpmTokenInfoReply { + ::default_instance() + } +} + +impl Pkcs11GetTpmTokenInfoReply { + pub fn new() -> Pkcs11GetTpmTokenInfoReply { + ::std::default::Default::default() + } + + // .user_data_auth.TpmTokenInfo token_info = 1; + + + pub fn get_token_info(&self) -> &TpmTokenInfo { + self.token_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_token_info(&mut self) { + self.token_info.clear(); + } + + pub fn has_token_info(&self) -> bool { + self.token_info.is_some() + } + + // Param is passed by value, moved + pub fn set_token_info(&mut self, v: TpmTokenInfo) { + self.token_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_token_info(&mut self) -> &mut TpmTokenInfo { + if self.token_info.is_none() { + self.token_info.set_default(); + } + self.token_info.as_mut().unwrap() + } + + // Take field + pub fn take_token_info(&mut self) -> TpmTokenInfo { + self.token_info.take().unwrap_or_else(|| TpmTokenInfo::new()) + } +} + +impl ::protobuf::Message for Pkcs11GetTpmTokenInfoReply { + fn is_initialized(&self) -> bool { + for v in &self.token_info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.token_info)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.token_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.token_info.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> Pkcs11GetTpmTokenInfoReply { + Pkcs11GetTpmTokenInfoReply::new() + } + + fn default_instance() -> &'static Pkcs11GetTpmTokenInfoReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(Pkcs11GetTpmTokenInfoReply::new) + } +} + +impl ::protobuf::Clear for Pkcs11GetTpmTokenInfoReply { + fn clear(&mut self) { + self.token_info.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for Pkcs11GetTpmTokenInfoReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct Pkcs11TerminateRequest { + // message fields + pub username: ::std::string::String, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Pkcs11TerminateRequest { + fn default() -> &'a Pkcs11TerminateRequest { + ::default_instance() + } +} + +impl Pkcs11TerminateRequest { + pub fn new() -> Pkcs11TerminateRequest { + ::std::default::Default::default() + } + + // string username = 1; + + + pub fn get_username(&self) -> &str { + &self.username + } + pub fn clear_username(&mut self) { + self.username.clear(); + } + + // Param is passed by value, moved + pub fn set_username(&mut self, v: ::std::string::String) { + self.username = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_username(&mut self) -> &mut ::std::string::String { + &mut self.username + } + + // Take field + pub fn take_username(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.username, ::std::string::String::new()) + } +} + +impl ::protobuf::Message for Pkcs11TerminateRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.username)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.username.is_empty() { + os.write_string(1, &self.username)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> Pkcs11TerminateRequest { + Pkcs11TerminateRequest::new() + } + + fn default_instance() -> &'static Pkcs11TerminateRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(Pkcs11TerminateRequest::new) + } +} + +impl ::protobuf::Clear for Pkcs11TerminateRequest { + fn clear(&mut self) { + self.username.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for Pkcs11TerminateRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct Pkcs11TerminateReply { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> Pkcs11TerminateReply { + Pkcs11TerminateReply::new() + } + + fn default_instance() -> &'static Pkcs11TerminateReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(Pkcs11TerminateReply::new) + } +} + +impl ::protobuf::Clear for Pkcs11TerminateReply { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for Pkcs11TerminateReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct Pkcs11RestoreTpmTokensRequest { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> Pkcs11RestoreTpmTokensRequest { + Pkcs11RestoreTpmTokensRequest::new() + } + + fn default_instance() -> &'static Pkcs11RestoreTpmTokensRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(Pkcs11RestoreTpmTokensRequest::new) + } +} + +impl ::protobuf::Clear for Pkcs11RestoreTpmTokensRequest { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for Pkcs11RestoreTpmTokensRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct Pkcs11RestoreTpmTokensReply { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> Pkcs11RestoreTpmTokensReply { + Pkcs11RestoreTpmTokensReply::new() + } + + fn default_instance() -> &'static Pkcs11RestoreTpmTokensReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(Pkcs11RestoreTpmTokensReply::new) + } +} + +impl ::protobuf::Clear for Pkcs11RestoreTpmTokensReply { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for Pkcs11RestoreTpmTokensReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct InstallAttributesGetRequest { + // message fields + pub name: ::std::string::String, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a InstallAttributesGetRequest { + fn default() -> &'a InstallAttributesGetRequest { + ::default_instance() + } +} + +impl InstallAttributesGetRequest { + pub fn new() -> InstallAttributesGetRequest { + ::std::default::Default::default() + } + + // string name = 1; + + + pub fn get_name(&self) -> &str { + &self.name + } + pub fn clear_name(&mut self) { + self.name.clear(); + } + + // Param is passed by value, moved + pub fn set_name(&mut self, v: ::std::string::String) { + self.name = 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 { + &mut self.name + } + + // Take field + pub fn take_name(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.name, ::std::string::String::new()) + } +} + +impl ::protobuf::Message for InstallAttributesGetRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.name.is_empty() { + os.write_string(1, &self.name)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> InstallAttributesGetRequest { + InstallAttributesGetRequest::new() + } + + fn default_instance() -> &'static InstallAttributesGetRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(InstallAttributesGetRequest::new) + } +} + +impl ::protobuf::Clear for InstallAttributesGetRequest { + fn clear(&mut self) { + self.name.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for InstallAttributesGetRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct InstallAttributesGetReply { + // message fields + pub error: CryptohomeErrorCode, + pub value: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a InstallAttributesGetReply { + fn default() -> &'a InstallAttributesGetReply { + ::default_instance() + } +} + +impl InstallAttributesGetReply { + pub fn new() -> InstallAttributesGetReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // bytes value = 2; + + + pub fn get_value(&self) -> &[u8] { + &self.value + } + pub fn clear_value(&mut self) { + self.value.clear(); + } + + // Param is passed by value, moved + pub fn set_value(&mut self, v: ::std::vec::Vec) { + self.value = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_value(&mut self) -> &mut ::std::vec::Vec { + &mut self.value + } + + // Take field + pub fn take_value(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for InstallAttributesGetReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.value)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if !self.value.is_empty() { + my_size += ::protobuf::rt::bytes_size(2, &self.value); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if !self.value.is_empty() { + os.write_bytes(2, &self.value)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> InstallAttributesGetReply { + InstallAttributesGetReply::new() + } + + fn default_instance() -> &'static InstallAttributesGetReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(InstallAttributesGetReply::new) + } +} + +impl ::protobuf::Clear for InstallAttributesGetReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.value.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for InstallAttributesGetReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct InstallAttributesSetRequest { + // message fields + pub name: ::std::string::String, + pub value: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a InstallAttributesSetRequest { + fn default() -> &'a InstallAttributesSetRequest { + ::default_instance() + } +} + +impl InstallAttributesSetRequest { + pub fn new() -> InstallAttributesSetRequest { + ::std::default::Default::default() + } + + // string name = 1; + + + pub fn get_name(&self) -> &str { + &self.name + } + pub fn clear_name(&mut self) { + self.name.clear(); + } + + // Param is passed by value, moved + pub fn set_name(&mut self, v: ::std::string::String) { + self.name = 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 { + &mut self.name + } + + // Take field + pub fn take_name(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.name, ::std::string::String::new()) + } + + // bytes value = 2; + + + pub fn get_value(&self) -> &[u8] { + &self.value + } + pub fn clear_value(&mut self) { + self.value.clear(); + } + + // Param is passed by value, moved + pub fn set_value(&mut self, v: ::std::vec::Vec) { + self.value = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_value(&mut self) -> &mut ::std::vec::Vec { + &mut self.value + } + + // Take field + pub fn take_value(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.value, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for InstallAttributesSetRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.value)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + 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.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> InstallAttributesSetRequest { + InstallAttributesSetRequest::new() + } + + fn default_instance() -> &'static InstallAttributesSetRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(InstallAttributesSetRequest::new) + } +} + +impl ::protobuf::Clear for InstallAttributesSetRequest { + fn clear(&mut self) { + self.name.clear(); + self.value.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for InstallAttributesSetRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct InstallAttributesSetReply { + // message fields + pub error: CryptohomeErrorCode, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a InstallAttributesSetReply { + fn default() -> &'a InstallAttributesSetReply { + ::default_instance() + } +} + +impl InstallAttributesSetReply { + pub fn new() -> InstallAttributesSetReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } +} + +impl ::protobuf::Message for InstallAttributesSetReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> InstallAttributesSetReply { + InstallAttributesSetReply::new() + } + + fn default_instance() -> &'static InstallAttributesSetReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(InstallAttributesSetReply::new) + } +} + +impl ::protobuf::Clear for InstallAttributesSetReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for InstallAttributesSetReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct InstallAttributesFinalizeRequest { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> InstallAttributesFinalizeRequest { + InstallAttributesFinalizeRequest::new() + } + + fn default_instance() -> &'static InstallAttributesFinalizeRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(InstallAttributesFinalizeRequest::new) + } +} + +impl ::protobuf::Clear for InstallAttributesFinalizeRequest { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for InstallAttributesFinalizeRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct InstallAttributesFinalizeReply { + // message fields + pub error: CryptohomeErrorCode, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a InstallAttributesFinalizeReply { + fn default() -> &'a InstallAttributesFinalizeReply { + ::default_instance() + } +} + +impl InstallAttributesFinalizeReply { + pub fn new() -> InstallAttributesFinalizeReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } +} + +impl ::protobuf::Message for InstallAttributesFinalizeReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> InstallAttributesFinalizeReply { + InstallAttributesFinalizeReply::new() + } + + fn default_instance() -> &'static InstallAttributesFinalizeReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(InstallAttributesFinalizeReply::new) + } +} + +impl ::protobuf::Clear for InstallAttributesFinalizeReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for InstallAttributesFinalizeReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct InstallAttributesGetStatusRequest { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> InstallAttributesGetStatusRequest { + InstallAttributesGetStatusRequest::new() + } + + fn default_instance() -> &'static InstallAttributesGetStatusRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(InstallAttributesGetStatusRequest::new) + } +} + +impl ::protobuf::Clear for InstallAttributesGetStatusRequest { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for InstallAttributesGetStatusRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct InstallAttributesGetStatusReply { + // message fields + pub error: CryptohomeErrorCode, + pub count: i32, + pub is_secure: bool, + pub state: InstallAttributesState, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a InstallAttributesGetStatusReply { + fn default() -> &'a InstallAttributesGetStatusReply { + ::default_instance() + } +} + +impl InstallAttributesGetStatusReply { + pub fn new() -> InstallAttributesGetStatusReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // int32 count = 2; + + + pub fn get_count(&self) -> i32 { + self.count + } + pub fn clear_count(&mut self) { + self.count = 0; + } + + // Param is passed by value, moved + pub fn set_count(&mut self, v: i32) { + self.count = v; + } + + // bool is_secure = 3; + + + pub fn get_is_secure(&self) -> bool { + self.is_secure + } + pub fn clear_is_secure(&mut self) { + self.is_secure = false; + } + + // Param is passed by value, moved + pub fn set_is_secure(&mut self, v: bool) { + self.is_secure = v; + } + + // .user_data_auth.InstallAttributesState state = 4; + + + pub fn get_state(&self) -> InstallAttributesState { + self.state + } + pub fn clear_state(&mut self) { + self.state = InstallAttributesState::UNKNOWN; + } + + // Param is passed by value, moved + pub fn set_state(&mut self, v: InstallAttributesState) { + self.state = v; + } +} + +impl ::protobuf::Message for InstallAttributesGetStatusReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int32()?; + self.count = tmp; + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.is_secure = tmp; + }, + 4 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.state, 4, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if self.count != 0 { + my_size += ::protobuf::rt::value_size(2, self.count, ::protobuf::wire_format::WireTypeVarint); + } + if self.is_secure != false { + my_size += 2; + } + if self.state != InstallAttributesState::UNKNOWN { + my_size += ::protobuf::rt::enum_size(4, self.state); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::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 != InstallAttributesState::UNKNOWN { + os.write_enum(4, ::protobuf::ProtobufEnum::value(&self.state))?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> InstallAttributesGetStatusReply { + InstallAttributesGetStatusReply::new() + } + + fn default_instance() -> &'static InstallAttributesGetStatusReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(InstallAttributesGetStatusReply::new) + } +} + +impl ::protobuf::Clear for InstallAttributesGetStatusReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.count = 0; + self.is_secure = false; + self.state = InstallAttributesState::UNKNOWN; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for InstallAttributesGetStatusReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct FirmwareManagementParameters { + // message fields + pub flags: u32, + pub developer_key_hash: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a FirmwareManagementParameters { + fn default() -> &'a FirmwareManagementParameters { + ::default_instance() + } +} + +impl FirmwareManagementParameters { + pub fn new() -> FirmwareManagementParameters { + ::std::default::Default::default() + } + + // uint32 flags = 1; + + + pub fn get_flags(&self) -> u32 { + self.flags + } + pub fn clear_flags(&mut self) { + self.flags = 0; + } + + // Param is passed by value, moved + pub fn set_flags(&mut self, v: u32) { + self.flags = v; + } + + // bytes developer_key_hash = 2; + + + pub fn get_developer_key_hash(&self) -> &[u8] { + &self.developer_key_hash + } + pub fn clear_developer_key_hash(&mut self) { + self.developer_key_hash.clear(); + } + + // Param is passed by value, moved + pub fn set_developer_key_hash(&mut self, v: ::std::vec::Vec) { + self.developer_key_hash = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_developer_key_hash(&mut self) -> &mut ::std::vec::Vec { + &mut self.developer_key_hash + } + + // Take field + pub fn take_developer_key_hash(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.developer_key_hash, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for FirmwareManagementParameters { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_uint32()?; + self.flags = tmp; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.developer_key_hash)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.flags != 0 { + my_size += ::protobuf::rt::value_size(1, self.flags, ::protobuf::wire_format::WireTypeVarint); + } + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + 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.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> FirmwareManagementParameters { + FirmwareManagementParameters::new() + } + + fn default_instance() -> &'static FirmwareManagementParameters { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(FirmwareManagementParameters::new) + } +} + +impl ::protobuf::Clear for FirmwareManagementParameters { + fn clear(&mut self) { + self.flags = 0; + self.developer_key_hash.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for FirmwareManagementParameters { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetFirmwareManagementParametersRequest { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetFirmwareManagementParametersRequest { + GetFirmwareManagementParametersRequest::new() + } + + fn default_instance() -> &'static GetFirmwareManagementParametersRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetFirmwareManagementParametersRequest::new) + } +} + +impl ::protobuf::Clear for GetFirmwareManagementParametersRequest { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetFirmwareManagementParametersRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetFirmwareManagementParametersReply { + // message fields + pub error: CryptohomeErrorCode, + pub fwmp: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetFirmwareManagementParametersReply { + fn default() -> &'a GetFirmwareManagementParametersReply { + ::default_instance() + } +} + +impl GetFirmwareManagementParametersReply { + pub fn new() -> GetFirmwareManagementParametersReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // .user_data_auth.FirmwareManagementParameters fwmp = 2; + + + pub fn get_fwmp(&self) -> &FirmwareManagementParameters { + self.fwmp.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_fwmp(&mut self) { + self.fwmp.clear(); + } + + pub fn has_fwmp(&self) -> bool { + self.fwmp.is_some() + } + + // Param is passed by value, moved + pub fn set_fwmp(&mut self, v: FirmwareManagementParameters) { + self.fwmp = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_fwmp(&mut self) -> &mut FirmwareManagementParameters { + if self.fwmp.is_none() { + self.fwmp.set_default(); + } + self.fwmp.as_mut().unwrap() + } + + // Take field + pub fn take_fwmp(&mut self) -> FirmwareManagementParameters { + self.fwmp.take().unwrap_or_else(|| FirmwareManagementParameters::new()) + } +} + +impl ::protobuf::Message for GetFirmwareManagementParametersReply { + fn is_initialized(&self) -> bool { + for v in &self.fwmp { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.fwmp)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if let Some(ref v) = self.fwmp.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if let Some(ref v) = self.fwmp.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetFirmwareManagementParametersReply { + GetFirmwareManagementParametersReply::new() + } + + fn default_instance() -> &'static GetFirmwareManagementParametersReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetFirmwareManagementParametersReply::new) + } +} + +impl ::protobuf::Clear for GetFirmwareManagementParametersReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.fwmp.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetFirmwareManagementParametersReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct RemoveFirmwareManagementParametersRequest { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> RemoveFirmwareManagementParametersRequest { + RemoveFirmwareManagementParametersRequest::new() + } + + fn default_instance() -> &'static RemoveFirmwareManagementParametersRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RemoveFirmwareManagementParametersRequest::new) + } +} + +impl ::protobuf::Clear for RemoveFirmwareManagementParametersRequest { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for RemoveFirmwareManagementParametersRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct RemoveFirmwareManagementParametersReply { + // message fields + pub error: CryptohomeErrorCode, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a RemoveFirmwareManagementParametersReply { + fn default() -> &'a RemoveFirmwareManagementParametersReply { + ::default_instance() + } +} + +impl RemoveFirmwareManagementParametersReply { + pub fn new() -> RemoveFirmwareManagementParametersReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } +} + +impl ::protobuf::Message for RemoveFirmwareManagementParametersReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> RemoveFirmwareManagementParametersReply { + RemoveFirmwareManagementParametersReply::new() + } + + fn default_instance() -> &'static RemoveFirmwareManagementParametersReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RemoveFirmwareManagementParametersReply::new) + } +} + +impl ::protobuf::Clear for RemoveFirmwareManagementParametersReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for RemoveFirmwareManagementParametersReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct SetFirmwareManagementParametersRequest { + // message fields + pub fwmp: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a SetFirmwareManagementParametersRequest { + fn default() -> &'a SetFirmwareManagementParametersRequest { + ::default_instance() + } +} + +impl SetFirmwareManagementParametersRequest { + pub fn new() -> SetFirmwareManagementParametersRequest { + ::std::default::Default::default() + } + + // .user_data_auth.FirmwareManagementParameters fwmp = 1; + + + pub fn get_fwmp(&self) -> &FirmwareManagementParameters { + self.fwmp.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_fwmp(&mut self) { + self.fwmp.clear(); + } + + pub fn has_fwmp(&self) -> bool { + self.fwmp.is_some() + } + + // Param is passed by value, moved + pub fn set_fwmp(&mut self, v: FirmwareManagementParameters) { + self.fwmp = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_fwmp(&mut self) -> &mut FirmwareManagementParameters { + if self.fwmp.is_none() { + self.fwmp.set_default(); + } + self.fwmp.as_mut().unwrap() + } + + // Take field + pub fn take_fwmp(&mut self) -> FirmwareManagementParameters { + self.fwmp.take().unwrap_or_else(|| FirmwareManagementParameters::new()) + } +} + +impl ::protobuf::Message for SetFirmwareManagementParametersRequest { + fn is_initialized(&self) -> bool { + for v in &self.fwmp { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.fwmp)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.fwmp.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.fwmp.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> SetFirmwareManagementParametersRequest { + SetFirmwareManagementParametersRequest::new() + } + + fn default_instance() -> &'static SetFirmwareManagementParametersRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(SetFirmwareManagementParametersRequest::new) + } +} + +impl ::protobuf::Clear for SetFirmwareManagementParametersRequest { + fn clear(&mut self) { + self.fwmp.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for SetFirmwareManagementParametersRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct SetFirmwareManagementParametersReply { + // message fields + pub error: CryptohomeErrorCode, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a SetFirmwareManagementParametersReply { + fn default() -> &'a SetFirmwareManagementParametersReply { + ::default_instance() + } +} + +impl SetFirmwareManagementParametersReply { + pub fn new() -> SetFirmwareManagementParametersReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } +} + +impl ::protobuf::Message for SetFirmwareManagementParametersReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> SetFirmwareManagementParametersReply { + SetFirmwareManagementParametersReply::new() + } + + fn default_instance() -> &'static SetFirmwareManagementParametersReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(SetFirmwareManagementParametersReply::new) + } +} + +impl ::protobuf::Clear for SetFirmwareManagementParametersReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for SetFirmwareManagementParametersReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetSystemSaltRequest { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetSystemSaltRequest { + GetSystemSaltRequest::new() + } + + fn default_instance() -> &'static GetSystemSaltRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetSystemSaltRequest::new) + } +} + +impl ::protobuf::Clear for GetSystemSaltRequest { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetSystemSaltRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetSystemSaltReply { + // message fields + pub salt: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetSystemSaltReply { + fn default() -> &'a GetSystemSaltReply { + ::default_instance() + } +} + +impl GetSystemSaltReply { + pub fn new() -> GetSystemSaltReply { + ::std::default::Default::default() + } + + // bytes salt = 1; + + + pub fn get_salt(&self) -> &[u8] { + &self.salt + } + pub fn clear_salt(&mut self) { + self.salt.clear(); + } + + // Param is passed by value, moved + pub fn set_salt(&mut self, v: ::std::vec::Vec) { + self.salt = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_salt(&mut self) -> &mut ::std::vec::Vec { + &mut self.salt + } + + // Take field + pub fn take_salt(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.salt, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for GetSystemSaltReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.salt)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.salt.is_empty() { + os.write_bytes(1, &self.salt)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetSystemSaltReply { + GetSystemSaltReply::new() + } + + fn default_instance() -> &'static GetSystemSaltReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetSystemSaltReply::new) + } +} + +impl ::protobuf::Clear for GetSystemSaltReply { + fn clear(&mut self) { + self.salt.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetSystemSaltReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct UpdateCurrentUserActivityTimestampRequest { + // message fields + pub time_shift_sec: i32, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a UpdateCurrentUserActivityTimestampRequest { + fn default() -> &'a UpdateCurrentUserActivityTimestampRequest { + ::default_instance() + } +} + +impl UpdateCurrentUserActivityTimestampRequest { + pub fn new() -> UpdateCurrentUserActivityTimestampRequest { + ::std::default::Default::default() + } + + // int32 time_shift_sec = 1; + + + pub fn get_time_shift_sec(&self) -> i32 { + self.time_shift_sec + } + pub fn clear_time_shift_sec(&mut self) { + self.time_shift_sec = 0; + } + + // Param is passed by value, moved + pub fn set_time_shift_sec(&mut self, v: i32) { + self.time_shift_sec = v; + } +} + +impl ::protobuf::Message for UpdateCurrentUserActivityTimestampRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int32()?; + self.time_shift_sec = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.time_shift_sec != 0 { + my_size += ::protobuf::rt::value_size(1, self.time_shift_sec, ::protobuf::wire_format::WireTypeVarint); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.time_shift_sec != 0 { + os.write_int32(1, self.time_shift_sec)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> UpdateCurrentUserActivityTimestampRequest { + UpdateCurrentUserActivityTimestampRequest::new() + } + + fn default_instance() -> &'static UpdateCurrentUserActivityTimestampRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(UpdateCurrentUserActivityTimestampRequest::new) + } +} + +impl ::protobuf::Clear for UpdateCurrentUserActivityTimestampRequest { + fn clear(&mut self) { + self.time_shift_sec = 0; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for UpdateCurrentUserActivityTimestampRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct UpdateCurrentUserActivityTimestampReply { + // message fields + pub error: CryptohomeErrorCode, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a UpdateCurrentUserActivityTimestampReply { + fn default() -> &'a UpdateCurrentUserActivityTimestampReply { + ::default_instance() + } +} + +impl UpdateCurrentUserActivityTimestampReply { + pub fn new() -> UpdateCurrentUserActivityTimestampReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } +} + +impl ::protobuf::Message for UpdateCurrentUserActivityTimestampReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> UpdateCurrentUserActivityTimestampReply { + UpdateCurrentUserActivityTimestampReply::new() + } + + fn default_instance() -> &'static UpdateCurrentUserActivityTimestampReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(UpdateCurrentUserActivityTimestampReply::new) + } +} + +impl ::protobuf::Clear for UpdateCurrentUserActivityTimestampReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for UpdateCurrentUserActivityTimestampReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetSanitizedUsernameRequest { + // message fields + pub username: ::std::string::String, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetSanitizedUsernameRequest { + fn default() -> &'a GetSanitizedUsernameRequest { + ::default_instance() + } +} + +impl GetSanitizedUsernameRequest { + pub fn new() -> GetSanitizedUsernameRequest { + ::std::default::Default::default() + } + + // string username = 1; + + + pub fn get_username(&self) -> &str { + &self.username + } + pub fn clear_username(&mut self) { + self.username.clear(); + } + + // Param is passed by value, moved + pub fn set_username(&mut self, v: ::std::string::String) { + self.username = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_username(&mut self) -> &mut ::std::string::String { + &mut self.username + } + + // Take field + pub fn take_username(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.username, ::std::string::String::new()) + } +} + +impl ::protobuf::Message for GetSanitizedUsernameRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.username)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.username.is_empty() { + os.write_string(1, &self.username)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetSanitizedUsernameRequest { + GetSanitizedUsernameRequest::new() + } + + fn default_instance() -> &'static GetSanitizedUsernameRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetSanitizedUsernameRequest::new) + } +} + +impl ::protobuf::Clear for GetSanitizedUsernameRequest { + fn clear(&mut self) { + self.username.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetSanitizedUsernameRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetSanitizedUsernameReply { + // message fields + pub sanitized_username: ::std::string::String, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetSanitizedUsernameReply { + fn default() -> &'a GetSanitizedUsernameReply { + ::default_instance() + } +} + +impl GetSanitizedUsernameReply { + pub fn new() -> GetSanitizedUsernameReply { + ::std::default::Default::default() + } + + // string sanitized_username = 1; + + + pub fn get_sanitized_username(&self) -> &str { + &self.sanitized_username + } + pub fn clear_sanitized_username(&mut self) { + self.sanitized_username.clear(); + } + + // Param is passed by value, moved + pub fn set_sanitized_username(&mut self, v: ::std::string::String) { + self.sanitized_username = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_sanitized_username(&mut self) -> &mut ::std::string::String { + &mut self.sanitized_username + } + + // Take field + pub fn take_sanitized_username(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.sanitized_username, ::std::string::String::new()) + } +} + +impl ::protobuf::Message for GetSanitizedUsernameReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.sanitized_username)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.sanitized_username.is_empty() { + os.write_string(1, &self.sanitized_username)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetSanitizedUsernameReply { + GetSanitizedUsernameReply::new() + } + + fn default_instance() -> &'static GetSanitizedUsernameReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetSanitizedUsernameReply::new) + } +} + +impl ::protobuf::Clear for GetSanitizedUsernameReply { + fn clear(&mut self) { + self.sanitized_username.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetSanitizedUsernameReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetLoginStatusRequest { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetLoginStatusRequest { + GetLoginStatusRequest::new() + } + + fn default_instance() -> &'static GetLoginStatusRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetLoginStatusRequest::new) + } +} + +impl ::protobuf::Clear for GetLoginStatusRequest { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetLoginStatusRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetLoginStatusReply { + // message fields + pub error: CryptohomeErrorCode, + pub owner_user_exists: bool, + pub is_locked_to_single_user: bool, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetLoginStatusReply { + fn default() -> &'a GetLoginStatusReply { + ::default_instance() + } +} + +impl GetLoginStatusReply { + pub fn new() -> GetLoginStatusReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // bool owner_user_exists = 2; + + + pub fn get_owner_user_exists(&self) -> bool { + self.owner_user_exists + } + pub fn clear_owner_user_exists(&mut self) { + self.owner_user_exists = false; + } + + // Param is passed by value, moved + pub fn set_owner_user_exists(&mut self, v: bool) { + self.owner_user_exists = v; + } + + // bool is_locked_to_single_user = 3; + + + pub fn get_is_locked_to_single_user(&self) -> bool { + self.is_locked_to_single_user + } + pub fn clear_is_locked_to_single_user(&mut self) { + self.is_locked_to_single_user = false; + } + + // Param is passed by value, moved + pub fn set_is_locked_to_single_user(&mut self, v: bool) { + self.is_locked_to_single_user = v; + } +} + +impl ::protobuf::Message for GetLoginStatusReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.owner_user_exists = tmp; + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.is_locked_to_single_user = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if self.owner_user_exists != false { + my_size += 2; + } + if self.is_locked_to_single_user != false { + my_size += 2; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::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.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetLoginStatusReply { + GetLoginStatusReply::new() + } + + fn default_instance() -> &'static GetLoginStatusReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetLoginStatusReply::new) + } +} + +impl ::protobuf::Clear for GetLoginStatusReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.owner_user_exists = false; + self.is_locked_to_single_user = false; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetLoginStatusReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetStatusStringRequest { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetStatusStringRequest { + fn default() -> &'a GetStatusStringRequest { + ::default_instance() + } +} + +impl GetStatusStringRequest { + pub fn new() -> GetStatusStringRequest { + ::std::default::Default::default() + } +} + +impl ::protobuf::Message for GetStatusStringRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetStatusStringRequest { + GetStatusStringRequest::new() + } + + fn default_instance() -> &'static GetStatusStringRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetStatusStringRequest::new) + } +} + +impl ::protobuf::Clear for GetStatusStringRequest { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetStatusStringRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetStatusStringReply { + // message fields + pub status: ::std::string::String, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetStatusStringReply { + fn default() -> &'a GetStatusStringReply { + ::default_instance() + } +} + +impl GetStatusStringReply { + pub fn new() -> GetStatusStringReply { + ::std::default::Default::default() + } + + // string status = 1; + + + pub fn get_status(&self) -> &str { + &self.status + } + pub fn clear_status(&mut self) { + self.status.clear(); + } + + // Param is passed by value, moved + pub fn set_status(&mut self, v: ::std::string::String) { + self.status = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_status(&mut self) -> &mut ::std::string::String { + &mut self.status + } + + // Take field + pub fn take_status(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.status, ::std::string::String::new()) + } +} + +impl ::protobuf::Message for GetStatusStringReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.status)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if !self.status.is_empty() { + my_size += ::protobuf::rt::string_size(1, &self.status); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.status.is_empty() { + os.write_string(1, &self.status)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetStatusStringReply { + GetStatusStringReply::new() + } + + fn default_instance() -> &'static GetStatusStringReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetStatusStringReply::new) + } +} + +impl ::protobuf::Clear for GetStatusStringReply { + fn clear(&mut self) { + self.status.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetStatusStringReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct LockToSingleUserMountUntilRebootRequest { + // message fields + pub account_id: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a LockToSingleUserMountUntilRebootRequest { + fn default() -> &'a LockToSingleUserMountUntilRebootRequest { + ::default_instance() + } +} + +impl LockToSingleUserMountUntilRebootRequest { + pub fn new() -> LockToSingleUserMountUntilRebootRequest { + ::std::default::Default::default() + } + + // .cryptohome.AccountIdentifier account_id = 1; + + + pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { + self.account_id.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_account_id(&mut self) { + self.account_id.clear(); + } + + 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: super::rpc::AccountIdentifier) { + self.account_id = ::protobuf::SingularPtrField::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 super::rpc::AccountIdentifier { + if self.account_id.is_none() { + self.account_id.set_default(); + } + self.account_id.as_mut().unwrap() + } + + // Take field + pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { + self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) + } +} + +impl ::protobuf::Message for LockToSingleUserMountUntilRebootRequest { + fn is_initialized(&self) -> bool { + for v in &self.account_id { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.account_id.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.account_id.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> LockToSingleUserMountUntilRebootRequest { + LockToSingleUserMountUntilRebootRequest::new() + } + + fn default_instance() -> &'static LockToSingleUserMountUntilRebootRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(LockToSingleUserMountUntilRebootRequest::new) + } +} + +impl ::protobuf::Clear for LockToSingleUserMountUntilRebootRequest { + fn clear(&mut self) { + self.account_id.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for LockToSingleUserMountUntilRebootRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct LockToSingleUserMountUntilRebootReply { + // message fields + pub error: CryptohomeErrorCode, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a LockToSingleUserMountUntilRebootReply { + fn default() -> &'a LockToSingleUserMountUntilRebootReply { + ::default_instance() + } +} + +impl LockToSingleUserMountUntilRebootReply { + pub fn new() -> LockToSingleUserMountUntilRebootReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } +} + +impl ::protobuf::Message for LockToSingleUserMountUntilRebootReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> LockToSingleUserMountUntilRebootReply { + LockToSingleUserMountUntilRebootReply::new() + } + + fn default_instance() -> &'static LockToSingleUserMountUntilRebootReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(LockToSingleUserMountUntilRebootReply::new) + } +} + +impl ::protobuf::Clear for LockToSingleUserMountUntilRebootReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for LockToSingleUserMountUntilRebootReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetRsuDeviceIdReply { + // message fields + pub error: CryptohomeErrorCode, + pub rsu_device_id: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetRsuDeviceIdReply { + fn default() -> &'a GetRsuDeviceIdReply { + ::default_instance() + } +} + +impl GetRsuDeviceIdReply { + pub fn new() -> GetRsuDeviceIdReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // bytes rsu_device_id = 2; + + + pub fn get_rsu_device_id(&self) -> &[u8] { + &self.rsu_device_id + } + pub fn clear_rsu_device_id(&mut self) { + self.rsu_device_id.clear(); + } + + // Param is passed by value, moved + pub fn set_rsu_device_id(&mut self, v: ::std::vec::Vec) { + self.rsu_device_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_rsu_device_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.rsu_device_id + } + + // Take field + pub fn take_rsu_device_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.rsu_device_id, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for GetRsuDeviceIdReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.rsu_device_id)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if !self.rsu_device_id.is_empty() { + os.write_bytes(2, &self.rsu_device_id)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetRsuDeviceIdReply { + GetRsuDeviceIdReply::new() + } + + fn default_instance() -> &'static GetRsuDeviceIdReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetRsuDeviceIdReply::new) + } +} + +impl ::protobuf::Clear for GetRsuDeviceIdReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.rsu_device_id.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetRsuDeviceIdReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetRsuDeviceIdRequest { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetRsuDeviceIdRequest { + GetRsuDeviceIdRequest::new() + } + + fn default_instance() -> &'static GetRsuDeviceIdRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetRsuDeviceIdRequest::new) + } +} + +impl ::protobuf::Clear for GetRsuDeviceIdRequest { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetRsuDeviceIdRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct CheckHealthRequest { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CheckHealthRequest { + fn default() -> &'a CheckHealthRequest { + ::default_instance() + } +} + +impl CheckHealthRequest { + pub fn new() -> CheckHealthRequest { + ::std::default::Default::default() + } +} + +impl ::protobuf::Message for CheckHealthRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> CheckHealthRequest { + CheckHealthRequest::new() + } + + fn default_instance() -> &'static CheckHealthRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(CheckHealthRequest::new) + } +} + +impl ::protobuf::Clear for CheckHealthRequest { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for CheckHealthRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct CheckHealthReply { + // message fields + pub requires_powerwash: bool, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CheckHealthReply { + fn default() -> &'a CheckHealthReply { + ::default_instance() + } +} + +impl CheckHealthReply { + pub fn new() -> CheckHealthReply { + ::std::default::Default::default() + } + + // bool requires_powerwash = 2; + + + pub fn get_requires_powerwash(&self) -> bool { + self.requires_powerwash + } + pub fn clear_requires_powerwash(&mut self) { + self.requires_powerwash = false; + } + + // Param is passed by value, moved + pub fn set_requires_powerwash(&mut self, v: bool) { + self.requires_powerwash = v; + } +} + +impl ::protobuf::Message for CheckHealthReply { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.requires_powerwash = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.requires_powerwash != false { + my_size += 2; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.requires_powerwash != false { + os.write_bool(2, self.requires_powerwash)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> CheckHealthReply { + CheckHealthReply::new() + } + + fn default_instance() -> &'static CheckHealthReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(CheckHealthReply::new) + } +} + +impl ::protobuf::Clear for CheckHealthReply { + fn clear(&mut self) { + self.requires_powerwash = false; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for CheckHealthReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ResetApplicationContainerRequest { + // message fields + pub account_id: ::protobuf::SingularPtrField, + pub application_name: ::std::string::String, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ResetApplicationContainerRequest { + fn default() -> &'a ResetApplicationContainerRequest { + ::default_instance() + } +} + +impl ResetApplicationContainerRequest { + pub fn new() -> ResetApplicationContainerRequest { + ::std::default::Default::default() + } + + // .cryptohome.AccountIdentifier account_id = 1; + + + pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { + self.account_id.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_account_id(&mut self) { + self.account_id.clear(); + } + + 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: super::rpc::AccountIdentifier) { + self.account_id = ::protobuf::SingularPtrField::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 super::rpc::AccountIdentifier { + if self.account_id.is_none() { + self.account_id.set_default(); + } + self.account_id.as_mut().unwrap() + } + + // Take field + pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { + self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) + } + + // string application_name = 2; + + + pub fn get_application_name(&self) -> &str { + &self.application_name + } + pub fn clear_application_name(&mut self) { + self.application_name.clear(); + } + + // Param is passed by value, moved + pub fn set_application_name(&mut self, v: ::std::string::String) { + self.application_name = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_application_name(&mut self) -> &mut ::std::string::String { + &mut self.application_name + } + + // Take field + pub fn take_application_name(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.application_name, ::std::string::String::new()) + } +} + +impl ::protobuf::Message for ResetApplicationContainerRequest { + fn is_initialized(&self) -> bool { + for v in &self.account_id { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.application_name)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.account_id.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.account_id.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if !self.application_name.is_empty() { + os.write_string(2, &self.application_name)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> ResetApplicationContainerRequest { + ResetApplicationContainerRequest::new() + } + + fn default_instance() -> &'static ResetApplicationContainerRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ResetApplicationContainerRequest::new) + } +} + +impl ::protobuf::Clear for ResetApplicationContainerRequest { + fn clear(&mut self) { + self.account_id.clear(); + self.application_name.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for ResetApplicationContainerRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ResetApplicationContainerReply { + // message fields + pub error: CryptohomeErrorCode, + pub error_info: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ResetApplicationContainerReply { + fn default() -> &'a ResetApplicationContainerReply { + ::default_instance() + } +} + +impl ResetApplicationContainerReply { + pub fn new() -> ResetApplicationContainerReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // .user_data_auth.CryptohomeErrorInfo error_info = 2; + + + pub fn get_error_info(&self) -> &CryptohomeErrorInfo { + self.error_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_error_info(&mut self) { + self.error_info.clear(); + } + + pub fn has_error_info(&self) -> bool { + self.error_info.is_some() + } + + // Param is passed by value, moved + pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { + self.error_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { + if self.error_info.is_none() { + self.error_info.set_default(); + } + self.error_info.as_mut().unwrap() + } + + // Take field + pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { + self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) + } +} + +impl ::protobuf::Message for ResetApplicationContainerReply { + fn is_initialized(&self) -> bool { + for v in &self.error_info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if let Some(ref v) = self.error_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if let Some(ref v) = self.error_info.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> ResetApplicationContainerReply { + ResetApplicationContainerReply::new() + } + + fn default_instance() -> &'static ResetApplicationContainerReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ResetApplicationContainerReply::new) + } +} + +impl ::protobuf::Clear for ResetApplicationContainerReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.error_info.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for ResetApplicationContainerReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct FidoMakeCredentialRequest { + // message fields + pub account_id: ::protobuf::SingularPtrField, + pub make_credential_options: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a FidoMakeCredentialRequest { + fn default() -> &'a FidoMakeCredentialRequest { + ::default_instance() + } +} + +impl FidoMakeCredentialRequest { + pub fn new() -> FidoMakeCredentialRequest { + ::std::default::Default::default() + } + + // .cryptohome.AccountIdentifier account_id = 1; + + + pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { + self.account_id.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_account_id(&mut self) { + self.account_id.clear(); + } + + 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: super::rpc::AccountIdentifier) { + self.account_id = ::protobuf::SingularPtrField::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 super::rpc::AccountIdentifier { + if self.account_id.is_none() { + self.account_id.set_default(); + } + self.account_id.as_mut().unwrap() + } + + // Take field + pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { + self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) + } + + // .cryptohome.fido.PublicKeyCredentialCreationOptions make_credential_options = 2; + + + pub fn get_make_credential_options(&self) -> &super::fido::PublicKeyCredentialCreationOptions { + self.make_credential_options.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_make_credential_options(&mut self) { + self.make_credential_options.clear(); + } + + pub fn has_make_credential_options(&self) -> bool { + self.make_credential_options.is_some() + } + + // Param is passed by value, moved + pub fn set_make_credential_options(&mut self, v: super::fido::PublicKeyCredentialCreationOptions) { + self.make_credential_options = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_make_credential_options(&mut self) -> &mut super::fido::PublicKeyCredentialCreationOptions { + if self.make_credential_options.is_none() { + self.make_credential_options.set_default(); + } + self.make_credential_options.as_mut().unwrap() + } + + // Take field + pub fn take_make_credential_options(&mut self) -> super::fido::PublicKeyCredentialCreationOptions { + self.make_credential_options.take().unwrap_or_else(|| super::fido::PublicKeyCredentialCreationOptions::new()) + } +} + +impl ::protobuf::Message for FidoMakeCredentialRequest { + fn is_initialized(&self) -> bool { + for v in &self.account_id { + if !v.is_initialized() { + return false; + } + }; + for v in &self.make_credential_options { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.make_credential_options)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.account_id.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.make_credential_options.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.account_id.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if let Some(ref v) = self.make_credential_options.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> FidoMakeCredentialRequest { + FidoMakeCredentialRequest::new() + } + + fn default_instance() -> &'static FidoMakeCredentialRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(FidoMakeCredentialRequest::new) + } +} + +impl ::protobuf::Clear for FidoMakeCredentialRequest { + fn clear(&mut self) { + self.account_id.clear(); + self.make_credential_options.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for FidoMakeCredentialRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct FidoMakeCredentialReply { + // message fields + pub error: CryptohomeErrorCode, + pub make_credential_response: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a FidoMakeCredentialReply { + fn default() -> &'a FidoMakeCredentialReply { + ::default_instance() + } +} + +impl FidoMakeCredentialReply { + pub fn new() -> FidoMakeCredentialReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // .cryptohome.fido.MakeCredentialAuthenticatorResponse make_credential_response = 2; + + + pub fn get_make_credential_response(&self) -> &super::fido::MakeCredentialAuthenticatorResponse { + self.make_credential_response.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_make_credential_response(&mut self) { + self.make_credential_response.clear(); + } + + pub fn has_make_credential_response(&self) -> bool { + self.make_credential_response.is_some() + } + + // Param is passed by value, moved + pub fn set_make_credential_response(&mut self, v: super::fido::MakeCredentialAuthenticatorResponse) { + self.make_credential_response = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_make_credential_response(&mut self) -> &mut super::fido::MakeCredentialAuthenticatorResponse { + if self.make_credential_response.is_none() { + self.make_credential_response.set_default(); + } + self.make_credential_response.as_mut().unwrap() + } + + // Take field + pub fn take_make_credential_response(&mut self) -> super::fido::MakeCredentialAuthenticatorResponse { + self.make_credential_response.take().unwrap_or_else(|| super::fido::MakeCredentialAuthenticatorResponse::new()) + } +} + +impl ::protobuf::Message for FidoMakeCredentialReply { + fn is_initialized(&self) -> bool { + for v in &self.make_credential_response { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.make_credential_response)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if let Some(ref v) = self.make_credential_response.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if let Some(ref v) = self.make_credential_response.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> FidoMakeCredentialReply { + FidoMakeCredentialReply::new() + } + + fn default_instance() -> &'static FidoMakeCredentialReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(FidoMakeCredentialReply::new) + } +} + +impl ::protobuf::Clear for FidoMakeCredentialReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.make_credential_response.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for FidoMakeCredentialReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct FidoGetAssertionRequest { + // message fields + pub get_assertion_options: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a FidoGetAssertionRequest { + fn default() -> &'a FidoGetAssertionRequest { + ::default_instance() + } +} + +impl FidoGetAssertionRequest { + pub fn new() -> FidoGetAssertionRequest { + ::std::default::Default::default() + } + + // .cryptohome.fido.PublicKeyCredentialRequestOptions get_assertion_options = 1; + + + pub fn get_get_assertion_options(&self) -> &super::fido::PublicKeyCredentialRequestOptions { + self.get_assertion_options.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_get_assertion_options(&mut self) { + self.get_assertion_options.clear(); + } + + pub fn has_get_assertion_options(&self) -> bool { + self.get_assertion_options.is_some() + } + + // Param is passed by value, moved + pub fn set_get_assertion_options(&mut self, v: super::fido::PublicKeyCredentialRequestOptions) { + self.get_assertion_options = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_get_assertion_options(&mut self) -> &mut super::fido::PublicKeyCredentialRequestOptions { + if self.get_assertion_options.is_none() { + self.get_assertion_options.set_default(); + } + self.get_assertion_options.as_mut().unwrap() + } + + // Take field + pub fn take_get_assertion_options(&mut self) -> super::fido::PublicKeyCredentialRequestOptions { + self.get_assertion_options.take().unwrap_or_else(|| super::fido::PublicKeyCredentialRequestOptions::new()) + } +} + +impl ::protobuf::Message for FidoGetAssertionRequest { + fn is_initialized(&self) -> bool { + for v in &self.get_assertion_options { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.get_assertion_options)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.get_assertion_options.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.get_assertion_options.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> FidoGetAssertionRequest { + FidoGetAssertionRequest::new() + } + + fn default_instance() -> &'static FidoGetAssertionRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(FidoGetAssertionRequest::new) + } +} + +impl ::protobuf::Clear for FidoGetAssertionRequest { + fn clear(&mut self) { + self.get_assertion_options.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for FidoGetAssertionRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct FidoGetAssertionReply { + // message fields + pub error: CryptohomeErrorCode, + pub get_assertion_response: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a FidoGetAssertionReply { + fn default() -> &'a FidoGetAssertionReply { + ::default_instance() + } +} + +impl FidoGetAssertionReply { + pub fn new() -> FidoGetAssertionReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // .cryptohome.fido.GetAssertionAuthenticatorResponse get_assertion_response = 2; + + + pub fn get_get_assertion_response(&self) -> &super::fido::GetAssertionAuthenticatorResponse { + self.get_assertion_response.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_get_assertion_response(&mut self) { + self.get_assertion_response.clear(); + } + + pub fn has_get_assertion_response(&self) -> bool { + self.get_assertion_response.is_some() + } + + // Param is passed by value, moved + pub fn set_get_assertion_response(&mut self, v: super::fido::GetAssertionAuthenticatorResponse) { + self.get_assertion_response = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_get_assertion_response(&mut self) -> &mut super::fido::GetAssertionAuthenticatorResponse { + if self.get_assertion_response.is_none() { + self.get_assertion_response.set_default(); + } + self.get_assertion_response.as_mut().unwrap() + } + + // Take field + pub fn take_get_assertion_response(&mut self) -> super::fido::GetAssertionAuthenticatorResponse { + self.get_assertion_response.take().unwrap_or_else(|| super::fido::GetAssertionAuthenticatorResponse::new()) + } +} + +impl ::protobuf::Message for FidoGetAssertionReply { + fn is_initialized(&self) -> bool { + for v in &self.get_assertion_response { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.get_assertion_response)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if let Some(ref v) = self.get_assertion_response.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if let Some(ref v) = self.get_assertion_response.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> FidoGetAssertionReply { + FidoGetAssertionReply::new() + } + + fn default_instance() -> &'static FidoGetAssertionReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(FidoGetAssertionReply::new) + } +} + +impl ::protobuf::Clear for FidoGetAssertionReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.get_assertion_response.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for FidoGetAssertionReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct AddAuthFactorRequest { + // message fields + pub auth_session_id: ::std::vec::Vec, + pub auth_factor: ::protobuf::SingularPtrField, + pub auth_input: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AddAuthFactorRequest { + fn default() -> &'a AddAuthFactorRequest { + ::default_instance() + } +} + +impl AddAuthFactorRequest { + pub fn new() -> AddAuthFactorRequest { + ::std::default::Default::default() + } + + // bytes auth_session_id = 1; + + + pub fn get_auth_session_id(&self) -> &[u8] { + &self.auth_session_id + } + pub fn clear_auth_session_id(&mut self) { + self.auth_session_id.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec) { + self.auth_session_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.auth_session_id + } + + // Take field + pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) + } + + // .user_data_auth.AuthFactor auth_factor = 2; + + + pub fn get_auth_factor(&self) -> &super::auth_factor::AuthFactor { + self.auth_factor.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_auth_factor(&mut self) { + self.auth_factor.clear(); + } + + pub fn has_auth_factor(&self) -> bool { + self.auth_factor.is_some() + } + + // Param is passed by value, moved + pub fn set_auth_factor(&mut self, v: super::auth_factor::AuthFactor) { + self.auth_factor = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_factor(&mut self) -> &mut super::auth_factor::AuthFactor { + if self.auth_factor.is_none() { + self.auth_factor.set_default(); + } + self.auth_factor.as_mut().unwrap() + } + + // Take field + pub fn take_auth_factor(&mut self) -> super::auth_factor::AuthFactor { + self.auth_factor.take().unwrap_or_else(|| super::auth_factor::AuthFactor::new()) + } + + // .user_data_auth.AuthInput auth_input = 3; + + + pub fn get_auth_input(&self) -> &super::auth_factor::AuthInput { + self.auth_input.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_auth_input(&mut self) { + self.auth_input.clear(); + } + + pub fn has_auth_input(&self) -> bool { + self.auth_input.is_some() + } + + // Param is passed by value, moved + pub fn set_auth_input(&mut self, v: super::auth_factor::AuthInput) { + self.auth_input = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_input(&mut self) -> &mut super::auth_factor::AuthInput { + if self.auth_input.is_none() { + self.auth_input.set_default(); + } + self.auth_input.as_mut().unwrap() + } + + // Take field + pub fn take_auth_input(&mut self) -> super::auth_factor::AuthInput { + self.auth_input.take().unwrap_or_else(|| super::auth_factor::AuthInput::new()) + } +} + +impl ::protobuf::Message for AddAuthFactorRequest { + fn is_initialized(&self) -> bool { + for v in &self.auth_factor { + if !v.is_initialized() { + return false; + } + }; + for v in &self.auth_input { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.auth_factor)?; + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.auth_input)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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(ref v) = self.auth_factor.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.auth_input.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.auth_session_id.is_empty() { + os.write_bytes(1, &self.auth_session_id)?; + } + if let Some(ref v) = self.auth_factor.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if let Some(ref v) = self.auth_input.as_ref() { + os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> AddAuthFactorRequest { + AddAuthFactorRequest::new() + } + + fn default_instance() -> &'static AddAuthFactorRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(AddAuthFactorRequest::new) + } +} + +impl ::protobuf::Clear for AddAuthFactorRequest { + fn clear(&mut self) { + self.auth_session_id.clear(); + self.auth_factor.clear(); + self.auth_input.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for AddAuthFactorRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct AddAuthFactorReply { + // message fields + pub error: CryptohomeErrorCode, + pub error_info: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AddAuthFactorReply { + fn default() -> &'a AddAuthFactorReply { + ::default_instance() + } +} + +impl AddAuthFactorReply { + pub fn new() -> AddAuthFactorReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // .user_data_auth.CryptohomeErrorInfo error_info = 2; + + + pub fn get_error_info(&self) -> &CryptohomeErrorInfo { + self.error_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_error_info(&mut self) { + self.error_info.clear(); + } + + pub fn has_error_info(&self) -> bool { + self.error_info.is_some() + } + + // Param is passed by value, moved + pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { + self.error_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { + if self.error_info.is_none() { + self.error_info.set_default(); + } + self.error_info.as_mut().unwrap() + } + + // Take field + pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { + self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) + } +} + +impl ::protobuf::Message for AddAuthFactorReply { + fn is_initialized(&self) -> bool { + for v in &self.error_info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if let Some(ref v) = self.error_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if let Some(ref v) = self.error_info.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> AddAuthFactorReply { + AddAuthFactorReply::new() + } + + fn default_instance() -> &'static AddAuthFactorReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(AddAuthFactorReply::new) + } +} + +impl ::protobuf::Clear for AddAuthFactorReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.error_info.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for AddAuthFactorReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct AuthenticateAuthFactorRequest { + // message fields + pub auth_session_id: ::std::vec::Vec, + pub auth_factor_label: ::std::string::String, + pub auth_input: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AuthenticateAuthFactorRequest { + fn default() -> &'a AuthenticateAuthFactorRequest { + ::default_instance() + } +} + +impl AuthenticateAuthFactorRequest { + pub fn new() -> AuthenticateAuthFactorRequest { + ::std::default::Default::default() + } + + // bytes auth_session_id = 1; + + + pub fn get_auth_session_id(&self) -> &[u8] { + &self.auth_session_id + } + pub fn clear_auth_session_id(&mut self) { + self.auth_session_id.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec) { + self.auth_session_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.auth_session_id + } + + // Take field + pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) + } + + // string auth_factor_label = 2; + + + pub fn get_auth_factor_label(&self) -> &str { + &self.auth_factor_label + } + pub fn clear_auth_factor_label(&mut self) { + self.auth_factor_label.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_factor_label(&mut self, v: ::std::string::String) { + self.auth_factor_label = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_factor_label(&mut self) -> &mut ::std::string::String { + &mut self.auth_factor_label + } + + // Take field + pub fn take_auth_factor_label(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.auth_factor_label, ::std::string::String::new()) + } + + // .user_data_auth.AuthInput auth_input = 3; + + + pub fn get_auth_input(&self) -> &super::auth_factor::AuthInput { + self.auth_input.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_auth_input(&mut self) { + self.auth_input.clear(); + } + + pub fn has_auth_input(&self) -> bool { + self.auth_input.is_some() + } + + // Param is passed by value, moved + pub fn set_auth_input(&mut self, v: super::auth_factor::AuthInput) { + self.auth_input = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_input(&mut self) -> &mut super::auth_factor::AuthInput { + if self.auth_input.is_none() { + self.auth_input.set_default(); + } + self.auth_input.as_mut().unwrap() + } + + // Take field + pub fn take_auth_input(&mut self) -> super::auth_factor::AuthInput { + self.auth_input.take().unwrap_or_else(|| super::auth_factor::AuthInput::new()) + } +} + +impl ::protobuf::Message for AuthenticateAuthFactorRequest { + fn is_initialized(&self) -> bool { + for v in &self.auth_input { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.auth_factor_label)?; + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.auth_input)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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(ref v) = self.auth_input.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + 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(ref v) = self.auth_input.as_ref() { + os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> AuthenticateAuthFactorRequest { + AuthenticateAuthFactorRequest::new() + } + + fn default_instance() -> &'static AuthenticateAuthFactorRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(AuthenticateAuthFactorRequest::new) + } +} + +impl ::protobuf::Clear for AuthenticateAuthFactorRequest { + fn clear(&mut self) { + self.auth_session_id.clear(); + self.auth_factor_label.clear(); + self.auth_input.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for AuthenticateAuthFactorRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct AuthenticateAuthFactorReply { + // message fields + pub error: CryptohomeErrorCode, + pub error_info: ::protobuf::SingularPtrField, + pub authenticated: bool, + pub authorized_for: ::std::vec::Vec, + // message oneof groups + pub _seconds_left: ::std::option::Option, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AuthenticateAuthFactorReply { + fn default() -> &'a AuthenticateAuthFactorReply { + ::default_instance() + } +} + +#[derive(Clone,PartialEq,Debug)] +pub enum AuthenticateAuthFactorReply_oneof__seconds_left { + seconds_left(u32), +} + +impl AuthenticateAuthFactorReply { + pub fn new() -> AuthenticateAuthFactorReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // .user_data_auth.CryptohomeErrorInfo error_info = 2; + + + pub fn get_error_info(&self) -> &CryptohomeErrorInfo { + self.error_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_error_info(&mut self) { + self.error_info.clear(); + } + + pub fn has_error_info(&self) -> bool { + self.error_info.is_some() + } + + // Param is passed by value, moved + pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { + self.error_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { + if self.error_info.is_none() { + self.error_info.set_default(); + } + self.error_info.as_mut().unwrap() + } + + // Take field + pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { + self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) + } + + // bool authenticated = 3; + + + pub fn get_authenticated(&self) -> bool { + self.authenticated + } + pub fn clear_authenticated(&mut self) { + self.authenticated = false; + } + + // Param is passed by value, moved + pub fn set_authenticated(&mut self, v: bool) { + self.authenticated = v; + } + + // repeated .user_data_auth.AuthIntent authorized_for = 4; + + + pub fn get_authorized_for(&self) -> &[super::auth_factor::AuthIntent] { + &self.authorized_for + } + pub fn clear_authorized_for(&mut self) { + self.authorized_for.clear(); + } + + // Param is passed by value, moved + pub fn set_authorized_for(&mut self, v: ::std::vec::Vec) { + self.authorized_for = v; + } + + // Mutable pointer to the field. + pub fn mut_authorized_for(&mut self) -> &mut ::std::vec::Vec { + &mut self.authorized_for + } + + // Take field + pub fn take_authorized_for(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.authorized_for, ::std::vec::Vec::new()) + } + + // uint32 seconds_left = 5; + + + pub fn get_seconds_left(&self) -> u32 { + match self._seconds_left { + ::std::option::Option::Some(AuthenticateAuthFactorReply_oneof__seconds_left::seconds_left(v)) => v, + _ => 0, + } + } + pub fn clear_seconds_left(&mut self) { + self._seconds_left = ::std::option::Option::None; + } + + pub fn has_seconds_left(&self) -> bool { + match self._seconds_left { + ::std::option::Option::Some(AuthenticateAuthFactorReply_oneof__seconds_left::seconds_left(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_seconds_left(&mut self, v: u32) { + self._seconds_left = ::std::option::Option::Some(AuthenticateAuthFactorReply_oneof__seconds_left::seconds_left(v)) + } +} + +impl ::protobuf::Message for AuthenticateAuthFactorReply { + fn is_initialized(&self) -> bool { + for v in &self.error_info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.authenticated = tmp; + }, + 4 => { + ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.authorized_for, 4, &mut self.unknown_fields)? + }, + 5 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self._seconds_left = ::std::option::Option::Some(AuthenticateAuthFactorReply_oneof__seconds_left::seconds_left(is.read_uint32()?)); + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if let Some(ref v) = self.error_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if self.authenticated != false { + my_size += 2; + } + for value in &self.authorized_for { + my_size += ::protobuf::rt::enum_size(4, *value); + }; + if let ::std::option::Option::Some(ref v) = self._seconds_left { + match v { + &AuthenticateAuthFactorReply_oneof__seconds_left::seconds_left(v) => { + my_size += ::protobuf::rt::value_size(5, v, ::protobuf::wire_format::WireTypeVarint); + }, + }; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if let Some(ref v) = self.error_info.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if self.authenticated != false { + os.write_bool(3, self.authenticated)?; + } + for v in &self.authorized_for { + os.write_enum(4, ::protobuf::ProtobufEnum::value(v))?; + }; + if let ::std::option::Option::Some(ref v) = self._seconds_left { + match v { + &AuthenticateAuthFactorReply_oneof__seconds_left::seconds_left(v) => { + os.write_uint32(5, v)?; + }, + }; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> AuthenticateAuthFactorReply { + AuthenticateAuthFactorReply::new() + } + + fn default_instance() -> &'static AuthenticateAuthFactorReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(AuthenticateAuthFactorReply::new) + } +} + +impl ::protobuf::Clear for AuthenticateAuthFactorReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.error_info.clear(); + self.authenticated = false; + self.authorized_for.clear(); + self._seconds_left = ::std::option::Option::None; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for AuthenticateAuthFactorReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct UpdateAuthFactorRequest { + // message fields + pub auth_session_id: ::std::vec::Vec, + pub auth_factor_label: ::std::string::String, + pub auth_factor: ::protobuf::SingularPtrField, + pub auth_input: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a UpdateAuthFactorRequest { + fn default() -> &'a UpdateAuthFactorRequest { + ::default_instance() + } +} + +impl UpdateAuthFactorRequest { + pub fn new() -> UpdateAuthFactorRequest { + ::std::default::Default::default() + } + + // bytes auth_session_id = 1; + + + pub fn get_auth_session_id(&self) -> &[u8] { + &self.auth_session_id + } + pub fn clear_auth_session_id(&mut self) { + self.auth_session_id.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec) { + self.auth_session_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.auth_session_id + } + + // Take field + pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) + } + + // string auth_factor_label = 2; + + + pub fn get_auth_factor_label(&self) -> &str { + &self.auth_factor_label + } + pub fn clear_auth_factor_label(&mut self) { + self.auth_factor_label.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_factor_label(&mut self, v: ::std::string::String) { + self.auth_factor_label = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_factor_label(&mut self) -> &mut ::std::string::String { + &mut self.auth_factor_label + } + + // Take field + pub fn take_auth_factor_label(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.auth_factor_label, ::std::string::String::new()) + } + + // .user_data_auth.AuthFactor auth_factor = 3; + + + pub fn get_auth_factor(&self) -> &super::auth_factor::AuthFactor { + self.auth_factor.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_auth_factor(&mut self) { + self.auth_factor.clear(); + } + + pub fn has_auth_factor(&self) -> bool { + self.auth_factor.is_some() + } + + // Param is passed by value, moved + pub fn set_auth_factor(&mut self, v: super::auth_factor::AuthFactor) { + self.auth_factor = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_factor(&mut self) -> &mut super::auth_factor::AuthFactor { + if self.auth_factor.is_none() { + self.auth_factor.set_default(); + } + self.auth_factor.as_mut().unwrap() + } + + // Take field + pub fn take_auth_factor(&mut self) -> super::auth_factor::AuthFactor { + self.auth_factor.take().unwrap_or_else(|| super::auth_factor::AuthFactor::new()) + } + + // .user_data_auth.AuthInput auth_input = 4; + + + pub fn get_auth_input(&self) -> &super::auth_factor::AuthInput { + self.auth_input.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_auth_input(&mut self) { + self.auth_input.clear(); + } + + pub fn has_auth_input(&self) -> bool { + self.auth_input.is_some() + } + + // Param is passed by value, moved + pub fn set_auth_input(&mut self, v: super::auth_factor::AuthInput) { + self.auth_input = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_input(&mut self) -> &mut super::auth_factor::AuthInput { + if self.auth_input.is_none() { + self.auth_input.set_default(); + } + self.auth_input.as_mut().unwrap() + } + + // Take field + pub fn take_auth_input(&mut self) -> super::auth_factor::AuthInput { + self.auth_input.take().unwrap_or_else(|| super::auth_factor::AuthInput::new()) + } +} + +impl ::protobuf::Message for UpdateAuthFactorRequest { + fn is_initialized(&self) -> bool { + for v in &self.auth_factor { + if !v.is_initialized() { + return false; + } + }; + for v in &self.auth_input { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.auth_factor_label)?; + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.auth_factor)?; + }, + 4 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.auth_input)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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(ref v) = self.auth_factor.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.auth_input.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + 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(ref v) = self.auth_factor.as_ref() { + os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if let Some(ref v) = self.auth_input.as_ref() { + os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> UpdateAuthFactorRequest { + UpdateAuthFactorRequest::new() + } + + fn default_instance() -> &'static UpdateAuthFactorRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(UpdateAuthFactorRequest::new) + } +} + +impl ::protobuf::Clear for UpdateAuthFactorRequest { + fn clear(&mut self) { + self.auth_session_id.clear(); + self.auth_factor_label.clear(); + self.auth_factor.clear(); + self.auth_input.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for UpdateAuthFactorRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct UpdateAuthFactorReply { + // message fields + pub error: CryptohomeErrorCode, + pub error_info: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a UpdateAuthFactorReply { + fn default() -> &'a UpdateAuthFactorReply { + ::default_instance() + } +} + +impl UpdateAuthFactorReply { + pub fn new() -> UpdateAuthFactorReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // .user_data_auth.CryptohomeErrorInfo error_info = 2; + + + pub fn get_error_info(&self) -> &CryptohomeErrorInfo { + self.error_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_error_info(&mut self) { + self.error_info.clear(); + } + + pub fn has_error_info(&self) -> bool { + self.error_info.is_some() + } + + // Param is passed by value, moved + pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { + self.error_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { + if self.error_info.is_none() { + self.error_info.set_default(); + } + self.error_info.as_mut().unwrap() + } + + // Take field + pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { + self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) + } +} + +impl ::protobuf::Message for UpdateAuthFactorReply { + fn is_initialized(&self) -> bool { + for v in &self.error_info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if let Some(ref v) = self.error_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if let Some(ref v) = self.error_info.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> UpdateAuthFactorReply { + UpdateAuthFactorReply::new() + } + + fn default_instance() -> &'static UpdateAuthFactorReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(UpdateAuthFactorReply::new) + } +} + +impl ::protobuf::Clear for UpdateAuthFactorReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.error_info.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for UpdateAuthFactorReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct RemoveAuthFactorRequest { + // message fields + pub auth_session_id: ::std::vec::Vec, + pub auth_factor_label: ::std::string::String, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a RemoveAuthFactorRequest { + fn default() -> &'a RemoveAuthFactorRequest { + ::default_instance() + } +} + +impl RemoveAuthFactorRequest { + pub fn new() -> RemoveAuthFactorRequest { + ::std::default::Default::default() + } + + // bytes auth_session_id = 1; + + + pub fn get_auth_session_id(&self) -> &[u8] { + &self.auth_session_id + } + pub fn clear_auth_session_id(&mut self) { + self.auth_session_id.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec) { + self.auth_session_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.auth_session_id + } + + // Take field + pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) + } + + // string auth_factor_label = 2; + + + pub fn get_auth_factor_label(&self) -> &str { + &self.auth_factor_label + } + pub fn clear_auth_factor_label(&mut self) { + self.auth_factor_label.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_factor_label(&mut self, v: ::std::string::String) { + self.auth_factor_label = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_factor_label(&mut self) -> &mut ::std::string::String { + &mut self.auth_factor_label + } + + // Take field + pub fn take_auth_factor_label(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.auth_factor_label, ::std::string::String::new()) + } +} + +impl ::protobuf::Message for RemoveAuthFactorRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.auth_factor_label)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + 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.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> RemoveAuthFactorRequest { + RemoveAuthFactorRequest::new() + } + + fn default_instance() -> &'static RemoveAuthFactorRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RemoveAuthFactorRequest::new) + } +} + +impl ::protobuf::Clear for RemoveAuthFactorRequest { + fn clear(&mut self) { + self.auth_session_id.clear(); + self.auth_factor_label.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for RemoveAuthFactorRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct RemoveAuthFactorReply { + // message fields + pub error: CryptohomeErrorCode, + pub error_info: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a RemoveAuthFactorReply { + fn default() -> &'a RemoveAuthFactorReply { + ::default_instance() + } +} + +impl RemoveAuthFactorReply { + pub fn new() -> RemoveAuthFactorReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // .user_data_auth.CryptohomeErrorInfo error_info = 2; + + + pub fn get_error_info(&self) -> &CryptohomeErrorInfo { + self.error_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_error_info(&mut self) { + self.error_info.clear(); + } + + pub fn has_error_info(&self) -> bool { + self.error_info.is_some() + } + + // Param is passed by value, moved + pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { + self.error_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { + if self.error_info.is_none() { + self.error_info.set_default(); + } + self.error_info.as_mut().unwrap() + } + + // Take field + pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { + self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) + } +} + +impl ::protobuf::Message for RemoveAuthFactorReply { + fn is_initialized(&self) -> bool { + for v in &self.error_info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if let Some(ref v) = self.error_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if let Some(ref v) = self.error_info.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> RemoveAuthFactorReply { + RemoveAuthFactorReply::new() + } + + fn default_instance() -> &'static RemoveAuthFactorReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(RemoveAuthFactorReply::new) + } +} + +impl ::protobuf::Clear for RemoveAuthFactorReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.error_info.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for RemoveAuthFactorReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ListAuthFactorsRequest { + // message fields + pub account_id: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ListAuthFactorsRequest { + fn default() -> &'a ListAuthFactorsRequest { + ::default_instance() + } +} + +impl ListAuthFactorsRequest { + pub fn new() -> ListAuthFactorsRequest { + ::std::default::Default::default() + } + + // .cryptohome.AccountIdentifier account_id = 1; + + + pub fn get_account_id(&self) -> &super::rpc::AccountIdentifier { + self.account_id.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_account_id(&mut self) { + self.account_id.clear(); + } + + 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: super::rpc::AccountIdentifier) { + self.account_id = ::protobuf::SingularPtrField::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 super::rpc::AccountIdentifier { + if self.account_id.is_none() { + self.account_id.set_default(); + } + self.account_id.as_mut().unwrap() + } + + // Take field + pub fn take_account_id(&mut self) -> super::rpc::AccountIdentifier { + self.account_id.take().unwrap_or_else(|| super::rpc::AccountIdentifier::new()) + } +} + +impl ::protobuf::Message for ListAuthFactorsRequest { + fn is_initialized(&self) -> bool { + for v in &self.account_id { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.account_id)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.account_id.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.account_id.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> ListAuthFactorsRequest { + ListAuthFactorsRequest::new() + } + + fn default_instance() -> &'static ListAuthFactorsRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ListAuthFactorsRequest::new) + } +} + +impl ::protobuf::Clear for ListAuthFactorsRequest { + fn clear(&mut self) { + self.account_id.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for ListAuthFactorsRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ListAuthFactorsReply { + // message fields + pub error: CryptohomeErrorCode, + pub error_info: ::protobuf::SingularPtrField, + pub configured_auth_factors_with_status: ::protobuf::RepeatedField, + pub supported_auth_factors: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a ListAuthFactorsReply { + fn default() -> &'a ListAuthFactorsReply { + ::default_instance() + } +} + +impl ListAuthFactorsReply { + pub fn new() -> ListAuthFactorsReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // .user_data_auth.CryptohomeErrorInfo error_info = 2; + + + pub fn get_error_info(&self) -> &CryptohomeErrorInfo { + self.error_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_error_info(&mut self) { + self.error_info.clear(); + } + + pub fn has_error_info(&self) -> bool { + self.error_info.is_some() + } + + // Param is passed by value, moved + pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { + self.error_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { + if self.error_info.is_none() { + self.error_info.set_default(); + } + self.error_info.as_mut().unwrap() + } + + // Take field + pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { + self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) + } + + // repeated .user_data_auth.AuthFactorWithStatus configured_auth_factors_with_status = 5; + + + pub fn get_configured_auth_factors_with_status(&self) -> &[AuthFactorWithStatus] { + &self.configured_auth_factors_with_status + } + pub fn clear_configured_auth_factors_with_status(&mut self) { + self.configured_auth_factors_with_status.clear(); + } + + // Param is passed by value, moved + pub fn set_configured_auth_factors_with_status(&mut self, v: ::protobuf::RepeatedField) { + self.configured_auth_factors_with_status = v; + } + + // Mutable pointer to the field. + pub fn mut_configured_auth_factors_with_status(&mut self) -> &mut ::protobuf::RepeatedField { + &mut self.configured_auth_factors_with_status + } + + // Take field + pub fn take_configured_auth_factors_with_status(&mut self) -> ::protobuf::RepeatedField { + ::std::mem::replace(&mut self.configured_auth_factors_with_status, ::protobuf::RepeatedField::new()) + } + + // repeated .user_data_auth.AuthFactorType supported_auth_factors = 4; + + + pub fn get_supported_auth_factors(&self) -> &[super::auth_factor::AuthFactorType] { + &self.supported_auth_factors + } + pub fn clear_supported_auth_factors(&mut self) { + self.supported_auth_factors.clear(); + } + + // Param is passed by value, moved + pub fn set_supported_auth_factors(&mut self, v: ::std::vec::Vec) { + self.supported_auth_factors = v; + } + + // Mutable pointer to the field. + pub fn mut_supported_auth_factors(&mut self) -> &mut ::std::vec::Vec { + &mut self.supported_auth_factors + } + + // Take field + pub fn take_supported_auth_factors(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.supported_auth_factors, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for ListAuthFactorsReply { + fn is_initialized(&self) -> bool { + for v in &self.error_info { + if !v.is_initialized() { + return false; + } + }; + for v in &self.configured_auth_factors_with_status { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; + }, + 5 => { + ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.configured_auth_factors_with_status)?; + }, + 4 => { + ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.supported_auth_factors, 4, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if let Some(ref v) = self.error_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + for value in &self.configured_auth_factors_with_status { + let len = value.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + }; + for value in &self.supported_auth_factors { + my_size += ::protobuf::rt::enum_size(4, *value); + }; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if let Some(ref v) = self.error_info.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + for v in &self.configured_auth_factors_with_status { + os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }; + for v in &self.supported_auth_factors { + os.write_enum(4, ::protobuf::ProtobufEnum::value(v))?; + }; + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> ListAuthFactorsReply { + ListAuthFactorsReply::new() + } + + fn default_instance() -> &'static ListAuthFactorsReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ListAuthFactorsReply::new) + } +} + +impl ::protobuf::Clear for ListAuthFactorsReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.error_info.clear(); + self.configured_auth_factors_with_status.clear(); + self.supported_auth_factors.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for ListAuthFactorsReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetRecoveryRequestRequest { + // message fields + pub auth_session_id: ::std::vec::Vec, + pub auth_factor_label: ::std::string::String, + pub requestor_user_id_type: GetRecoveryRequestRequest_UserType, + pub requestor_user_id: ::std::string::String, + pub gaia_access_token: ::std::string::String, + pub gaia_reauth_proof_token: ::std::string::String, + pub epoch_response: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetRecoveryRequestRequest { + fn default() -> &'a GetRecoveryRequestRequest { + ::default_instance() + } +} + +impl GetRecoveryRequestRequest { + pub fn new() -> GetRecoveryRequestRequest { + ::std::default::Default::default() + } + + // bytes auth_session_id = 1; + + + pub fn get_auth_session_id(&self) -> &[u8] { + &self.auth_session_id + } + pub fn clear_auth_session_id(&mut self) { + self.auth_session_id.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec) { + self.auth_session_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.auth_session_id + } + + // Take field + pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) + } + + // string auth_factor_label = 2; + + + pub fn get_auth_factor_label(&self) -> &str { + &self.auth_factor_label + } + pub fn clear_auth_factor_label(&mut self) { + self.auth_factor_label.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_factor_label(&mut self, v: ::std::string::String) { + self.auth_factor_label = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_factor_label(&mut self) -> &mut ::std::string::String { + &mut self.auth_factor_label + } + + // Take field + pub fn take_auth_factor_label(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.auth_factor_label, ::std::string::String::new()) + } + + // .user_data_auth.GetRecoveryRequestRequest.UserType requestor_user_id_type = 3; + + + pub fn get_requestor_user_id_type(&self) -> GetRecoveryRequestRequest_UserType { + self.requestor_user_id_type + } + pub fn clear_requestor_user_id_type(&mut self) { + self.requestor_user_id_type = GetRecoveryRequestRequest_UserType::UNKNOWN; + } + + // Param is passed by value, moved + pub fn set_requestor_user_id_type(&mut self, v: GetRecoveryRequestRequest_UserType) { + self.requestor_user_id_type = v; + } + + // string requestor_user_id = 4; + + + pub fn get_requestor_user_id(&self) -> &str { + &self.requestor_user_id + } + pub fn clear_requestor_user_id(&mut self) { + self.requestor_user_id.clear(); + } + + // Param is passed by value, moved + pub fn set_requestor_user_id(&mut self, v: ::std::string::String) { + self.requestor_user_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_requestor_user_id(&mut self) -> &mut ::std::string::String { + &mut self.requestor_user_id + } + + // Take field + pub fn take_requestor_user_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.requestor_user_id, ::std::string::String::new()) + } + + // string gaia_access_token = 5; + + + pub fn get_gaia_access_token(&self) -> &str { + &self.gaia_access_token + } + pub fn clear_gaia_access_token(&mut self) { + self.gaia_access_token.clear(); + } + + // Param is passed by value, moved + pub fn set_gaia_access_token(&mut self, v: ::std::string::String) { + self.gaia_access_token = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_gaia_access_token(&mut self) -> &mut ::std::string::String { + &mut self.gaia_access_token + } + + // Take field + pub fn take_gaia_access_token(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.gaia_access_token, ::std::string::String::new()) + } + + // string gaia_reauth_proof_token = 6; + + + pub fn get_gaia_reauth_proof_token(&self) -> &str { + &self.gaia_reauth_proof_token + } + pub fn clear_gaia_reauth_proof_token(&mut self) { + self.gaia_reauth_proof_token.clear(); + } + + // Param is passed by value, moved + pub fn set_gaia_reauth_proof_token(&mut self, v: ::std::string::String) { + self.gaia_reauth_proof_token = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_gaia_reauth_proof_token(&mut self) -> &mut ::std::string::String { + &mut self.gaia_reauth_proof_token + } + + // Take field + pub fn take_gaia_reauth_proof_token(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.gaia_reauth_proof_token, ::std::string::String::new()) + } + + // bytes epoch_response = 7; + + + pub fn get_epoch_response(&self) -> &[u8] { + &self.epoch_response + } + pub fn clear_epoch_response(&mut self) { + self.epoch_response.clear(); + } + + // Param is passed by value, moved + pub fn set_epoch_response(&mut self, v: ::std::vec::Vec) { + self.epoch_response = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_epoch_response(&mut self) -> &mut ::std::vec::Vec { + &mut self.epoch_response + } + + // Take field + pub fn take_epoch_response(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.epoch_response, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for GetRecoveryRequestRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.auth_factor_label)?; + }, + 3 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.requestor_user_id_type, 3, &mut self.unknown_fields)? + }, + 4 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.requestor_user_id)?; + }, + 5 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.gaia_access_token)?; + }, + 6 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.gaia_reauth_proof_token)?; + }, + 7 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.epoch_response)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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 != GetRecoveryRequestRequest_UserType::UNKNOWN { + my_size += ::protobuf::rt::enum_size(3, self.requestor_user_id_type); + } + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + 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 != GetRecoveryRequestRequest_UserType::UNKNOWN { + os.write_enum(3, ::protobuf::ProtobufEnum::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.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetRecoveryRequestRequest { + GetRecoveryRequestRequest::new() + } + + fn default_instance() -> &'static GetRecoveryRequestRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetRecoveryRequestRequest::new) + } +} + +impl ::protobuf::Clear for GetRecoveryRequestRequest { + fn clear(&mut self) { + self.auth_session_id.clear(); + self.auth_factor_label.clear(); + self.requestor_user_id_type = GetRecoveryRequestRequest_UserType::UNKNOWN; + self.requestor_user_id.clear(); + self.gaia_access_token.clear(); + self.gaia_reauth_proof_token.clear(); + self.epoch_response.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetRecoveryRequestRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum GetRecoveryRequestRequest_UserType { + UNKNOWN = 0, + GAIA_ID = 1, +} + +impl ::protobuf::ProtobufEnum for GetRecoveryRequestRequest_UserType { + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(GetRecoveryRequestRequest_UserType::UNKNOWN), + 1 => ::std::option::Option::Some(GetRecoveryRequestRequest_UserType::GAIA_ID), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [GetRecoveryRequestRequest_UserType] = &[ + GetRecoveryRequestRequest_UserType::UNKNOWN, + GetRecoveryRequestRequest_UserType::GAIA_ID, + ]; + values + } +} + +impl ::std::marker::Copy for GetRecoveryRequestRequest_UserType { +} + +impl ::std::default::Default for GetRecoveryRequestRequest_UserType { + fn default() -> Self { + GetRecoveryRequestRequest_UserType::UNKNOWN + } +} + +impl ::protobuf::reflect::ProtobufValue for GetRecoveryRequestRequest_UserType { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetRecoveryRequestReply { + // message fields + pub error: CryptohomeErrorCode, + pub error_info: ::protobuf::SingularPtrField, + pub recovery_request: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetRecoveryRequestReply { + fn default() -> &'a GetRecoveryRequestReply { + ::default_instance() + } +} + +impl GetRecoveryRequestReply { + pub fn new() -> GetRecoveryRequestReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // .user_data_auth.CryptohomeErrorInfo error_info = 2; + + + pub fn get_error_info(&self) -> &CryptohomeErrorInfo { + self.error_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_error_info(&mut self) { + self.error_info.clear(); + } + + pub fn has_error_info(&self) -> bool { + self.error_info.is_some() + } + + // Param is passed by value, moved + pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { + self.error_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { + if self.error_info.is_none() { + self.error_info.set_default(); + } + self.error_info.as_mut().unwrap() + } + + // Take field + pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { + self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) + } + + // bytes recovery_request = 3; + + + pub fn get_recovery_request(&self) -> &[u8] { + &self.recovery_request + } + pub fn clear_recovery_request(&mut self) { + self.recovery_request.clear(); + } + + // Param is passed by value, moved + pub fn set_recovery_request(&mut self, v: ::std::vec::Vec) { + self.recovery_request = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_recovery_request(&mut self) -> &mut ::std::vec::Vec { + &mut self.recovery_request + } + + // Take field + pub fn take_recovery_request(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.recovery_request, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for GetRecoveryRequestReply { + fn is_initialized(&self) -> bool { + for v in &self.error_info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; + }, + 3 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.recovery_request)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if let Some(ref v) = self.error_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if let Some(ref v) = self.error_info.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if !self.recovery_request.is_empty() { + os.write_bytes(3, &self.recovery_request)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetRecoveryRequestReply { + GetRecoveryRequestReply::new() + } + + fn default_instance() -> &'static GetRecoveryRequestReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetRecoveryRequestReply::new) + } +} + +impl ::protobuf::Clear for GetRecoveryRequestReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.error_info.clear(); + self.recovery_request.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetRecoveryRequestReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct PrepareAsyncAuthFactorRequest { + // message fields + pub auth_session_id: ::std::vec::Vec, + pub auth_factor_type: super::auth_factor::AuthFactorType, + pub purpose: super::auth_factor::AuthFactorPreparePurpose, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PrepareAsyncAuthFactorRequest { + fn default() -> &'a PrepareAsyncAuthFactorRequest { + ::default_instance() + } +} + +impl PrepareAsyncAuthFactorRequest { + pub fn new() -> PrepareAsyncAuthFactorRequest { + ::std::default::Default::default() + } + + // bytes auth_session_id = 1; + + + pub fn get_auth_session_id(&self) -> &[u8] { + &self.auth_session_id + } + pub fn clear_auth_session_id(&mut self) { + self.auth_session_id.clear(); + } + + // Param is passed by value, moved + pub fn set_auth_session_id(&mut self, v: ::std::vec::Vec) { + self.auth_session_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_auth_session_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.auth_session_id + } + + // Take field + pub fn take_auth_session_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.auth_session_id, ::std::vec::Vec::new()) + } + + // .user_data_auth.AuthFactorType auth_factor_type = 2; + + + pub fn get_auth_factor_type(&self) -> super::auth_factor::AuthFactorType { + self.auth_factor_type + } + pub fn clear_auth_factor_type(&mut self) { + self.auth_factor_type = super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED; + } + + // Param is passed by value, moved + pub fn set_auth_factor_type(&mut self, v: super::auth_factor::AuthFactorType) { + self.auth_factor_type = v; + } + + // .user_data_auth.AuthFactorPreparePurpose purpose = 3; + + + pub fn get_purpose(&self) -> super::auth_factor::AuthFactorPreparePurpose { + self.purpose + } + pub fn clear_purpose(&mut self) { + self.purpose = super::auth_factor::AuthFactorPreparePurpose::PURPOSE_UNSPECIFIED; + } + + // Param is passed by value, moved + pub fn set_purpose(&mut self, v: super::auth_factor::AuthFactorPreparePurpose) { + self.purpose = v; + } +} + +impl ::protobuf::Message for PrepareAsyncAuthFactorRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.auth_session_id)?; + }, + 2 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.auth_factor_type, 2, &mut self.unknown_fields)? + }, + 3 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.purpose, 3, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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 != super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED { + my_size += ::protobuf::rt::enum_size(2, self.auth_factor_type); + } + if self.purpose != super::auth_factor::AuthFactorPreparePurpose::PURPOSE_UNSPECIFIED { + my_size += ::protobuf::rt::enum_size(3, self.purpose); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.auth_session_id.is_empty() { + os.write_bytes(1, &self.auth_session_id)?; + } + if self.auth_factor_type != super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED { + os.write_enum(2, ::protobuf::ProtobufEnum::value(&self.auth_factor_type))?; + } + if self.purpose != super::auth_factor::AuthFactorPreparePurpose::PURPOSE_UNSPECIFIED { + os.write_enum(3, ::protobuf::ProtobufEnum::value(&self.purpose))?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> PrepareAsyncAuthFactorRequest { + PrepareAsyncAuthFactorRequest::new() + } + + fn default_instance() -> &'static PrepareAsyncAuthFactorRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PrepareAsyncAuthFactorRequest::new) + } +} + +impl ::protobuf::Clear for PrepareAsyncAuthFactorRequest { + fn clear(&mut self) { + self.auth_session_id.clear(); + self.auth_factor_type = super::auth_factor::AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED; + self.purpose = super::auth_factor::AuthFactorPreparePurpose::PURPOSE_UNSPECIFIED; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for PrepareAsyncAuthFactorRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct PrepareAsyncAuthFactorReply { + // message fields + pub error: CryptohomeErrorCode, + pub error_info: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PrepareAsyncAuthFactorReply { + fn default() -> &'a PrepareAsyncAuthFactorReply { + ::default_instance() + } +} + +impl PrepareAsyncAuthFactorReply { + pub fn new() -> PrepareAsyncAuthFactorReply { + ::std::default::Default::default() + } + + // .user_data_auth.CryptohomeErrorCode error = 1; + + + pub fn get_error(&self) -> CryptohomeErrorCode { + self.error + } + pub fn clear_error(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + } + + // Param is passed by value, moved + pub fn set_error(&mut self, v: CryptohomeErrorCode) { + self.error = v; + } + + // .user_data_auth.CryptohomeErrorInfo error_info = 2; + + + pub fn get_error_info(&self) -> &CryptohomeErrorInfo { + self.error_info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_error_info(&mut self) { + self.error_info.clear(); + } + + pub fn has_error_info(&self) -> bool { + self.error_info.is_some() + } + + // Param is passed by value, moved + pub fn set_error_info(&mut self, v: CryptohomeErrorInfo) { + self.error_info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_error_info(&mut self) -> &mut CryptohomeErrorInfo { + if self.error_info.is_none() { + self.error_info.set_default(); + } + self.error_info.as_mut().unwrap() + } + + // Take field + pub fn take_error_info(&mut self) -> CryptohomeErrorInfo { + self.error_info.take().unwrap_or_else(|| CryptohomeErrorInfo::new()) + } +} + +impl ::protobuf::Message for PrepareAsyncAuthFactorReply { + fn is_initialized(&self) -> bool { + for v in &self.error_info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.error, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.error_info)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + my_size += ::protobuf::rt::enum_size(1, self.error); + } + if let Some(ref v) = self.error_info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.error != CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.error))?; + } + if let Some(ref v) = self.error_info.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> PrepareAsyncAuthFactorReply { + PrepareAsyncAuthFactorReply::new() + } + + fn default_instance() -> &'static PrepareAsyncAuthFactorReply { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PrepareAsyncAuthFactorReply::new) + } +} + +impl ::protobuf::Clear for PrepareAsyncAuthFactorReply { + fn clear(&mut self) { + self.error = CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET; + self.error_info.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for PrepareAsyncAuthFactorReply { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct AsyncAuthScanResult { + // message oneof groups + pub scan_result: ::std::option::Option, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AsyncAuthScanResult { + fn default() -> &'a AsyncAuthScanResult { + ::default_instance() + } +} + +#[derive(Clone,PartialEq,Debug)] +pub enum AsyncAuthScanResult_oneof_scan_result { + fingerprint_result(FingerprintScanResult), +} + +impl AsyncAuthScanResult { + pub fn new() -> AsyncAuthScanResult { + ::std::default::Default::default() + } + + // .user_data_auth.FingerprintScanResult fingerprint_result = 1; + + + pub fn get_fingerprint_result(&self) -> FingerprintScanResult { + match self.scan_result { + ::std::option::Option::Some(AsyncAuthScanResult_oneof_scan_result::fingerprint_result(v)) => 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(AsyncAuthScanResult_oneof_scan_result::fingerprint_result(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_fingerprint_result(&mut self, v: FingerprintScanResult) { + self.scan_result = ::std::option::Option::Some(AsyncAuthScanResult_oneof_scan_result::fingerprint_result(v)) + } +} + +impl ::protobuf::Message for AsyncAuthScanResult { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.scan_result = ::std::option::Option::Some(AsyncAuthScanResult_oneof_scan_result::fingerprint_result(is.read_enum()?)); + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let ::std::option::Option::Some(ref v) = self.scan_result { + match v { + &AsyncAuthScanResult_oneof_scan_result::fingerprint_result(v) => { + my_size += ::protobuf::rt::enum_size(1, v); + }, + }; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let ::std::option::Option::Some(ref v) = self.scan_result { + match v { + &AsyncAuthScanResult_oneof_scan_result::fingerprint_result(v) => { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&v))?; + }, + }; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> AsyncAuthScanResult { + AsyncAuthScanResult::new() + } + + fn default_instance() -> &'static AsyncAuthScanResult { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(AsyncAuthScanResult::new) + } +} + +impl ::protobuf::Clear for AsyncAuthScanResult { + fn clear(&mut self) { + self.scan_result = ::std::option::Option::None; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for AsyncAuthScanResult { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct FingerprintEnrollmentProgress { + // message fields + pub percent_complete: i32, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a FingerprintEnrollmentProgress { + fn default() -> &'a FingerprintEnrollmentProgress { + ::default_instance() + } +} + +impl FingerprintEnrollmentProgress { + pub fn new() -> FingerprintEnrollmentProgress { + ::std::default::Default::default() + } + + // int32 percent_complete = 1; + + + pub fn get_percent_complete(&self) -> i32 { + self.percent_complete + } + pub fn clear_percent_complete(&mut self) { + self.percent_complete = 0; + } + + // Param is passed by value, moved + pub fn set_percent_complete(&mut self, v: i32) { + self.percent_complete = v; + } +} + +impl ::protobuf::Message for FingerprintEnrollmentProgress { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int32()?; + self.percent_complete = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.percent_complete != 0 { + my_size += ::protobuf::rt::value_size(1, self.percent_complete, ::protobuf::wire_format::WireTypeVarint); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.percent_complete != 0 { + os.write_int32(1, self.percent_complete)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> FingerprintEnrollmentProgress { + FingerprintEnrollmentProgress::new() + } + + fn default_instance() -> &'static FingerprintEnrollmentProgress { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(FingerprintEnrollmentProgress::new) + } +} + +impl ::protobuf::Clear for FingerprintEnrollmentProgress { + fn clear(&mut self) { + self.percent_complete = 0; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for FingerprintEnrollmentProgress { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct AsyncAuthEnrollmentProgress { + // message fields + pub scan_result: ::protobuf::SingularPtrField, + pub done: bool, + // message oneof groups + pub progress: ::std::option::Option, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AsyncAuthEnrollmentProgress { + fn default() -> &'a AsyncAuthEnrollmentProgress { + ::default_instance() + } +} + +#[derive(Clone,PartialEq,Debug)] +pub enum AsyncAuthEnrollmentProgress_oneof_progress { + fingerprint_progress(FingerprintEnrollmentProgress), +} + +impl AsyncAuthEnrollmentProgress { + pub fn new() -> AsyncAuthEnrollmentProgress { + ::std::default::Default::default() + } + + // .user_data_auth.AsyncAuthScanResult scan_result = 1; + + + pub fn get_scan_result(&self) -> &AsyncAuthScanResult { + self.scan_result.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_scan_result(&mut self) { + self.scan_result.clear(); + } + + pub fn has_scan_result(&self) -> bool { + self.scan_result.is_some() + } + + // Param is passed by value, moved + pub fn set_scan_result(&mut self, v: AsyncAuthScanResult) { + self.scan_result = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_scan_result(&mut self) -> &mut AsyncAuthScanResult { + if self.scan_result.is_none() { + self.scan_result.set_default(); + } + self.scan_result.as_mut().unwrap() + } + + // Take field + pub fn take_scan_result(&mut self) -> AsyncAuthScanResult { + self.scan_result.take().unwrap_or_else(|| AsyncAuthScanResult::new()) + } + + // bool done = 2; + + + pub fn get_done(&self) -> bool { + self.done + } + pub fn clear_done(&mut self) { + self.done = false; + } + + // Param is passed by value, moved + pub fn set_done(&mut self, v: bool) { + self.done = v; + } + + // .user_data_auth.FingerprintEnrollmentProgress fingerprint_progress = 3; + + + pub fn get_fingerprint_progress(&self) -> &FingerprintEnrollmentProgress { + match self.progress { + ::std::option::Option::Some(AsyncAuthEnrollmentProgress_oneof_progress::fingerprint_progress(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(AsyncAuthEnrollmentProgress_oneof_progress::fingerprint_progress(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_fingerprint_progress(&mut self, v: FingerprintEnrollmentProgress) { + self.progress = ::std::option::Option::Some(AsyncAuthEnrollmentProgress_oneof_progress::fingerprint_progress(v)) + } + + // Mutable pointer to the field. + pub fn mut_fingerprint_progress(&mut self) -> &mut FingerprintEnrollmentProgress { + if let ::std::option::Option::Some(AsyncAuthEnrollmentProgress_oneof_progress::fingerprint_progress(_)) = self.progress { + } else { + self.progress = ::std::option::Option::Some(AsyncAuthEnrollmentProgress_oneof_progress::fingerprint_progress(FingerprintEnrollmentProgress::new())); + } + match self.progress { + ::std::option::Option::Some(AsyncAuthEnrollmentProgress_oneof_progress::fingerprint_progress(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(AsyncAuthEnrollmentProgress_oneof_progress::fingerprint_progress(v)) => v, + _ => panic!(), + } + } else { + FingerprintEnrollmentProgress::new() + } + } +} + +impl ::protobuf::Message for AsyncAuthEnrollmentProgress { + fn is_initialized(&self) -> bool { + for v in &self.scan_result { + if !v.is_initialized() { + return false; + } + }; + if let Some(AsyncAuthEnrollmentProgress_oneof_progress::fingerprint_progress(ref v)) = self.progress { + if !v.is_initialized() { + return false; + } + } + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.scan_result)?; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.done = tmp; + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.progress = ::std::option::Option::Some(AsyncAuthEnrollmentProgress_oneof_progress::fingerprint_progress(is.read_message()?)); + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.scan_result.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if self.done != false { + my_size += 2; + } + if let ::std::option::Option::Some(ref v) = self.progress { + match v { + &AsyncAuthEnrollmentProgress_oneof_progress::fingerprint_progress(ref v) => { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + }, + }; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.scan_result.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if self.done != false { + os.write_bool(2, self.done)?; + } + if let ::std::option::Option::Some(ref v) = self.progress { + match v { + &AsyncAuthEnrollmentProgress_oneof_progress::fingerprint_progress(ref v) => { + os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }, + }; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> AsyncAuthEnrollmentProgress { + AsyncAuthEnrollmentProgress::new() + } + + fn default_instance() -> &'static AsyncAuthEnrollmentProgress { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(AsyncAuthEnrollmentProgress::new) + } +} + +impl ::protobuf::Clear for AsyncAuthEnrollmentProgress { + fn clear(&mut self) { + self.scan_result.clear(); + self.done = false; + self.progress = ::std::option::Option::None; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for AsyncAuthEnrollmentProgress { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum CryptohomeErrorCode { + CRYPTOHOME_ERROR_NOT_SET = 0, + CRYPTOHOME_ERROR_ACCOUNT_NOT_FOUND = 1, + CRYPTOHOME_ERROR_AUTHORIZATION_KEY_NOT_FOUND = 2, + CRYPTOHOME_ERROR_AUTHORIZATION_KEY_FAILED = 3, + CRYPTOHOME_ERROR_NOT_IMPLEMENTED = 4, + CRYPTOHOME_ERROR_MOUNT_FATAL = 5, + CRYPTOHOME_ERROR_MOUNT_MOUNT_POINT_BUSY = 6, + CRYPTOHOME_ERROR_TPM_COMM_ERROR = 7, + CRYPTOHOME_ERROR_TPM_DEFEND_LOCK = 8, + CRYPTOHOME_ERROR_TPM_NEEDS_REBOOT = 9, + CRYPTOHOME_ERROR_AUTHORIZATION_KEY_DENIED = 10, + CRYPTOHOME_ERROR_KEY_QUOTA_EXCEEDED = 11, + CRYPTOHOME_ERROR_KEY_LABEL_EXISTS = 12, + CRYPTOHOME_ERROR_BACKING_STORE_FAILURE = 13, + CRYPTOHOME_ERROR_UPDATE_SIGNATURE_INVALID = 14, + CRYPTOHOME_ERROR_KEY_NOT_FOUND = 15, + CRYPTOHOME_ERROR_LOCKBOX_SIGNATURE_INVALID = 16, + CRYPTOHOME_ERROR_LOCKBOX_CANNOT_SIGN = 17, + CRYPTOHOME_ERROR_BOOT_ATTRIBUTE_NOT_FOUND = 18, + CRYPTOHOME_ERROR_BOOT_ATTRIBUTES_CANNOT_SIGN = 19, + CRYPTOHOME_ERROR_TPM_EK_NOT_AVAILABLE = 20, + CRYPTOHOME_ERROR_ATTESTATION_NOT_READY = 21, + CRYPTOHOME_ERROR_CANNOT_CONNECT_TO_CA = 22, + CRYPTOHOME_ERROR_CA_REFUSED_ENROLLMENT = 23, + CRYPTOHOME_ERROR_CA_REFUSED_CERTIFICATE = 24, + CRYPTOHOME_ERROR_INTERNAL_ATTESTATION_ERROR = 25, + CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_INVALID = 26, + CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_CANNOT_STORE = 27, + CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_CANNOT_REMOVE = 28, + CRYPTOHOME_ERROR_MOUNT_OLD_ENCRYPTION = 29, + CRYPTOHOME_ERROR_MOUNT_PREVIOUS_MIGRATION_INCOMPLETE = 30, + CRYPTOHOME_ERROR_MIGRATE_KEY_FAILED = 31, + CRYPTOHOME_ERROR_REMOVE_FAILED = 32, + CRYPTOHOME_ERROR_INVALID_ARGUMENT = 33, + CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_GET_FAILED = 34, + CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_SET_FAILED = 35, + CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_FINALIZE_FAILED = 36, + CRYPTOHOME_ERROR_UPDATE_USER_ACTIVITY_TIMESTAMP_FAILED = 37, + CRYPTOHOME_ERROR_FAILED_TO_READ_PCR = 38, + CRYPTOHOME_ERROR_PCR_ALREADY_EXTENDED = 39, + CRYPTOHOME_ERROR_FAILED_TO_EXTEND_PCR = 40, + CRYPTOHOME_ERROR_TPM_UPDATE_REQUIRED = 41, + CRYPTOHOME_ERROR_FINGERPRINT_ERROR_INTERNAL = 42, + CRYPTOHOME_ERROR_FINGERPRINT_RETRY_REQUIRED = 43, + CRYPTOHOME_ERROR_FINGERPRINT_DENIED = 44, + CRYPTOHOME_ERROR_VAULT_UNRECOVERABLE = 45, + CRYPTOHOME_ERROR_FIDO_MAKE_CREDENTIAL_FAILED = 46, + CRYPTOHOME_ERROR_FIDO_GET_ASSERTION_FAILED = 47, + CRYPTOHOME_TOKEN_SERIALIZATION_FAILED = 48, + CRYPTOHOME_INVALID_AUTH_SESSION_TOKEN = 49, + CRYPTOHOME_ADD_CREDENTIALS_FAILED = 50, + CRYPTOHOME_ERROR_UNAUTHENTICATED_AUTH_SESSION = 51, + CRYPTOHOME_ERROR_UNKNOWN_LEGACY = 52, + CRYPTOHOME_ERROR_UNUSABLE_VAULT = 53, + CRYPTOHOME_REMOVE_CREDENTIALS_FAILED = 54, + CRYPTOHOME_UPDATE_CREDENTIALS_FAILED = 55, +} + +impl ::protobuf::ProtobufEnum for 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), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static 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, + ]; + values + } +} + +impl ::std::marker::Copy for CryptohomeErrorCode { +} + +impl ::std::default::Default for CryptohomeErrorCode { + fn default() -> Self { + CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET + } +} + +impl ::protobuf::reflect::ProtobufValue for CryptohomeErrorCode { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum PrimaryAction { + PRIMARY_NO_ERROR = 0, + PRIMARY_NONE = 1, + PRIMARY_CREATE_REQUIRED = 2, + PRIMARY_NOTIFY_OLD_ENCRYPTION_POLICY = 3, + PRIMARY_RESUME_PREVIOUS_MIGRATION = 4, + PRIMARY_TPM_UDPATE_REQUIRED = 5, + PRIMARY_TPM_NEEDS_REBOOT = 6, + PRIMARY_TPM_LOCKOUT = 7, + PRIMARY_INCORRECT_AUTH = 8, +} + +impl ::protobuf::ProtobufEnum for 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), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static 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, + ]; + values + } +} + +impl ::std::marker::Copy for PrimaryAction { +} + +impl ::std::default::Default for PrimaryAction { + fn default() -> Self { + PrimaryAction::PRIMARY_NO_ERROR + } +} + +impl ::protobuf::reflect::ProtobufValue for PrimaryAction { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum PossibleAction { + POSSIBLY_NONE = 0, + POSSIBLY_RETRY = 1, + POSSIBLY_REBOOT = 2, + POSSIBLY_AUTH = 3, + POSSIBLY_INCORRECT_AUTH = 4, + POSSIBLY_DELETE_VAULT = 5, + POSSIBLY_POWERWASH = 6, + POSSIBLY_DEV_CHECK_UNEXPECTED_STATE = 7, + POSSIBLY_FATAL = 8, +} + +impl ::protobuf::ProtobufEnum for 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), + 4 => ::std::option::Option::Some(PossibleAction::POSSIBLY_INCORRECT_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 + } + } + + fn values() -> &'static [Self] { + static values: &'static [PossibleAction] = &[ + PossibleAction::POSSIBLY_NONE, + PossibleAction::POSSIBLY_RETRY, + PossibleAction::POSSIBLY_REBOOT, + PossibleAction::POSSIBLY_AUTH, + PossibleAction::POSSIBLY_INCORRECT_AUTH, + PossibleAction::POSSIBLY_DELETE_VAULT, + PossibleAction::POSSIBLY_POWERWASH, + PossibleAction::POSSIBLY_DEV_CHECK_UNEXPECTED_STATE, + PossibleAction::POSSIBLY_FATAL, + ]; + values + } +} + +impl ::std::marker::Copy for PossibleAction { +} + +impl ::std::default::Default for PossibleAction { + fn default() -> Self { + PossibleAction::POSSIBLY_NONE + } +} + +impl ::protobuf::reflect::ProtobufValue for PossibleAction { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum DircryptoMigrationStatus { + DIRCRYPTO_MIGRATION_SUCCESS = 0, + DIRCRYPTO_MIGRATION_FAILED = 1, + DIRCRYPTO_MIGRATION_INITIALIZING = 2, + DIRCRYPTO_MIGRATION_IN_PROGRESS = 3, +} + +impl ::protobuf::ProtobufEnum for 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 + } + } + + fn values() -> &'static [Self] { + static values: &'static [DircryptoMigrationStatus] = &[ + DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_SUCCESS, + DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_FAILED, + DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_INITIALIZING, + DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_IN_PROGRESS, + ]; + values + } +} + +impl ::std::marker::Copy for DircryptoMigrationStatus { +} + +impl ::std::default::Default for DircryptoMigrationStatus { + fn default() -> Self { + DircryptoMigrationStatus::DIRCRYPTO_MIGRATION_SUCCESS + } +} + +impl ::protobuf::reflect::ProtobufValue for DircryptoMigrationStatus { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum AuthSessionFlags { + AUTH_SESSION_FLAGS_NONE = 0, + AUTH_SESSION_FLAGS_EPHEMERAL_USER = 2, +} + +impl ::protobuf::ProtobufEnum for 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 + } + } + + fn values() -> &'static [Self] { + static values: &'static [AuthSessionFlags] = &[ + AuthSessionFlags::AUTH_SESSION_FLAGS_NONE, + AuthSessionFlags::AUTH_SESSION_FLAGS_EPHEMERAL_USER, + ]; + values + } +} + +impl ::std::marker::Copy for AuthSessionFlags { +} + +impl ::std::default::Default for AuthSessionFlags { + fn default() -> Self { + AuthSessionFlags::AUTH_SESSION_FLAGS_NONE + } +} + +impl ::protobuf::reflect::ProtobufValue for AuthSessionFlags { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum AuthSessionStatus { + AUTH_SESSION_STATUS_NOT_SET = 0, + AUTH_SESSION_STATUS_FURTHER_FACTOR_REQUIRED = 1, + AUTH_SESSION_STATUS_AUTHENTICATED = 2, + AUTH_SESSION_STATUS_INVALID_AUTH_SESSION = 3, +} + +impl ::protobuf::ProtobufEnum for 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 + } + } + + fn values() -> &'static [Self] { + static 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, + ]; + values + } +} + +impl ::std::marker::Copy for AuthSessionStatus { +} + +impl ::std::default::Default for AuthSessionStatus { + fn default() -> Self { + AuthSessionStatus::AUTH_SESSION_STATUS_NOT_SET + } +} + +impl ::protobuf::reflect::ProtobufValue for AuthSessionStatus { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum VaultEncryptionType { + CRYPTOHOME_VAULT_ENCRYPTION_ANY = 0, + CRYPTOHOME_VAULT_ENCRYPTION_ECRYPTFS = 1, + CRYPTOHOME_VAULT_ENCRYPTION_FSCRYPT = 2, + CRYPTOHOME_VAULT_ENCRYPTION_DMCRYPT = 3, +} + +impl ::protobuf::ProtobufEnum for 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 + } + } + + fn values() -> &'static [Self] { + static values: &'static [VaultEncryptionType] = &[ + VaultEncryptionType::CRYPTOHOME_VAULT_ENCRYPTION_ANY, + VaultEncryptionType::CRYPTOHOME_VAULT_ENCRYPTION_ECRYPTFS, + VaultEncryptionType::CRYPTOHOME_VAULT_ENCRYPTION_FSCRYPT, + VaultEncryptionType::CRYPTOHOME_VAULT_ENCRYPTION_DMCRYPT, + ]; + values + } +} + +impl ::std::marker::Copy for VaultEncryptionType { +} + +impl ::std::default::Default for VaultEncryptionType { + fn default() -> Self { + VaultEncryptionType::CRYPTOHOME_VAULT_ENCRYPTION_ANY + } +} + +impl ::protobuf::reflect::ProtobufValue for VaultEncryptionType { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum InstallAttributesState { + UNKNOWN = 0, + TPM_NOT_OWNED = 1, + FIRST_INSTALL = 2, + VALID = 3, + INVALID = 4, +} + +impl ::protobuf::ProtobufEnum for 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 + } + } + + fn values() -> &'static [Self] { + static values: &'static [InstallAttributesState] = &[ + InstallAttributesState::UNKNOWN, + InstallAttributesState::TPM_NOT_OWNED, + InstallAttributesState::FIRST_INSTALL, + InstallAttributesState::VALID, + InstallAttributesState::INVALID, + ]; + values + } +} + +impl ::std::marker::Copy for InstallAttributesState { +} + +impl ::std::default::Default for InstallAttributesState { + fn default() -> Self { + InstallAttributesState::UNKNOWN + } +} + +impl ::protobuf::reflect::ProtobufValue for InstallAttributesState { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum FingerprintScanResult { + FINGERPRINT_SCAN_RESULT_SUCCESS = 0, + FINGERPRINT_SCAN_RESULT_RETRY = 1, + FINGERPRINT_SCAN_RESULT_LOCKOUT = 2, + FINGERPRINT_SCAN_RESULT_FATAL_ERROR = 3, +} + +impl ::protobuf::ProtobufEnum for 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), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [FingerprintScanResult] = &[ + FingerprintScanResult::FINGERPRINT_SCAN_RESULT_SUCCESS, + FingerprintScanResult::FINGERPRINT_SCAN_RESULT_RETRY, + FingerprintScanResult::FINGERPRINT_SCAN_RESULT_LOCKOUT, + FingerprintScanResult::FINGERPRINT_SCAN_RESULT_FATAL_ERROR, + ]; + values + } +} + +impl ::std::marker::Copy for FingerprintScanResult { +} + +impl ::std::default::Default for FingerprintScanResult { + fn default() -> Self { + FingerprintScanResult::FINGERPRINT_SCAN_RESULT_SUCCESS + } +} + +impl ::protobuf::reflect::ProtobufValue for FingerprintScanResult { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} diff --git a/system_api/src/protos/auth_factor.rs b/system_api/src/protos/auth_factor.rs new file mode 100644 index 000000000..afb6c077a --- /dev/null +++ b/system_api/src/protos/auth_factor.rs @@ -0,0 +1,3098 @@ +// This file is generated by rust-protobuf 2.27.1. Do not edit +// @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_imports)] +#![allow(unused_results)] +//! Generated file from `auth_factor.proto` + +/// Generated files are compatible only with the same version +/// of protobuf runtime. +// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_27_1; + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct PasswordAuthInput { + // message fields + pub secret: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PasswordAuthInput { + fn default() -> &'a PasswordAuthInput { + ::default_instance() + } +} + +impl PasswordAuthInput { + pub fn new() -> PasswordAuthInput { + ::std::default::Default::default() + } + + // bytes secret = 1; + + + pub fn get_secret(&self) -> &[u8] { + &self.secret + } + pub fn clear_secret(&mut self) { + self.secret.clear(); + } + + // Param is passed by value, moved + pub fn set_secret(&mut self, v: ::std::vec::Vec) { + self.secret = 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 { + &mut self.secret + } + + // Take field + pub fn take_secret(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.secret, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for PasswordAuthInput { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.secret)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.secret.is_empty() { + os.write_bytes(1, &self.secret)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> PasswordAuthInput { + PasswordAuthInput::new() + } + + fn default_instance() -> &'static PasswordAuthInput { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PasswordAuthInput::new) + } +} + +impl ::protobuf::Clear for PasswordAuthInput { + fn clear(&mut self) { + self.secret.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for PasswordAuthInput { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct PinAuthInput { + // message fields + pub secret: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PinAuthInput { + fn default() -> &'a PinAuthInput { + ::default_instance() + } +} + +impl PinAuthInput { + pub fn new() -> PinAuthInput { + ::std::default::Default::default() + } + + // bytes secret = 1; + + + pub fn get_secret(&self) -> &[u8] { + &self.secret + } + pub fn clear_secret(&mut self) { + self.secret.clear(); + } + + // Param is passed by value, moved + pub fn set_secret(&mut self, v: ::std::vec::Vec) { + self.secret = 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 { + &mut self.secret + } + + // Take field + pub fn take_secret(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.secret, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for PinAuthInput { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.secret)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.secret.is_empty() { + os.write_bytes(1, &self.secret)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> PinAuthInput { + PinAuthInput::new() + } + + fn default_instance() -> &'static PinAuthInput { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PinAuthInput::new) + } +} + +impl ::protobuf::Clear for PinAuthInput { + fn clear(&mut self) { + self.secret.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for PinAuthInput { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct CryptohomeRecoveryAuthInput { + // message fields + pub mediator_pub_key: ::std::vec::Vec, + pub epoch_response: ::std::vec::Vec, + pub recovery_response: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CryptohomeRecoveryAuthInput { + fn default() -> &'a CryptohomeRecoveryAuthInput { + ::default_instance() + } +} + +impl CryptohomeRecoveryAuthInput { + pub fn new() -> CryptohomeRecoveryAuthInput { + ::std::default::Default::default() + } + + // bytes mediator_pub_key = 1; + + + pub fn get_mediator_pub_key(&self) -> &[u8] { + &self.mediator_pub_key + } + pub fn clear_mediator_pub_key(&mut self) { + self.mediator_pub_key.clear(); + } + + // Param is passed by value, moved + pub fn set_mediator_pub_key(&mut self, v: ::std::vec::Vec) { + self.mediator_pub_key = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_mediator_pub_key(&mut self) -> &mut ::std::vec::Vec { + &mut self.mediator_pub_key + } + + // Take field + pub fn take_mediator_pub_key(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.mediator_pub_key, ::std::vec::Vec::new()) + } + + // bytes epoch_response = 2; + + + pub fn get_epoch_response(&self) -> &[u8] { + &self.epoch_response + } + pub fn clear_epoch_response(&mut self) { + self.epoch_response.clear(); + } + + // Param is passed by value, moved + pub fn set_epoch_response(&mut self, v: ::std::vec::Vec) { + self.epoch_response = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_epoch_response(&mut self) -> &mut ::std::vec::Vec { + &mut self.epoch_response + } + + // Take field + pub fn take_epoch_response(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.epoch_response, ::std::vec::Vec::new()) + } + + // bytes recovery_response = 3; + + + pub fn get_recovery_response(&self) -> &[u8] { + &self.recovery_response + } + pub fn clear_recovery_response(&mut self) { + self.recovery_response.clear(); + } + + // Param is passed by value, moved + pub fn set_recovery_response(&mut self, v: ::std::vec::Vec) { + self.recovery_response = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_recovery_response(&mut self) -> &mut ::std::vec::Vec { + &mut self.recovery_response + } + + // Take field + pub fn take_recovery_response(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.recovery_response, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for CryptohomeRecoveryAuthInput { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.mediator_pub_key)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.epoch_response)?; + }, + 3 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.recovery_response)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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.epoch_response.is_empty() { + my_size += ::protobuf::rt::bytes_size(2, &self.epoch_response); + } + if !self.recovery_response.is_empty() { + my_size += ::protobuf::rt::bytes_size(3, &self.recovery_response); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.mediator_pub_key.is_empty() { + os.write_bytes(1, &self.mediator_pub_key)?; + } + if !self.epoch_response.is_empty() { + os.write_bytes(2, &self.epoch_response)?; + } + if !self.recovery_response.is_empty() { + os.write_bytes(3, &self.recovery_response)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> CryptohomeRecoveryAuthInput { + CryptohomeRecoveryAuthInput::new() + } + + fn default_instance() -> &'static CryptohomeRecoveryAuthInput { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(CryptohomeRecoveryAuthInput::new) + } +} + +impl ::protobuf::Clear for CryptohomeRecoveryAuthInput { + fn clear(&mut self) { + self.mediator_pub_key.clear(); + self.epoch_response.clear(); + self.recovery_response.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for CryptohomeRecoveryAuthInput { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct KioskAuthInput { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> KioskAuthInput { + KioskAuthInput::new() + } + + fn default_instance() -> &'static KioskAuthInput { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(KioskAuthInput::new) + } +} + +impl ::protobuf::Clear for KioskAuthInput { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for KioskAuthInput { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct SmartCardAuthInput { + // message fields + pub signature_algorithms: ::std::vec::Vec, + pub key_delegate_dbus_service_name: ::std::string::String, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a SmartCardAuthInput { + fn default() -> &'a SmartCardAuthInput { + ::default_instance() + } +} + +impl SmartCardAuthInput { + pub fn new() -> SmartCardAuthInput { + ::std::default::Default::default() + } + + // repeated .user_data_auth.SmartCardSignatureAlgorithm signature_algorithms = 1; + + + pub fn get_signature_algorithms(&self) -> &[SmartCardSignatureAlgorithm] { + &self.signature_algorithms + } + pub fn clear_signature_algorithms(&mut self) { + self.signature_algorithms.clear(); + } + + // Param is passed by value, moved + pub fn set_signature_algorithms(&mut self, v: ::std::vec::Vec) { + self.signature_algorithms = v; + } + + // Mutable pointer to the field. + pub fn mut_signature_algorithms(&mut self) -> &mut ::std::vec::Vec { + &mut self.signature_algorithms + } + + // Take field + pub fn take_signature_algorithms(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.signature_algorithms, ::std::vec::Vec::new()) + } + + // string key_delegate_dbus_service_name = 2; + + + pub fn get_key_delegate_dbus_service_name(&self) -> &str { + &self.key_delegate_dbus_service_name + } + pub fn clear_key_delegate_dbus_service_name(&mut self) { + self.key_delegate_dbus_service_name.clear(); + } + + // Param is passed by value, moved + pub fn set_key_delegate_dbus_service_name(&mut self, v: ::std::string::String) { + self.key_delegate_dbus_service_name = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_key_delegate_dbus_service_name(&mut self) -> &mut ::std::string::String { + &mut self.key_delegate_dbus_service_name + } + + // Take field + pub fn take_key_delegate_dbus_service_name(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.key_delegate_dbus_service_name, ::std::string::String::new()) + } +} + +impl ::protobuf::Message for SmartCardAuthInput { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.signature_algorithms, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.key_delegate_dbus_service_name)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + for value in &self.signature_algorithms { + my_size += ::protobuf::rt::enum_size(1, *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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + for v in &self.signature_algorithms { + os.write_enum(1, ::protobuf::ProtobufEnum::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.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> SmartCardAuthInput { + SmartCardAuthInput::new() + } + + fn default_instance() -> &'static SmartCardAuthInput { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(SmartCardAuthInput::new) + } +} + +impl ::protobuf::Clear for SmartCardAuthInput { + fn clear(&mut self) { + self.signature_algorithms.clear(); + self.key_delegate_dbus_service_name.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for SmartCardAuthInput { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct LegacyFingerprintAuthInput { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> LegacyFingerprintAuthInput { + LegacyFingerprintAuthInput::new() + } + + fn default_instance() -> &'static LegacyFingerprintAuthInput { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(LegacyFingerprintAuthInput::new) + } +} + +impl ::protobuf::Clear for LegacyFingerprintAuthInput { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for LegacyFingerprintAuthInput { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct AuthInput { + // message oneof groups + pub input: ::std::option::Option, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AuthInput { + fn default() -> &'a AuthInput { + ::default_instance() + } +} + +#[derive(Clone,PartialEq,Debug)] +pub enum AuthInput_oneof_input { + password_input(PasswordAuthInput), + pin_input(PinAuthInput), + cryptohome_recovery_input(CryptohomeRecoveryAuthInput), + kiosk_input(KioskAuthInput), + smart_card_input(SmartCardAuthInput), + legacy_fingerprint_input(LegacyFingerprintAuthInput), +} + +impl AuthInput { + pub fn new() -> AuthInput { + ::std::default::Default::default() + } + + // .user_data_auth.PasswordAuthInput password_input = 1; + + + pub fn get_password_input(&self) -> &PasswordAuthInput { + match self.input { + ::std::option::Option::Some(AuthInput_oneof_input::password_input(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(AuthInput_oneof_input::password_input(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_password_input(&mut self, v: PasswordAuthInput) { + self.input = ::std::option::Option::Some(AuthInput_oneof_input::password_input(v)) + } + + // Mutable pointer to the field. + pub fn mut_password_input(&mut self) -> &mut PasswordAuthInput { + if let ::std::option::Option::Some(AuthInput_oneof_input::password_input(_)) = self.input { + } else { + self.input = ::std::option::Option::Some(AuthInput_oneof_input::password_input(PasswordAuthInput::new())); + } + match self.input { + ::std::option::Option::Some(AuthInput_oneof_input::password_input(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(AuthInput_oneof_input::password_input(v)) => v, + _ => panic!(), + } + } else { + PasswordAuthInput::new() + } + } + + // .user_data_auth.PinAuthInput pin_input = 2; + + + pub fn get_pin_input(&self) -> &PinAuthInput { + match self.input { + ::std::option::Option::Some(AuthInput_oneof_input::pin_input(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(AuthInput_oneof_input::pin_input(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_pin_input(&mut self, v: PinAuthInput) { + self.input = ::std::option::Option::Some(AuthInput_oneof_input::pin_input(v)) + } + + // Mutable pointer to the field. + pub fn mut_pin_input(&mut self) -> &mut PinAuthInput { + if let ::std::option::Option::Some(AuthInput_oneof_input::pin_input(_)) = self.input { + } else { + self.input = ::std::option::Option::Some(AuthInput_oneof_input::pin_input(PinAuthInput::new())); + } + match self.input { + ::std::option::Option::Some(AuthInput_oneof_input::pin_input(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(AuthInput_oneof_input::pin_input(v)) => v, + _ => panic!(), + } + } else { + PinAuthInput::new() + } + } + + // .user_data_auth.CryptohomeRecoveryAuthInput cryptohome_recovery_input = 3; + + + pub fn get_cryptohome_recovery_input(&self) -> &CryptohomeRecoveryAuthInput { + match self.input { + ::std::option::Option::Some(AuthInput_oneof_input::cryptohome_recovery_input(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(AuthInput_oneof_input::cryptohome_recovery_input(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_cryptohome_recovery_input(&mut self, v: CryptohomeRecoveryAuthInput) { + self.input = ::std::option::Option::Some(AuthInput_oneof_input::cryptohome_recovery_input(v)) + } + + // Mutable pointer to the field. + pub fn mut_cryptohome_recovery_input(&mut self) -> &mut CryptohomeRecoveryAuthInput { + if let ::std::option::Option::Some(AuthInput_oneof_input::cryptohome_recovery_input(_)) = self.input { + } else { + self.input = ::std::option::Option::Some(AuthInput_oneof_input::cryptohome_recovery_input(CryptohomeRecoveryAuthInput::new())); + } + match self.input { + ::std::option::Option::Some(AuthInput_oneof_input::cryptohome_recovery_input(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(AuthInput_oneof_input::cryptohome_recovery_input(v)) => v, + _ => panic!(), + } + } else { + CryptohomeRecoveryAuthInput::new() + } + } + + // .user_data_auth.KioskAuthInput kiosk_input = 4; + + + pub fn get_kiosk_input(&self) -> &KioskAuthInput { + match self.input { + ::std::option::Option::Some(AuthInput_oneof_input::kiosk_input(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(AuthInput_oneof_input::kiosk_input(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_kiosk_input(&mut self, v: KioskAuthInput) { + self.input = ::std::option::Option::Some(AuthInput_oneof_input::kiosk_input(v)) + } + + // Mutable pointer to the field. + pub fn mut_kiosk_input(&mut self) -> &mut KioskAuthInput { + if let ::std::option::Option::Some(AuthInput_oneof_input::kiosk_input(_)) = self.input { + } else { + self.input = ::std::option::Option::Some(AuthInput_oneof_input::kiosk_input(KioskAuthInput::new())); + } + match self.input { + ::std::option::Option::Some(AuthInput_oneof_input::kiosk_input(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(AuthInput_oneof_input::kiosk_input(v)) => v, + _ => panic!(), + } + } else { + KioskAuthInput::new() + } + } + + // .user_data_auth.SmartCardAuthInput smart_card_input = 5; + + + pub fn get_smart_card_input(&self) -> &SmartCardAuthInput { + match self.input { + ::std::option::Option::Some(AuthInput_oneof_input::smart_card_input(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(AuthInput_oneof_input::smart_card_input(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_smart_card_input(&mut self, v: SmartCardAuthInput) { + self.input = ::std::option::Option::Some(AuthInput_oneof_input::smart_card_input(v)) + } + + // Mutable pointer to the field. + pub fn mut_smart_card_input(&mut self) -> &mut SmartCardAuthInput { + if let ::std::option::Option::Some(AuthInput_oneof_input::smart_card_input(_)) = self.input { + } else { + self.input = ::std::option::Option::Some(AuthInput_oneof_input::smart_card_input(SmartCardAuthInput::new())); + } + match self.input { + ::std::option::Option::Some(AuthInput_oneof_input::smart_card_input(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(AuthInput_oneof_input::smart_card_input(v)) => v, + _ => panic!(), + } + } else { + SmartCardAuthInput::new() + } + } + + // .user_data_auth.LegacyFingerprintAuthInput legacy_fingerprint_input = 6; + + + pub fn get_legacy_fingerprint_input(&self) -> &LegacyFingerprintAuthInput { + match self.input { + ::std::option::Option::Some(AuthInput_oneof_input::legacy_fingerprint_input(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(AuthInput_oneof_input::legacy_fingerprint_input(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_legacy_fingerprint_input(&mut self, v: LegacyFingerprintAuthInput) { + self.input = ::std::option::Option::Some(AuthInput_oneof_input::legacy_fingerprint_input(v)) + } + + // Mutable pointer to the field. + pub fn mut_legacy_fingerprint_input(&mut self) -> &mut LegacyFingerprintAuthInput { + if let ::std::option::Option::Some(AuthInput_oneof_input::legacy_fingerprint_input(_)) = self.input { + } else { + self.input = ::std::option::Option::Some(AuthInput_oneof_input::legacy_fingerprint_input(LegacyFingerprintAuthInput::new())); + } + match self.input { + ::std::option::Option::Some(AuthInput_oneof_input::legacy_fingerprint_input(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(AuthInput_oneof_input::legacy_fingerprint_input(v)) => v, + _ => panic!(), + } + } else { + LegacyFingerprintAuthInput::new() + } + } +} + +impl ::protobuf::Message for AuthInput { + fn is_initialized(&self) -> bool { + if let Some(AuthInput_oneof_input::password_input(ref v)) = self.input { + if !v.is_initialized() { + return false; + } + } + if let Some(AuthInput_oneof_input::pin_input(ref v)) = self.input { + if !v.is_initialized() { + return false; + } + } + if let Some(AuthInput_oneof_input::cryptohome_recovery_input(ref v)) = self.input { + if !v.is_initialized() { + return false; + } + } + if let Some(AuthInput_oneof_input::kiosk_input(ref v)) = self.input { + if !v.is_initialized() { + return false; + } + } + if let Some(AuthInput_oneof_input::smart_card_input(ref v)) = self.input { + if !v.is_initialized() { + return false; + } + } + if let Some(AuthInput_oneof_input::legacy_fingerprint_input(ref v)) = self.input { + if !v.is_initialized() { + return false; + } + } + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.input = ::std::option::Option::Some(AuthInput_oneof_input::password_input(is.read_message()?)); + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.input = ::std::option::Option::Some(AuthInput_oneof_input::pin_input(is.read_message()?)); + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.input = ::std::option::Option::Some(AuthInput_oneof_input::cryptohome_recovery_input(is.read_message()?)); + }, + 4 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.input = ::std::option::Option::Some(AuthInput_oneof_input::kiosk_input(is.read_message()?)); + }, + 5 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.input = ::std::option::Option::Some(AuthInput_oneof_input::smart_card_input(is.read_message()?)); + }, + 6 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.input = ::std::option::Option::Some(AuthInput_oneof_input::legacy_fingerprint_input(is.read_message()?)); + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let ::std::option::Option::Some(ref v) = self.input { + match v { + &AuthInput_oneof_input::password_input(ref v) => { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + }, + &AuthInput_oneof_input::pin_input(ref v) => { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + }, + &AuthInput_oneof_input::cryptohome_recovery_input(ref v) => { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + }, + &AuthInput_oneof_input::kiosk_input(ref v) => { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + }, + &AuthInput_oneof_input::smart_card_input(ref v) => { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + }, + &AuthInput_oneof_input::legacy_fingerprint_input(ref v) => { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + }, + }; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let ::std::option::Option::Some(ref v) = self.input { + match v { + &AuthInput_oneof_input::password_input(ref v) => { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }, + &AuthInput_oneof_input::pin_input(ref v) => { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }, + &AuthInput_oneof_input::cryptohome_recovery_input(ref v) => { + os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }, + &AuthInput_oneof_input::kiosk_input(ref v) => { + os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }, + &AuthInput_oneof_input::smart_card_input(ref v) => { + os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }, + &AuthInput_oneof_input::legacy_fingerprint_input(ref v) => { + os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }, + }; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> AuthInput { + AuthInput::new() + } + + fn default_instance() -> &'static AuthInput { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(AuthInput::new) + } +} + +impl ::protobuf::Clear for AuthInput { + 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.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for AuthInput { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct PasswordMetadata { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> PasswordMetadata { + PasswordMetadata::new() + } + + fn default_instance() -> &'static PasswordMetadata { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PasswordMetadata::new) + } +} + +impl ::protobuf::Clear for PasswordMetadata { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for PasswordMetadata { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct PinMetadata { + // message fields + pub auth_locked: bool, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PinMetadata { + fn default() -> &'a PinMetadata { + ::default_instance() + } +} + +impl PinMetadata { + pub fn new() -> PinMetadata { + ::std::default::Default::default() + } + + // bool auth_locked = 1; + + + pub fn get_auth_locked(&self) -> bool { + self.auth_locked + } + pub fn clear_auth_locked(&mut self) { + self.auth_locked = false; + } + + // Param is passed by value, moved + pub fn set_auth_locked(&mut self, v: bool) { + self.auth_locked = v; + } +} + +impl ::protobuf::Message for PinMetadata { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.auth_locked = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.auth_locked != false { + my_size += 2; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.auth_locked != false { + os.write_bool(1, self.auth_locked)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> PinMetadata { + PinMetadata::new() + } + + fn default_instance() -> &'static PinMetadata { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PinMetadata::new) + } +} + +impl ::protobuf::Clear for PinMetadata { + fn clear(&mut self) { + self.auth_locked = false; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for PinMetadata { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct CryptohomeRecoveryMetadata { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> CryptohomeRecoveryMetadata { + CryptohomeRecoveryMetadata::new() + } + + fn default_instance() -> &'static CryptohomeRecoveryMetadata { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(CryptohomeRecoveryMetadata::new) + } +} + +impl ::protobuf::Clear for CryptohomeRecoveryMetadata { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for CryptohomeRecoveryMetadata { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct KioskMetadata { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> KioskMetadata { + KioskMetadata::new() + } + + fn default_instance() -> &'static KioskMetadata { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(KioskMetadata::new) + } +} + +impl ::protobuf::Clear for KioskMetadata { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for KioskMetadata { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct SmartCardMetadata { + // message fields + pub public_key_spki_der: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a SmartCardMetadata { + fn default() -> &'a SmartCardMetadata { + ::default_instance() + } +} + +impl SmartCardMetadata { + pub fn new() -> SmartCardMetadata { + ::std::default::Default::default() + } + + // bytes public_key_spki_der = 1; + + + pub fn get_public_key_spki_der(&self) -> &[u8] { + &self.public_key_spki_der + } + pub fn clear_public_key_spki_der(&mut self) { + self.public_key_spki_der.clear(); + } + + // Param is passed by value, moved + pub fn set_public_key_spki_der(&mut self, v: ::std::vec::Vec) { + self.public_key_spki_der = 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 { + &mut self.public_key_spki_der + } + + // Take field + pub fn take_public_key_spki_der(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.public_key_spki_der, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for SmartCardMetadata { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.public_key_spki_der)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.public_key_spki_der.is_empty() { + os.write_bytes(1, &self.public_key_spki_der)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> SmartCardMetadata { + SmartCardMetadata::new() + } + + fn default_instance() -> &'static SmartCardMetadata { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(SmartCardMetadata::new) + } +} + +impl ::protobuf::Clear for SmartCardMetadata { + fn clear(&mut self) { + self.public_key_spki_der.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for SmartCardMetadata { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct CommonMetadata { + // message fields + pub chromeos_version_last_updated: ::std::vec::Vec, + pub chrome_version_last_updated: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CommonMetadata { + fn default() -> &'a CommonMetadata { + ::default_instance() + } +} + +impl CommonMetadata { + pub fn new() -> CommonMetadata { + ::std::default::Default::default() + } + + // bytes chromeos_version_last_updated = 1; + + + pub fn get_chromeos_version_last_updated(&self) -> &[u8] { + &self.chromeos_version_last_updated + } + pub fn clear_chromeos_version_last_updated(&mut self) { + self.chromeos_version_last_updated.clear(); + } + + // Param is passed by value, moved + pub fn set_chromeos_version_last_updated(&mut self, v: ::std::vec::Vec) { + self.chromeos_version_last_updated = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_chromeos_version_last_updated(&mut self) -> &mut ::std::vec::Vec { + &mut self.chromeos_version_last_updated + } + + // Take field + pub fn take_chromeos_version_last_updated(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.chromeos_version_last_updated, ::std::vec::Vec::new()) + } + + // bytes chrome_version_last_updated = 2; + + + pub fn get_chrome_version_last_updated(&self) -> &[u8] { + &self.chrome_version_last_updated + } + pub fn clear_chrome_version_last_updated(&mut self) { + self.chrome_version_last_updated.clear(); + } + + // Param is passed by value, moved + pub fn set_chrome_version_last_updated(&mut self, v: ::std::vec::Vec) { + self.chrome_version_last_updated = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_chrome_version_last_updated(&mut self) -> &mut ::std::vec::Vec { + &mut self.chrome_version_last_updated + } + + // Take field + pub fn take_chrome_version_last_updated(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.chrome_version_last_updated, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for CommonMetadata { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.chromeos_version_last_updated)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.chrome_version_last_updated)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if !self.chromeos_version_last_updated.is_empty() { + my_size += ::protobuf::rt::bytes_size(1, &self.chromeos_version_last_updated); + } + if !self.chrome_version_last_updated.is_empty() { + my_size += ::protobuf::rt::bytes_size(2, &self.chrome_version_last_updated); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.chromeos_version_last_updated.is_empty() { + os.write_bytes(1, &self.chromeos_version_last_updated)?; + } + if !self.chrome_version_last_updated.is_empty() { + os.write_bytes(2, &self.chrome_version_last_updated)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> CommonMetadata { + CommonMetadata::new() + } + + fn default_instance() -> &'static CommonMetadata { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(CommonMetadata::new) + } +} + +impl ::protobuf::Clear for CommonMetadata { + fn clear(&mut self) { + self.chromeos_version_last_updated.clear(); + self.chrome_version_last_updated.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for CommonMetadata { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct LegacyFingerprintMetadata { + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> LegacyFingerprintMetadata { + LegacyFingerprintMetadata::new() + } + + fn default_instance() -> &'static LegacyFingerprintMetadata { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(LegacyFingerprintMetadata::new) + } +} + +impl ::protobuf::Clear for LegacyFingerprintMetadata { + fn clear(&mut self) { + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for LegacyFingerprintMetadata { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct AuthFactor { + // message fields + pub field_type: AuthFactorType, + pub label: ::std::string::String, + pub common_metadata: ::protobuf::SingularPtrField, + // message oneof groups + pub metadata: ::std::option::Option, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AuthFactor { + fn default() -> &'a AuthFactor { + ::default_instance() + } +} + +#[derive(Clone,PartialEq,Debug)] +pub enum AuthFactor_oneof_metadata { + password_metadata(PasswordMetadata), + pin_metadata(PinMetadata), + cryptohome_recovery_metadata(CryptohomeRecoveryMetadata), + kiosk_metadata(KioskMetadata), + smart_card_metadata(SmartCardMetadata), + legacy_fingerprint_metadata(LegacyFingerprintMetadata), +} + +impl AuthFactor { + pub fn new() -> AuthFactor { + ::std::default::Default::default() + } + + // .user_data_auth.AuthFactorType type = 1; + + + pub fn get_field_type(&self) -> AuthFactorType { + self.field_type + } + pub fn clear_field_type(&mut self) { + self.field_type = AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED; + } + + // Param is passed by value, moved + pub fn set_field_type(&mut self, v: AuthFactorType) { + self.field_type = v; + } + + // string label = 2; + + + pub fn get_label(&self) -> &str { + &self.label + } + pub fn clear_label(&mut self) { + self.label.clear(); + } + + // Param is passed by value, moved + pub fn set_label(&mut self, v: ::std::string::String) { + self.label = 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 { + &mut self.label + } + + // Take field + pub fn take_label(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.label, ::std::string::String::new()) + } + + // .user_data_auth.CommonMetadata common_metadata = 9; + + + pub fn get_common_metadata(&self) -> &CommonMetadata { + self.common_metadata.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_common_metadata(&mut self) { + self.common_metadata.clear(); + } + + pub fn has_common_metadata(&self) -> bool { + self.common_metadata.is_some() + } + + // Param is passed by value, moved + pub fn set_common_metadata(&mut self, v: CommonMetadata) { + self.common_metadata = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_common_metadata(&mut self) -> &mut CommonMetadata { + if self.common_metadata.is_none() { + self.common_metadata.set_default(); + } + self.common_metadata.as_mut().unwrap() + } + + // Take field + pub fn take_common_metadata(&mut self) -> CommonMetadata { + self.common_metadata.take().unwrap_or_else(|| CommonMetadata::new()) + } + + // .user_data_auth.PasswordMetadata password_metadata = 4; + + + pub fn get_password_metadata(&self) -> &PasswordMetadata { + match self.metadata { + ::std::option::Option::Some(AuthFactor_oneof_metadata::password_metadata(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(AuthFactor_oneof_metadata::password_metadata(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_password_metadata(&mut self, v: PasswordMetadata) { + self.metadata = ::std::option::Option::Some(AuthFactor_oneof_metadata::password_metadata(v)) + } + + // Mutable pointer to the field. + pub fn mut_password_metadata(&mut self) -> &mut PasswordMetadata { + if let ::std::option::Option::Some(AuthFactor_oneof_metadata::password_metadata(_)) = self.metadata { + } else { + self.metadata = ::std::option::Option::Some(AuthFactor_oneof_metadata::password_metadata(PasswordMetadata::new())); + } + match self.metadata { + ::std::option::Option::Some(AuthFactor_oneof_metadata::password_metadata(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(AuthFactor_oneof_metadata::password_metadata(v)) => v, + _ => panic!(), + } + } else { + PasswordMetadata::new() + } + } + + // .user_data_auth.PinMetadata pin_metadata = 5; + + + pub fn get_pin_metadata(&self) -> &PinMetadata { + match self.metadata { + ::std::option::Option::Some(AuthFactor_oneof_metadata::pin_metadata(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(AuthFactor_oneof_metadata::pin_metadata(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_pin_metadata(&mut self, v: PinMetadata) { + self.metadata = ::std::option::Option::Some(AuthFactor_oneof_metadata::pin_metadata(v)) + } + + // Mutable pointer to the field. + pub fn mut_pin_metadata(&mut self) -> &mut PinMetadata { + if let ::std::option::Option::Some(AuthFactor_oneof_metadata::pin_metadata(_)) = self.metadata { + } else { + self.metadata = ::std::option::Option::Some(AuthFactor_oneof_metadata::pin_metadata(PinMetadata::new())); + } + match self.metadata { + ::std::option::Option::Some(AuthFactor_oneof_metadata::pin_metadata(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(AuthFactor_oneof_metadata::pin_metadata(v)) => v, + _ => panic!(), + } + } else { + PinMetadata::new() + } + } + + // .user_data_auth.CryptohomeRecoveryMetadata cryptohome_recovery_metadata = 6; + + + pub fn get_cryptohome_recovery_metadata(&self) -> &CryptohomeRecoveryMetadata { + match self.metadata { + ::std::option::Option::Some(AuthFactor_oneof_metadata::cryptohome_recovery_metadata(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(AuthFactor_oneof_metadata::cryptohome_recovery_metadata(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_cryptohome_recovery_metadata(&mut self, v: CryptohomeRecoveryMetadata) { + self.metadata = ::std::option::Option::Some(AuthFactor_oneof_metadata::cryptohome_recovery_metadata(v)) + } + + // Mutable pointer to the field. + pub fn mut_cryptohome_recovery_metadata(&mut self) -> &mut CryptohomeRecoveryMetadata { + if let ::std::option::Option::Some(AuthFactor_oneof_metadata::cryptohome_recovery_metadata(_)) = self.metadata { + } else { + self.metadata = ::std::option::Option::Some(AuthFactor_oneof_metadata::cryptohome_recovery_metadata(CryptohomeRecoveryMetadata::new())); + } + match self.metadata { + ::std::option::Option::Some(AuthFactor_oneof_metadata::cryptohome_recovery_metadata(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(AuthFactor_oneof_metadata::cryptohome_recovery_metadata(v)) => v, + _ => panic!(), + } + } else { + CryptohomeRecoveryMetadata::new() + } + } + + // .user_data_auth.KioskMetadata kiosk_metadata = 7; + + + pub fn get_kiosk_metadata(&self) -> &KioskMetadata { + match self.metadata { + ::std::option::Option::Some(AuthFactor_oneof_metadata::kiosk_metadata(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(AuthFactor_oneof_metadata::kiosk_metadata(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_kiosk_metadata(&mut self, v: KioskMetadata) { + self.metadata = ::std::option::Option::Some(AuthFactor_oneof_metadata::kiosk_metadata(v)) + } + + // Mutable pointer to the field. + pub fn mut_kiosk_metadata(&mut self) -> &mut KioskMetadata { + if let ::std::option::Option::Some(AuthFactor_oneof_metadata::kiosk_metadata(_)) = self.metadata { + } else { + self.metadata = ::std::option::Option::Some(AuthFactor_oneof_metadata::kiosk_metadata(KioskMetadata::new())); + } + match self.metadata { + ::std::option::Option::Some(AuthFactor_oneof_metadata::kiosk_metadata(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(AuthFactor_oneof_metadata::kiosk_metadata(v)) => v, + _ => panic!(), + } + } else { + KioskMetadata::new() + } + } + + // .user_data_auth.SmartCardMetadata smart_card_metadata = 8; + + + pub fn get_smart_card_metadata(&self) -> &SmartCardMetadata { + match self.metadata { + ::std::option::Option::Some(AuthFactor_oneof_metadata::smart_card_metadata(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(AuthFactor_oneof_metadata::smart_card_metadata(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_smart_card_metadata(&mut self, v: SmartCardMetadata) { + self.metadata = ::std::option::Option::Some(AuthFactor_oneof_metadata::smart_card_metadata(v)) + } + + // Mutable pointer to the field. + pub fn mut_smart_card_metadata(&mut self) -> &mut SmartCardMetadata { + if let ::std::option::Option::Some(AuthFactor_oneof_metadata::smart_card_metadata(_)) = self.metadata { + } else { + self.metadata = ::std::option::Option::Some(AuthFactor_oneof_metadata::smart_card_metadata(SmartCardMetadata::new())); + } + match self.metadata { + ::std::option::Option::Some(AuthFactor_oneof_metadata::smart_card_metadata(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(AuthFactor_oneof_metadata::smart_card_metadata(v)) => v, + _ => panic!(), + } + } else { + SmartCardMetadata::new() + } + } + + // .user_data_auth.LegacyFingerprintMetadata legacy_fingerprint_metadata = 11; + + + pub fn get_legacy_fingerprint_metadata(&self) -> &LegacyFingerprintMetadata { + match self.metadata { + ::std::option::Option::Some(AuthFactor_oneof_metadata::legacy_fingerprint_metadata(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(AuthFactor_oneof_metadata::legacy_fingerprint_metadata(..)) => true, + _ => false, + } + } + + // Param is passed by value, moved + pub fn set_legacy_fingerprint_metadata(&mut self, v: LegacyFingerprintMetadata) { + self.metadata = ::std::option::Option::Some(AuthFactor_oneof_metadata::legacy_fingerprint_metadata(v)) + } + + // Mutable pointer to the field. + pub fn mut_legacy_fingerprint_metadata(&mut self) -> &mut LegacyFingerprintMetadata { + if let ::std::option::Option::Some(AuthFactor_oneof_metadata::legacy_fingerprint_metadata(_)) = self.metadata { + } else { + self.metadata = ::std::option::Option::Some(AuthFactor_oneof_metadata::legacy_fingerprint_metadata(LegacyFingerprintMetadata::new())); + } + match self.metadata { + ::std::option::Option::Some(AuthFactor_oneof_metadata::legacy_fingerprint_metadata(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(AuthFactor_oneof_metadata::legacy_fingerprint_metadata(v)) => v, + _ => panic!(), + } + } else { + LegacyFingerprintMetadata::new() + } + } +} + +impl ::protobuf::Message for AuthFactor { + fn is_initialized(&self) -> bool { + for v in &self.common_metadata { + if !v.is_initialized() { + return false; + } + }; + if let Some(AuthFactor_oneof_metadata::password_metadata(ref v)) = self.metadata { + if !v.is_initialized() { + return false; + } + } + if let Some(AuthFactor_oneof_metadata::pin_metadata(ref v)) = self.metadata { + if !v.is_initialized() { + return false; + } + } + if let Some(AuthFactor_oneof_metadata::cryptohome_recovery_metadata(ref v)) = self.metadata { + if !v.is_initialized() { + return false; + } + } + if let Some(AuthFactor_oneof_metadata::kiosk_metadata(ref v)) = self.metadata { + if !v.is_initialized() { + return false; + } + } + if let Some(AuthFactor_oneof_metadata::smart_card_metadata(ref v)) = self.metadata { + if !v.is_initialized() { + return false; + } + } + if let Some(AuthFactor_oneof_metadata::legacy_fingerprint_metadata(ref v)) = self.metadata { + if !v.is_initialized() { + return false; + } + } + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.label)?; + }, + 9 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.common_metadata)?; + }, + 4 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.metadata = ::std::option::Option::Some(AuthFactor_oneof_metadata::password_metadata(is.read_message()?)); + }, + 5 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.metadata = ::std::option::Option::Some(AuthFactor_oneof_metadata::pin_metadata(is.read_message()?)); + }, + 6 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.metadata = ::std::option::Option::Some(AuthFactor_oneof_metadata::cryptohome_recovery_metadata(is.read_message()?)); + }, + 7 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.metadata = ::std::option::Option::Some(AuthFactor_oneof_metadata::kiosk_metadata(is.read_message()?)); + }, + 8 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.metadata = ::std::option::Option::Some(AuthFactor_oneof_metadata::smart_card_metadata(is.read_message()?)); + }, + 11 => { + if wire_type != ::protobuf::wire_format::WireTypeLengthDelimited { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + self.metadata = ::std::option::Option::Some(AuthFactor_oneof_metadata::legacy_fingerprint_metadata(is.read_message()?)); + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.field_type != AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED { + my_size += ::protobuf::rt::enum_size(1, self.field_type); + } + if !self.label.is_empty() { + my_size += ::protobuf::rt::string_size(2, &self.label); + } + if let Some(ref v) = self.common_metadata.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let ::std::option::Option::Some(ref v) = self.metadata { + match v { + &AuthFactor_oneof_metadata::password_metadata(ref v) => { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + }, + &AuthFactor_oneof_metadata::pin_metadata(ref v) => { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + }, + &AuthFactor_oneof_metadata::cryptohome_recovery_metadata(ref v) => { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + }, + &AuthFactor_oneof_metadata::kiosk_metadata(ref v) => { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + }, + &AuthFactor_oneof_metadata::smart_card_metadata(ref v) => { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + }, + &AuthFactor_oneof_metadata::legacy_fingerprint_metadata(ref v) => { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + }, + }; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.field_type != AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.field_type))?; + } + if !self.label.is_empty() { + os.write_string(2, &self.label)?; + } + if let Some(ref v) = self.common_metadata.as_ref() { + os.write_tag(9, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if let ::std::option::Option::Some(ref v) = self.metadata { + match v { + &AuthFactor_oneof_metadata::password_metadata(ref v) => { + os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }, + &AuthFactor_oneof_metadata::pin_metadata(ref v) => { + os.write_tag(5, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }, + &AuthFactor_oneof_metadata::cryptohome_recovery_metadata(ref v) => { + os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }, + &AuthFactor_oneof_metadata::kiosk_metadata(ref v) => { + os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }, + &AuthFactor_oneof_metadata::smart_card_metadata(ref v) => { + os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }, + &AuthFactor_oneof_metadata::legacy_fingerprint_metadata(ref v) => { + os.write_tag(11, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }, + }; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> AuthFactor { + AuthFactor::new() + } + + fn default_instance() -> &'static AuthFactor { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(AuthFactor::new) + } +} + +impl ::protobuf::Clear for AuthFactor { + fn clear(&mut self) { + self.field_type = 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.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for AuthFactor { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum AuthFactorType { + AUTH_FACTOR_TYPE_UNSPECIFIED = 0, + AUTH_FACTOR_TYPE_PASSWORD = 1, + AUTH_FACTOR_TYPE_PIN = 2, + AUTH_FACTOR_TYPE_CRYPTOHOME_RECOVERY = 3, + AUTH_FACTOR_TYPE_KIOSK = 4, + AUTH_FACTOR_TYPE_SMART_CARD = 5, + AUTH_FACTOR_TYPE_LEGACY_FINGERPRINT = 6, +} + +impl ::protobuf::ProtobufEnum for 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), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static 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, + ]; + values + } +} + +impl ::std::marker::Copy for AuthFactorType { +} + +impl ::std::default::Default for AuthFactorType { + fn default() -> Self { + AuthFactorType::AUTH_FACTOR_TYPE_UNSPECIFIED + } +} + +impl ::protobuf::reflect::ProtobufValue for AuthFactorType { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum AuthFactorPreparePurpose { + PURPOSE_UNSPECIFIED = 0, + PURPOSE_ADD_AUTH_FACTOR = 1, + PURPOSE_AUTHENTICATE_AUTH_FACTOR = 2, +} + +impl ::protobuf::ProtobufEnum for 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 + } + } + + fn values() -> &'static [Self] { + static values: &'static [AuthFactorPreparePurpose] = &[ + AuthFactorPreparePurpose::PURPOSE_UNSPECIFIED, + AuthFactorPreparePurpose::PURPOSE_ADD_AUTH_FACTOR, + AuthFactorPreparePurpose::PURPOSE_AUTHENTICATE_AUTH_FACTOR, + ]; + values + } +} + +impl ::std::marker::Copy for AuthFactorPreparePurpose { +} + +impl ::std::default::Default for AuthFactorPreparePurpose { + fn default() -> Self { + AuthFactorPreparePurpose::PURPOSE_UNSPECIFIED + } +} + +impl ::protobuf::reflect::ProtobufValue for AuthFactorPreparePurpose { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum SmartCardSignatureAlgorithm { + CHALLENGE_NOT_SPECIFIED = 0, + CHALLENGE_RSASSA_PKCS1_V1_5_SHA1 = 1, + CHALLENGE_RSASSA_PKCS1_V1_5_SHA256 = 2, + CHALLENGE_RSASSA_PKCS1_V1_5_SHA384 = 3, + CHALLENGE_RSASSA_PKCS1_V1_5_SHA512 = 4, +} + +impl ::protobuf::ProtobufEnum for 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 + } + } + + fn values() -> &'static [Self] { + static 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, + ]; + values + } +} + +impl ::std::marker::Copy for SmartCardSignatureAlgorithm { +} + +impl ::std::default::Default for SmartCardSignatureAlgorithm { + fn default() -> Self { + SmartCardSignatureAlgorithm::CHALLENGE_NOT_SPECIFIED + } +} + +impl ::protobuf::reflect::ProtobufValue for SmartCardSignatureAlgorithm { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum AuthIntent { + AUTH_INTENT_UNSPECIFIED = 0, + AUTH_INTENT_DECRYPT = 1, + AUTH_INTENT_VERIFY_ONLY = 2, +} + +impl ::protobuf::ProtobufEnum for 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), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [AuthIntent] = &[ + AuthIntent::AUTH_INTENT_UNSPECIFIED, + AuthIntent::AUTH_INTENT_DECRYPT, + AuthIntent::AUTH_INTENT_VERIFY_ONLY, + ]; + values + } +} + +impl ::std::marker::Copy for AuthIntent { +} + +impl ::std::default::Default for AuthIntent { + fn default() -> Self { + AuthIntent::AUTH_INTENT_UNSPECIFIED + } +} + +impl ::protobuf::reflect::ProtobufValue for AuthIntent { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} diff --git a/system_api/src/protos/fido.rs b/system_api/src/protos/fido.rs new file mode 100644 index 000000000..c61b8041e --- /dev/null +++ b/system_api/src/protos/fido.rs @@ -0,0 +1,3754 @@ +// This file is generated by rust-protobuf 2.27.1. Do not edit +// @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_imports)] +#![allow(unused_results)] +//! Generated file from `fido.proto` + +/// Generated files are compatible only with the same version +/// of protobuf runtime. +// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_27_1; + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct Url { + // message fields + pub url: ::std::string::String, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a Url { + fn default() -> &'a Url { + ::default_instance() + } +} + +impl Url { + pub fn new() -> Url { + ::std::default::Default::default() + } + + // string url = 1; + + + pub fn get_url(&self) -> &str { + &self.url + } + pub fn clear_url(&mut self) { + self.url.clear(); + } + + // Param is passed by value, moved + pub fn set_url(&mut self, v: ::std::string::String) { + self.url = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_url(&mut self) -> &mut ::std::string::String { + &mut self.url + } + + // Take field + pub fn take_url(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.url, ::std::string::String::new()) + } +} + +impl ::protobuf::Message for Url { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.url)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if !self.url.is_empty() { + os.write_string(1, &self.url)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> Url { + Url::new() + } + + fn default_instance() -> &'static Url { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(Url::new) + } +} + +impl ::protobuf::Clear for Url { + fn clear(&mut self) { + self.url.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for Url { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct CommonCredentialInfo { + // message fields + pub id: ::std::string::String, + pub raw_id: ::std::vec::Vec, + pub client_data_json: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CommonCredentialInfo { + fn default() -> &'a CommonCredentialInfo { + ::default_instance() + } +} + +impl CommonCredentialInfo { + pub fn new() -> CommonCredentialInfo { + ::std::default::Default::default() + } + + // string id = 1; + + + pub fn get_id(&self) -> &str { + &self.id + } + pub fn clear_id(&mut self) { + self.id.clear(); + } + + // Param is passed by value, moved + pub fn set_id(&mut self, v: ::std::string::String) { + self.id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_id(&mut self) -> &mut ::std::string::String { + &mut self.id + } + + // Take field + pub fn take_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.id, ::std::string::String::new()) + } + + // bytes raw_id = 2; + + + pub fn get_raw_id(&self) -> &[u8] { + &self.raw_id + } + pub fn clear_raw_id(&mut self) { + self.raw_id.clear(); + } + + // Param is passed by value, moved + pub fn set_raw_id(&mut self, v: ::std::vec::Vec) { + self.raw_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_raw_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.raw_id + } + + // Take field + pub fn take_raw_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.raw_id, ::std::vec::Vec::new()) + } + + // bytes client_data_json = 3; + + + pub fn get_client_data_json(&self) -> &[u8] { + &self.client_data_json + } + pub fn clear_client_data_json(&mut self) { + self.client_data_json.clear(); + } + + // Param is passed by value, moved + pub fn set_client_data_json(&mut self, v: ::std::vec::Vec) { + self.client_data_json = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_client_data_json(&mut self) -> &mut ::std::vec::Vec { + &mut self.client_data_json + } + + // Take field + pub fn take_client_data_json(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.client_data_json, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for CommonCredentialInfo { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.raw_id)?; + }, + 3 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.client_data_json)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + 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.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> CommonCredentialInfo { + CommonCredentialInfo::new() + } + + fn default_instance() -> &'static CommonCredentialInfo { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(CommonCredentialInfo::new) + } +} + +impl ::protobuf::Clear for CommonCredentialInfo { + fn clear(&mut self) { + self.id.clear(); + self.raw_id.clear(); + self.client_data_json.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for CommonCredentialInfo { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct MakeCredentialAuthenticatorResponse { + // message fields + pub info: ::protobuf::SingularPtrField, + pub attestation_object: ::std::vec::Vec, + pub transports: ::std::vec::Vec, + pub echo_hmac_create_secret: bool, + pub hmac_create_secret: bool, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a MakeCredentialAuthenticatorResponse { + fn default() -> &'a MakeCredentialAuthenticatorResponse { + ::default_instance() + } +} + +impl MakeCredentialAuthenticatorResponse { + pub fn new() -> MakeCredentialAuthenticatorResponse { + ::std::default::Default::default() + } + + // .cryptohome.fido.CommonCredentialInfo info = 1; + + + pub fn get_info(&self) -> &CommonCredentialInfo { + self.info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_info(&mut self) { + self.info.clear(); + } + + pub fn has_info(&self) -> bool { + self.info.is_some() + } + + // Param is passed by value, moved + pub fn set_info(&mut self, v: CommonCredentialInfo) { + self.info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_info(&mut self) -> &mut CommonCredentialInfo { + if self.info.is_none() { + self.info.set_default(); + } + self.info.as_mut().unwrap() + } + + // Take field + pub fn take_info(&mut self) -> CommonCredentialInfo { + self.info.take().unwrap_or_else(|| CommonCredentialInfo::new()) + } + + // bytes attestation_object = 2; + + + pub fn get_attestation_object(&self) -> &[u8] { + &self.attestation_object + } + pub fn clear_attestation_object(&mut self) { + self.attestation_object.clear(); + } + + // Param is passed by value, moved + pub fn set_attestation_object(&mut self, v: ::std::vec::Vec) { + self.attestation_object = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_attestation_object(&mut self) -> &mut ::std::vec::Vec { + &mut self.attestation_object + } + + // Take field + pub fn take_attestation_object(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.attestation_object, ::std::vec::Vec::new()) + } + + // repeated .cryptohome.fido.AuthenticatorTransport transports = 3; + + + pub fn get_transports(&self) -> &[AuthenticatorTransport] { + &self.transports + } + pub fn clear_transports(&mut self) { + self.transports.clear(); + } + + // Param is passed by value, moved + pub fn set_transports(&mut self, v: ::std::vec::Vec) { + self.transports = v; + } + + // Mutable pointer to the field. + pub fn mut_transports(&mut self) -> &mut ::std::vec::Vec { + &mut self.transports + } + + // Take field + pub fn take_transports(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.transports, ::std::vec::Vec::new()) + } + + // bool echo_hmac_create_secret = 4; + + + pub fn get_echo_hmac_create_secret(&self) -> bool { + self.echo_hmac_create_secret + } + pub fn clear_echo_hmac_create_secret(&mut self) { + self.echo_hmac_create_secret = false; + } + + // Param is passed by value, moved + pub fn set_echo_hmac_create_secret(&mut self, v: bool) { + self.echo_hmac_create_secret = v; + } + + // bool hmac_create_secret = 5; + + + pub fn get_hmac_create_secret(&self) -> bool { + self.hmac_create_secret + } + pub fn clear_hmac_create_secret(&mut self) { + self.hmac_create_secret = false; + } + + // Param is passed by value, moved + pub fn set_hmac_create_secret(&mut self, v: bool) { + self.hmac_create_secret = v; + } +} + +impl ::protobuf::Message for MakeCredentialAuthenticatorResponse { + fn is_initialized(&self) -> bool { + for v in &self.info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.info)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.attestation_object)?; + }, + 3 => { + ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.transports, 3, &mut self.unknown_fields)? + }, + 4 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.echo_hmac_create_secret = tmp; + }, + 5 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.hmac_create_secret = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_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::enum_size(3, *value); + }; + if self.echo_hmac_create_secret != false { + my_size += 2; + } + if self.hmac_create_secret != false { + my_size += 2; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.info.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if !self.attestation_object.is_empty() { + os.write_bytes(2, &self.attestation_object)?; + } + for v in &self.transports { + os.write_enum(3, ::protobuf::ProtobufEnum::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.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> MakeCredentialAuthenticatorResponse { + MakeCredentialAuthenticatorResponse::new() + } + + fn default_instance() -> &'static MakeCredentialAuthenticatorResponse { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(MakeCredentialAuthenticatorResponse::new) + } +} + +impl ::protobuf::Clear for MakeCredentialAuthenticatorResponse { + 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.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for MakeCredentialAuthenticatorResponse { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct GetAssertionAuthenticatorResponse { + // message fields + pub info: ::protobuf::SingularPtrField, + pub authenticator_data: ::std::vec::Vec, + pub signature: ::std::vec::Vec, + pub user_handle: ::std::vec::Vec, + pub echo_appid_extension: bool, + pub appid_extension: bool, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a GetAssertionAuthenticatorResponse { + fn default() -> &'a GetAssertionAuthenticatorResponse { + ::default_instance() + } +} + +impl GetAssertionAuthenticatorResponse { + pub fn new() -> GetAssertionAuthenticatorResponse { + ::std::default::Default::default() + } + + // .cryptohome.fido.CommonCredentialInfo info = 1; + + + pub fn get_info(&self) -> &CommonCredentialInfo { + self.info.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_info(&mut self) { + self.info.clear(); + } + + pub fn has_info(&self) -> bool { + self.info.is_some() + } + + // Param is passed by value, moved + pub fn set_info(&mut self, v: CommonCredentialInfo) { + self.info = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_info(&mut self) -> &mut CommonCredentialInfo { + if self.info.is_none() { + self.info.set_default(); + } + self.info.as_mut().unwrap() + } + + // Take field + pub fn take_info(&mut self) -> CommonCredentialInfo { + self.info.take().unwrap_or_else(|| CommonCredentialInfo::new()) + } + + // bytes authenticator_data = 2; + + + pub fn get_authenticator_data(&self) -> &[u8] { + &self.authenticator_data + } + pub fn clear_authenticator_data(&mut self) { + self.authenticator_data.clear(); + } + + // Param is passed by value, moved + pub fn set_authenticator_data(&mut self, v: ::std::vec::Vec) { + self.authenticator_data = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_authenticator_data(&mut self) -> &mut ::std::vec::Vec { + &mut self.authenticator_data + } + + // Take field + pub fn take_authenticator_data(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.authenticator_data, ::std::vec::Vec::new()) + } + + // bytes signature = 3; + + + pub fn get_signature(&self) -> &[u8] { + &self.signature + } + pub fn clear_signature(&mut self) { + self.signature.clear(); + } + + // Param is passed by value, moved + pub fn set_signature(&mut self, v: ::std::vec::Vec) { + self.signature = 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 { + &mut self.signature + } + + // Take field + pub fn take_signature(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.signature, ::std::vec::Vec::new()) + } + + // bytes user_handle = 4; + + + pub fn get_user_handle(&self) -> &[u8] { + &self.user_handle + } + pub fn clear_user_handle(&mut self) { + self.user_handle.clear(); + } + + // Param is passed by value, moved + pub fn set_user_handle(&mut self, v: ::std::vec::Vec) { + self.user_handle = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_user_handle(&mut self) -> &mut ::std::vec::Vec { + &mut self.user_handle + } + + // Take field + pub fn take_user_handle(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.user_handle, ::std::vec::Vec::new()) + } + + // bool echo_appid_extension = 5; + + + pub fn get_echo_appid_extension(&self) -> bool { + self.echo_appid_extension + } + pub fn clear_echo_appid_extension(&mut self) { + self.echo_appid_extension = false; + } + + // Param is passed by value, moved + pub fn set_echo_appid_extension(&mut self, v: bool) { + self.echo_appid_extension = v; + } + + // bool appid_extension = 6; + + + pub fn get_appid_extension(&self) -> bool { + self.appid_extension + } + pub fn clear_appid_extension(&mut self) { + self.appid_extension = false; + } + + // Param is passed by value, moved + pub fn set_appid_extension(&mut self, v: bool) { + self.appid_extension = v; + } +} + +impl ::protobuf::Message for GetAssertionAuthenticatorResponse { + fn is_initialized(&self) -> bool { + for v in &self.info { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.info)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.authenticator_data)?; + }, + 3 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.signature)?; + }, + 4 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.user_handle)?; + }, + 5 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.echo_appid_extension = tmp; + }, + 6 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.appid_extension = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.info.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_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 += 2; + } + if self.appid_extension != false { + my_size += 2; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.info.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(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.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> GetAssertionAuthenticatorResponse { + GetAssertionAuthenticatorResponse::new() + } + + fn default_instance() -> &'static GetAssertionAuthenticatorResponse { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(GetAssertionAuthenticatorResponse::new) + } +} + +impl ::protobuf::Clear for GetAssertionAuthenticatorResponse { + 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.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for GetAssertionAuthenticatorResponse { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct PublicKeyCredentialRpEntity { + // message fields + pub id: ::std::string::String, + pub name: ::std::string::String, + pub icon: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PublicKeyCredentialRpEntity { + fn default() -> &'a PublicKeyCredentialRpEntity { + ::default_instance() + } +} + +impl PublicKeyCredentialRpEntity { + pub fn new() -> PublicKeyCredentialRpEntity { + ::std::default::Default::default() + } + + // string id = 1; + + + pub fn get_id(&self) -> &str { + &self.id + } + pub fn clear_id(&mut self) { + self.id.clear(); + } + + // Param is passed by value, moved + pub fn set_id(&mut self, v: ::std::string::String) { + self.id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_id(&mut self) -> &mut ::std::string::String { + &mut self.id + } + + // Take field + pub fn take_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.id, ::std::string::String::new()) + } + + // string name = 2; + + + pub fn get_name(&self) -> &str { + &self.name + } + pub fn clear_name(&mut self) { + self.name.clear(); + } + + // Param is passed by value, moved + pub fn set_name(&mut self, v: ::std::string::String) { + self.name = 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 { + &mut self.name + } + + // Take field + pub fn take_name(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.name, ::std::string::String::new()) + } + + // .cryptohome.fido.Url icon = 3; + + + pub fn get_icon(&self) -> &Url { + self.icon.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_icon(&mut self) { + self.icon.clear(); + } + + pub fn has_icon(&self) -> bool { + self.icon.is_some() + } + + // Param is passed by value, moved + pub fn set_icon(&mut self, v: Url) { + self.icon = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_icon(&mut self) -> &mut Url { + if self.icon.is_none() { + self.icon.set_default(); + } + self.icon.as_mut().unwrap() + } + + // Take field + pub fn take_icon(&mut self) -> Url { + self.icon.take().unwrap_or_else(|| Url::new()) + } +} + +impl ::protobuf::Message for PublicKeyCredentialRpEntity { + fn is_initialized(&self) -> bool { + for v in &self.icon { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.id)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?; + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.icon)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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(ref v) = self.icon.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + 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(ref v) = self.icon.as_ref() { + os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> PublicKeyCredentialRpEntity { + PublicKeyCredentialRpEntity::new() + } + + fn default_instance() -> &'static PublicKeyCredentialRpEntity { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PublicKeyCredentialRpEntity::new) + } +} + +impl ::protobuf::Clear for PublicKeyCredentialRpEntity { + fn clear(&mut self) { + self.id.clear(); + self.name.clear(); + self.icon.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for PublicKeyCredentialRpEntity { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct PublicKeyCredentialUserEntity { + // message fields + pub id: ::std::vec::Vec, + pub name: ::std::string::String, + pub icon: ::protobuf::SingularPtrField, + pub display_name: ::std::string::String, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PublicKeyCredentialUserEntity { + fn default() -> &'a PublicKeyCredentialUserEntity { + ::default_instance() + } +} + +impl PublicKeyCredentialUserEntity { + pub fn new() -> PublicKeyCredentialUserEntity { + ::std::default::Default::default() + } + + // bytes id = 1; + + + pub fn get_id(&self) -> &[u8] { + &self.id + } + pub fn clear_id(&mut self) { + self.id.clear(); + } + + // Param is passed by value, moved + pub fn set_id(&mut self, v: ::std::vec::Vec) { + self.id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.id + } + + // Take field + pub fn take_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.id, ::std::vec::Vec::new()) + } + + // string name = 2; + + + pub fn get_name(&self) -> &str { + &self.name + } + pub fn clear_name(&mut self) { + self.name.clear(); + } + + // Param is passed by value, moved + pub fn set_name(&mut self, v: ::std::string::String) { + self.name = 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 { + &mut self.name + } + + // Take field + pub fn take_name(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.name, ::std::string::String::new()) + } + + // .cryptohome.fido.Url icon = 3; + + + pub fn get_icon(&self) -> &Url { + self.icon.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_icon(&mut self) { + self.icon.clear(); + } + + pub fn has_icon(&self) -> bool { + self.icon.is_some() + } + + // Param is passed by value, moved + pub fn set_icon(&mut self, v: Url) { + self.icon = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_icon(&mut self) -> &mut Url { + if self.icon.is_none() { + self.icon.set_default(); + } + self.icon.as_mut().unwrap() + } + + // Take field + pub fn take_icon(&mut self) -> Url { + self.icon.take().unwrap_or_else(|| Url::new()) + } + + // string display_name = 4; + + + pub fn get_display_name(&self) -> &str { + &self.display_name + } + pub fn clear_display_name(&mut self) { + self.display_name.clear(); + } + + // Param is passed by value, moved + pub fn set_display_name(&mut self, v: ::std::string::String) { + self.display_name = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_display_name(&mut self) -> &mut ::std::string::String { + &mut self.display_name + } + + // Take field + pub fn take_display_name(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.display_name, ::std::string::String::new()) + } +} + +impl ::protobuf::Message for PublicKeyCredentialUserEntity { + fn is_initialized(&self) -> bool { + for v in &self.icon { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.id)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.name)?; + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.icon)?; + }, + 4 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.display_name)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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(ref v) = self.icon.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + 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(ref v) = self.icon.as_ref() { + os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if !self.display_name.is_empty() { + os.write_string(4, &self.display_name)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> PublicKeyCredentialUserEntity { + PublicKeyCredentialUserEntity::new() + } + + fn default_instance() -> &'static PublicKeyCredentialUserEntity { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PublicKeyCredentialUserEntity::new) + } +} + +impl ::protobuf::Clear for PublicKeyCredentialUserEntity { + fn clear(&mut self) { + self.id.clear(); + self.name.clear(); + self.icon.clear(); + self.display_name.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for PublicKeyCredentialUserEntity { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct PublicKeyCredentialParameters { + // message fields + pub field_type: PublicKeyCredentialType, + pub algorithm_identifier: i32, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PublicKeyCredentialParameters { + fn default() -> &'a PublicKeyCredentialParameters { + ::default_instance() + } +} + +impl PublicKeyCredentialParameters { + pub fn new() -> PublicKeyCredentialParameters { + ::std::default::Default::default() + } + + // .cryptohome.fido.PublicKeyCredentialType type = 1; + + + pub fn get_field_type(&self) -> PublicKeyCredentialType { + self.field_type + } + pub fn clear_field_type(&mut self) { + self.field_type = PublicKeyCredentialType::PUBLIC_KEY; + } + + // Param is passed by value, moved + pub fn set_field_type(&mut self, v: PublicKeyCredentialType) { + self.field_type = v; + } + + // int32 algorithm_identifier = 2; + + + pub fn get_algorithm_identifier(&self) -> i32 { + self.algorithm_identifier + } + pub fn clear_algorithm_identifier(&mut self) { + self.algorithm_identifier = 0; + } + + // Param is passed by value, moved + pub fn set_algorithm_identifier(&mut self, v: i32) { + self.algorithm_identifier = v; + } +} + +impl ::protobuf::Message for PublicKeyCredentialParameters { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 1, &mut self.unknown_fields)? + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int32()?; + self.algorithm_identifier = tmp; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.field_type != PublicKeyCredentialType::PUBLIC_KEY { + my_size += ::protobuf::rt::enum_size(1, self.field_type); + } + if self.algorithm_identifier != 0 { + my_size += ::protobuf::rt::value_size(2, self.algorithm_identifier, ::protobuf::wire_format::WireTypeVarint); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.field_type != PublicKeyCredentialType::PUBLIC_KEY { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.field_type))?; + } + if self.algorithm_identifier != 0 { + os.write_int32(2, self.algorithm_identifier)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> PublicKeyCredentialParameters { + PublicKeyCredentialParameters::new() + } + + fn default_instance() -> &'static PublicKeyCredentialParameters { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PublicKeyCredentialParameters::new) + } +} + +impl ::protobuf::Clear for PublicKeyCredentialParameters { + fn clear(&mut self) { + self.field_type = PublicKeyCredentialType::PUBLIC_KEY; + self.algorithm_identifier = 0; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for PublicKeyCredentialParameters { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct CableAuthentication { + // message fields + pub version: u32, + pub client_eid: ::std::vec::Vec, + pub authenticator_eid: ::std::vec::Vec, + pub session_pre_key: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CableAuthentication { + fn default() -> &'a CableAuthentication { + ::default_instance() + } +} + +impl CableAuthentication { + pub fn new() -> CableAuthentication { + ::std::default::Default::default() + } + + // uint32 version = 1; + + + pub fn get_version(&self) -> u32 { + self.version + } + pub fn clear_version(&mut self) { + self.version = 0; + } + + // Param is passed by value, moved + pub fn set_version(&mut self, v: u32) { + self.version = v; + } + + // bytes client_eid = 2; + + + pub fn get_client_eid(&self) -> &[u8] { + &self.client_eid + } + pub fn clear_client_eid(&mut self) { + self.client_eid.clear(); + } + + // Param is passed by value, moved + pub fn set_client_eid(&mut self, v: ::std::vec::Vec) { + self.client_eid = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_client_eid(&mut self) -> &mut ::std::vec::Vec { + &mut self.client_eid + } + + // Take field + pub fn take_client_eid(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.client_eid, ::std::vec::Vec::new()) + } + + // bytes authenticator_eid = 3; + + + pub fn get_authenticator_eid(&self) -> &[u8] { + &self.authenticator_eid + } + pub fn clear_authenticator_eid(&mut self) { + self.authenticator_eid.clear(); + } + + // Param is passed by value, moved + pub fn set_authenticator_eid(&mut self, v: ::std::vec::Vec) { + self.authenticator_eid = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_authenticator_eid(&mut self) -> &mut ::std::vec::Vec { + &mut self.authenticator_eid + } + + // Take field + pub fn take_authenticator_eid(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.authenticator_eid, ::std::vec::Vec::new()) + } + + // bytes session_pre_key = 4; + + + pub fn get_session_pre_key(&self) -> &[u8] { + &self.session_pre_key + } + pub fn clear_session_pre_key(&mut self) { + self.session_pre_key.clear(); + } + + // Param is passed by value, moved + pub fn set_session_pre_key(&mut self, v: ::std::vec::Vec) { + self.session_pre_key = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_session_pre_key(&mut self) -> &mut ::std::vec::Vec { + &mut self.session_pre_key + } + + // Take field + pub fn take_session_pre_key(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.session_pre_key, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for CableAuthentication { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_uint32()?; + self.version = tmp; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.client_eid)?; + }, + 3 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.authenticator_eid)?; + }, + 4 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.session_pre_key)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.version != 0 { + my_size += ::protobuf::rt::value_size(1, self.version, ::protobuf::wire_format::WireTypeVarint); + } + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + 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.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> CableAuthentication { + CableAuthentication::new() + } + + fn default_instance() -> &'static CableAuthentication { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(CableAuthentication::new) + } +} + +impl ::protobuf::Clear for CableAuthentication { + fn clear(&mut self) { + self.version = 0; + self.client_eid.clear(); + self.authenticator_eid.clear(); + self.session_pre_key.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for CableAuthentication { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct CableRegistration { + // message fields + pub versions: ::std::vec::Vec, + pub relying_party_public_key: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a CableRegistration { + fn default() -> &'a CableRegistration { + ::default_instance() + } +} + +impl CableRegistration { + pub fn new() -> CableRegistration { + ::std::default::Default::default() + } + + // bytes versions = 1; + + + pub fn get_versions(&self) -> &[u8] { + &self.versions + } + pub fn clear_versions(&mut self) { + self.versions.clear(); + } + + // Param is passed by value, moved + pub fn set_versions(&mut self, v: ::std::vec::Vec) { + self.versions = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_versions(&mut self) -> &mut ::std::vec::Vec { + &mut self.versions + } + + // Take field + pub fn take_versions(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.versions, ::std::vec::Vec::new()) + } + + // bytes relying_party_public_key = 2; + + + pub fn get_relying_party_public_key(&self) -> &[u8] { + &self.relying_party_public_key + } + pub fn clear_relying_party_public_key(&mut self) { + self.relying_party_public_key.clear(); + } + + // Param is passed by value, moved + pub fn set_relying_party_public_key(&mut self, v: ::std::vec::Vec) { + self.relying_party_public_key = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_relying_party_public_key(&mut self) -> &mut ::std::vec::Vec { + &mut self.relying_party_public_key + } + + // Take field + pub fn take_relying_party_public_key(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.relying_party_public_key, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for CableRegistration { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.versions)?; + }, + 2 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.relying_party_public_key)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + 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.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> CableRegistration { + CableRegistration::new() + } + + fn default_instance() -> &'static CableRegistration { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(CableRegistration::new) + } +} + +impl ::protobuf::Clear for CableRegistration { + fn clear(&mut self) { + self.versions.clear(); + self.relying_party_public_key.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for CableRegistration { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct PublicKeyCredentialRequestOptions { + // message fields + pub challenge: ::std::vec::Vec, + pub adjusted_timeout: i64, + pub relying_party_id: ::std::string::String, + pub allow_credentials: ::protobuf::RepeatedField, + pub user_verification: UserVerificationRequirement, + pub appid: ::std::string::String, + pub cable_authentication_data: ::protobuf::RepeatedField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PublicKeyCredentialRequestOptions { + fn default() -> &'a PublicKeyCredentialRequestOptions { + ::default_instance() + } +} + +impl PublicKeyCredentialRequestOptions { + pub fn new() -> PublicKeyCredentialRequestOptions { + ::std::default::Default::default() + } + + // bytes challenge = 1; + + + pub fn get_challenge(&self) -> &[u8] { + &self.challenge + } + pub fn clear_challenge(&mut self) { + self.challenge.clear(); + } + + // Param is passed by value, moved + pub fn set_challenge(&mut self, v: ::std::vec::Vec) { + self.challenge = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_challenge(&mut self) -> &mut ::std::vec::Vec { + &mut self.challenge + } + + // Take field + pub fn take_challenge(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.challenge, ::std::vec::Vec::new()) + } + + // int64 adjusted_timeout = 2; + + + pub fn get_adjusted_timeout(&self) -> i64 { + self.adjusted_timeout + } + pub fn clear_adjusted_timeout(&mut self) { + self.adjusted_timeout = 0; + } + + // Param is passed by value, moved + pub fn set_adjusted_timeout(&mut self, v: i64) { + self.adjusted_timeout = v; + } + + // string relying_party_id = 3; + + + pub fn get_relying_party_id(&self) -> &str { + &self.relying_party_id + } + pub fn clear_relying_party_id(&mut self) { + self.relying_party_id.clear(); + } + + // Param is passed by value, moved + pub fn set_relying_party_id(&mut self, v: ::std::string::String) { + self.relying_party_id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_relying_party_id(&mut self) -> &mut ::std::string::String { + &mut self.relying_party_id + } + + // Take field + pub fn take_relying_party_id(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.relying_party_id, ::std::string::String::new()) + } + + // repeated .cryptohome.fido.PublicKeyCredentialDescriptor allow_credentials = 4; + + + pub fn get_allow_credentials(&self) -> &[PublicKeyCredentialDescriptor] { + &self.allow_credentials + } + pub fn clear_allow_credentials(&mut self) { + self.allow_credentials.clear(); + } + + // Param is passed by value, moved + pub fn set_allow_credentials(&mut self, v: ::protobuf::RepeatedField) { + self.allow_credentials = v; + } + + // Mutable pointer to the field. + pub fn mut_allow_credentials(&mut self) -> &mut ::protobuf::RepeatedField { + &mut self.allow_credentials + } + + // Take field + pub fn take_allow_credentials(&mut self) -> ::protobuf::RepeatedField { + ::std::mem::replace(&mut self.allow_credentials, ::protobuf::RepeatedField::new()) + } + + // .cryptohome.fido.UserVerificationRequirement user_verification = 5; + + + pub fn get_user_verification(&self) -> UserVerificationRequirement { + self.user_verification + } + pub fn clear_user_verification(&mut self) { + self.user_verification = UserVerificationRequirement::REQUIRED; + } + + // Param is passed by value, moved + pub fn set_user_verification(&mut self, v: UserVerificationRequirement) { + self.user_verification = v; + } + + // string appid = 6; + + + pub fn get_appid(&self) -> &str { + &self.appid + } + pub fn clear_appid(&mut self) { + self.appid.clear(); + } + + // Param is passed by value, moved + pub fn set_appid(&mut self, v: ::std::string::String) { + self.appid = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_appid(&mut self) -> &mut ::std::string::String { + &mut self.appid + } + + // Take field + pub fn take_appid(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.appid, ::std::string::String::new()) + } + + // repeated .cryptohome.fido.CableAuthentication cable_authentication_data = 7; + + + pub fn get_cable_authentication_data(&self) -> &[CableAuthentication] { + &self.cable_authentication_data + } + pub fn clear_cable_authentication_data(&mut self) { + self.cable_authentication_data.clear(); + } + + // Param is passed by value, moved + pub fn set_cable_authentication_data(&mut self, v: ::protobuf::RepeatedField) { + self.cable_authentication_data = v; + } + + // Mutable pointer to the field. + pub fn mut_cable_authentication_data(&mut self) -> &mut ::protobuf::RepeatedField { + &mut self.cable_authentication_data + } + + // Take field + pub fn take_cable_authentication_data(&mut self) -> ::protobuf::RepeatedField { + ::std::mem::replace(&mut self.cable_authentication_data, ::protobuf::RepeatedField::new()) + } +} + +impl ::protobuf::Message for PublicKeyCredentialRequestOptions { + fn is_initialized(&self) -> bool { + for v in &self.allow_credentials { + if !v.is_initialized() { + return false; + } + }; + for v in &self.cable_authentication_data { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.challenge)?; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int64()?; + self.adjusted_timeout = tmp; + }, + 3 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.relying_party_id)?; + }, + 4 => { + ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.allow_credentials)?; + }, + 5 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.user_verification, 5, &mut self.unknown_fields)? + }, + 6 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.appid)?; + }, + 7 => { + ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.cable_authentication_data)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + 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::value_size(2, self.adjusted_timeout, ::protobuf::wire_format::WireTypeVarint); + } + 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_varint32_size(len) + len; + }; + if self.user_verification != UserVerificationRequirement::REQUIRED { + my_size += ::protobuf::rt::enum_size(5, self.user_verification); + } + 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_varint32_size(len) + len; + }; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + 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 { + os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }; + if self.user_verification != UserVerificationRequirement::REQUIRED { + os.write_enum(5, ::protobuf::ProtobufEnum::value(&self.user_verification))?; + } + if !self.appid.is_empty() { + os.write_string(6, &self.appid)?; + } + for v in &self.cable_authentication_data { + os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }; + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> PublicKeyCredentialRequestOptions { + PublicKeyCredentialRequestOptions::new() + } + + fn default_instance() -> &'static PublicKeyCredentialRequestOptions { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PublicKeyCredentialRequestOptions::new) + } +} + +impl ::protobuf::Clear for PublicKeyCredentialRequestOptions { + fn clear(&mut self) { + self.challenge.clear(); + self.adjusted_timeout = 0; + self.relying_party_id.clear(); + self.allow_credentials.clear(); + self.user_verification = UserVerificationRequirement::REQUIRED; + self.appid.clear(); + self.cable_authentication_data.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for PublicKeyCredentialRequestOptions { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct AuthenticatorSelectionCriteria { + // message fields + pub authenticator_attachment: AuthenticatorAttachment, + pub require_resident_key: bool, + pub user_verification: UserVerificationRequirement, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AuthenticatorSelectionCriteria { + fn default() -> &'a AuthenticatorSelectionCriteria { + ::default_instance() + } +} + +impl AuthenticatorSelectionCriteria { + pub fn new() -> AuthenticatorSelectionCriteria { + ::std::default::Default::default() + } + + // .cryptohome.fido.AuthenticatorAttachment authenticator_attachment = 1; + + + pub fn get_authenticator_attachment(&self) -> AuthenticatorAttachment { + self.authenticator_attachment + } + pub fn clear_authenticator_attachment(&mut self) { + self.authenticator_attachment = AuthenticatorAttachment::NO_PREFERENCE; + } + + // Param is passed by value, moved + pub fn set_authenticator_attachment(&mut self, v: AuthenticatorAttachment) { + self.authenticator_attachment = v; + } + + // bool require_resident_key = 2; + + + pub fn get_require_resident_key(&self) -> bool { + self.require_resident_key + } + pub fn clear_require_resident_key(&mut self) { + self.require_resident_key = false; + } + + // Param is passed by value, moved + pub fn set_require_resident_key(&mut self, v: bool) { + self.require_resident_key = v; + } + + // .cryptohome.fido.UserVerificationRequirement user_verification = 3; + + + pub fn get_user_verification(&self) -> UserVerificationRequirement { + self.user_verification + } + pub fn clear_user_verification(&mut self) { + self.user_verification = UserVerificationRequirement::REQUIRED; + } + + // Param is passed by value, moved + pub fn set_user_verification(&mut self, v: UserVerificationRequirement) { + self.user_verification = v; + } +} + +impl ::protobuf::Message for AuthenticatorSelectionCriteria { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.authenticator_attachment, 1, &mut self.unknown_fields)? + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.require_resident_key = tmp; + }, + 3 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.user_verification, 3, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.authenticator_attachment != AuthenticatorAttachment::NO_PREFERENCE { + my_size += ::protobuf::rt::enum_size(1, self.authenticator_attachment); + } + if self.require_resident_key != false { + my_size += 2; + } + if self.user_verification != UserVerificationRequirement::REQUIRED { + my_size += ::protobuf::rt::enum_size(3, self.user_verification); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.authenticator_attachment != AuthenticatorAttachment::NO_PREFERENCE { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.authenticator_attachment))?; + } + if self.require_resident_key != false { + os.write_bool(2, self.require_resident_key)?; + } + if self.user_verification != UserVerificationRequirement::REQUIRED { + os.write_enum(3, ::protobuf::ProtobufEnum::value(&self.user_verification))?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> AuthenticatorSelectionCriteria { + AuthenticatorSelectionCriteria::new() + } + + fn default_instance() -> &'static AuthenticatorSelectionCriteria { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(AuthenticatorSelectionCriteria::new) + } +} + +impl ::protobuf::Clear for AuthenticatorSelectionCriteria { + fn clear(&mut self) { + self.authenticator_attachment = AuthenticatorAttachment::NO_PREFERENCE; + self.require_resident_key = false; + self.user_verification = UserVerificationRequirement::REQUIRED; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for AuthenticatorSelectionCriteria { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct PublicKeyCredentialCreationOptions { + // message fields + pub relying_party: ::protobuf::SingularPtrField, + pub user: ::protobuf::SingularPtrField, + pub challenge: ::std::vec::Vec, + pub public_key_parameters: ::protobuf::RepeatedField, + pub adjusted_timeout: i64, + pub exclude_credentials: ::protobuf::RepeatedField, + pub authenticator_selection: ::protobuf::SingularPtrField, + pub attestation: AttestationConveyancePreference, + pub cable_registration_data: ::protobuf::SingularPtrField, + pub hmac_create_secret: bool, + pub protection_policy: ProtectionPolicy, + pub enforce_protection_policy: bool, + pub appid_exclude: ::std::string::String, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PublicKeyCredentialCreationOptions { + fn default() -> &'a PublicKeyCredentialCreationOptions { + ::default_instance() + } +} + +impl PublicKeyCredentialCreationOptions { + pub fn new() -> PublicKeyCredentialCreationOptions { + ::std::default::Default::default() + } + + // .cryptohome.fido.PublicKeyCredentialRpEntity relying_party = 1; + + + pub fn get_relying_party(&self) -> &PublicKeyCredentialRpEntity { + self.relying_party.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_relying_party(&mut self) { + self.relying_party.clear(); + } + + pub fn has_relying_party(&self) -> bool { + self.relying_party.is_some() + } + + // Param is passed by value, moved + pub fn set_relying_party(&mut self, v: PublicKeyCredentialRpEntity) { + self.relying_party = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_relying_party(&mut self) -> &mut PublicKeyCredentialRpEntity { + if self.relying_party.is_none() { + self.relying_party.set_default(); + } + self.relying_party.as_mut().unwrap() + } + + // Take field + pub fn take_relying_party(&mut self) -> PublicKeyCredentialRpEntity { + self.relying_party.take().unwrap_or_else(|| PublicKeyCredentialRpEntity::new()) + } + + // .cryptohome.fido.PublicKeyCredentialUserEntity user = 2; + + + pub fn get_user(&self) -> &PublicKeyCredentialUserEntity { + self.user.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_user(&mut self) { + self.user.clear(); + } + + pub fn has_user(&self) -> bool { + self.user.is_some() + } + + // Param is passed by value, moved + pub fn set_user(&mut self, v: PublicKeyCredentialUserEntity) { + self.user = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_user(&mut self) -> &mut PublicKeyCredentialUserEntity { + if self.user.is_none() { + self.user.set_default(); + } + self.user.as_mut().unwrap() + } + + // Take field + pub fn take_user(&mut self) -> PublicKeyCredentialUserEntity { + self.user.take().unwrap_or_else(|| PublicKeyCredentialUserEntity::new()) + } + + // bytes challenge = 3; + + + pub fn get_challenge(&self) -> &[u8] { + &self.challenge + } + pub fn clear_challenge(&mut self) { + self.challenge.clear(); + } + + // Param is passed by value, moved + pub fn set_challenge(&mut self, v: ::std::vec::Vec) { + self.challenge = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_challenge(&mut self) -> &mut ::std::vec::Vec { + &mut self.challenge + } + + // Take field + pub fn take_challenge(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.challenge, ::std::vec::Vec::new()) + } + + // repeated .cryptohome.fido.PublicKeyCredentialParameters public_key_parameters = 4; + + + pub fn get_public_key_parameters(&self) -> &[PublicKeyCredentialParameters] { + &self.public_key_parameters + } + pub fn clear_public_key_parameters(&mut self) { + self.public_key_parameters.clear(); + } + + // Param is passed by value, moved + pub fn set_public_key_parameters(&mut self, v: ::protobuf::RepeatedField) { + self.public_key_parameters = v; + } + + // Mutable pointer to the field. + pub fn mut_public_key_parameters(&mut self) -> &mut ::protobuf::RepeatedField { + &mut self.public_key_parameters + } + + // Take field + pub fn take_public_key_parameters(&mut self) -> ::protobuf::RepeatedField { + ::std::mem::replace(&mut self.public_key_parameters, ::protobuf::RepeatedField::new()) + } + + // int64 adjusted_timeout = 5; + + + pub fn get_adjusted_timeout(&self) -> i64 { + self.adjusted_timeout + } + pub fn clear_adjusted_timeout(&mut self) { + self.adjusted_timeout = 0; + } + + // Param is passed by value, moved + pub fn set_adjusted_timeout(&mut self, v: i64) { + self.adjusted_timeout = v; + } + + // repeated .cryptohome.fido.PublicKeyCredentialDescriptor exclude_credentials = 6; + + + pub fn get_exclude_credentials(&self) -> &[PublicKeyCredentialDescriptor] { + &self.exclude_credentials + } + pub fn clear_exclude_credentials(&mut self) { + self.exclude_credentials.clear(); + } + + // Param is passed by value, moved + pub fn set_exclude_credentials(&mut self, v: ::protobuf::RepeatedField) { + self.exclude_credentials = v; + } + + // Mutable pointer to the field. + pub fn mut_exclude_credentials(&mut self) -> &mut ::protobuf::RepeatedField { + &mut self.exclude_credentials + } + + // Take field + pub fn take_exclude_credentials(&mut self) -> ::protobuf::RepeatedField { + ::std::mem::replace(&mut self.exclude_credentials, ::protobuf::RepeatedField::new()) + } + + // .cryptohome.fido.AuthenticatorSelectionCriteria authenticator_selection = 7; + + + pub fn get_authenticator_selection(&self) -> &AuthenticatorSelectionCriteria { + self.authenticator_selection.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_authenticator_selection(&mut self) { + self.authenticator_selection.clear(); + } + + pub fn has_authenticator_selection(&self) -> bool { + self.authenticator_selection.is_some() + } + + // Param is passed by value, moved + pub fn set_authenticator_selection(&mut self, v: AuthenticatorSelectionCriteria) { + self.authenticator_selection = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_authenticator_selection(&mut self) -> &mut AuthenticatorSelectionCriteria { + if self.authenticator_selection.is_none() { + self.authenticator_selection.set_default(); + } + self.authenticator_selection.as_mut().unwrap() + } + + // Take field + pub fn take_authenticator_selection(&mut self) -> AuthenticatorSelectionCriteria { + self.authenticator_selection.take().unwrap_or_else(|| AuthenticatorSelectionCriteria::new()) + } + + // .cryptohome.fido.AttestationConveyancePreference attestation = 8; + + + pub fn get_attestation(&self) -> AttestationConveyancePreference { + self.attestation + } + pub fn clear_attestation(&mut self) { + self.attestation = AttestationConveyancePreference::NONE_ATTESTATION_PREFERENCE; + } + + // Param is passed by value, moved + pub fn set_attestation(&mut self, v: AttestationConveyancePreference) { + self.attestation = v; + } + + // .cryptohome.fido.CableRegistration cable_registration_data = 9; + + + pub fn get_cable_registration_data(&self) -> &CableRegistration { + self.cable_registration_data.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_cable_registration_data(&mut self) { + self.cable_registration_data.clear(); + } + + pub fn has_cable_registration_data(&self) -> bool { + self.cable_registration_data.is_some() + } + + // Param is passed by value, moved + pub fn set_cable_registration_data(&mut self, v: CableRegistration) { + self.cable_registration_data = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_cable_registration_data(&mut self) -> &mut CableRegistration { + if self.cable_registration_data.is_none() { + self.cable_registration_data.set_default(); + } + self.cable_registration_data.as_mut().unwrap() + } + + // Take field + pub fn take_cable_registration_data(&mut self) -> CableRegistration { + self.cable_registration_data.take().unwrap_or_else(|| CableRegistration::new()) + } + + // bool hmac_create_secret = 10; + + + pub fn get_hmac_create_secret(&self) -> bool { + self.hmac_create_secret + } + pub fn clear_hmac_create_secret(&mut self) { + self.hmac_create_secret = false; + } + + // Param is passed by value, moved + pub fn set_hmac_create_secret(&mut self, v: bool) { + self.hmac_create_secret = v; + } + + // .cryptohome.fido.ProtectionPolicy protection_policy = 11; + + + pub fn get_protection_policy(&self) -> ProtectionPolicy { + self.protection_policy + } + pub fn clear_protection_policy(&mut self) { + self.protection_policy = ProtectionPolicy::UNSPECIFIED; + } + + // Param is passed by value, moved + pub fn set_protection_policy(&mut self, v: ProtectionPolicy) { + self.protection_policy = v; + } + + // bool enforce_protection_policy = 12; + + + pub fn get_enforce_protection_policy(&self) -> bool { + self.enforce_protection_policy + } + pub fn clear_enforce_protection_policy(&mut self) { + self.enforce_protection_policy = false; + } + + // Param is passed by value, moved + pub fn set_enforce_protection_policy(&mut self, v: bool) { + self.enforce_protection_policy = v; + } + + // string appid_exclude = 13; + + + pub fn get_appid_exclude(&self) -> &str { + &self.appid_exclude + } + pub fn clear_appid_exclude(&mut self) { + self.appid_exclude.clear(); + } + + // Param is passed by value, moved + pub fn set_appid_exclude(&mut self, v: ::std::string::String) { + self.appid_exclude = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_appid_exclude(&mut self) -> &mut ::std::string::String { + &mut self.appid_exclude + } + + // Take field + pub fn take_appid_exclude(&mut self) -> ::std::string::String { + ::std::mem::replace(&mut self.appid_exclude, ::std::string::String::new()) + } +} + +impl ::protobuf::Message for PublicKeyCredentialCreationOptions { + fn is_initialized(&self) -> bool { + for v in &self.relying_party { + if !v.is_initialized() { + return false; + } + }; + for v in &self.user { + if !v.is_initialized() { + return false; + } + }; + for v in &self.public_key_parameters { + if !v.is_initialized() { + return false; + } + }; + for v in &self.exclude_credentials { + if !v.is_initialized() { + return false; + } + }; + for v in &self.authenticator_selection { + if !v.is_initialized() { + return false; + } + }; + for v in &self.cable_registration_data { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.relying_party)?; + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.user)?; + }, + 3 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.challenge)?; + }, + 4 => { + ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.public_key_parameters)?; + }, + 5 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int64()?; + self.adjusted_timeout = tmp; + }, + 6 => { + ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.exclude_credentials)?; + }, + 7 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.authenticator_selection)?; + }, + 8 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.attestation, 8, &mut self.unknown_fields)? + }, + 9 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.cable_registration_data)?; + }, + 10 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.hmac_create_secret = tmp; + }, + 11 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.protection_policy, 11, &mut self.unknown_fields)? + }, + 12 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.enforce_protection_policy = tmp; + }, + 13 => { + ::protobuf::rt::read_singular_proto3_string_into(wire_type, is, &mut self.appid_exclude)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.relying_party.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.user.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_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_varint32_size(len) + len; + }; + if self.adjusted_timeout != 0 { + my_size += ::protobuf::rt::value_size(5, self.adjusted_timeout, ::protobuf::wire_format::WireTypeVarint); + } + for value in &self.exclude_credentials { + let len = value.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + }; + if let Some(ref v) = self.authenticator_selection.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if self.attestation != AttestationConveyancePreference::NONE_ATTESTATION_PREFERENCE { + my_size += ::protobuf::rt::enum_size(8, self.attestation); + } + if let Some(ref v) = self.cable_registration_data.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if self.hmac_create_secret != false { + my_size += 2; + } + if self.protection_policy != ProtectionPolicy::UNSPECIFIED { + my_size += ::protobuf::rt::enum_size(11, self.protection_policy); + } + if self.enforce_protection_policy != false { + my_size += 2; + } + if !self.appid_exclude.is_empty() { + my_size += ::protobuf::rt::string_size(13, &self.appid_exclude); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.relying_party.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if let Some(ref v) = self.user.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if !self.challenge.is_empty() { + os.write_bytes(3, &self.challenge)?; + } + for v in &self.public_key_parameters { + os.write_tag(4, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }; + if self.adjusted_timeout != 0 { + os.write_int64(5, self.adjusted_timeout)?; + } + for v in &self.exclude_credentials { + os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }; + if let Some(ref v) = self.authenticator_selection.as_ref() { + os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if self.attestation != AttestationConveyancePreference::NONE_ATTESTATION_PREFERENCE { + os.write_enum(8, ::protobuf::ProtobufEnum::value(&self.attestation))?; + } + if let Some(ref v) = self.cable_registration_data.as_ref() { + os.write_tag(9, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if self.hmac_create_secret != false { + os.write_bool(10, self.hmac_create_secret)?; + } + if self.protection_policy != ProtectionPolicy::UNSPECIFIED { + os.write_enum(11, ::protobuf::ProtobufEnum::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.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> PublicKeyCredentialCreationOptions { + PublicKeyCredentialCreationOptions::new() + } + + fn default_instance() -> &'static PublicKeyCredentialCreationOptions { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PublicKeyCredentialCreationOptions::new) + } +} + +impl ::protobuf::Clear for PublicKeyCredentialCreationOptions { + 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 = AttestationConveyancePreference::NONE_ATTESTATION_PREFERENCE; + self.cable_registration_data.clear(); + self.hmac_create_secret = false; + self.protection_policy = ProtectionPolicy::UNSPECIFIED; + self.enforce_protection_policy = false; + self.appid_exclude.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for PublicKeyCredentialCreationOptions { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct PublicKeyCredentialDescriptor { + // message fields + pub field_type: PublicKeyCredentialType, + pub id: ::std::vec::Vec, + pub transports: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a PublicKeyCredentialDescriptor { + fn default() -> &'a PublicKeyCredentialDescriptor { + ::default_instance() + } +} + +impl PublicKeyCredentialDescriptor { + pub fn new() -> PublicKeyCredentialDescriptor { + ::std::default::Default::default() + } + + // .cryptohome.fido.PublicKeyCredentialType type = 1; + + + pub fn get_field_type(&self) -> PublicKeyCredentialType { + self.field_type + } + pub fn clear_field_type(&mut self) { + self.field_type = PublicKeyCredentialType::PUBLIC_KEY; + } + + // Param is passed by value, moved + pub fn set_field_type(&mut self, v: PublicKeyCredentialType) { + self.field_type = v; + } + + // bytes id = 2; + + + pub fn get_id(&self) -> &[u8] { + &self.id + } + pub fn clear_id(&mut self) { + self.id.clear(); + } + + // Param is passed by value, moved + pub fn set_id(&mut self, v: ::std::vec::Vec) { + self.id = v; + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_id(&mut self) -> &mut ::std::vec::Vec { + &mut self.id + } + + // Take field + pub fn take_id(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.id, ::std::vec::Vec::new()) + } + + // repeated .cryptohome.fido.AuthenticatorTransport transports = 3; + + + pub fn get_transports(&self) -> &[AuthenticatorTransport] { + &self.transports + } + pub fn clear_transports(&mut self) { + self.transports.clear(); + } + + // Param is passed by value, moved + pub fn set_transports(&mut self, v: ::std::vec::Vec) { + self.transports = v; + } + + // Mutable pointer to the field. + pub fn mut_transports(&mut self) -> &mut ::std::vec::Vec { + &mut self.transports + } + + // Take field + pub fn take_transports(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.transports, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for PublicKeyCredentialDescriptor { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto3_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_proto3_bytes_into(wire_type, is, &mut self.id)?; + }, + 3 => { + ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.transports, 3, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if self.field_type != PublicKeyCredentialType::PUBLIC_KEY { + my_size += ::protobuf::rt::enum_size(1, self.field_type); + } + if !self.id.is_empty() { + my_size += ::protobuf::rt::bytes_size(2, &self.id); + } + for value in &self.transports { + my_size += ::protobuf::rt::enum_size(3, *value); + }; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if self.field_type != PublicKeyCredentialType::PUBLIC_KEY { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&self.field_type))?; + } + if !self.id.is_empty() { + os.write_bytes(2, &self.id)?; + } + for v in &self.transports { + os.write_enum(3, ::protobuf::ProtobufEnum::value(v))?; + }; + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> PublicKeyCredentialDescriptor { + PublicKeyCredentialDescriptor::new() + } + + fn default_instance() -> &'static PublicKeyCredentialDescriptor { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(PublicKeyCredentialDescriptor::new) + } +} + +impl ::protobuf::Clear for PublicKeyCredentialDescriptor { + fn clear(&mut self) { + self.field_type = PublicKeyCredentialType::PUBLIC_KEY; + self.id.clear(); + self.transports.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for PublicKeyCredentialDescriptor { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum AuthenticatorStatus { + SUCCESS = 0, + PENDING_REQUEST = 1, + NOT_ALLOWED_ERROR = 2, + INVALID_DOMAIN = 3, + INVALID_ICON_URL = 4, + CREDENTIAL_EXCLUDED = 5, + CREDENTIAL_NOT_RECOGNIZED = 6, + NOT_IMPLEMENTED = 7, + NOT_FOCUSED = 8, + RESIDENT_CREDENTIALS_UNSUPPORTED = 9, + USER_VERIFICATION_UNSUPPORTED = 10, + ALGORITHM_UNSUPPORTED = 11, + EMPTY_ALLOW_CREDENTIALS = 12, + ANDROID_NOT_SUPPORTED_ERROR = 13, + PROTECTION_POLICY_INCONSISTENT = 14, + ABORT_ERROR = 15, + OPAQUE_DOMAIN = 16, + INVALID_PROTOCOL = 17, + BAD_RELYING_PARTY_ID = 18, + UNKNOWN_ERROR = 19, +} + +impl ::protobuf::ProtobufEnum for 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 + } + } + + fn values() -> &'static [Self] { + static 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, + ]; + values + } +} + +impl ::std::marker::Copy for AuthenticatorStatus { +} + +impl ::std::default::Default for AuthenticatorStatus { + fn default() -> Self { + AuthenticatorStatus::SUCCESS + } +} + +impl ::protobuf::reflect::ProtobufValue for AuthenticatorStatus { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum AuthenticatorTransport { + USB = 0, + NFC = 1, + BLE = 2, + CABLE = 3, + INTERNAL = 4, +} + +impl ::protobuf::ProtobufEnum for 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 + } + } + + fn values() -> &'static [Self] { + static values: &'static [AuthenticatorTransport] = &[ + AuthenticatorTransport::USB, + AuthenticatorTransport::NFC, + AuthenticatorTransport::BLE, + AuthenticatorTransport::CABLE, + AuthenticatorTransport::INTERNAL, + ]; + values + } +} + +impl ::std::marker::Copy for AuthenticatorTransport { +} + +impl ::std::default::Default for AuthenticatorTransport { + fn default() -> Self { + AuthenticatorTransport::USB + } +} + +impl ::protobuf::reflect::ProtobufValue for AuthenticatorTransport { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum UserVerificationRequirement { + REQUIRED = 0, + PREFERRED = 1, + DISCOURAGED = 2, +} + +impl ::protobuf::ProtobufEnum for 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 + } + } + + fn values() -> &'static [Self] { + static values: &'static [UserVerificationRequirement] = &[ + UserVerificationRequirement::REQUIRED, + UserVerificationRequirement::PREFERRED, + UserVerificationRequirement::DISCOURAGED, + ]; + values + } +} + +impl ::std::marker::Copy for UserVerificationRequirement { +} + +impl ::std::default::Default for UserVerificationRequirement { + fn default() -> Self { + UserVerificationRequirement::REQUIRED + } +} + +impl ::protobuf::reflect::ProtobufValue for UserVerificationRequirement { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum AttestationConveyancePreference { + NONE_ATTESTATION_PREFERENCE = 0, + INDIRECT = 1, + DIRECT = 2, + ENTERPRISE = 3, +} + +impl ::protobuf::ProtobufEnum for 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 + } + } + + fn values() -> &'static [Self] { + static values: &'static [AttestationConveyancePreference] = &[ + AttestationConveyancePreference::NONE_ATTESTATION_PREFERENCE, + AttestationConveyancePreference::INDIRECT, + AttestationConveyancePreference::DIRECT, + AttestationConveyancePreference::ENTERPRISE, + ]; + values + } +} + +impl ::std::marker::Copy for AttestationConveyancePreference { +} + +impl ::std::default::Default for AttestationConveyancePreference { + fn default() -> Self { + AttestationConveyancePreference::NONE_ATTESTATION_PREFERENCE + } +} + +impl ::protobuf::reflect::ProtobufValue for AttestationConveyancePreference { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum AuthenticatorAttachment { + NO_PREFERENCE = 0, + PLATFORM = 1, + CROSS_PLATFORM = 2, +} + +impl ::protobuf::ProtobufEnum for 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 + } + } + + fn values() -> &'static [Self] { + static values: &'static [AuthenticatorAttachment] = &[ + AuthenticatorAttachment::NO_PREFERENCE, + AuthenticatorAttachment::PLATFORM, + AuthenticatorAttachment::CROSS_PLATFORM, + ]; + values + } +} + +impl ::std::marker::Copy for AuthenticatorAttachment { +} + +impl ::std::default::Default for AuthenticatorAttachment { + fn default() -> Self { + AuthenticatorAttachment::NO_PREFERENCE + } +} + +impl ::protobuf::reflect::ProtobufValue for AuthenticatorAttachment { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum ProtectionPolicy { + UNSPECIFIED = 0, + NONE_PROTECTION_POLICY = 1, + UV_OR_CRED_ID_REQUIRED = 2, + UV_REQUIRED = 3, +} + +impl ::protobuf::ProtobufEnum for 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 + } + } + + fn values() -> &'static [Self] { + static values: &'static [ProtectionPolicy] = &[ + ProtectionPolicy::UNSPECIFIED, + ProtectionPolicy::NONE_PROTECTION_POLICY, + ProtectionPolicy::UV_OR_CRED_ID_REQUIRED, + ProtectionPolicy::UV_REQUIRED, + ]; + values + } +} + +impl ::std::marker::Copy for ProtectionPolicy { +} + +impl ::std::default::Default for ProtectionPolicy { + fn default() -> Self { + ProtectionPolicy::UNSPECIFIED + } +} + +impl ::protobuf::reflect::ProtobufValue for ProtectionPolicy { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum PublicKeyCredentialType { + PUBLIC_KEY = 0, +} + +impl ::protobuf::ProtobufEnum for 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 + } + } + + fn values() -> &'static [Self] { + static values: &'static [PublicKeyCredentialType] = &[ + PublicKeyCredentialType::PUBLIC_KEY, + ]; + values + } +} + +impl ::std::marker::Copy for PublicKeyCredentialType { +} + +impl ::std::default::Default for PublicKeyCredentialType { + fn default() -> Self { + PublicKeyCredentialType::PUBLIC_KEY + } +} + +impl ::protobuf::reflect::ProtobufValue for PublicKeyCredentialType { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} diff --git a/system_api_stub/src/system_api.rs b/system_api/src/protos/include_protos.rs similarity index 63% rename from system_api_stub/src/system_api.rs rename to system_api/src/protos/include_protos.rs index 852ee53f3..65022ee9e 100644 --- a/system_api_stub/src/system_api.rs +++ b/system_api/src/protos/include_protos.rs @@ -2,4 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// This space intentionally left blank. +pub mod UserDataAuth; +pub mod auth_factor; +pub mod fido; +pub mod key; +pub mod rpc; diff --git a/system_api/src/protos/key.rs b/system_api/src/protos/key.rs new file mode 100644 index 000000000..f6434f421 --- /dev/null +++ b/system_api/src/protos/key.rs @@ -0,0 +1,1651 @@ +// This file is generated by rust-protobuf 2.27.1. Do not edit +// @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_imports)] +#![allow(unused_results)] +//! Generated file from `key.proto` + +/// Generated files are compatible only with the same version +/// of protobuf runtime. +// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_27_1; + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct KeyPrivileges { + // message fields + add: ::std::option::Option, + remove: ::std::option::Option, + update: ::std::option::Option, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 get_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 get_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 get_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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.add = ::std::option::Option::Some(tmp); + }, + 3 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.remove = ::std::option::Option::Some(tmp); + }, + 4 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.update = ::std::option::Option::Some(tmp); + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(v) = self.add { + my_size += 2; + } + if let Some(v) = self.remove { + my_size += 2; + } + if let Some(v) = self.update { + my_size += 2; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + 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.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> KeyPrivileges { + KeyPrivileges::new() + } + + fn default_instance() -> &'static KeyPrivileges { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(KeyPrivileges::new) + } +} + +impl ::protobuf::Clear for KeyPrivileges { + fn clear(&mut self) { + self.add = ::std::option::Option::None; + self.remove = ::std::option::Option::None; + self.update = ::std::option::Option::None; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for KeyPrivileges { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct KeyProviderData { + // message fields + pub entry: ::protobuf::RepeatedField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a KeyProviderData { + fn default() -> &'a KeyProviderData { + ::default_instance() + } +} + +impl KeyProviderData { + pub fn new() -> KeyProviderData { + ::std::default::Default::default() + } + + // repeated .cryptohome.KeyProviderData.Entry entry = 1; + + + pub fn get_entry(&self) -> &[KeyProviderData_Entry] { + &self.entry + } + pub fn clear_entry(&mut self) { + self.entry.clear(); + } + + // Param is passed by value, moved + pub fn set_entry(&mut self, v: ::protobuf::RepeatedField) { + self.entry = v; + } + + // Mutable pointer to the field. + pub fn mut_entry(&mut self) -> &mut ::protobuf::RepeatedField { + &mut self.entry + } + + // Take field + pub fn take_entry(&mut self) -> ::protobuf::RepeatedField { + ::std::mem::replace(&mut self.entry, ::protobuf::RepeatedField::new()) + } +} + +impl ::protobuf::Message for KeyProviderData { + fn is_initialized(&self) -> bool { + for v in &self.entry { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.entry)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + for value in &self.entry { + let len = value.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + }; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + for v in &self.entry { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }; + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> KeyProviderData { + KeyProviderData::new() + } + + fn default_instance() -> &'static KeyProviderData { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(KeyProviderData::new) + } +} + +impl ::protobuf::Clear for KeyProviderData { + fn clear(&mut self) { + self.entry.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for KeyProviderData { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct KeyProviderData_Entry { + // message fields + name: ::protobuf::SingularField<::std::string::String>, + number: ::std::option::Option, + bytes: ::protobuf::SingularField<::std::vec::Vec>, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a KeyProviderData_Entry { + fn default() -> &'a KeyProviderData_Entry { + ::default_instance() + } +} + +impl KeyProviderData_Entry { + pub fn new() -> KeyProviderData_Entry { + ::std::default::Default::default() + } + + // optional string name = 1; + + + pub fn get_name(&self) -> &str { + match self.name.as_ref() { + Some(v) => &v, + None => "", + } + } + pub fn clear_name(&mut self) { + self.name.clear(); + } + + 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 = ::protobuf::SingularField::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.set_default(); + } + 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 get_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 get_bytes(&self) -> &[u8] { + match self.bytes.as_ref() { + Some(v) => &v, + None => &[], + } + } + pub fn clear_bytes(&mut self) { + self.bytes.clear(); + } + + 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 = ::protobuf::SingularField::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.set_default(); + } + 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 KeyProviderData_Entry { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.name)?; + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int64()?; + self.number = ::std::option::Option::Some(tmp); + }, + 3 => { + ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.bytes)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.name.as_ref() { + my_size += ::protobuf::rt::string_size(1, &v); + } + if let Some(v) = self.number { + my_size += ::protobuf::rt::value_size(2, v, ::protobuf::wire_format::WireTypeVarint); + } + if let Some(ref v) = self.bytes.as_ref() { + my_size += ::protobuf::rt::bytes_size(3, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.name.as_ref() { + os.write_string(1, &v)?; + } + if let Some(v) = self.number { + os.write_int64(2, v)?; + } + if let Some(ref v) = self.bytes.as_ref() { + os.write_bytes(3, &v)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> KeyProviderData_Entry { + KeyProviderData_Entry::new() + } + + fn default_instance() -> &'static KeyProviderData_Entry { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(KeyProviderData_Entry::new) + } +} + +impl ::protobuf::Clear for KeyProviderData_Entry { + fn clear(&mut self) { + self.name.clear(); + self.number = ::std::option::Option::None; + self.bytes.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for KeyProviderData_Entry { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct ChallengePublicKeyInfo { + // message fields + public_key_spki_der: ::protobuf::SingularField<::std::vec::Vec>, + pub signature_algorithm: ::std::vec::Vec, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 get_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.clear(); + } + + 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 = ::protobuf::SingularField::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.set_default(); + } + 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()) + } + + // repeated .cryptohome.ChallengeSignatureAlgorithm signature_algorithm = 2; + + + pub fn get_signature_algorithm(&self) -> &[ChallengeSignatureAlgorithm] { + &self.signature_algorithm + } + pub fn clear_signature_algorithm(&mut self) { + self.signature_algorithm.clear(); + } + + // Param is passed by value, moved + pub fn set_signature_algorithm(&mut self, v: ::std::vec::Vec) { + self.signature_algorithm = v; + } + + // Mutable pointer to the field. + pub fn mut_signature_algorithm(&mut self) -> &mut ::std::vec::Vec { + &mut self.signature_algorithm + } + + // Take field + pub fn take_signature_algorithm(&mut self) -> ::std::vec::Vec { + ::std::mem::replace(&mut self.signature_algorithm, ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for ChallengePublicKeyInfo { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.public_key_spki_der)?; + }, + 2 => { + ::protobuf::rt::read_repeated_enum_with_unknown_fields_into(wire_type, is, &mut self.signature_algorithm, 2, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref 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::enum_size(2, *value); + }; + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.public_key_spki_der.as_ref() { + os.write_bytes(1, &v)?; + } + for v in &self.signature_algorithm { + os.write_enum(2, ::protobuf::ProtobufEnum::value(v))?; + }; + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> ChallengePublicKeyInfo { + ChallengePublicKeyInfo::new() + } + + fn default_instance() -> &'static ChallengePublicKeyInfo { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(ChallengePublicKeyInfo::new) + } +} + +impl ::protobuf::Clear for ChallengePublicKeyInfo { + fn clear(&mut self) { + self.public_key_spki_der.clear(); + self.signature_algorithm.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for ChallengePublicKeyInfo { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct KeyPolicy { + // message fields + low_entropy_credential: ::std::option::Option, + auth_locked: ::std::option::Option, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 get_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 get_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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.low_entropy_credential = ::std::option::Option::Some(tmp); + }, + 2 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_bool()?; + self.auth_locked = ::std::option::Option::Some(tmp); + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(v) = self.low_entropy_credential { + my_size += 2; + } + if let Some(v) = self.auth_locked { + my_size += 2; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + 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.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> KeyPolicy { + KeyPolicy::new() + } + + fn default_instance() -> &'static KeyPolicy { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(KeyPolicy::new) + } +} + +impl ::protobuf::Clear for KeyPolicy { + fn clear(&mut self) { + self.low_entropy_credential = ::std::option::Option::None; + self.auth_locked = ::std::option::Option::None; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for KeyPolicy { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct KeyData { + // message fields + field_type: ::std::option::Option, + label: ::protobuf::SingularField<::std::string::String>, + pub privileges: ::protobuf::SingularPtrField, + revision: ::std::option::Option, + pub provider_data: ::protobuf::SingularPtrField, + pub challenge_response_key: ::protobuf::RepeatedField, + pub policy: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 get_field_type(&self) -> KeyData_KeyType { + self.field_type.unwrap_or(KeyData_KeyType::KEY_TYPE_PASSWORD) + } + pub fn clear_field_type(&mut self) { + self.field_type = ::std::option::Option::None; + } + + pub fn has_field_type(&self) -> bool { + self.field_type.is_some() + } + + // Param is passed by value, moved + pub fn set_field_type(&mut self, v: KeyData_KeyType) { + self.field_type = ::std::option::Option::Some(v); + } + + // optional string label = 2; + + + pub fn get_label(&self) -> &str { + match self.label.as_ref() { + Some(v) => &v, + None => "", + } + } + pub fn clear_label(&mut self) { + self.label.clear(); + } + + 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 = ::protobuf::SingularField::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.set_default(); + } + 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 .cryptohome.KeyPrivileges privileges = 3; + + + pub fn get_privileges(&self) -> &KeyPrivileges { + self.privileges.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_privileges(&mut self) { + self.privileges.clear(); + } + + pub fn has_privileges(&self) -> bool { + self.privileges.is_some() + } + + // Param is passed by value, moved + pub fn set_privileges(&mut self, v: KeyPrivileges) { + self.privileges = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_privileges(&mut self) -> &mut KeyPrivileges { + if self.privileges.is_none() { + self.privileges.set_default(); + } + self.privileges.as_mut().unwrap() + } + + // Take field + pub fn take_privileges(&mut self) -> KeyPrivileges { + self.privileges.take().unwrap_or_else(|| KeyPrivileges::new()) + } + + // optional int64 revision = 4; + + + pub fn get_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); + } + + // optional .cryptohome.KeyProviderData provider_data = 6; + + + pub fn get_provider_data(&self) -> &KeyProviderData { + self.provider_data.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_provider_data(&mut self) { + self.provider_data.clear(); + } + + pub fn has_provider_data(&self) -> bool { + self.provider_data.is_some() + } + + // Param is passed by value, moved + pub fn set_provider_data(&mut self, v: KeyProviderData) { + self.provider_data = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_provider_data(&mut self) -> &mut KeyProviderData { + if self.provider_data.is_none() { + self.provider_data.set_default(); + } + self.provider_data.as_mut().unwrap() + } + + // Take field + pub fn take_provider_data(&mut self) -> KeyProviderData { + self.provider_data.take().unwrap_or_else(|| KeyProviderData::new()) + } + + // repeated .cryptohome.ChallengePublicKeyInfo challenge_response_key = 7; + + + pub fn get_challenge_response_key(&self) -> &[ChallengePublicKeyInfo] { + &self.challenge_response_key + } + pub fn clear_challenge_response_key(&mut self) { + self.challenge_response_key.clear(); + } + + // Param is passed by value, moved + pub fn set_challenge_response_key(&mut self, v: ::protobuf::RepeatedField) { + self.challenge_response_key = v; + } + + // Mutable pointer to the field. + pub fn mut_challenge_response_key(&mut self) -> &mut ::protobuf::RepeatedField { + &mut self.challenge_response_key + } + + // Take field + pub fn take_challenge_response_key(&mut self) -> ::protobuf::RepeatedField { + ::std::mem::replace(&mut self.challenge_response_key, ::protobuf::RepeatedField::new()) + } + + // optional .cryptohome.KeyPolicy policy = 8; + + + pub fn get_policy(&self) -> &KeyPolicy { + self.policy.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_policy(&mut self) { + self.policy.clear(); + } + + pub fn has_policy(&self) -> bool { + self.policy.is_some() + } + + // Param is passed by value, moved + pub fn set_policy(&mut self, v: KeyPolicy) { + self.policy = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_policy(&mut self) -> &mut KeyPolicy { + if self.policy.is_none() { + self.policy.set_default(); + } + self.policy.as_mut().unwrap() + } + + // Take field + pub fn take_policy(&mut self) -> KeyPolicy { + self.policy.take().unwrap_or_else(|| KeyPolicy::new()) + } +} + +impl ::protobuf::Message for KeyData { + fn is_initialized(&self) -> bool { + for v in &self.privileges { + if !v.is_initialized() { + return false; + } + }; + for v in &self.provider_data { + if !v.is_initialized() { + return false; + } + }; + for v in &self.challenge_response_key { + if !v.is_initialized() { + return false; + } + }; + for v in &self.policy { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.field_type, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.label)?; + }, + 3 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.privileges)?; + }, + 4 => { + if wire_type != ::protobuf::wire_format::WireTypeVarint { + return ::std::result::Result::Err(::protobuf::rt::unexpected_wire_type(wire_type)); + } + let tmp = is.read_int64()?; + self.revision = ::std::option::Option::Some(tmp); + }, + 6 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.provider_data)?; + }, + 7 => { + ::protobuf::rt::read_repeated_message_into(wire_type, is, &mut self.challenge_response_key)?; + }, + 8 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.policy)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(v) = self.field_type { + my_size += ::protobuf::rt::enum_size(1, v); + } + if let Some(ref v) = self.label.as_ref() { + my_size += ::protobuf::rt::string_size(2, &v); + } + if let Some(ref v) = self.privileges.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(v) = self.revision { + my_size += ::protobuf::rt::value_size(4, v, ::protobuf::wire_format::WireTypeVarint); + } + if let Some(ref v) = self.provider_data.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + for value in &self.challenge_response_key { + let len = value.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + }; + if let Some(ref v) = self.policy.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(v) = self.field_type { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&v))?; + } + if let Some(ref v) = self.label.as_ref() { + os.write_string(2, &v)?; + } + if let Some(ref v) = self.privileges.as_ref() { + os.write_tag(3, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if let Some(v) = self.revision { + os.write_int64(4, v)?; + } + if let Some(ref v) = self.provider_data.as_ref() { + os.write_tag(6, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + for v in &self.challenge_response_key { + os.write_tag(7, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + }; + if let Some(ref v) = self.policy.as_ref() { + os.write_tag(8, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> KeyData { + KeyData::new() + } + + fn default_instance() -> &'static KeyData { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(KeyData::new) + } +} + +impl ::protobuf::Clear for KeyData { + fn clear(&mut self) { + self.field_type = ::std::option::Option::None; + self.label.clear(); + self.privileges.clear(); + self.revision = ::std::option::Option::None; + self.provider_data.clear(); + self.challenge_response_key.clear(); + self.policy.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for KeyData { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum KeyData_KeyType { + KEY_TYPE_PASSWORD = 0, + KEY_TYPE_CHALLENGE_RESPONSE = 1, + KEY_TYPE_FINGERPRINT = 2, + KEY_TYPE_KIOSK = 3, +} + +impl ::protobuf::ProtobufEnum for KeyData_KeyType { + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 0 => ::std::option::Option::Some(KeyData_KeyType::KEY_TYPE_PASSWORD), + 1 => ::std::option::Option::Some(KeyData_KeyType::KEY_TYPE_CHALLENGE_RESPONSE), + 2 => ::std::option::Option::Some(KeyData_KeyType::KEY_TYPE_FINGERPRINT), + 3 => ::std::option::Option::Some(KeyData_KeyType::KEY_TYPE_KIOSK), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [KeyData_KeyType] = &[ + KeyData_KeyType::KEY_TYPE_PASSWORD, + KeyData_KeyType::KEY_TYPE_CHALLENGE_RESPONSE, + KeyData_KeyType::KEY_TYPE_FINGERPRINT, + KeyData_KeyType::KEY_TYPE_KIOSK, + ]; + values + } +} + +impl ::std::marker::Copy for KeyData_KeyType { +} + +impl ::std::default::Default for KeyData_KeyType { + fn default() -> Self { + KeyData_KeyType::KEY_TYPE_PASSWORD + } +} + +impl ::protobuf::reflect::ProtobufValue for KeyData_KeyType { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct Key { + // message fields + pub data: ::protobuf::SingularPtrField, + secret: ::protobuf::SingularField<::std::vec::Vec>, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 .cryptohome.KeyData data = 1; + + + pub fn get_data(&self) -> &KeyData { + self.data.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_data(&mut self) { + self.data.clear(); + } + + pub fn has_data(&self) -> bool { + self.data.is_some() + } + + // Param is passed by value, moved + pub fn set_data(&mut self, v: KeyData) { + self.data = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_data(&mut self) -> &mut KeyData { + if self.data.is_none() { + self.data.set_default(); + } + self.data.as_mut().unwrap() + } + + // Take field + pub fn take_data(&mut self) -> KeyData { + self.data.take().unwrap_or_else(|| KeyData::new()) + } + + // optional bytes secret = 2; + + + pub fn get_secret(&self) -> &[u8] { + match self.secret.as_ref() { + Some(v) => &v, + None => &[], + } + } + pub fn clear_secret(&mut self) { + self.secret.clear(); + } + + 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 = ::protobuf::SingularField::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.set_default(); + } + 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 { + fn is_initialized(&self) -> bool { + for v in &self.data { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.data)?; + }, + 2 => { + ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.secret)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.data.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.secret.as_ref() { + my_size += ::protobuf::rt::bytes_size(2, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.data.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if let Some(ref v) = self.secret.as_ref() { + os.write_bytes(2, &v)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> Key { + Key::new() + } + + fn default_instance() -> &'static Key { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(Key::new) + } +} + +impl ::protobuf::Clear for Key { + fn clear(&mut self) { + self.data.clear(); + self.secret.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for Key { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum ChallengeSignatureAlgorithm { + CHALLENGE_RSASSA_PKCS1_V1_5_SHA1 = 1, + CHALLENGE_RSASSA_PKCS1_V1_5_SHA256 = 2, + CHALLENGE_RSASSA_PKCS1_V1_5_SHA384 = 3, + CHALLENGE_RSASSA_PKCS1_V1_5_SHA512 = 4, +} + +impl ::protobuf::ProtobufEnum for 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 + } + } + + fn values() -> &'static [Self] { + static 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, + ]; + values + } +} + +impl ::std::marker::Copy for ChallengeSignatureAlgorithm { +} + +// 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 + } +} + +impl ::protobuf::reflect::ProtobufValue for ChallengeSignatureAlgorithm { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} diff --git a/system_api/src/protos/rpc.rs b/system_api/src/protos/rpc.rs new file mode 100644 index 000000000..72334c885 --- /dev/null +++ b/system_api/src/protos/rpc.rs @@ -0,0 +1,1621 @@ +// This file is generated by rust-protobuf 2.27.1. Do not edit +// @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_imports)] +#![allow(unused_results)] +//! Generated file from `rpc.proto` + +/// Generated files are compatible only with the same version +/// of protobuf runtime. +// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_27_1; + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct AccountIdentifier { + // message fields + email: ::protobuf::SingularField<::std::string::String>, + account_id: ::protobuf::SingularField<::std::string::String>, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 get_email(&self) -> &str { + match self.email.as_ref() { + Some(v) => &v, + None => "", + } + } + pub fn clear_email(&mut self) { + self.email.clear(); + } + + 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 = ::protobuf::SingularField::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.set_default(); + } + 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 get_account_id(&self) -> &str { + match self.account_id.as_ref() { + Some(v) => &v, + None => "", + } + } + pub fn clear_account_id(&mut self) { + self.account_id.clear(); + } + + 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 = ::protobuf::SingularField::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.set_default(); + } + 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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.email)?; + }, + 2 => { + ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.account_id)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.email.as_ref() { + my_size += ::protobuf::rt::string_size(1, &v); + } + if let Some(ref v) = self.account_id.as_ref() { + my_size += ::protobuf::rt::string_size(2, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.email.as_ref() { + os.write_string(1, &v)?; + } + if let Some(ref v) = self.account_id.as_ref() { + os.write_string(2, &v)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> AccountIdentifier { + AccountIdentifier::new() + } + + fn default_instance() -> &'static AccountIdentifier { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(AccountIdentifier::new) + } +} + +impl ::protobuf::Clear for AccountIdentifier { + fn clear(&mut self) { + self.email.clear(); + self.account_id.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for AccountIdentifier { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct KeyDelegate { + // message fields + dbus_service_name: ::protobuf::SingularField<::std::string::String>, + dbus_object_path: ::protobuf::SingularField<::std::string::String>, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 get_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.clear(); + } + + 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 = ::protobuf::SingularField::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.set_default(); + } + 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 get_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.clear(); + } + + 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 = ::protobuf::SingularField::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.set_default(); + } + 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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.dbus_service_name)?; + }, + 2 => { + ::protobuf::rt::read_singular_string_into(wire_type, is, &mut self.dbus_object_path)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.dbus_service_name.as_ref() { + my_size += ::protobuf::rt::string_size(1, &v); + } + if let Some(ref v) = self.dbus_object_path.as_ref() { + my_size += ::protobuf::rt::string_size(2, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.dbus_service_name.as_ref() { + os.write_string(1, &v)?; + } + if let Some(ref v) = self.dbus_object_path.as_ref() { + os.write_string(2, &v)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> KeyDelegate { + KeyDelegate::new() + } + + fn default_instance() -> &'static KeyDelegate { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(KeyDelegate::new) + } +} + +impl ::protobuf::Clear for KeyDelegate { + fn clear(&mut self) { + self.dbus_service_name.clear(); + self.dbus_object_path.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for KeyDelegate { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct AuthorizationRequest { + // message fields + pub key: ::protobuf::SingularPtrField, + pub key_delegate: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a AuthorizationRequest { + fn default() -> &'a AuthorizationRequest { + ::default_instance() + } +} + +impl AuthorizationRequest { + pub fn new() -> AuthorizationRequest { + ::std::default::Default::default() + } + + // optional .cryptohome.Key key = 1; + + + pub fn get_key(&self) -> &super::key::Key { + self.key.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_key(&mut self) { + self.key.clear(); + } + + pub fn has_key(&self) -> bool { + self.key.is_some() + } + + // Param is passed by value, moved + pub fn set_key(&mut self, v: super::key::Key) { + self.key = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_key(&mut self) -> &mut super::key::Key { + if self.key.is_none() { + self.key.set_default(); + } + self.key.as_mut().unwrap() + } + + // Take field + pub fn take_key(&mut self) -> super::key::Key { + self.key.take().unwrap_or_else(|| super::key::Key::new()) + } + + // optional .cryptohome.KeyDelegate key_delegate = 2; + + + pub fn get_key_delegate(&self) -> &KeyDelegate { + self.key_delegate.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_key_delegate(&mut self) { + self.key_delegate.clear(); + } + + pub fn has_key_delegate(&self) -> bool { + self.key_delegate.is_some() + } + + // Param is passed by value, moved + pub fn set_key_delegate(&mut self, v: KeyDelegate) { + self.key_delegate = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_key_delegate(&mut self) -> &mut KeyDelegate { + if self.key_delegate.is_none() { + self.key_delegate.set_default(); + } + self.key_delegate.as_mut().unwrap() + } + + // Take field + pub fn take_key_delegate(&mut self) -> KeyDelegate { + self.key_delegate.take().unwrap_or_else(|| KeyDelegate::new()) + } +} + +impl ::protobuf::Message for AuthorizationRequest { + fn is_initialized(&self) -> bool { + for v in &self.key { + if !v.is_initialized() { + return false; + } + }; + for v in &self.key_delegate { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.key)?; + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.key_delegate)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.key.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + if let Some(ref v) = self.key_delegate.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.key.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + if let Some(ref v) = self.key_delegate.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> AuthorizationRequest { + AuthorizationRequest::new() + } + + fn default_instance() -> &'static AuthorizationRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(AuthorizationRequest::new) + } +} + +impl ::protobuf::Clear for AuthorizationRequest { + fn clear(&mut self) { + self.key.clear(); + self.key_delegate.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for AuthorizationRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct KeyChallengeRequest { + // message fields + challenge_type: ::std::option::Option, + pub signature_request_data: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 get_challenge_type(&self) -> KeyChallengeRequest_ChallengeType { + self.challenge_type.unwrap_or(KeyChallengeRequest_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: KeyChallengeRequest_ChallengeType) { + self.challenge_type = ::std::option::Option::Some(v); + } + + // optional .cryptohome.SignatureKeyChallengeRequestData signature_request_data = 2; + + + pub fn get_signature_request_data(&self) -> &SignatureKeyChallengeRequestData { + self.signature_request_data.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_signature_request_data(&mut self) { + self.signature_request_data.clear(); + } + + pub fn has_signature_request_data(&self) -> bool { + self.signature_request_data.is_some() + } + + // Param is passed by value, moved + pub fn set_signature_request_data(&mut self, v: SignatureKeyChallengeRequestData) { + self.signature_request_data = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_signature_request_data(&mut self) -> &mut SignatureKeyChallengeRequestData { + if self.signature_request_data.is_none() { + self.signature_request_data.set_default(); + } + self.signature_request_data.as_mut().unwrap() + } + + // Take field + pub fn take_signature_request_data(&mut self) -> SignatureKeyChallengeRequestData { + self.signature_request_data.take().unwrap_or_else(|| SignatureKeyChallengeRequestData::new()) + } +} + +impl ::protobuf::Message for KeyChallengeRequest { + fn is_initialized(&self) -> bool { + for v in &self.signature_request_data { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.challenge_type, 1, &mut self.unknown_fields)? + }, + 2 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.signature_request_data)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(v) = self.challenge_type { + my_size += ::protobuf::rt::enum_size(1, v); + } + if let Some(ref v) = self.signature_request_data.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(v) = self.challenge_type { + os.write_enum(1, ::protobuf::ProtobufEnum::value(&v))?; + } + if let Some(ref v) = self.signature_request_data.as_ref() { + os.write_tag(2, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> KeyChallengeRequest { + KeyChallengeRequest::new() + } + + fn default_instance() -> &'static KeyChallengeRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(KeyChallengeRequest::new) + } +} + +impl ::protobuf::Clear for KeyChallengeRequest { + fn clear(&mut self) { + self.challenge_type = ::std::option::Option::None; + self.signature_request_data.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for KeyChallengeRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum KeyChallengeRequest_ChallengeType { + CHALLENGE_TYPE_SIGNATURE = 1, +} + +impl ::protobuf::ProtobufEnum for KeyChallengeRequest_ChallengeType { + fn value(&self) -> i32 { + *self as i32 + } + + fn from_i32(value: i32) -> ::std::option::Option { + match value { + 1 => ::std::option::Option::Some(KeyChallengeRequest_ChallengeType::CHALLENGE_TYPE_SIGNATURE), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static values: &'static [KeyChallengeRequest_ChallengeType] = &[ + KeyChallengeRequest_ChallengeType::CHALLENGE_TYPE_SIGNATURE, + ]; + values + } +} + +impl ::std::marker::Copy for KeyChallengeRequest_ChallengeType { +} + +// Note, `Default` is implemented although default value is not 0 +impl ::std::default::Default for KeyChallengeRequest_ChallengeType { + fn default() -> Self { + KeyChallengeRequest_ChallengeType::CHALLENGE_TYPE_SIGNATURE + } +} + +impl ::protobuf::reflect::ProtobufValue for KeyChallengeRequest_ChallengeType { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct SignatureKeyChallengeRequestData { + // message fields + data_to_sign: ::protobuf::SingularField<::std::vec::Vec>, + public_key_spki_der: ::protobuf::SingularField<::std::vec::Vec>, + signature_algorithm: ::std::option::Option, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 get_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.clear(); + } + + 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 = ::protobuf::SingularField::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.set_default(); + } + 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 get_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.clear(); + } + + 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 = ::protobuf::SingularField::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.set_default(); + } + 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 get_signature_algorithm(&self) -> super::key::ChallengeSignatureAlgorithm { + self.signature_algorithm.unwrap_or(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(v); + } +} + +impl ::protobuf::Message for SignatureKeyChallengeRequestData { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.data_to_sign)?; + }, + 2 => { + ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.public_key_spki_der)?; + }, + 3 => { + ::protobuf::rt::read_proto2_enum_with_unknown_fields_into(wire_type, is, &mut self.signature_algorithm, 3, &mut self.unknown_fields)? + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.data_to_sign.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + if let Some(ref 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::enum_size(3, v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.data_to_sign.as_ref() { + os.write_bytes(1, &v)?; + } + if let Some(ref 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::ProtobufEnum::value(&v))?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> SignatureKeyChallengeRequestData { + SignatureKeyChallengeRequestData::new() + } + + fn default_instance() -> &'static SignatureKeyChallengeRequestData { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(SignatureKeyChallengeRequestData::new) + } +} + +impl ::protobuf::Clear for SignatureKeyChallengeRequestData { + fn clear(&mut self) { + self.data_to_sign.clear(); + self.public_key_spki_der.clear(); + self.signature_algorithm = ::std::option::Option::None; + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for SignatureKeyChallengeRequestData { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct KeyChallengeResponse { + // message fields + pub signature_response_data: ::protobuf::SingularPtrField, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a KeyChallengeResponse { + fn default() -> &'a KeyChallengeResponse { + ::default_instance() + } +} + +impl KeyChallengeResponse { + pub fn new() -> KeyChallengeResponse { + ::std::default::Default::default() + } + + // optional .cryptohome.SignatureKeyChallengeResponseData signature_response_data = 1; + + + pub fn get_signature_response_data(&self) -> &SignatureKeyChallengeResponseData { + self.signature_response_data.as_ref().unwrap_or_else(|| ::default_instance()) + } + pub fn clear_signature_response_data(&mut self) { + self.signature_response_data.clear(); + } + + pub fn has_signature_response_data(&self) -> bool { + self.signature_response_data.is_some() + } + + // Param is passed by value, moved + pub fn set_signature_response_data(&mut self, v: SignatureKeyChallengeResponseData) { + self.signature_response_data = ::protobuf::SingularPtrField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_signature_response_data(&mut self) -> &mut SignatureKeyChallengeResponseData { + if self.signature_response_data.is_none() { + self.signature_response_data.set_default(); + } + self.signature_response_data.as_mut().unwrap() + } + + // Take field + pub fn take_signature_response_data(&mut self) -> SignatureKeyChallengeResponseData { + self.signature_response_data.take().unwrap_or_else(|| SignatureKeyChallengeResponseData::new()) + } +} + +impl ::protobuf::Message for KeyChallengeResponse { + fn is_initialized(&self) -> bool { + for v in &self.signature_response_data { + if !v.is_initialized() { + return false; + } + }; + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_message_into(wire_type, is, &mut self.signature_response_data)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.signature_response_data.as_ref() { + let len = v.compute_size(); + my_size += 1 + ::protobuf::rt::compute_raw_varint32_size(len) + len; + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.signature_response_data.as_ref() { + os.write_tag(1, ::protobuf::wire_format::WireTypeLengthDelimited)?; + os.write_raw_varint32(v.get_cached_size())?; + v.write_to_with_cached_sizes(os)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> KeyChallengeResponse { + KeyChallengeResponse::new() + } + + fn default_instance() -> &'static KeyChallengeResponse { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(KeyChallengeResponse::new) + } +} + +impl ::protobuf::Clear for KeyChallengeResponse { + fn clear(&mut self) { + self.signature_response_data.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for KeyChallengeResponse { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct SignatureKeyChallengeResponseData { + // message fields + signature: ::protobuf::SingularField<::std::vec::Vec>, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +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 get_signature(&self) -> &[u8] { + match self.signature.as_ref() { + Some(v) => &v, + None => &[], + } + } + pub fn clear_signature(&mut self) { + self.signature.clear(); + } + + 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 = ::protobuf::SingularField::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.set_default(); + } + 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 { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.signature)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.signature.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.signature.as_ref() { + os.write_bytes(1, &v)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> SignatureKeyChallengeResponseData { + SignatureKeyChallengeResponseData::new() + } + + fn default_instance() -> &'static SignatureKeyChallengeResponseData { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(SignatureKeyChallengeResponseData::new) + } +} + +impl ::protobuf::Clear for SignatureKeyChallengeResponseData { + fn clear(&mut self) { + self.signature.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for SignatureKeyChallengeResponseData { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum CryptohomeErrorCode { + CRYPTOHOME_ERROR_NOT_SET = 0, + CRYPTOHOME_ERROR_ACCOUNT_NOT_FOUND = 1, + CRYPTOHOME_ERROR_AUTHORIZATION_KEY_NOT_FOUND = 2, + CRYPTOHOME_ERROR_AUTHORIZATION_KEY_FAILED = 3, + CRYPTOHOME_ERROR_NOT_IMPLEMENTED = 4, + CRYPTOHOME_ERROR_MOUNT_FATAL = 5, + CRYPTOHOME_ERROR_MOUNT_MOUNT_POINT_BUSY = 6, + CRYPTOHOME_ERROR_TPM_COMM_ERROR = 7, + CRYPTOHOME_ERROR_TPM_DEFEND_LOCK = 8, + CRYPTOHOME_ERROR_TPM_NEEDS_REBOOT = 9, + CRYPTOHOME_ERROR_AUTHORIZATION_KEY_DENIED = 10, + CRYPTOHOME_ERROR_KEY_QUOTA_EXCEEDED = 11, + CRYPTOHOME_ERROR_KEY_LABEL_EXISTS = 12, + CRYPTOHOME_ERROR_BACKING_STORE_FAILURE = 13, + CRYPTOHOME_ERROR_UPDATE_SIGNATURE_INVALID = 14, + CRYPTOHOME_ERROR_KEY_NOT_FOUND = 15, + CRYPTOHOME_ERROR_LOCKBOX_SIGNATURE_INVALID = 16, + CRYPTOHOME_ERROR_LOCKBOX_CANNOT_SIGN = 17, + CRYPTOHOME_ERROR_BOOT_ATTRIBUTE_NOT_FOUND = 18, + CRYPTOHOME_ERROR_BOOT_ATTRIBUTES_CANNOT_SIGN = 19, + CRYPTOHOME_ERROR_TPM_EK_NOT_AVAILABLE = 20, + CRYPTOHOME_ERROR_ATTESTATION_NOT_READY = 21, + CRYPTOHOME_ERROR_CANNOT_CONNECT_TO_CA = 22, + CRYPTOHOME_ERROR_CA_REFUSED_ENROLLMENT = 23, + CRYPTOHOME_ERROR_CA_REFUSED_CERTIFICATE = 24, + CRYPTOHOME_ERROR_INTERNAL_ATTESTATION_ERROR = 25, + CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_INVALID = 26, + CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_CANNOT_STORE = 27, + CRYPTOHOME_ERROR_FIRMWARE_MANAGEMENT_PARAMETERS_CANNOT_REMOVE = 28, + CRYPTOHOME_ERROR_MOUNT_OLD_ENCRYPTION = 29, + CRYPTOHOME_ERROR_MOUNT_PREVIOUS_MIGRATION_INCOMPLETE = 30, + CRYPTOHOME_ERROR_MIGRATE_KEY_FAILED = 31, + CRYPTOHOME_ERROR_REMOVE_FAILED = 32, + CRYPTOHOME_ERROR_INVALID_ARGUMENT = 33, + CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_GET_FAILED = 34, + CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_SET_FAILED = 35, + CRYPTOHOME_ERROR_INSTALL_ATTRIBUTES_FINALIZE_FAILED = 36, + CRYPTOHOME_ERROR_UPDATE_USER_ACTIVITY_TIMESTAMP_FAILED = 37, + CRYPTOHOME_ERROR_FAILED_TO_READ_PCR = 38, + CRYPTOHOME_ERROR_PCR_ALREADY_EXTENDED = 39, + CRYPTOHOME_ERROR_FAILED_TO_EXTEND_PCR = 40, + CRYPTOHOME_ERROR_TPM_UPDATE_REQUIRED = 41, + CRYPTOHOME_ERROR_FINGERPRINT_ERROR_INTERNAL = 42, + CRYPTOHOME_ERROR_FINGERPRINT_RETRY_REQUIRED = 43, + CRYPTOHOME_ERROR_FINGERPRINT_DENIED = 44, + CRYPTOHOME_ERROR_VAULT_UNRECOVERABLE = 45, + CRYPTOHOME_ERROR_FIDO_MAKE_CREDENTIAL_FAILED = 46, + CRYPTOHOME_ERROR_FIDO_GET_ASSERTION_FAILED = 47, + CRYPTOHOME_TOKEN_SERIALIZATION_FAILED = 48, + CRYPTOHOME_INVALID_AUTH_SESSION_TOKEN = 49, + CRYPTOHOME_ADD_CREDENTIALS_FAILED = 50, + CRYPTOHOME_ERROR_UNAUTHENTICATED_AUTH_SESSION = 51, + CRYPTOHOME_ERROR_UNKNOWN_LEGACY = 52, + CRYPTOHOME_ERROR_UNUSABLE_VAULT = 53, + CRYPTOHOME_REMOVE_CREDENTIALS_FAILED = 54, + CRYPTOHOME_UPDATE_CREDENTIALS_FAILED = 55, +} + +impl ::protobuf::ProtobufEnum for 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), + _ => ::std::option::Option::None + } + } + + fn values() -> &'static [Self] { + static 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, + ]; + values + } +} + +impl ::std::marker::Copy for CryptohomeErrorCode { +} + +impl ::std::default::Default for CryptohomeErrorCode { + fn default() -> Self { + CryptohomeErrorCode::CRYPTOHOME_ERROR_NOT_SET + } +} + +impl ::protobuf::reflect::ProtobufValue for CryptohomeErrorCode { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} + +#[derive(Clone,PartialEq,Eq,Debug,Hash)] +pub enum FirmwareManagementParametersFlags { + NONE = 0, + DEVELOPER_DISABLE_BOOT = 1, + DEVELOPER_DISABLE_RECOVERY_INSTALL = 2, + DEVELOPER_DISABLE_RECOVERY_ROOTFS = 4, + DEVELOPER_ENABLE_USB = 8, + DEVELOPER_ENABLE_LEGACY = 16, + DEVELOPER_USE_KEY_HASH = 32, + DEVELOPER_DISABLE_CASE_CLOSED_DEBUGGING_UNLOCK = 64, +} + +impl ::protobuf::ProtobufEnum for 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 + } + } + + fn values() -> &'static [Self] { + static 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, + ]; + values + } +} + +impl ::std::marker::Copy for FirmwareManagementParametersFlags { +} + +impl ::std::default::Default for FirmwareManagementParametersFlags { + fn default() -> Self { + FirmwareManagementParametersFlags::NONE + } +} + +impl ::protobuf::reflect::ProtobufValue for FirmwareManagementParametersFlags { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Enum(::protobuf::ProtobufEnum::descriptor(self)) + } +} diff --git a/system_api/src/protos/vtpm_interface.rs b/system_api/src/protos/vtpm_interface.rs new file mode 100644 index 000000000..07bdf08be --- /dev/null +++ b/system_api/src/protos/vtpm_interface.rs @@ -0,0 +1,316 @@ +// This file is generated by rust-protobuf 2.27.1. Do not edit +// @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_imports)] +#![allow(unused_results)] +//! Generated file from `vtpm_interface.proto` + +/// Generated files are compatible only with the same version +/// of protobuf runtime. +// const _PROTOBUF_VERSION_CHECK: () = ::protobuf::VERSION_2_27_1; + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct SendCommandRequest { + // message fields + command: ::protobuf::SingularField<::std::vec::Vec>, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a SendCommandRequest { + fn default() -> &'a SendCommandRequest { + ::default_instance() + } +} + +impl SendCommandRequest { + pub fn new() -> SendCommandRequest { + ::std::default::Default::default() + } + + // optional bytes command = 1; + + + pub fn get_command(&self) -> &[u8] { + match self.command.as_ref() { + Some(v) => &v, + None => &[], + } + } + pub fn clear_command(&mut self) { + self.command.clear(); + } + + pub fn has_command(&self) -> bool { + self.command.is_some() + } + + // Param is passed by value, moved + pub fn set_command(&mut self, v: ::std::vec::Vec) { + self.command = ::protobuf::SingularField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_command(&mut self) -> &mut ::std::vec::Vec { + if self.command.is_none() { + self.command.set_default(); + } + self.command.as_mut().unwrap() + } + + // Take field + pub fn take_command(&mut self) -> ::std::vec::Vec { + self.command.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for SendCommandRequest { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.command)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.command.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.command.as_ref() { + os.write_bytes(1, &v)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> SendCommandRequest { + SendCommandRequest::new() + } + + fn default_instance() -> &'static SendCommandRequest { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(SendCommandRequest::new) + } +} + +impl ::protobuf::Clear for SendCommandRequest { + fn clear(&mut self) { + self.command.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for SendCommandRequest { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} + +#[derive(PartialEq,Clone,Default,Debug)] +pub struct SendCommandResponse { + // message fields + response: ::protobuf::SingularField<::std::vec::Vec>, + // special fields + pub unknown_fields: ::protobuf::UnknownFields, + pub cached_size: ::protobuf::CachedSize, +} + +impl<'a> ::std::default::Default for &'a SendCommandResponse { + fn default() -> &'a SendCommandResponse { + ::default_instance() + } +} + +impl SendCommandResponse { + pub fn new() -> SendCommandResponse { + ::std::default::Default::default() + } + + // optional bytes response = 1; + + + pub fn get_response(&self) -> &[u8] { + match self.response.as_ref() { + Some(v) => &v, + None => &[], + } + } + pub fn clear_response(&mut self) { + self.response.clear(); + } + + pub fn has_response(&self) -> bool { + self.response.is_some() + } + + // Param is passed by value, moved + pub fn set_response(&mut self, v: ::std::vec::Vec) { + self.response = ::protobuf::SingularField::some(v); + } + + // Mutable pointer to the field. + // If field is not initialized, it is initialized with default value first. + pub fn mut_response(&mut self) -> &mut ::std::vec::Vec { + if self.response.is_none() { + self.response.set_default(); + } + self.response.as_mut().unwrap() + } + + // Take field + pub fn take_response(&mut self) -> ::std::vec::Vec { + self.response.take().unwrap_or_else(|| ::std::vec::Vec::new()) + } +} + +impl ::protobuf::Message for SendCommandResponse { + fn is_initialized(&self) -> bool { + true + } + + fn merge_from(&mut self, is: &mut ::protobuf::CodedInputStream<'_>) -> ::protobuf::ProtobufResult<()> { + while !is.eof()? { + let (field_number, wire_type) = is.read_tag_unpack()?; + match field_number { + 1 => { + ::protobuf::rt::read_singular_bytes_into(wire_type, is, &mut self.response)?; + }, + _ => { + ::protobuf::rt::read_unknown_or_skip_group(field_number, wire_type, is, self.mut_unknown_fields())?; + }, + }; + } + ::std::result::Result::Ok(()) + } + + // Compute sizes of nested messages + #[allow(unused_variables)] + fn compute_size(&self) -> u32 { + let mut my_size = 0; + if let Some(ref v) = self.response.as_ref() { + my_size += ::protobuf::rt::bytes_size(1, &v); + } + my_size += ::protobuf::rt::unknown_fields_size(self.get_unknown_fields()); + self.cached_size.set(my_size); + my_size + } + + fn write_to_with_cached_sizes(&self, os: &mut ::protobuf::CodedOutputStream<'_>) -> ::protobuf::ProtobufResult<()> { + if let Some(ref v) = self.response.as_ref() { + os.write_bytes(1, &v)?; + } + os.write_unknown_fields(self.get_unknown_fields())?; + ::std::result::Result::Ok(()) + } + + fn get_cached_size(&self) -> u32 { + self.cached_size.get() + } + + fn get_unknown_fields(&self) -> &::protobuf::UnknownFields { + &self.unknown_fields + } + + fn mut_unknown_fields(&mut self) -> &mut ::protobuf::UnknownFields { + &mut self.unknown_fields + } + + fn as_any(&self) -> &dyn (::std::any::Any) { + self as &dyn (::std::any::Any) + } + fn as_any_mut(&mut self) -> &mut dyn (::std::any::Any) { + self as &mut dyn (::std::any::Any) + } + fn into_any(self: ::std::boxed::Box) -> ::std::boxed::Box { + self + } + + fn descriptor(&self) -> &'static ::protobuf::reflect::MessageDescriptor { + Self::descriptor_static() + } + + fn new() -> SendCommandResponse { + SendCommandResponse::new() + } + + fn default_instance() -> &'static SendCommandResponse { + static instance: ::protobuf::rt::LazyV2 = ::protobuf::rt::LazyV2::INIT; + instance.get(SendCommandResponse::new) + } +} + +impl ::protobuf::Clear for SendCommandResponse { + fn clear(&mut self) { + self.response.clear(); + self.unknown_fields.clear(); + } +} + +impl ::protobuf::reflect::ProtobufValue for SendCommandResponse { + fn as_ref(&self) -> ::protobuf::reflect::ReflectValueRef { + ::protobuf::reflect::ReflectValueRef::Message(self) + } +} diff --git a/system_api/src/system_api.rs b/system_api/src/system_api.rs new file mode 100644 index 000000000..9a79cd243 --- /dev/null +++ b/system_api/src/system_api.rs @@ -0,0 +1,8 @@ +// Copyright 2022 The ChromiumOS Authors +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#![cfg(unix)] + +include!("bindings/include_modules.rs"); +include!("protos/include_protos.rs"); diff --git a/system_api/update_bindings.sh b/system_api/update_bindings.sh new file mode 100755 index 000000000..3fcba5100 --- /dev/null +++ b/system_api/update_bindings.sh @@ -0,0 +1,31 @@ +#!/usr/bin/env bash +# Copyright 2022 The ChromiumOS Authors +# Use of this source code is governed by a BSD-style license that can be +# found in the LICENSE file. + +STUB_DIR=$(dirname "$0") +SYSTEM_API_DIR="$HOME/chromiumos/src/platform2/system_api" + +if ! [ -e "$SYSTEM_API_DIR" ]; then + echo "This script must be run from a ChromeOS checkout and inside cros_sdk." +fi + +# The system_api build.rs will generate bindings in $SYSTEM_API_DIR/src +(cd "$SYSTEM_API_DIR" && cargo build) + +FILES=( + "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/UserDataAuth.rs" + "src/protos/vtpm_interface.rs" +) + +for FILE in "${FILES[@]}"; do + TARGET_DIR=$(dirname "$STUB_DIR/$FILE") + mkdir -p "$TARGET_DIR" + cp "$SYSTEM_API_DIR/$FILE" "$TARGET_DIR" +done diff --git a/system_api_stub/README.md b/system_api_stub/README.md deleted file mode 100644 index 4a51914bc..000000000 --- a/system_api_stub/README.md +++ /dev/null @@ -1,11 +0,0 @@ -# Stub crate for system_api - -system_api is used by ChromeOS to interact with other system services. - -In ChromeOS builds, the `chromeos` cargo feature is enabled and this crate is replaced with the -actual [system_api] implementation. - -On other platforms, the feature flag will remain disabled and this crate is used to satisfy cargo -dependencies on system_api. - -[system_api]: https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/platform2/system_api/ diff --git a/tools/health-check b/tools/health-check index 5f07975a4..17f314f6e 100755 --- a/tools/health-check +++ b/tools/health-check @@ -195,12 +195,14 @@ CHECKS: List[Check] = [ "hypervisor/src/whpx/whpx_sys/*.h", "third_party/vmm_vhost/*", "net_sys/src/lib.rs", + "system_api/src/bindings/*", ], python_tools=True, ), Check( check_rust_format, files=["**.rs"], + exclude=["system_api/src/bindings/*"], can_fix=True, ), Check(