#[non_exhaustive]pub struct SavedAttachedDisk {Show 16 fields
pub auto_delete: Option<bool>,
pub boot: Option<bool>,
pub device_name: Option<String>,
pub disk_encryption_key: Option<CustomerEncryptionKey>,
pub disk_size_gb: Option<i64>,
pub disk_type: Option<String>,
pub guest_os_features: Vec<GuestOsFeature>,
pub index: Option<i32>,
pub interface: Option<Interface>,
pub kind: Option<String>,
pub licenses: Vec<String>,
pub mode: Option<Mode>,
pub source: Option<String>,
pub storage_bytes: Option<i64>,
pub storage_bytes_status: Option<StorageBytesStatus>,
pub type: Option<Type>,
/* private fields */
}machine-images only.Expand description
DEPRECATED: Please use compute#savedDisk instead. An instance-attached disk resource.
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.auto_delete: Option<bool>Specifies whether the disk will be auto-deleted when the instance is deleted (but not when the disk is detached from the instance).
boot: Option<bool>Indicates that this is a boot disk. The virtual machine will use the first partition of the disk for its root filesystem.
device_name: Option<String>Specifies the name of the disk attached to the source instance.
disk_encryption_key: Option<CustomerEncryptionKey>The encryption key for the disk.
disk_size_gb: Option<i64>The size of the disk in base-2 GB.
disk_type: Option<String>Output only. [Output Only] URL of the disk type resource. For example:projects/project/zones/zone/diskTypes/pd-standard or pd-ssd
guest_os_features: Vec<GuestOsFeature>A list of features to enable on the guest operating system. Applicable only for bootable images. Read Enabling guest operating system features to see a list of available options.
index: Option<i32>Output only. Specifies zero-based index of the disk that is attached to the source instance.
interface: Option<Interface>Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME.
kind: Option<String>Output only. [Output Only] Type of the resource. Alwayscompute#attachedDisk for attached disks.
licenses: Vec<String>Output only. [Output Only] Any valid publicly visible licenses.
mode: Option<Mode>The mode in which this disk is attached to the source instance, eitherREAD_WRITE or READ_ONLY.
source: Option<String>Specifies a URL of the disk attached to the source instance.
storage_bytes: Option<i64>Output only. [Output Only] A size of the storage used by the disk’s snapshot by this machine image.
storage_bytes_status: Option<StorageBytesStatus>Output only. [Output Only] An indicator whether storageBytes is in a stable state or it is being adjusted as a result of shared storage reallocation. This status can either be UPDATING, meaning the size of the snapshot is being updated, or UP_TO_DATE, meaning the size of the snapshot is up-to-date.
type: Option<Type>Specifies the type of the attached disk, either SCRATCH orPERSISTENT.
Implementations§
Source§impl SavedAttachedDisk
impl SavedAttachedDisk
Sourcepub fn set_auto_delete<T>(self, v: T) -> Self
pub fn set_auto_delete<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_auto_delete<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_auto_delete<T>(self, v: Option<T>) -> Self
Sets or clears the value of auto_delete.
§Example
let x = SavedAttachedDisk::new().set_or_clear_auto_delete(Some(false));
let x = SavedAttachedDisk::new().set_or_clear_auto_delete(None::<bool>);Sourcepub fn set_or_clear_boot<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_boot<T>(self, v: Option<T>) -> Self
Sourcepub fn set_device_name<T>(self, v: T) -> Self
pub fn set_device_name<T>(self, v: T) -> Self
Sets the value of device_name.
§Example
let x = SavedAttachedDisk::new().set_device_name("example");Sourcepub fn set_or_clear_device_name<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_device_name<T>(self, v: Option<T>) -> Self
Sets or clears the value of device_name.
§Example
let x = SavedAttachedDisk::new().set_or_clear_device_name(Some("example"));
let x = SavedAttachedDisk::new().set_or_clear_device_name(None::<String>);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 = SavedAttachedDisk::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 = SavedAttachedDisk::new().set_or_clear_disk_encryption_key(Some(CustomerEncryptionKey::default()/* use setters */));
let x = SavedAttachedDisk::new().set_or_clear_disk_encryption_key(None::<CustomerEncryptionKey>);Sourcepub fn set_disk_size_gb<T>(self, v: T) -> Self
pub fn set_disk_size_gb<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_disk_size_gb<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_disk_size_gb<T>(self, v: Option<T>) -> Self
Sets or clears the value of disk_size_gb.
§Example
let x = SavedAttachedDisk::new().set_or_clear_disk_size_gb(Some(42));
let x = SavedAttachedDisk::new().set_or_clear_disk_size_gb(None::<i32>);Sourcepub fn set_disk_type<T>(self, v: T) -> Self
pub fn set_disk_type<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_disk_type<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_disk_type<T>(self, v: Option<T>) -> Self
Sourcepub fn set_guest_os_features<T, V>(self, v: T) -> Self
pub fn set_guest_os_features<T, V>(self, v: T) -> Self
Sets the value of guest_os_features.
§Example
use google_cloud_compute_v1::model::GuestOsFeature;
let x = SavedAttachedDisk::new()
.set_guest_os_features([
GuestOsFeature::default()/* use setters */,
GuestOsFeature::default()/* use (different) setters */,
]);Sourcepub fn set_or_clear_index<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_index<T>(self, v: Option<T>) -> Self
Sourcepub fn set_interface<T>(self, v: T) -> Self
pub fn set_interface<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_interface<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_interface<T>(self, v: Option<T>) -> Self
Sourcepub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_kind<T>(self, v: Option<T>) -> Self
Sourcepub fn set_licenses<T, V>(self, v: T) -> Self
pub fn set_licenses<T, V>(self, v: T) -> Self
Sourcepub fn set_or_clear_mode<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_mode<T>(self, v: Option<T>) -> Self
Sourcepub fn set_source<T>(self, v: T) -> Self
pub fn set_source<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_source<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_source<T>(self, v: Option<T>) -> Self
Sourcepub fn set_storage_bytes<T>(self, v: T) -> Self
pub fn set_storage_bytes<T>(self, v: T) -> Self
Sourcepub fn set_or_clear_storage_bytes<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_storage_bytes<T>(self, v: Option<T>) -> Self
Sets or clears the value of storage_bytes.
§Example
let x = SavedAttachedDisk::new().set_or_clear_storage_bytes(Some(42));
let x = SavedAttachedDisk::new().set_or_clear_storage_bytes(None::<i32>);Sourcepub fn set_storage_bytes_status<T>(self, v: T) -> Selfwhere
T: Into<StorageBytesStatus>,
pub fn set_storage_bytes_status<T>(self, v: T) -> Selfwhere
T: Into<StorageBytesStatus>,
Sets the value of storage_bytes_status.
§Example
use google_cloud_compute_v1::model::saved_attached_disk::StorageBytesStatus;
let x0 = SavedAttachedDisk::new().set_storage_bytes_status(StorageBytesStatus::UpToDate);Sourcepub fn set_or_clear_storage_bytes_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<StorageBytesStatus>,
pub fn set_or_clear_storage_bytes_status<T>(self, v: Option<T>) -> Selfwhere
T: Into<StorageBytesStatus>,
Sets or clears the value of storage_bytes_status.
§Example
use google_cloud_compute_v1::model::saved_attached_disk::StorageBytesStatus;
let x0 = SavedAttachedDisk::new().set_or_clear_storage_bytes_status(Some(StorageBytesStatus::UpToDate));
let x_none = SavedAttachedDisk::new().set_or_clear_storage_bytes_status(None::<StorageBytesStatus>);Sourcepub fn set_or_clear_type<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_type<T>(self, v: Option<T>) -> Self
Trait Implementations§
Source§impl Clone for SavedAttachedDisk
impl Clone for SavedAttachedDisk
Source§fn clone(&self) -> SavedAttachedDisk
fn clone(&self) -> SavedAttachedDisk
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for SavedAttachedDisk
impl Debug for SavedAttachedDisk
Source§impl Default for SavedAttachedDisk
impl Default for SavedAttachedDisk
Source§fn default() -> SavedAttachedDisk
fn default() -> SavedAttachedDisk
Source§impl Message for SavedAttachedDisk
impl Message for SavedAttachedDisk
Source§impl PartialEq for SavedAttachedDisk
impl PartialEq for SavedAttachedDisk
impl StructuralPartialEq for SavedAttachedDisk
Auto Trait Implementations§
impl Freeze for SavedAttachedDisk
impl RefUnwindSafe for SavedAttachedDisk
impl Send for SavedAttachedDisk
impl Sync for SavedAttachedDisk
impl Unpin for SavedAttachedDisk
impl UnsafeUnpin for SavedAttachedDisk
impl UnwindSafe for SavedAttachedDisk
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self>
fn with_context(self, otel_cx: Context) -> WithContext<Self>
Source§fn with_current_context(self) -> WithContext<Self>
fn with_current_context(self) -> WithContext<Self>
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request