#[non_exhaustive]pub struct VolumeConfig {
pub name: String,
pub id: String,
pub snapshots_enabled: bool,
pub type: Type,
pub protocol: Protocol,
pub size_gb: i32,
pub lun_ranges: Vec<LunRange>,
pub machine_ids: Vec<String>,
pub nfs_exports: Vec<NfsExport>,
pub user_note: String,
pub gcp_service: String,
pub performance_tier: VolumePerformanceTier,
/* private fields */
}Expand description
Configuration parameters for a new 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 name of the volume config.
id: StringA transient unique identifier to identify a volume within an ProvisioningConfig request.
snapshots_enabled: boolWhether snapshots should be enabled.
type: TypeThe type of this Volume.
protocol: ProtocolVolume protocol.
size_gb: i32The requested size of this volume, in GB.
lun_ranges: Vec<LunRange>LUN ranges to be configured. Set only when protocol is PROTOCOL_FC.
machine_ids: Vec<String>Machine ids connected to this volume. Set only when protocol is PROTOCOL_FC.
nfs_exports: Vec<NfsExport>NFS exports. Set only when protocol is PROTOCOL_NFS.
user_note: StringUser note field, it can be used by customers to add additional information for the BMS Ops team .
gcp_service: StringThe GCP service of the storage volume. Available gcp_service are in https://cloud.google.com/bare-metal/docs/bms-planning.
performance_tier: VolumePerformanceTierPerformance tier of the Volume. Default is SHARED.
Implementations§
Source§impl VolumeConfig
impl VolumeConfig
Sourcepub fn set_snapshots_enabled<T: Into<bool>>(self, v: T) -> Self
pub fn set_snapshots_enabled<T: Into<bool>>(self, v: T) -> Self
Sets the value of snapshots_enabled.
§Example
let x = VolumeConfig::new().set_snapshots_enabled(true);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_size_gb<T: Into<i32>>(self, v: T) -> Self
pub fn set_size_gb<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_lun_ranges<T, V>(self, v: T) -> Self
pub fn set_lun_ranges<T, V>(self, v: T) -> Self
Sets the value of lun_ranges.
§Example
use google_cloud_baremetalsolution_v2::model::volume_config::LunRange;
let x = VolumeConfig::new()
.set_lun_ranges([
LunRange::default()/* use setters */,
LunRange::default()/* use (different) setters */,
]);Sourcepub fn set_machine_ids<T, V>(self, v: T) -> Self
pub fn set_machine_ids<T, V>(self, v: T) -> Self
Sets the value of machine_ids.
§Example
let x = VolumeConfig::new().set_machine_ids(["a", "b", "c"]);Sourcepub fn set_nfs_exports<T, V>(self, v: T) -> Self
pub fn set_nfs_exports<T, V>(self, v: T) -> Self
Sets the value of nfs_exports.
§Example
use google_cloud_baremetalsolution_v2::model::volume_config::NfsExport;
let x = VolumeConfig::new()
.set_nfs_exports([
NfsExport::default()/* use setters */,
NfsExport::default()/* use (different) setters */,
]);Sourcepub fn set_user_note<T: Into<String>>(self, v: T) -> Self
pub fn set_user_note<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_gcp_service<T: Into<String>>(self, v: T) -> Self
pub fn set_gcp_service<T: Into<String>>(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 = VolumeConfig::new().set_performance_tier(VolumePerformanceTier::Shared);
let x1 = VolumeConfig::new().set_performance_tier(VolumePerformanceTier::Assigned);
let x2 = VolumeConfig::new().set_performance_tier(VolumePerformanceTier::Ht);Trait Implementations§
Source§impl Clone for VolumeConfig
impl Clone for VolumeConfig
Source§fn clone(&self) -> VolumeConfig
fn clone(&self) -> VolumeConfig
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 VolumeConfig
impl Debug for VolumeConfig
Source§impl Default for VolumeConfig
impl Default for VolumeConfig
Source§fn default() -> VolumeConfig
fn default() -> VolumeConfig
Source§impl Message for VolumeConfig
impl Message for VolumeConfig
Source§impl PartialEq for VolumeConfig
impl PartialEq for VolumeConfig
impl StructuralPartialEq for VolumeConfig
Auto Trait Implementations§
impl Freeze for VolumeConfig
impl RefUnwindSafe for VolumeConfig
impl Send for VolumeConfig
impl Sync for VolumeConfig
impl Unpin for VolumeConfig
impl UnsafeUnpin for VolumeConfig
impl UnwindSafe for VolumeConfig
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