#[non_exhaustive]pub struct Volume {Show 24 fields
pub name: String,
pub id: String,
pub storage_type: StorageType,
pub state: State,
pub requested_size_gib: i64,
pub originally_requested_size_gib: i64,
pub current_size_gib: i64,
pub emergency_size_gib: i64,
pub max_size_gib: i64,
pub auto_grown_size_gib: i64,
pub remaining_space_gib: i64,
pub snapshot_reservation_detail: Option<SnapshotReservationDetail>,
pub snapshot_auto_delete_behavior: SnapshotAutoDeleteBehavior,
pub labels: HashMap<String, String>,
pub snapshot_enabled: bool,
pub pod: String,
pub protocol: Protocol,
pub boot_volume: bool,
pub performance_tier: VolumePerformanceTier,
pub notes: String,
pub workload_profile: WorkloadProfile,
pub expire_time: Option<Timestamp>,
pub instances: Vec<String>,
pub attached: bool,
/* private fields */
}Expand description
A storage volume.
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: StringOutput only. The resource name of this Volume.
Resource names are schemeless URIs that follow the conventions in
https://cloud.google.com/apis/design/resource_names.
Format:
projects/{project}/locations/{location}/volumes/{volume}
id: StringAn identifier for the Volume, generated by the backend.
storage_type: StorageTypeThe storage type for this volume.
state: StateThe state of this storage volume.
requested_size_gib: i64The requested size of this storage volume, in GiB.
originally_requested_size_gib: i64Originally requested size, in GiB.
current_size_gib: i64The current size of this storage volume, in GiB, including space reserved for snapshots. This size might be different than the requested size if the storage volume has been configured with auto grow or auto shrink.
emergency_size_gib: i64Additional emergency size that was requested for this Volume, in GiB. current_size_gib includes this value.
max_size_gib: i64Maximum size volume can be expanded to in case of evergency, in GiB.
auto_grown_size_gib: i64The size, in GiB, that this storage volume has expanded as a result of an auto grow policy. In the absence of auto-grow, the value is 0.
remaining_space_gib: i64The space remaining in the storage volume for new LUNs, in GiB, excluding space reserved for snapshots.
snapshot_reservation_detail: Option<SnapshotReservationDetail>Details about snapshot space reservation and usage on the storage volume.
snapshot_auto_delete_behavior: SnapshotAutoDeleteBehaviorThe behavior to use when snapshot reserved space is full.
labels: HashMap<String, String>Labels as key value pairs.
snapshot_enabled: boolWhether snapshots are enabled.
pod: StringImmutable. Pod name.
protocol: ProtocolOutput only. Storage protocol for the Volume.
boot_volume: boolOutput only. Whether this volume is a boot volume. A boot volume is one which contains a boot LUN.
performance_tier: VolumePerformanceTierImmutable. Performance tier of the Volume. Default is SHARED.
notes: StringInput only. User-specified notes for new Volume. Used to provision Volumes that require manual intervention.
workload_profile: WorkloadProfileThe workload profile for the volume.
expire_time: Option<Timestamp>Output only. Time after which volume will be fully deleted. It is filled only for volumes in COOLOFF state.
instances: Vec<String>Output only. Instances this Volume is attached to. This field is set only in Get requests.
attached: boolOutput only. Is the Volume attached at at least one instance.
This field is a lightweight counterpart of instances field.
It is filled in List responses as well.
Implementations§
Source§impl Volume
impl Volume
pub fn new() -> Self
Sourcepub fn set_storage_type<T: Into<StorageType>>(self, v: T) -> Self
pub fn set_storage_type<T: Into<StorageType>>(self, v: T) -> Self
Sets the value of storage_type.
§Example
use google_cloud_baremetalsolution_v2::model::volume::StorageType;
let x0 = Volume::new().set_storage_type(StorageType::Ssd);
let x1 = Volume::new().set_storage_type(StorageType::Hdd);Sourcepub fn set_requested_size_gib<T: Into<i64>>(self, v: T) -> Self
pub fn set_requested_size_gib<T: Into<i64>>(self, v: T) -> Self
Sourcepub fn set_originally_requested_size_gib<T: Into<i64>>(self, v: T) -> Self
pub fn set_originally_requested_size_gib<T: Into<i64>>(self, v: T) -> Self
Sets the value of originally_requested_size_gib.
§Example
let x = Volume::new().set_originally_requested_size_gib(42);Sourcepub fn set_current_size_gib<T: Into<i64>>(self, v: T) -> Self
pub fn set_current_size_gib<T: Into<i64>>(self, v: T) -> Self
Sourcepub fn set_emergency_size_gib<T: Into<i64>>(self, v: T) -> Self
pub fn set_emergency_size_gib<T: Into<i64>>(self, v: T) -> Self
Sourcepub fn set_max_size_gib<T: Into<i64>>(self, v: T) -> Self
pub fn set_max_size_gib<T: Into<i64>>(self, v: T) -> Self
Sourcepub fn set_auto_grown_size_gib<T: Into<i64>>(self, v: T) -> Self
pub fn set_auto_grown_size_gib<T: Into<i64>>(self, v: T) -> Self
Sourcepub fn set_remaining_space_gib<T: Into<i64>>(self, v: T) -> Self
pub fn set_remaining_space_gib<T: Into<i64>>(self, v: T) -> Self
Sourcepub fn set_snapshot_reservation_detail<T>(self, v: T) -> Selfwhere
T: Into<SnapshotReservationDetail>,
pub fn set_snapshot_reservation_detail<T>(self, v: T) -> Selfwhere
T: Into<SnapshotReservationDetail>,
Sets the value of snapshot_reservation_detail.
§Example
use google_cloud_baremetalsolution_v2::model::volume::SnapshotReservationDetail;
let x = Volume::new().set_snapshot_reservation_detail(SnapshotReservationDetail::default()/* use setters */);Sourcepub fn set_or_clear_snapshot_reservation_detail<T>(self, v: Option<T>) -> Selfwhere
T: Into<SnapshotReservationDetail>,
pub fn set_or_clear_snapshot_reservation_detail<T>(self, v: Option<T>) -> Selfwhere
T: Into<SnapshotReservationDetail>,
Sets or clears the value of snapshot_reservation_detail.
§Example
use google_cloud_baremetalsolution_v2::model::volume::SnapshotReservationDetail;
let x = Volume::new().set_or_clear_snapshot_reservation_detail(Some(SnapshotReservationDetail::default()/* use setters */));
let x = Volume::new().set_or_clear_snapshot_reservation_detail(None::<SnapshotReservationDetail>);Sourcepub fn set_snapshot_auto_delete_behavior<T: Into<SnapshotAutoDeleteBehavior>>(
self,
v: T,
) -> Self
pub fn set_snapshot_auto_delete_behavior<T: Into<SnapshotAutoDeleteBehavior>>( self, v: T, ) -> Self
Sets the value of snapshot_auto_delete_behavior.
§Example
use google_cloud_baremetalsolution_v2::model::volume::SnapshotAutoDeleteBehavior;
let x0 = Volume::new().set_snapshot_auto_delete_behavior(SnapshotAutoDeleteBehavior::Disabled);
let x1 = Volume::new().set_snapshot_auto_delete_behavior(SnapshotAutoDeleteBehavior::OldestFirst);
let x2 = Volume::new().set_snapshot_auto_delete_behavior(SnapshotAutoDeleteBehavior::NewestFirst);Sourcepub fn set_labels<T, K, V>(self, v: T) -> Self
pub fn set_labels<T, K, V>(self, v: T) -> Self
Sourcepub fn set_snapshot_enabled<T: Into<bool>>(self, v: T) -> Self
pub fn set_snapshot_enabled<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_protocol<T: Into<Protocol>>(self, v: T) -> Self
pub fn set_protocol<T: Into<Protocol>>(self, v: T) -> Self
Sourcepub fn set_boot_volume<T: Into<bool>>(self, v: T) -> Self
pub fn set_boot_volume<T: Into<bool>>(self, v: T) -> Self
Sourcepub fn set_performance_tier<T: Into<VolumePerformanceTier>>(self, v: T) -> Self
pub fn set_performance_tier<T: Into<VolumePerformanceTier>>(self, v: T) -> Self
Sets the value of performance_tier.
§Example
use google_cloud_baremetalsolution_v2::model::VolumePerformanceTier;
let x0 = Volume::new().set_performance_tier(VolumePerformanceTier::Shared);
let x1 = Volume::new().set_performance_tier(VolumePerformanceTier::Assigned);
let x2 = Volume::new().set_performance_tier(VolumePerformanceTier::Ht);Sourcepub fn set_workload_profile<T: Into<WorkloadProfile>>(self, v: T) -> Self
pub fn set_workload_profile<T: Into<WorkloadProfile>>(self, v: T) -> Self
Sets the value of workload_profile.
§Example
use google_cloud_baremetalsolution_v2::model::volume::WorkloadProfile;
let x0 = Volume::new().set_workload_profile(WorkloadProfile::Generic);
let x1 = Volume::new().set_workload_profile(WorkloadProfile::Hana);Sourcepub fn set_expire_time<T>(self, v: T) -> Self
pub fn set_expire_time<T>(self, v: T) -> Self
Sets the value of expire_time.
§Example
use wkt::Timestamp;
let x = Volume::new().set_expire_time(Timestamp::default()/* use setters */);Sourcepub fn set_or_clear_expire_time<T>(self, v: Option<T>) -> Self
pub fn set_or_clear_expire_time<T>(self, v: Option<T>) -> Self
Sets or clears the value of expire_time.
§Example
use wkt::Timestamp;
let x = Volume::new().set_or_clear_expire_time(Some(Timestamp::default()/* use setters */));
let x = Volume::new().set_or_clear_expire_time(None::<Timestamp>);