#[non_exhaustive]pub struct CdnKey {
pub name: String,
pub hostname: String,
pub cdn_key_config: Option<CdnKeyConfig>,
/* private fields */
}Expand description
Configuration for a CDN key. Used by the Video Stitcher to sign URIs for fetching video manifests and signing media segments for playback.
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.name: StringThe resource name of the CDN key, in the form of
projects/{project}/locations/{location}/cdnKeys/{id}.
The name is ignored when creating a CDN key.
hostname: StringThe hostname this key applies to.
cdn_key_config: Option<CdnKeyConfig>Configuration associated with the CDN key.
Implementations§
Source§impl CdnKey
impl CdnKey
Sourcepub fn set_hostname<T: Into<String>>(self, v: T) -> Self
pub fn set_hostname<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_cdn_key_config<T: Into<Option<CdnKeyConfig>>>(self, v: T) -> Self
pub fn set_cdn_key_config<T: Into<Option<CdnKeyConfig>>>(self, v: T) -> Self
Sets the value of cdn_key_config.
Note that all the setters affecting cdn_key_config are mutually
exclusive.
§Example
use google_cloud_video_stitcher_v1::model::GoogleCdnKey;
let x = CdnKey::new().set_cdn_key_config(Some(
google_cloud_video_stitcher_v1::model::cdn_key::CdnKeyConfig::GoogleCdnKey(GoogleCdnKey::default().into())));Sourcepub fn google_cdn_key(&self) -> Option<&Box<GoogleCdnKey>>
pub fn google_cdn_key(&self) -> Option<&Box<GoogleCdnKey>>
The value of cdn_key_config
if it holds a GoogleCdnKey, None if the field is not set or
holds a different branch.
Sourcepub fn set_google_cdn_key<T: Into<Box<GoogleCdnKey>>>(self, v: T) -> Self
pub fn set_google_cdn_key<T: Into<Box<GoogleCdnKey>>>(self, v: T) -> Self
Sets the value of cdn_key_config
to hold a GoogleCdnKey.
Note that all the setters affecting cdn_key_config are
mutually exclusive.
§Example
use google_cloud_video_stitcher_v1::model::GoogleCdnKey;
let x = CdnKey::new().set_google_cdn_key(GoogleCdnKey::default()/* use setters */);
assert!(x.google_cdn_key().is_some());
assert!(x.akamai_cdn_key().is_none());
assert!(x.media_cdn_key().is_none());Sourcepub fn akamai_cdn_key(&self) -> Option<&Box<AkamaiCdnKey>>
pub fn akamai_cdn_key(&self) -> Option<&Box<AkamaiCdnKey>>
The value of cdn_key_config
if it holds a AkamaiCdnKey, None if the field is not set or
holds a different branch.
Sourcepub fn set_akamai_cdn_key<T: Into<Box<AkamaiCdnKey>>>(self, v: T) -> Self
pub fn set_akamai_cdn_key<T: Into<Box<AkamaiCdnKey>>>(self, v: T) -> Self
Sets the value of cdn_key_config
to hold a AkamaiCdnKey.
Note that all the setters affecting cdn_key_config are
mutually exclusive.
§Example
use google_cloud_video_stitcher_v1::model::AkamaiCdnKey;
let x = CdnKey::new().set_akamai_cdn_key(AkamaiCdnKey::default()/* use setters */);
assert!(x.akamai_cdn_key().is_some());
assert!(x.google_cdn_key().is_none());
assert!(x.media_cdn_key().is_none());Sourcepub fn media_cdn_key(&self) -> Option<&Box<MediaCdnKey>>
pub fn media_cdn_key(&self) -> Option<&Box<MediaCdnKey>>
The value of cdn_key_config
if it holds a MediaCdnKey, None if the field is not set or
holds a different branch.
Sourcepub fn set_media_cdn_key<T: Into<Box<MediaCdnKey>>>(self, v: T) -> Self
pub fn set_media_cdn_key<T: Into<Box<MediaCdnKey>>>(self, v: T) -> Self
Sets the value of cdn_key_config
to hold a MediaCdnKey.
Note that all the setters affecting cdn_key_config are
mutually exclusive.
§Example
use google_cloud_video_stitcher_v1::model::MediaCdnKey;
let x = CdnKey::new().set_media_cdn_key(MediaCdnKey::default()/* use setters */);
assert!(x.media_cdn_key().is_some());
assert!(x.google_cdn_key().is_none());
assert!(x.akamai_cdn_key().is_none());