pub struct Table {
pub name: String,
pub cluster_states: HashMap<String, ClusterState>,
pub column_families: HashMap<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: HashMap<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: HashMap<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
.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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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