Struct CsiVolumeBuilder

Source
pub struct CsiVolumeBuilder { /* private fields */ }
Expand description

Builder for CsiVolume.

Implementations§

Source§

impl CsiVolumeBuilder

Source

pub fn id(&mut self, value: String) -> &mut Self

Source

pub fn name(&mut self, value: String) -> &mut Self

Source

pub fn external_id(&mut self, value: Option<String>) -> &mut Self

Source

pub fn namespace(&mut self, value: String) -> &mut Self

Source

pub fn requested_topologies( &mut self, value: Option<CsiTopologyRequest>, ) -> &mut Self

RequestedTopologies are the topologies submitted as options to the storage provider at the time the volume was created. After volumes are created, this field is ignored.

Source

pub fn topologies(&mut self, value: Vec<CsiTopology>) -> &mut Self

Topologies are the topologies returned by the storage provider, based on the RequestedTopologies and what the storage provider could support. This value cannot be set by the user.

Source

pub fn access_mode(&mut self, value: CsiVolumeAccessMode) -> &mut Self

Source

pub fn attachment_mode(&mut self, value: CsiVolumeAttachmentMode) -> &mut Self

Source

pub fn mount_options(&mut self, value: Option<CsiMountOptions>) -> &mut Self

Source

pub fn secrets(&mut self, value: Option<HashMap<String, String>>) -> &mut Self

Source

pub fn parameters( &mut self, value: Option<HashMap<String, String>>, ) -> &mut Self

Source

pub fn context(&mut self, value: Option<HashMap<String, String>>) -> &mut Self

Source

pub fn capacity(&mut self, value: i64) -> &mut Self

Source

pub fn requested_capacity_min(&mut self, value: i64) -> &mut Self

These fields are used as part of the volume creation request

Source

pub fn requested_capacity_max(&mut self, value: i64) -> &mut Self

Source

pub fn requested_capabilities( &mut self, value: Vec<CsiVolumeCapability>, ) -> &mut Self

Source

pub fn clone_id(&mut self, value: Option<String>) -> &mut Self

Source

pub fn snapshot_id(&mut self, value: Option<String>) -> &mut Self

Source

pub fn read_allocs(&mut self, value: HashMap<String, Allocation>) -> &mut Self

ReadAllocs is a map of allocation IDs for tracking reader claim status. The Allocation value will always be nil; clients can populate this data by iterating over the Allocations field.

Source

pub fn write_allocs(&mut self, value: HashMap<String, Allocation>) -> &mut Self

WriteAllocs is a map of allocation IDs for tracking writer claim status. The Allocation value will always be nil; clients can populate this data by iterating over the Allocations field.

Source

pub fn allocations(&mut self, value: Vec<AllocationListStub>) -> &mut Self

Allocations is a combined list of readers and writers

Source

pub fn schedulable(&mut self, value: bool) -> &mut Self

Schedulable is true if all the denormalized plugin health fields are true

Source

pub fn plugin_id(&mut self, value: Option<String>) -> &mut Self

Source

pub fn provider(&mut self, value: String) -> &mut Self

Source

pub fn provider_version(&mut self, value: String) -> &mut Self

Source

pub fn controller_required(&mut self, value: bool) -> &mut Self

Source

pub fn controllers_healthy(&mut self, value: i64) -> &mut Self

Source

pub fn controllers_expected(&mut self, value: i64) -> &mut Self

Source

pub fn nodes_healthy(&mut self, value: i64) -> &mut Self

Source

pub fn nodes_expected(&mut self, value: i64) -> &mut Self

Source

pub fn resource_exhausted(&mut self, value: DateTime<Utc>) -> &mut Self

Source

pub fn create_index(&mut self, value: u64) -> &mut Self

Source

pub fn modify_index(&mut self, value: u64) -> &mut Self

Source

pub fn create_time(&mut self, value: i64) -> &mut Self

CreateTime stored as UnixNano

Source

pub fn modify_time(&mut self, value: i64) -> &mut Self

ModifyTime stored as UnixNano

Source

pub fn build(&self) -> Result<CsiVolume, CsiVolumeBuilderError>

Builds a new CsiVolume.

§Errors

If a required field has not been initialized.

Trait Implementations§

Source§

impl Clone for CsiVolumeBuilder

Source§

fn clone(&self) -> CsiVolumeBuilder

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 Default for CsiVolumeBuilder

Source§

fn default() -> Self

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

Auto Trait Implementations§

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> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

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> ToOwned for T
where T: Clone,

Source§

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>,

Source§

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>,

Source§

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.