pub struct Table {
pub name: String,
pub cluster_states: BTreeMap<String, ClusterState>,
pub column_families: BTreeMap<String, ColumnFamily>,
pub granularity: i32,
pub restore_info: Option<RestoreInfo>,
pub change_stream_config: Option<ChangeStreamConfig>,
pub deletion_protection: bool,
pub automated_backup_config: Option<AutomatedBackupConfig>,
}
Expand description
A collection of user data indexed by row, column, and timestamp. Each table is served using the resources of its parent cluster.
Fields§
§name: String
The unique name of the table. Values are of the form
projects/{project}/instances/{instance}/tables/[_a-zA-Z0-9][-_.a-zA-Z0-9]*
.
Views: NAME_ONLY
, SCHEMA_VIEW
, REPLICATION_VIEW
, FULL
cluster_states: BTreeMap<String, ClusterState>
Output only. Map from cluster ID to per-cluster table state.
If it could not be determined whether or not the table has data in a
particular cluster (for example, if its zone is unavailable), then
there will be an entry for the cluster with UNKNOWN replication_status
.
Views: REPLICATION_VIEW
, ENCRYPTION_VIEW
, FULL
column_families: BTreeMap<String, ColumnFamily>
The column families configured for this table, mapped by column family ID.
Views: SCHEMA_VIEW
, STATS_VIEW
, FULL
granularity: i32
Immutable. The granularity (i.e. MILLIS
) at which timestamps are stored
in this table. Timestamps not matching the granularity will be rejected. If
unspecified at creation time, the value will be set to MILLIS
. Views:
SCHEMA_VIEW
, FULL
.
restore_info: Option<RestoreInfo>
Output only. If this table was restored from another data source (e.g. a backup), this field will be populated with information about the restore.
change_stream_config: Option<ChangeStreamConfig>
If specified, enable the change stream on this table. Otherwise, the change stream is disabled and the change stream is not retained.
deletion_protection: bool
Set to true to make the table protected against data loss. i.e. deleting the following resources through Admin APIs are prohibited:
- The table.
- The column families in the table.
- The instance containing the table.
Note one can still delete the data stored in the table through Data APIs.
automated_backup_config: Option<AutomatedBackupConfig>
Implementations§
source§impl Table
impl Table
sourcepub fn granularity(&self) -> TimestampGranularity
pub fn granularity(&self) -> TimestampGranularity
Returns the enum value of granularity
, or the default if the field is set to an invalid enum value.
sourcepub fn set_granularity(&mut self, value: TimestampGranularity)
pub fn set_granularity(&mut self, value: TimestampGranularity)
Sets granularity
to the provided enum value.
Trait Implementations§
source§impl Message for Table
impl Message for Table
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for Table
impl PartialEq for Table
impl StructuralPartialEq for Table
Auto Trait Implementations§
impl Freeze for Table
impl RefUnwindSafe for Table
impl Send for Table
impl Sync for Table
impl Unpin for Table
impl UnwindSafe for Table
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<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§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