#[non_exhaustive]pub struct Cluster {
pub name: String,
pub location: String,
pub state: State,
pub serve_nodes: i32,
pub node_scaling_factor: NodeScalingFactor,
pub default_storage_type: StorageType,
pub encryption_config: Option<EncryptionConfig>,
pub config: Option<Config>,
/* private fields */
}Expand description
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: StringThe unique name of the cluster. Values are of the form
projects/{project}/instances/{instance}/clusters/[a-z][-a-z0-9]*.
location: StringImmutable. The location where this cluster’s nodes and storage reside. For
best performance, clients should be located as close as possible to this
cluster. Currently only zones are supported, so values should be of the
form projects/{project}/locations/{zone}.
state: StateOutput only. The current state of the cluster.
serve_nodes: i32The number of nodes in the cluster. If no value is set, Cloud Bigtable automatically allocates nodes based on your data footprint and optimized for 50% storage utilization.
node_scaling_factor: NodeScalingFactorImmutable. The node scaling factor of this cluster.
default_storage_type: StorageTypeImmutable. The type of storage used by this cluster to serve its parent instance’s tables, unless explicitly overridden.
encryption_config: Option<EncryptionConfig>Immutable. The encryption configuration for CMEK-protected clusters.
config: Option<Config>Implementations§
Source§impl Cluster
impl Cluster
Sourcepub fn set_location<T: Into<String>>(self, v: T) -> Self
pub fn set_location<T: Into<String>>(self, v: T) -> Self
Sourcepub fn set_serve_nodes<T: Into<i32>>(self, v: T) -> Self
pub fn set_serve_nodes<T: Into<i32>>(self, v: T) -> Self
Sourcepub fn set_node_scaling_factor<T: Into<NodeScalingFactor>>(self, v: T) -> Self
pub fn set_node_scaling_factor<T: Into<NodeScalingFactor>>(self, v: T) -> Self
Sets the value of node_scaling_factor.
§Example
use google_cloud_bigtable_admin_v2::model::cluster::NodeScalingFactor;
let x0 = Cluster::new().set_node_scaling_factor(NodeScalingFactor::NodeScalingFactor1X);
let x1 = Cluster::new().set_node_scaling_factor(NodeScalingFactor::NodeScalingFactor2X);Sourcepub fn set_default_storage_type<T: Into<StorageType>>(self, v: T) -> Self
pub fn set_default_storage_type<T: Into<StorageType>>(self, v: T) -> Self
Sets the value of default_storage_type.
§Example
use google_cloud_bigtable_admin_v2::model::StorageType;
let x0 = Cluster::new().set_default_storage_type(StorageType::Ssd);
let x1 = Cluster::new().set_default_storage_type(StorageType::Hdd);Sourcepub fn set_encryption_config<T>(self, v: T) -> Selfwhere
T: Into<EncryptionConfig>,
pub fn set_encryption_config<T>(self, v: T) -> Selfwhere
T: Into<EncryptionConfig>,
Sets the value of encryption_config.
§Example
use google_cloud_bigtable_admin_v2::model::cluster::EncryptionConfig;
let x = Cluster::new().set_encryption_config(EncryptionConfig::default()/* use setters */);Sourcepub fn set_or_clear_encryption_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<EncryptionConfig>,
pub fn set_or_clear_encryption_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<EncryptionConfig>,
Sets or clears the value of encryption_config.
§Example
use google_cloud_bigtable_admin_v2::model::cluster::EncryptionConfig;
let x = Cluster::new().set_or_clear_encryption_config(Some(EncryptionConfig::default()/* use setters */));
let x = Cluster::new().set_or_clear_encryption_config(None::<EncryptionConfig>);Sourcepub fn set_config<T: Into<Option<Config>>>(self, v: T) -> Self
pub fn set_config<T: Into<Option<Config>>>(self, v: T) -> Self
Sets the value of config.
Note that all the setters affecting config are mutually
exclusive.
§Example
use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
let x = Cluster::new().set_config(Some(
google_cloud_bigtable_admin_v2::model::cluster::Config::ClusterConfig(ClusterConfig::default().into())));Sourcepub fn cluster_config(&self) -> Option<&Box<ClusterConfig>>
pub fn cluster_config(&self) -> Option<&Box<ClusterConfig>>
The value of config
if it holds a ClusterConfig, None if the field is not set or
holds a different branch.
Sourcepub fn set_cluster_config<T: Into<Box<ClusterConfig>>>(self, v: T) -> Self
pub fn set_cluster_config<T: Into<Box<ClusterConfig>>>(self, v: T) -> Self
Sets the value of config
to hold a ClusterConfig.
Note that all the setters affecting config are
mutually exclusive.
§Example
use google_cloud_bigtable_admin_v2::model::cluster::ClusterConfig;
let x = Cluster::new().set_cluster_config(ClusterConfig::default()/* use setters */);
assert!(x.cluster_config().is_some());Trait Implementations§
impl StructuralPartialEq for Cluster
Auto Trait Implementations§
impl Freeze for Cluster
impl RefUnwindSafe for Cluster
impl Send for Cluster
impl Sync for Cluster
impl Unpin for Cluster
impl UnsafeUnpin for Cluster
impl UnwindSafe for Cluster
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