Struct google_api_proto::google::cloud::redis::cluster::v1::Cluster

source ·
pub struct Cluster {
Show 19 fields pub name: String, pub create_time: Option<Timestamp>, pub state: i32, pub uid: String, pub replica_count: Option<i32>, pub authorization_mode: i32, pub transit_encryption_mode: i32, pub size_gb: Option<i32>, pub shard_count: Option<i32>, pub psc_configs: Vec<PscConfig>, pub discovery_endpoints: Vec<DiscoveryEndpoint>, pub psc_connections: Vec<PscConnection>, pub state_info: Option<StateInfo>, pub node_type: i32, pub persistence_config: Option<ClusterPersistenceConfig>, pub redis_configs: BTreeMap<String, String>, pub precise_size_gb: Option<f64>, pub zone_distribution_config: Option<ZoneDistributionConfig>, pub deletion_protection_enabled: Option<bool>,
}
Expand description

A cluster instance.

Fields§

§name: String

Required. Unique name of the resource in this scope including project and location using the form: projects/{project_id}/locations/{location_id}/clusters/{cluster_id}

§create_time: Option<Timestamp>

Output only. The timestamp associated with the cluster creation request.

§state: i32

Output only. The current state of this cluster. Can be CREATING, READY, UPDATING, DELETING and SUSPENDED

§uid: String

Output only. System assigned, unique identifier for the cluster.

§replica_count: Option<i32>

Optional. The number of replica nodes per shard.

§authorization_mode: i32

Optional. The authorization mode of the Redis cluster. If not provided, auth feature is disabled for the cluster.

§transit_encryption_mode: i32

Optional. The in-transit encryption for the Redis cluster. If not provided, encryption is disabled for the cluster.

§size_gb: Option<i32>

Output only. Redis memory size in GB for the entire cluster rounded up to the next integer.

§shard_count: Option<i32>

Required. Number of shards for the Redis cluster.

§psc_configs: Vec<PscConfig>

Required. Each PscConfig configures the consumer network where IPs will be designated to the cluster for client access through Private Service Connect Automation. Currently, only one PscConfig is supported.

§discovery_endpoints: Vec<DiscoveryEndpoint>

Output only. Endpoints created on each given network, for Redis clients to connect to the cluster. Currently only one discovery endpoint is supported.

§psc_connections: Vec<PscConnection>

Output only. PSC connections for discovery of the cluster topology and accessing the cluster.

§state_info: Option<StateInfo>

Output only. Additional information about the current state of the cluster.

§node_type: i32

Optional. The type of a redis node in the cluster. NodeType determines the underlying machine-type of a redis node.

§persistence_config: Option<ClusterPersistenceConfig>

Optional. Persistence config (RDB, AOF) for the cluster.

§redis_configs: BTreeMap<String, String>

Optional. Key/Value pairs of customer overrides for mutable Redis Configs

§precise_size_gb: Option<f64>

Output only. Precise value of redis memory size in GB for the entire cluster.

§zone_distribution_config: Option<ZoneDistributionConfig>

Optional. This config will be used to determine how the customer wants us to distribute cluster resources within the region.

§deletion_protection_enabled: Option<bool>

Optional. The delete operation will fail when the value is set to true.

Implementations§

source§

impl Cluster

source

pub fn state(&self) -> State

Returns the enum value of state, or the default if the field is set to an invalid enum value.

source

pub fn set_state(&mut self, value: State)

Sets state to the provided enum value.

source

pub fn replica_count(&self) -> i32

Returns the value of replica_count, or the default value if replica_count is unset.

source

pub fn authorization_mode(&self) -> AuthorizationMode

Returns the enum value of authorization_mode, or the default if the field is set to an invalid enum value.

source

pub fn set_authorization_mode(&mut self, value: AuthorizationMode)

Sets authorization_mode to the provided enum value.

source

pub fn transit_encryption_mode(&self) -> TransitEncryptionMode

Returns the enum value of transit_encryption_mode, or the default if the field is set to an invalid enum value.

source

pub fn set_transit_encryption_mode(&mut self, value: TransitEncryptionMode)

Sets transit_encryption_mode to the provided enum value.

source

pub fn size_gb(&self) -> i32

Returns the value of size_gb, or the default value if size_gb is unset.

source

pub fn shard_count(&self) -> i32

Returns the value of shard_count, or the default value if shard_count is unset.

source

pub fn node_type(&self) -> NodeType

Returns the enum value of node_type, or the default if the field is set to an invalid enum value.

source

pub fn set_node_type(&mut self, value: NodeType)

Sets node_type to the provided enum value.

source

pub fn precise_size_gb(&self) -> f64

Returns the value of precise_size_gb, or the default value if precise_size_gb is unset.

source

pub fn deletion_protection_enabled(&self) -> bool

Returns the value of deletion_protection_enabled, or the default value if deletion_protection_enabled is unset.

Trait Implementations§

source§

impl Clone for Cluster

source§

fn clone(&self) -> Cluster

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 Debug for Cluster

source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
source§

impl Default for Cluster

source§

fn default() -> Self

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

impl Message for Cluster

source§

fn encoded_len(&self) -> usize

Returns the encoded length of the message without a length delimiter.
source§

fn clear(&mut self)

Clears the message, resetting all fields to their default.
source§

fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message to a buffer. Read more
source§

fn encode_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message to a newly allocated buffer.
source§

fn encode_length_delimited( &self, buf: &mut impl BufMut, ) -> Result<(), EncodeError>
where Self: Sized,

Encodes the message with a length-delimiter to a buffer. Read more
source§

fn encode_length_delimited_to_vec(&self) -> Vec<u8>
where Self: Sized,

Encodes the message with a length-delimiter to a newly allocated buffer.
source§

fn decode(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes an instance of the message from a buffer. Read more
source§

fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>
where Self: Default,

Decodes a length-delimited instance of the message from the buffer.
source§

fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes an instance of the message from a buffer, and merges it into self. Read more
source§

fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>
where Self: Sized,

Decodes a length-delimited instance of the message from buffer, and merges it into self.
source§

impl PartialEq for Cluster

source§

fn eq(&self, other: &Cluster) -> bool

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

fn ne(&self, other: &Rhs) -> bool

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl StructuralPartialEq for Cluster

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> From<T> for T

source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> FromRef<T> for T
where T: Clone,

§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoRequest<T> for T

source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
source§

impl<T> ToOwned for T
where T: Clone,

§

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

§

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

§

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.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more