Struct gapi_grpc::google::spanner::admin::database::v1::Database[][src]

pub struct Database {
    pub name: String,
    pub state: i32,
    pub create_time: Option<Timestamp>,
    pub restore_info: Option<RestoreInfo>,
    pub encryption_config: Option<EncryptionConfig>,
    pub encryption_info: Vec<EncryptionInfo>,
    pub version_retention_period: String,
    pub earliest_version_time: Option<Timestamp>,
}

A Cloud Spanner database.

Fields

name: String

Required. The name of the database. Values are of the form projects/<project>/instances/<instance>/databases/<database>, where <database> is as specified in the CREATE DATABASE statement. This name can be passed to other API methods to identify the database.

state: i32

Output only. The current database state.

create_time: Option<Timestamp>

Output only. If exists, the time at which the database creation started.

restore_info: Option<RestoreInfo>

Output only. Applicable only for restored databases. Contains information about the restore source.

encryption_config: Option<EncryptionConfig>

Output only. For databases that are using customer managed encryption, this field contains the encryption configuration for the database. For databases that are using Google default or other types of encryption, this field is empty.

encryption_info: Vec<EncryptionInfo>

Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as encryption state and the Cloud KMS key versions that are in use.

For databases that are using Google default or other types of encryption, this field is empty.

This field is propagated lazily from the backend. There might be a delay from when a key version is being used and when it appears in this field.

version_retention_period: String

Output only. The period in which Cloud Spanner retains all versions of data for the database. This is the same as the value of version_retention_period database option set using [UpdateDatabaseDdl][google.spanner.admin.database.v1.DatabaseAdmin.UpdateDatabaseDdl]. Defaults to 1 hour, if not set.

earliest_version_time: Option<Timestamp>

Output only. Earliest timestamp at which older versions of the data can be read. This value is continuously updated by Cloud Spanner and becomes stale the moment it is queried. If you are using this value to recover data, make sure to account for the time from the moment when the value is queried to the moment when you initiate the recovery.

Implementations

impl Database[src]

pub fn state(&self) -> State[src]

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

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

Sets state to the provided enum value.

Trait Implementations

impl Clone for Database[src]

impl Debug for Database[src]

impl Default for Database[src]

impl Message for Database[src]

impl PartialEq<Database> for Database[src]

impl StructuralPartialEq for Database[src]

Auto Trait Implementations

impl RefUnwindSafe for Database

impl Send for Database

impl Sync for Database

impl Unpin for Database

impl UnwindSafe for Database

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> From<T> for T[src]

impl<T> Instrument for T[src]

impl<T> Instrument for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> IntoRequest<T> for T[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<V, T> VZip<V> for T where
    V: MultiLane<T>, 
[src]

impl<T> WithSubscriber for T[src]