pub struct Volume {
Show 24 fields pub name: String, pub id: String, pub storage_type: i32, pub state: i32, 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: i32, pub labels: BTreeMap<String, String>, pub snapshot_enabled: bool, pub pod: String, pub protocol: i32, pub boot_volume: bool, pub performance_tier: i32, pub notes: String, pub workload_profile: i32, pub expire_time: Option<Timestamp>, pub instances: Vec<String>, pub attached: bool,
}
Expand description

A storage volume.

Fields§

§name: String

Output 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: String

An identifier for the Volume, generated by the backend.

§storage_type: i32

The storage type for this volume.

§state: i32

The state of this storage volume.

§requested_size_gib: i64

The requested size of this storage volume, in GiB.

§originally_requested_size_gib: i64

Originally requested size, in GiB.

§current_size_gib: i64

The 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: i64

Additional emergency size that was requested for this Volume, in GiB. current_size_gib includes this value.

§max_size_gib: i64

Maximum size volume can be expanded to in case of evergency, in GiB.

§auto_grown_size_gib: i64

The 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: i64

The 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: i32

The behavior to use when snapshot reserved space is full.

§labels: BTreeMap<String, String>

Labels as key value pairs.

§snapshot_enabled: bool

Whether snapshots are enabled.

§pod: String

Immutable. Pod name.

§protocol: i32

Output only. Storage protocol for the Volume.

§boot_volume: bool

Output only. Whether this volume is a boot volume. A boot volume is one which contains a boot LUN.

§performance_tier: i32

Immutable. Performance tier of the Volume. Default is SHARED.

§notes: String

Input only. User-specified notes for new Volume. Used to provision Volumes that require manual intervention.

§workload_profile: i32

The 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: bool

Output 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

source

pub fn storage_type(&self) -> StorageType

Returns the enum value of storage_type, or the default if the field is set to an invalid enum value.

source

pub fn set_storage_type(&mut self, value: StorageType)

Sets storage_type to the provided enum value.

source

pub fn state(&self) -> State

Returns the enum value of state, or the default if the field is set to an invalid enum value.

source

pub fn set_state(&mut self, value: State)

Sets state to the provided enum value.

source

pub fn snapshot_auto_delete_behavior(&self) -> SnapshotAutoDeleteBehavior

Returns the enum value of snapshot_auto_delete_behavior, or the default if the field is set to an invalid enum value.

source

pub fn set_snapshot_auto_delete_behavior( &mut self, value: SnapshotAutoDeleteBehavior )

Sets snapshot_auto_delete_behavior to the provided enum value.

source

pub fn protocol(&self) -> Protocol

Returns the enum value of protocol, or the default if the field is set to an invalid enum value.

source

pub fn set_protocol(&mut self, value: Protocol)

Sets protocol to the provided enum value.

source

pub fn performance_tier(&self) -> VolumePerformanceTier

Returns the enum value of performance_tier, or the default if the field is set to an invalid enum value.

source

pub fn set_performance_tier(&mut self, value: VolumePerformanceTier)

Sets performance_tier to the provided enum value.

source

pub fn workload_profile(&self) -> WorkloadProfile

Returns the enum value of workload_profile, or the default if the field is set to an invalid enum value.

source

pub fn set_workload_profile(&mut self, value: WorkloadProfile)

Sets workload_profile to the provided enum value.

Trait Implementations§

source§

impl Clone for Volume

source§

fn clone(&self) -> Volume

Returns a copy of the value. Read more
1.0.0 · source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
source§

impl Debug for Volume

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Volume

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl Message for Volume

source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
source§

fn encode<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message to a buffer. Read more
source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
source§

fn encode_length_delimited<B>(&self, buf: &mut B) -> Result<(), EncodeError>
where B: BufMut, Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
source§

fn decode<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes an instance of the message from a buffer. Read more
source§

fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError>
where B: Buf, Self: Default,

Decodes a length-delimited instance of the message from the buffer.
source§

fn merge<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
source§

fn merge_length_delimited<B>(&mut self, buf: B) -> Result<(), DecodeError>
where B: Buf, Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
source§

impl PartialEq for Volume

source§

fn eq(&self, other: &Volume) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Volume

Auto Trait Implementations§

§

impl Freeze for Volume

§

impl RefUnwindSafe for Volume

§

impl Send for Volume

§

impl Sync for Volume

§

impl Unpin for Volume

§

impl UnwindSafe for Volume

Blanket Implementations§

source§

impl<T> Any for T
where T: 'static + ?Sized,

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

impl<T> Borrow<T> for T
where T: ?Sized,

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
source§

impl<T> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
source§

impl<T, U> Into<U> for T
where U: From<T>,

source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

source§

impl<T> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for T
where T: Clone,

§

type Owned = T

The resulting type after obtaining ownership.
source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

§

type Error = Infallible

The type returned in the event of a conversion error.
source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more