#[non_exhaustive]pub struct SourceDiskEncryptionKey {
pub disk_encryption_key: Option<CustomerEncryptionKey>,
pub source_disk: Option<String>,
/* private fields */
}Available on crate feature
machine-images only.Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.disk_encryption_key: Option<CustomerEncryptionKey>Thecustomer-supplied encryption key of the source disk. Required if the source disk is protected by a customer-supplied encryption key.
source_disk: Option<String>URL of the disk attached to the source instance. This can be a full or valid partial URL. For example, the following are valid values:
- https://www.googleapis.com/compute/v1/projects/project/zones/zone/disks/disk- projects/project/zones/zone/disks/disk
- zones/zone/disks/disk
Implementations§
Source§impl SourceDiskEncryptionKey
impl SourceDiskEncryptionKey
pub fn new() -> Self
Sourcepub fn set_disk_encryption_key<T>(self, v: T) -> Selfwhere
T: Into<CustomerEncryptionKey>,
pub fn set_disk_encryption_key<T>(self, v: T) -> Selfwhere
T: Into<CustomerEncryptionKey>,
Sets the value of disk_encryption_key.
§Example
ⓘ
use google_cloud_compute_v1::model::CustomerEncryptionKey;
let x = SourceDiskEncryptionKey::new().set_disk_encryption_key(CustomerEncryptionKey::default()/* use setters */);Sourcepub fn set_or_clear_disk_encryption_key<T>(self, v: Option<T>) -> Selfwhere
T: Into<CustomerEncryptionKey>,
pub fn set_or_clear_disk_encryption_key<T>(self, v: Option<T>) -> Selfwhere
T: Into<CustomerEncryptionKey>,
Sets or clears the value of disk_encryption_key.
§Example
ⓘ
use google_cloud_compute_v1::model::CustomerEncryptionKey;
let x = SourceDiskEncryptionKey::new().set_or_clear_disk_encryption_key(Some(CustomerEncryptionKey::default()/* use setters */));
let x = SourceDiskEncryptionKey::new().set_or_clear_disk_encryption_key(None::<CustomerEncryptionKey>);Sourcepub fn set_source_disk<T>(self, v: T) -> Self
pub fn set_source_disk<T>(self, v: T) -> Self
Sets the value of source_disk.
§Example
ⓘ
let x = SourceDiskEncryptionKey::new().set_source_disk("example");Sourcepub fn set_or_clear_source_disk<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_source_disk<T>(self, v: Option<T>) -> Self
Sets or clears the value of source_disk.
§Example
ⓘ
let x = SourceDiskEncryptionKey::new().set_or_clear_source_disk(Some("example"));
let x = SourceDiskEncryptionKey::new().set_or_clear_source_disk(None::<String>);Trait Implementations§
Source§impl Clone for SourceDiskEncryptionKey
impl Clone for SourceDiskEncryptionKey
Source§fn clone(&self) -> SourceDiskEncryptionKey
fn clone(&self) -> SourceDiskEncryptionKey
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SourceDiskEncryptionKey
impl Debug for SourceDiskEncryptionKey
Source§impl Default for SourceDiskEncryptionKey
impl Default for SourceDiskEncryptionKey
Source§fn default() -> SourceDiskEncryptionKey
fn default() -> SourceDiskEncryptionKey
Returns the “default value” for a type. Read more
Source§impl Message for SourceDiskEncryptionKey
impl Message for SourceDiskEncryptionKey
Source§impl PartialEq for SourceDiskEncryptionKey
impl PartialEq for SourceDiskEncryptionKey
impl StructuralPartialEq for SourceDiskEncryptionKey
Auto Trait Implementations§
impl Freeze for SourceDiskEncryptionKey
impl RefUnwindSafe for SourceDiskEncryptionKey
impl Send for SourceDiskEncryptionKey
impl Sync for SourceDiskEncryptionKey
impl Unpin for SourceDiskEncryptionKey
impl UnwindSafe for SourceDiskEncryptionKey
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more