Class: Google::Apis::SpannerV1::CreateDatabaseRequest

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
lib/google/apis/spanner_v1/classes.rb,
lib/google/apis/spanner_v1/representations.rb,
lib/google/apis/spanner_v1/representations.rb

Overview

The request for CreateDatabase.

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(**args) ⇒ CreateDatabaseRequest

Returns a new instance of CreateDatabaseRequest.



1719
1720
1721
# File 'lib/google/apis/spanner_v1/classes.rb', line 1719

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#create_statementString

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] 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 (`). Corresponds to the JSON property createStatement

Returns:

  • (String)


1684
1685
1686
# File 'lib/google/apis/spanner_v1/classes.rb', line 1684

def create_statement
  @create_statement
end

#database_dialectString

Optional. The dialect of the Cloud Spanner Database. Corresponds to the JSON property databaseDialect

Returns:

  • (String)


1689
1690
1691
# File 'lib/google/apis/spanner_v1/classes.rb', line 1689

def database_dialect
  @database_dialect
end

#encryption_configGoogle::Apis::SpannerV1::EncryptionConfig

Encryption configuration for a Cloud Spanner database. Corresponds to the JSON property encryptionConfig



1694
1695
1696
# File 'lib/google/apis/spanner_v1/classes.rb', line 1694

def encryption_config
  @encryption_config
end

#extra_statementsArray<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. Corresponds to the JSON property extraStatements

Returns:

  • (Array<String>)


1702
1703
1704
# File 'lib/google/apis/spanner_v1/classes.rb', line 1702

def extra_statements
  @extra_statements
end

#proto_descriptorsString

Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements in ' extra_statements'. Contains a protobuf-serialized google.protobuf. FileDescriptorSet descriptor set. 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. Corresponds to the JSON property protoDescriptors NOTE: Values are automatically base64 encoded/decoded in the client library.

Returns:

  • (String)


1717
1718
1719
# File 'lib/google/apis/spanner_v1/classes.rb', line 1717

def proto_descriptors
  @proto_descriptors
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1724
1725
1726
1727
1728
1729
1730
# File 'lib/google/apis/spanner_v1/classes.rb', line 1724

def update!(**args)
  @create_statement = args[:create_statement] if args.key?(:create_statement)
  @database_dialect = args[:database_dialect] if args.key?(:database_dialect)
  @encryption_config = args[:encryption_config] if args.key?(:encryption_config)
  @extra_statements = args[:extra_statements] if args.key?(:extra_statements)
  @proto_descriptors = args[:proto_descriptors] if args.key?(:proto_descriptors)
end