#[non_exhaustive]pub struct EncryptionConfig {
pub encryption_type: Option<EncryptionType>,
/* private fields */
}Expand description
Encryption configuration for a new database being created from another source.
The source could be a Backup .
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.encryption_type: Option<EncryptionType>The method for encrypting the database.
Implementations§
Source§impl EncryptionConfig
impl EncryptionConfig
pub fn new() -> Self
Sourcepub fn set_encryption_type<T: Into<Option<EncryptionType>>>(self, v: T) -> Self
pub fn set_encryption_type<T: Into<Option<EncryptionType>>>(self, v: T) -> Self
Sets the value of encryption_type.
Note that all the setters affecting encryption_type are mutually
exclusive.
§Example
use google_cloud_firestore_admin_v1::model::database::encryption_config::GoogleDefaultEncryptionOptions;
let x = EncryptionConfig::new().set_encryption_type(Some(
google_cloud_firestore_admin_v1::model::database::encryption_config::EncryptionType::GoogleDefaultEncryption(GoogleDefaultEncryptionOptions::default().into())));Sourcepub fn google_default_encryption(
&self,
) -> Option<&Box<GoogleDefaultEncryptionOptions>>
pub fn google_default_encryption( &self, ) -> Option<&Box<GoogleDefaultEncryptionOptions>>
The value of encryption_type
if it holds a GoogleDefaultEncryption, None if the field is not set or
holds a different branch.
Sourcepub fn set_google_default_encryption<T: Into<Box<GoogleDefaultEncryptionOptions>>>(
self,
v: T,
) -> Self
pub fn set_google_default_encryption<T: Into<Box<GoogleDefaultEncryptionOptions>>>( self, v: T, ) -> Self
Sets the value of encryption_type
to hold a GoogleDefaultEncryption.
Note that all the setters affecting encryption_type are
mutually exclusive.
§Example
use google_cloud_firestore_admin_v1::model::database::encryption_config::GoogleDefaultEncryptionOptions;
let x = EncryptionConfig::new().set_google_default_encryption(GoogleDefaultEncryptionOptions::default()/* use setters */);
assert!(x.google_default_encryption().is_some());
assert!(x.use_source_encryption().is_none());
assert!(x.customer_managed_encryption().is_none());Sourcepub fn use_source_encryption(&self) -> Option<&Box<SourceEncryptionOptions>>
pub fn use_source_encryption(&self) -> Option<&Box<SourceEncryptionOptions>>
The value of encryption_type
if it holds a UseSourceEncryption, None if the field is not set or
holds a different branch.
Sourcepub fn set_use_source_encryption<T: Into<Box<SourceEncryptionOptions>>>(
self,
v: T,
) -> Self
pub fn set_use_source_encryption<T: Into<Box<SourceEncryptionOptions>>>( self, v: T, ) -> Self
Sets the value of encryption_type
to hold a UseSourceEncryption.
Note that all the setters affecting encryption_type are
mutually exclusive.
§Example
use google_cloud_firestore_admin_v1::model::database::encryption_config::SourceEncryptionOptions;
let x = EncryptionConfig::new().set_use_source_encryption(SourceEncryptionOptions::default()/* use setters */);
assert!(x.use_source_encryption().is_some());
assert!(x.google_default_encryption().is_none());
assert!(x.customer_managed_encryption().is_none());Sourcepub fn customer_managed_encryption(
&self,
) -> Option<&Box<CustomerManagedEncryptionOptions>>
pub fn customer_managed_encryption( &self, ) -> Option<&Box<CustomerManagedEncryptionOptions>>
The value of encryption_type
if it holds a CustomerManagedEncryption, None if the field is not set or
holds a different branch.
Sourcepub fn set_customer_managed_encryption<T: Into<Box<CustomerManagedEncryptionOptions>>>(
self,
v: T,
) -> Self
pub fn set_customer_managed_encryption<T: Into<Box<CustomerManagedEncryptionOptions>>>( self, v: T, ) -> Self
Sets the value of encryption_type
to hold a CustomerManagedEncryption.
Note that all the setters affecting encryption_type are
mutually exclusive.
§Example
use google_cloud_firestore_admin_v1::model::database::encryption_config::CustomerManagedEncryptionOptions;
let x = EncryptionConfig::new().set_customer_managed_encryption(CustomerManagedEncryptionOptions::default()/* use setters */);
assert!(x.customer_managed_encryption().is_some());
assert!(x.google_default_encryption().is_none());
assert!(x.use_source_encryption().is_none());Trait Implementations§
Source§impl Clone for EncryptionConfig
impl Clone for EncryptionConfig
Source§fn clone(&self) -> EncryptionConfig
fn clone(&self) -> EncryptionConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more