#[non_exhaustive]pub struct NewBucketConfig {
pub bucket: String,
pub hierarchical_namespace: Option<GcsHierarchicalNamespaceConfig>,
pub option: Option<Option>,
/* private fields */
}Expand description
When set in a StorageResourceConfig, indicates that a new Google Cloud Storage bucket should be created.
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.bucket: StringRequired. Immutable. Name of the Cloud Storage bucket to create.
hierarchical_namespace: Option<GcsHierarchicalNamespaceConfig>Optional. Immutable. If set, indicates that the bucket should use hierarchical namespaces.
option: Option<Option>Storage class of the bucket, which can be set automatically or explicitly.
Implementations§
Source§impl NewBucketConfig
impl NewBucketConfig
Sourcepub fn set_bucket<T: Into<String>>(self, v: T) -> Self
pub fn set_bucket<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_hierarchical_namespace<T>(self, v: T) -> Selfwhere
T: Into<GcsHierarchicalNamespaceConfig>,
pub fn set_hierarchical_namespace<T>(self, v: T) -> Selfwhere
T: Into<GcsHierarchicalNamespaceConfig>,
Sets the value of hierarchical_namespace.
§Example
use google_cloud_hypercomputecluster_v1::model::GcsHierarchicalNamespaceConfig;
let x = NewBucketConfig::new().set_hierarchical_namespace(GcsHierarchicalNamespaceConfig::default()/* use setters */);Sourcepub fn set_or_clear_hierarchical_namespace<T>(self, v: Option<T>) -> Selfwhere
T: Into<GcsHierarchicalNamespaceConfig>,
pub fn set_or_clear_hierarchical_namespace<T>(self, v: Option<T>) -> Selfwhere
T: Into<GcsHierarchicalNamespaceConfig>,
Sets or clears the value of hierarchical_namespace.
§Example
use google_cloud_hypercomputecluster_v1::model::GcsHierarchicalNamespaceConfig;
let x = NewBucketConfig::new().set_or_clear_hierarchical_namespace(Some(GcsHierarchicalNamespaceConfig::default()/* use setters */));
let x = NewBucketConfig::new().set_or_clear_hierarchical_namespace(None::<GcsHierarchicalNamespaceConfig>);Sourcepub fn set_option<T: Into<Option<Option>>>(self, v: T) -> Self
pub fn set_option<T: Into<Option<Option>>>(self, v: T) -> Self
Sets the value of option.
Note that all the setters affecting option are mutually
exclusive.
§Example
use google_cloud_hypercomputecluster_v1::model::new_bucket_config::StorageClass;
let x0 = NewBucketConfig::new().set_option(Some(
google_cloud_hypercomputecluster_v1::model::new_bucket_config::Option::StorageClass(StorageClass::Standard)));
let x1 = NewBucketConfig::new().set_option(Some(
google_cloud_hypercomputecluster_v1::model::new_bucket_config::Option::StorageClass(StorageClass::Nearline)));
let x2 = NewBucketConfig::new().set_option(Some(
google_cloud_hypercomputecluster_v1::model::new_bucket_config::Option::StorageClass(StorageClass::Coldline)));Sourcepub fn autoclass(&self) -> Option<&Box<GcsAutoclassConfig>>
pub fn autoclass(&self) -> Option<&Box<GcsAutoclassConfig>>
The value of option
if it holds a Autoclass, None if the field is not set or
holds a different branch.
Sourcepub fn set_autoclass<T: Into<Box<GcsAutoclassConfig>>>(self, v: T) -> Self
pub fn set_autoclass<T: Into<Box<GcsAutoclassConfig>>>(self, v: T) -> Self
Sets the value of option
to hold a Autoclass.
Note that all the setters affecting option are
mutually exclusive.
§Example
use google_cloud_hypercomputecluster_v1::model::GcsAutoclassConfig;
let x = NewBucketConfig::new().set_autoclass(GcsAutoclassConfig::default()/* use setters */);
assert!(x.autoclass().is_some());
assert!(x.storage_class().is_none());Sourcepub fn storage_class(&self) -> Option<&StorageClass>
pub fn storage_class(&self) -> Option<&StorageClass>
The value of option
if it holds a StorageClass, None if the field is not set or
holds a different branch.
Sourcepub fn set_storage_class<T: Into<StorageClass>>(self, v: T) -> Self
pub fn set_storage_class<T: Into<StorageClass>>(self, v: T) -> Self
Sets the value of option
to hold a StorageClass.
Note that all the setters affecting option are
mutually exclusive.
§Example
use google_cloud_hypercomputecluster_v1::model::new_bucket_config::StorageClass;
let x0 = NewBucketConfig::new().set_storage_class(StorageClass::Standard);
let x1 = NewBucketConfig::new().set_storage_class(StorageClass::Nearline);
let x2 = NewBucketConfig::new().set_storage_class(StorageClass::Coldline);
assert!(x0.storage_class().is_some());
assert!(x0.autoclass().is_none());
assert!(x1.storage_class().is_some());
assert!(x1.autoclass().is_none());
assert!(x2.storage_class().is_some());
assert!(x2.autoclass().is_none());Trait Implementations§
Source§impl Clone for NewBucketConfig
impl Clone for NewBucketConfig
Source§fn clone(&self) -> NewBucketConfig
fn clone(&self) -> NewBucketConfig
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 NewBucketConfig
impl Debug for NewBucketConfig
Source§impl Default for NewBucketConfig
impl Default for NewBucketConfig
Source§fn default() -> NewBucketConfig
fn default() -> NewBucketConfig
Source§impl Message for NewBucketConfig
impl Message for NewBucketConfig
Source§impl PartialEq for NewBucketConfig
impl PartialEq for NewBucketConfig
impl StructuralPartialEq for NewBucketConfig
Auto Trait Implementations§
impl Freeze for NewBucketConfig
impl RefUnwindSafe for NewBucketConfig
impl Send for NewBucketConfig
impl Sync for NewBucketConfig
impl Unpin for NewBucketConfig
impl UnsafeUnpin for NewBucketConfig
impl UnwindSafe for NewBucketConfig
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