#[non_exhaustive]pub struct StorageResource {
pub config: Option<StorageResourceConfig>,
pub reference: Option<Reference>,
/* private fields */
}Expand description
A resource representing a form of persistent storage that is accessible to compute resources in the cluster.
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.config: Option<StorageResourceConfig>Required. Immutable. Configuration for this storage resource, which describes how it should be created or imported. This field only controls how the storage resource is initially created or imported. Subsequent changes to the storage resource should be made via the resource’s API and will not be reflected in the configuration.
reference: Option<Reference>Reference to the storage resource in Google Cloud. Exactly one of these fields will be populated based on the configured type of storage resource.
Implementations§
Source§impl StorageResource
impl StorageResource
Sourcepub fn set_config<T>(self, v: T) -> Selfwhere
T: Into<StorageResourceConfig>,
pub fn set_config<T>(self, v: T) -> Selfwhere
T: Into<StorageResourceConfig>,
Sourcepub fn set_or_clear_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<StorageResourceConfig>,
pub fn set_or_clear_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<StorageResourceConfig>,
Sets or clears the value of config.
§Example
use google_cloud_hypercomputecluster_v1::model::StorageResourceConfig;
let x = StorageResource::new().set_or_clear_config(Some(StorageResourceConfig::default()/* use setters */));
let x = StorageResource::new().set_or_clear_config(None::<StorageResourceConfig>);Sourcepub fn set_reference<T: Into<Option<Reference>>>(self, v: T) -> Self
pub fn set_reference<T: Into<Option<Reference>>>(self, v: T) -> Self
Sets the value of reference.
Note that all the setters affecting reference are mutually
exclusive.
§Example
use google_cloud_hypercomputecluster_v1::model::FilestoreReference;
let x = StorageResource::new().set_reference(Some(
google_cloud_hypercomputecluster_v1::model::storage_resource::Reference::Filestore(FilestoreReference::default().into())));Sourcepub fn filestore(&self) -> Option<&Box<FilestoreReference>>
pub fn filestore(&self) -> Option<&Box<FilestoreReference>>
The value of reference
if it holds a Filestore, None if the field is not set or
holds a different branch.
Sourcepub fn set_filestore<T: Into<Box<FilestoreReference>>>(self, v: T) -> Self
pub fn set_filestore<T: Into<Box<FilestoreReference>>>(self, v: T) -> Self
Sets the value of reference
to hold a Filestore.
Note that all the setters affecting reference are
mutually exclusive.
§Example
use google_cloud_hypercomputecluster_v1::model::FilestoreReference;
let x = StorageResource::new().set_filestore(FilestoreReference::default()/* use setters */);
assert!(x.filestore().is_some());
assert!(x.bucket().is_none());
assert!(x.lustre().is_none());Sourcepub fn bucket(&self) -> Option<&Box<BucketReference>>
pub fn bucket(&self) -> Option<&Box<BucketReference>>
The value of reference
if it holds a Bucket, None if the field is not set or
holds a different branch.
Sourcepub fn set_bucket<T: Into<Box<BucketReference>>>(self, v: T) -> Self
pub fn set_bucket<T: Into<Box<BucketReference>>>(self, v: T) -> Self
Sets the value of reference
to hold a Bucket.
Note that all the setters affecting reference are
mutually exclusive.
§Example
use google_cloud_hypercomputecluster_v1::model::BucketReference;
let x = StorageResource::new().set_bucket(BucketReference::default()/* use setters */);
assert!(x.bucket().is_some());
assert!(x.filestore().is_none());
assert!(x.lustre().is_none());Sourcepub fn lustre(&self) -> Option<&Box<LustreReference>>
pub fn lustre(&self) -> Option<&Box<LustreReference>>
The value of reference
if it holds a Lustre, None if the field is not set or
holds a different branch.
Sourcepub fn set_lustre<T: Into<Box<LustreReference>>>(self, v: T) -> Self
pub fn set_lustre<T: Into<Box<LustreReference>>>(self, v: T) -> Self
Sets the value of reference
to hold a Lustre.
Note that all the setters affecting reference are
mutually exclusive.
§Example
use google_cloud_hypercomputecluster_v1::model::LustreReference;
let x = StorageResource::new().set_lustre(LustreReference::default()/* use setters */);
assert!(x.lustre().is_some());
assert!(x.filestore().is_none());
assert!(x.bucket().is_none());Trait Implementations§
Source§impl Clone for StorageResource
impl Clone for StorageResource
Source§impl Debug for StorageResource
impl Debug for StorageResource
Source§impl Default for StorageResource
impl Default for StorageResource
Source§impl Message for StorageResource
impl Message for StorageResource
Source§impl PartialEq for StorageResource
impl PartialEq for StorageResource
impl StructuralPartialEq for StorageResource
Auto Trait Implementations§
impl Freeze for StorageResource
impl RefUnwindSafe for StorageResource
impl Send for StorageResource
impl Sync for StorageResource
impl Unpin for StorageResource
impl UnsafeUnpin for StorageResource
impl UnwindSafe for StorageResource
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