Struct google_api_proto::google::spanner::admin::database::v1::CreateDatabaseRequest
source · pub struct CreateDatabaseRequest {
pub parent: String,
pub create_statement: String,
pub extra_statements: Vec<String>,
pub encryption_config: Option<EncryptionConfig>,
pub database_dialect: i32,
pub proto_descriptors: Bytes,
}
Expand description
The request for [CreateDatabase][google.spanner.admin.database.v1.DatabaseAdmin.CreateDatabase].
Fields§
§parent: String
Required. The name of the instance that will serve the new database.
Values are of the form projects/<project>/instances/<instance>
.
create_statement: String
Required. A CREATE DATABASE
statement, which specifies the ID of the
new database. The database ID must conform to the regular expression
[a-z][a-z0-9_\-]*\[a-z0-9\]
and be between 2 and 30 characters in length.
If the database ID is a reserved word or if it contains a hyphen, the
database ID must be enclosed in backticks (`
).
extra_statements: Vec<String>
Optional. A list of DDL statements to run inside the newly created database. Statements can create tables, indexes, etc. These statements execute atomically with the creation of the database: if there is an error in any statement, the database is not created.
encryption_config: Option<EncryptionConfig>
Optional. The encryption configuration for the database. If this field is not specified, Cloud Spanner will encrypt/decrypt all data at rest using Google default encryption.
database_dialect: i32
Optional. The dialect of the Cloud Spanner Database.
proto_descriptors: Bytes
Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements in
‘extra_statements’ above.
Contains a protobuf-serialized
google.protobuf.FileDescriptorSet.
To generate it, install and
run protoc
with –include_imports and –descriptor_set_out. For example,
to generate for moon/shot/app.proto, run
$protoc --proto_path=/app_path --proto_path=/lib_path \
--include_imports \
--descriptor_set_out=descriptors.data \
moon/shot/app.proto
For more details, see protobuffer self description.
Implementations§
source§impl CreateDatabaseRequest
impl CreateDatabaseRequest
sourcepub fn database_dialect(&self) -> DatabaseDialect
pub fn database_dialect(&self) -> DatabaseDialect
Returns the enum value of database_dialect
, or the default if the field is set to an invalid enum value.
sourcepub fn set_database_dialect(&mut self, value: DatabaseDialect)
pub fn set_database_dialect(&mut self, value: DatabaseDialect)
Sets database_dialect
to the provided enum value.
Trait Implementations§
source§impl Clone for CreateDatabaseRequest
impl Clone for CreateDatabaseRequest
source§fn clone(&self) -> CreateDatabaseRequest
fn clone(&self) -> CreateDatabaseRequest
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for CreateDatabaseRequest
impl Debug for CreateDatabaseRequest
source§impl Default for CreateDatabaseRequest
impl Default for CreateDatabaseRequest
source§impl Message for CreateDatabaseRequest
impl Message for CreateDatabaseRequest
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 CreateDatabaseRequest
impl PartialEq for CreateDatabaseRequest
source§fn eq(&self, other: &CreateDatabaseRequest) -> bool
fn eq(&self, other: &CreateDatabaseRequest) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for CreateDatabaseRequest
Auto Trait Implementations§
impl !Freeze for CreateDatabaseRequest
impl RefUnwindSafe for CreateDatabaseRequest
impl Send for CreateDatabaseRequest
impl Sync for CreateDatabaseRequest
impl Unpin for CreateDatabaseRequest
impl UnwindSafe for CreateDatabaseRequest
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