#[non_exhaustive]pub struct Encryption {
pub id: String,
pub drm_systems: Option<DrmSystems>,
pub encryption_mode: Option<EncryptionMode>,
pub secret_source: Option<SecretSource>,
/* private fields */
}Expand description
Encryption settings.
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.id: StringRequired. Identifier for this set of encryption options.
drm_systems: Option<DrmSystems>Required. DRM system(s) to use; at least one must be specified. If a DRM system is omitted, it is considered disabled.
encryption_mode: Option<EncryptionMode>Encryption mode can be either aes or cenc.
secret_source: Option<SecretSource>Defines where content keys are stored.
Implementations§
Source§impl Encryption
impl Encryption
pub fn new() -> Self
Sourcepub fn set_drm_systems<T>(self, v: T) -> Selfwhere
T: Into<DrmSystems>,
pub fn set_drm_systems<T>(self, v: T) -> Selfwhere
T: Into<DrmSystems>,
Sets the value of drm_systems.
§Example
use google_cloud_video_transcoder_v1::model::encryption::DrmSystems;
let x = Encryption::new().set_drm_systems(DrmSystems::default()/* use setters */);Sourcepub fn set_or_clear_drm_systems<T>(self, v: Option<T>) -> Selfwhere
T: Into<DrmSystems>,
pub fn set_or_clear_drm_systems<T>(self, v: Option<T>) -> Selfwhere
T: Into<DrmSystems>,
Sets or clears the value of drm_systems.
§Example
use google_cloud_video_transcoder_v1::model::encryption::DrmSystems;
let x = Encryption::new().set_or_clear_drm_systems(Some(DrmSystems::default()/* use setters */));
let x = Encryption::new().set_or_clear_drm_systems(None::<DrmSystems>);Sourcepub fn set_encryption_mode<T: Into<Option<EncryptionMode>>>(self, v: T) -> Self
pub fn set_encryption_mode<T: Into<Option<EncryptionMode>>>(self, v: T) -> Self
Sets the value of encryption_mode.
Note that all the setters affecting encryption_mode are mutually
exclusive.
§Example
use google_cloud_video_transcoder_v1::model::encryption::Aes128Encryption;
let x = Encryption::new().set_encryption_mode(Some(
google_cloud_video_transcoder_v1::model::encryption::EncryptionMode::Aes128(Aes128Encryption::default().into())));Sourcepub fn aes_128(&self) -> Option<&Box<Aes128Encryption>>
pub fn aes_128(&self) -> Option<&Box<Aes128Encryption>>
The value of encryption_mode
if it holds a Aes128, None if the field is not set or
holds a different branch.
Sourcepub fn set_aes_128<T: Into<Box<Aes128Encryption>>>(self, v: T) -> Self
pub fn set_aes_128<T: Into<Box<Aes128Encryption>>>(self, v: T) -> Self
Sets the value of encryption_mode
to hold a Aes128.
Note that all the setters affecting encryption_mode are
mutually exclusive.
§Example
use google_cloud_video_transcoder_v1::model::encryption::Aes128Encryption;
let x = Encryption::new().set_aes_128(Aes128Encryption::default()/* use setters */);
assert!(x.aes_128().is_some());
assert!(x.sample_aes().is_none());
assert!(x.mpeg_cenc().is_none());Sourcepub fn sample_aes(&self) -> Option<&Box<SampleAesEncryption>>
pub fn sample_aes(&self) -> Option<&Box<SampleAesEncryption>>
The value of encryption_mode
if it holds a SampleAes, None if the field is not set or
holds a different branch.
Sourcepub fn set_sample_aes<T: Into<Box<SampleAesEncryption>>>(self, v: T) -> Self
pub fn set_sample_aes<T: Into<Box<SampleAesEncryption>>>(self, v: T) -> Self
Sets the value of encryption_mode
to hold a SampleAes.
Note that all the setters affecting encryption_mode are
mutually exclusive.
§Example
use google_cloud_video_transcoder_v1::model::encryption::SampleAesEncryption;
let x = Encryption::new().set_sample_aes(SampleAesEncryption::default()/* use setters */);
assert!(x.sample_aes().is_some());
assert!(x.aes_128().is_none());
assert!(x.mpeg_cenc().is_none());Sourcepub fn mpeg_cenc(&self) -> Option<&Box<MpegCommonEncryption>>
pub fn mpeg_cenc(&self) -> Option<&Box<MpegCommonEncryption>>
The value of encryption_mode
if it holds a MpegCenc, None if the field is not set or
holds a different branch.
Sourcepub fn set_mpeg_cenc<T: Into<Box<MpegCommonEncryption>>>(self, v: T) -> Self
pub fn set_mpeg_cenc<T: Into<Box<MpegCommonEncryption>>>(self, v: T) -> Self
Sets the value of encryption_mode
to hold a MpegCenc.
Note that all the setters affecting encryption_mode are
mutually exclusive.
§Example
use google_cloud_video_transcoder_v1::model::encryption::MpegCommonEncryption;
let x = Encryption::new().set_mpeg_cenc(MpegCommonEncryption::default()/* use setters */);
assert!(x.mpeg_cenc().is_some());
assert!(x.aes_128().is_none());
assert!(x.sample_aes().is_none());Sourcepub fn set_secret_source<T: Into<Option<SecretSource>>>(self, v: T) -> Self
pub fn set_secret_source<T: Into<Option<SecretSource>>>(self, v: T) -> Self
Sets the value of secret_source.
Note that all the setters affecting secret_source are mutually
exclusive.
§Example
use google_cloud_video_transcoder_v1::model::encryption::SecretManagerSource;
let x = Encryption::new().set_secret_source(Some(
google_cloud_video_transcoder_v1::model::encryption::SecretSource::SecretManagerKeySource(SecretManagerSource::default().into())));Sourcepub fn secret_manager_key_source(&self) -> Option<&Box<SecretManagerSource>>
pub fn secret_manager_key_source(&self) -> Option<&Box<SecretManagerSource>>
The value of secret_source
if it holds a SecretManagerKeySource, None if the field is not set or
holds a different branch.
Sourcepub fn set_secret_manager_key_source<T: Into<Box<SecretManagerSource>>>(
self,
v: T,
) -> Self
pub fn set_secret_manager_key_source<T: Into<Box<SecretManagerSource>>>( self, v: T, ) -> Self
Sets the value of secret_source
to hold a SecretManagerKeySource.
Note that all the setters affecting secret_source are
mutually exclusive.
§Example
use google_cloud_video_transcoder_v1::model::encryption::SecretManagerSource;
let x = Encryption::new().set_secret_manager_key_source(SecretManagerSource::default()/* use setters */);
assert!(x.secret_manager_key_source().is_some());Trait Implementations§
Source§impl Clone for Encryption
impl Clone for Encryption
Source§fn clone(&self) -> Encryption
fn clone(&self) -> Encryption
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more