Represents a Database.
Package
@google-cloud/spanner!Constructors
(constructor)(properties)
constructor(properties?: google.spanner.admin.database.v1.IDatabase);Constructs a new Database.
| Type | Name | Description |
|---|---|---|
| IDatabase | properties |
Properties to set |
Properties
createTime
public createTime?: (google.protobuf.ITimestamp|null);Database createTime.
| Type | Description |
|---|---|
| (google.protobuf.ITimestamp|null) |
defaultLeader
public defaultLeader: string;Database defaultLeader.
| Type | Description |
|---|---|
| string |
earliestVersionTime
public earliestVersionTime?: (google.protobuf.ITimestamp|null);Database earliestVersionTime.
| Type | Description |
|---|---|
| (google.protobuf.ITimestamp|null) |
encryptionConfig
public encryptionConfig?: (google.spanner.admin.database.v1.IEncryptionConfig|null);Database encryptionConfig.
| Type | Description |
|---|---|
| (google.spanner.admin.database.v1.IEncryptionConfig|null) |
encryptionInfo
public encryptionInfo: google.spanner.admin.database.v1.IEncryptionInfo[];Database encryptionInfo.
| Type | Description |
|---|---|
| google.spanner.admin.database.v1.IEncryptionInfo[] |
name
public name: string;Database name.
| Type | Description |
|---|---|
| string |
restoreInfo
public restoreInfo?: (google.spanner.admin.database.v1.IRestoreInfo|null);Database restoreInfo.
| Type | Description |
|---|---|
| (google.spanner.admin.database.v1.IRestoreInfo|null) |
state
public state: (google.spanner.admin.database.v1.Database.State|keyof typeof google.spanner.admin.database.v1.Database.State);Database state.
| Type | Description |
|---|---|
| (google.spanner.admin.database.v1.Database.State|keyof typeof google.spanner.admin.database.v1.Database.State) |
versionRetentionPeriod
public versionRetentionPeriod: string;Database versionRetentionPeriod.
| Type | Description |
|---|---|
| string |
Methods
create(properties)
public static create(properties?: google.spanner.admin.database.v1.IDatabase): google.spanner.admin.database.v1.Database;Creates a new Database instance using the specified properties.
| Type | Name | Description |
|---|---|---|
| IDatabase | properties |
Properties to set |
| Type | Description |
|---|---|
| google.spanner.admin.database.v1.Database | Database instance |
decode(reader, length)
public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.admin.database.v1.Database;Decodes a Database message from the specified reader or buffer.
| Type | Name | Description |
|---|---|---|
| ($protobuf.Reader|Uint8Array) | reader |
Reader or buffer to decode from |
| number | length |
Message length if known beforehand |
| Type | Description |
|---|---|
| google.spanner.admin.database.v1.Database | Database |
decodeDelimited(reader)
public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.admin.database.v1.Database;Decodes a Database message from the specified reader or buffer, length delimited.
| Type | Name | Description |
|---|---|---|
| ($protobuf.Reader|Uint8Array) | reader |
Reader or buffer to decode from |
| Type | Description |
|---|---|
| google.spanner.admin.database.v1.Database | Database |
encode(message, writer)
public static encode(message: google.spanner.admin.database.v1.IDatabase, writer?: $protobuf.Writer): $protobuf.Writer;Encodes the specified Database message. Does not implicitly messages.
| Type | Name | Description |
|---|---|---|
| IDatabase | message |
Database message or plain object to encode |
| $protobuf.Writer | writer |
Writer to encode to |
| Type | Description |
|---|---|
| $protobuf.Writer | Writer |
encodeDelimited(message, writer)
public static encodeDelimited(message: google.spanner.admin.database.v1.IDatabase, writer?: $protobuf.Writer): $protobuf.Writer;Encodes the specified Database message, length delimited. Does not implicitly messages.
| Type | Name | Description |
|---|---|---|
| IDatabase | message |
Database message or plain object to encode |
| $protobuf.Writer | writer |
Writer to encode to |
| Type | Description |
|---|---|
| $protobuf.Writer | Writer |
fromObject(object)
public static fromObject(object: { [k: string]: any }): google.spanner.admin.database.v1.Database;Creates a Database message from a plain object. Also converts values to their respective internal types.
| Type | Name | Description |
|---|---|---|
| { [k: string]: any } | object |
Plain object |
| Type | Description |
|---|---|
| google.spanner.admin.database.v1.Database | Database |
toJSON()
public toJSON(): { [k: string]: any };Converts this Database to JSON.
| Type | Description |
|---|---|
| { [k: string]: any } | JSON object |
toObject(message, options)
public static toObject(message: google.spanner.admin.database.v1.Database, options?: $protobuf.IConversionOptions): { [k: string]: any };Creates a plain object from a Database message. Also converts values to other types if specified.
| Type | Name | Description |
|---|---|---|
| google.spanner.admin.database.v1.Database | message |
Database |
| $protobuf.IConversionOptions | options |
Conversion options |
| Type | Description |
|---|---|
| { [k: string]: any } | Plain object |
verify(message)
public static verify(message: { [k: string]: any }): (string|null);Verifies a Database message.
| Type | Name | Description |
|---|---|---|
| { [k: string]: any } | message |
Plain object to verify |
| Type | Description |
|---|---|
| (string|null) |
|