googleapis
Version:
Google APIs Client Library for Node.js
863 lines • 315 kB
TypeScript
/// <reference types="node" />
import { OAuth2Client, JWT, Compute, UserRefreshClient, BaseExternalAccountClient, GaxiosPromise, GoogleConfigurable, MethodOptions, StreamMethodOptions, GlobalOptions, GoogleAuth, BodyResponseCallback, APIRequestContext } from 'googleapis-common';
import { Readable } from 'stream';
export declare namespace spanner_v1 {
export interface Options extends GlobalOptions {
version: 'v1';
}
interface StandardParameters {
/**
* Auth client or API Key for the request
*/
auth?: string | OAuth2Client | JWT | Compute | UserRefreshClient | BaseExternalAccountClient | GoogleAuth;
/**
* V1 error format.
*/
'$.xgafv'?: string;
/**
* OAuth access token.
*/
access_token?: string;
/**
* Data format for response.
*/
alt?: string;
/**
* JSONP
*/
callback?: string;
/**
* Selector specifying which fields to include in a partial response.
*/
fields?: string;
/**
* API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.
*/
key?: string;
/**
* OAuth 2.0 token for the current user.
*/
oauth_token?: string;
/**
* Returns response with indentations and line breaks.
*/
prettyPrint?: boolean;
/**
* Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.
*/
quotaUser?: string;
/**
* Legacy upload protocol for media (e.g. "media", "multipart").
*/
uploadType?: string;
/**
* Upload protocol for media (e.g. "raw", "multipart").
*/
upload_protocol?: string;
}
/**
* Cloud Spanner API
*
* Cloud Spanner is a managed, mission-critical, globally consistent and scalable relational database service.
*
* @example
* ```js
* const {google} = require('googleapis');
* const spanner = google.spanner('v1');
* ```
*/
export class Spanner {
context: APIRequestContext;
projects: Resource$Projects;
scans: Resource$Scans;
constructor(options: GlobalOptions, google?: GoogleConfigurable);
}
/**
* A backup of a Cloud Spanner database.
*/
export interface Schema$Backup {
/**
* Output only. The time the CreateBackup request is received. If the request does not specify `version_time`, the `version_time` of the backup will be equivalent to the `create_time`.
*/
createTime?: string | null;
/**
* Required for the CreateBackup operation. Name of the database from which this backup was created. This needs to be in the same instance as the backup. Values are of the form `projects//instances//databases/`.
*/
database?: string | null;
/**
* Output only. The database dialect information for the backup.
*/
databaseDialect?: string | null;
/**
* Output only. The encryption information for the backup.
*/
encryptionInfo?: Schema$EncryptionInfo;
/**
* Required for the CreateBackup operation. The expiration time of the backup, with microseconds granularity that must be at least 6 hours and at most 366 days from the time the CreateBackup request is processed. Once the `expire_time` has passed, the backup is eligible to be automatically deleted by Cloud Spanner to free the resources used by the backup.
*/
expireTime?: string | null;
/**
* Output only. The max allowed expiration time of the backup, with microseconds granularity. A backup's expiration time can be configured in multiple APIs: CreateBackup, UpdateBackup, CopyBackup. When updating or copying an existing backup, the expiration time specified must be less than `Backup.max_expire_time`.
*/
maxExpireTime?: string | null;
/**
* Output only for the CreateBackup operation. Required for the UpdateBackup operation. A globally unique identifier for the backup which cannot be changed. Values are of the form `projects//instances//backups/a-z*[a-z0-9]` The final segment of the name must be between 2 and 60 characters in length. The backup is stored in the location(s) specified in the instance configuration of the instance containing the backup, identified by the prefix of the backup name of the form `projects//instances/`.
*/
name?: string | null;
/**
* Output only. The names of the destination backups being created by copying this source backup. The backup names are of the form `projects//instances//backups/`. Referencing backups may exist in different instances. The existence of any referencing backup prevents the backup from being deleted. When the copy operation is done (either successfully completed or cancelled or the destination backup is deleted), the reference to the backup is removed.
*/
referencingBackups?: string[] | null;
/**
* Output only. The names of the restored databases that reference the backup. The database names are of the form `projects//instances//databases/`. Referencing databases may exist in different instances. The existence of any referencing database prevents the backup from being deleted. When a restored database from the backup enters the `READY` state, the reference to the backup is removed.
*/
referencingDatabases?: string[] | null;
/**
* Output only. Size of the backup in bytes.
*/
sizeBytes?: string | null;
/**
* Output only. The current state of the backup.
*/
state?: string | null;
/**
* The backup will contain an externally consistent copy of the database at the timestamp specified by `version_time`. If `version_time` is not specified, the system will set `version_time` to the `create_time` of the backup.
*/
versionTime?: string | null;
}
/**
* Information about a backup.
*/
export interface Schema$BackupInfo {
/**
* Name of the backup.
*/
backup?: string | null;
/**
* The time the CreateBackup request was received.
*/
createTime?: string | null;
/**
* Name of the database the backup was created from.
*/
sourceDatabase?: string | null;
/**
* The backup contains an externally consistent copy of `source_database` at the timestamp specified by `version_time`. If the CreateBackup request did not specify `version_time`, the `version_time` of the backup is equivalent to the `create_time`.
*/
versionTime?: string | null;
}
/**
* The request for BatchCreateSessions.
*/
export interface Schema$BatchCreateSessionsRequest {
/**
* Required. The number of sessions to be created in this batch call. The API may return fewer than the requested number of sessions. If a specific number of sessions are desired, the client can make additional calls to BatchCreateSessions (adjusting session_count as necessary).
*/
sessionCount?: number | null;
/**
* Parameters to be applied to each created session.
*/
sessionTemplate?: Schema$Session;
}
/**
* The response for BatchCreateSessions.
*/
export interface Schema$BatchCreateSessionsResponse {
/**
* The freshly created sessions.
*/
session?: Schema$Session[];
}
/**
* The request for BeginTransaction.
*/
export interface Schema$BeginTransactionRequest {
/**
* Required. Options for the new transaction.
*/
options?: Schema$TransactionOptions;
/**
* Common options for this request. Priority is ignored for this request. Setting the priority in this request_options struct will not do anything. To set the priority for a transaction, set it on the reads and writes that are part of this transaction instead.
*/
requestOptions?: Schema$RequestOptions;
}
/**
* Associates `members`, or principals, with a `role`.
*/
export interface Schema$Binding {
/**
* The condition that is associated with this binding. If the condition evaluates to `true`, then this binding applies to the current request. If the condition evaluates to `false`, then this binding does not apply to the current request. However, a different role binding might grant the same role to one or more of the principals in this binding. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
*/
condition?: Schema$Expr;
/**
* Specifies the principals requesting access for a Google Cloud resource. `members` can have the following values: * `allUsers`: A special identifier that represents anyone who is on the internet; with or without a Google account. * `allAuthenticatedUsers`: A special identifier that represents anyone who is authenticated with a Google account or a service account. Does not include identities that come from external identity providers (IdPs) through identity federation. * `user:{emailid\}`: An email address that represents a specific Google account. For example, `alice@example.com` . * `serviceAccount:{emailid\}`: An email address that represents a Google service account. For example, `my-other-app@appspot.gserviceaccount.com`. * `serviceAccount:{projectid\}.svc.id.goog[{namespace\}/{kubernetes-sa\}]`: An identifier for a [Kubernetes service account](https://cloud.google.com/kubernetes-engine/docs/how-to/kubernetes-service-accounts). For example, `my-project.svc.id.goog[my-namespace/my-kubernetes-sa]`. * `group:{emailid\}`: An email address that represents a Google group. For example, `admins@example.com`. * `domain:{domain\}`: The G Suite domain (primary) that represents all the users of that domain. For example, `google.com` or `example.com`. * `deleted:user:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a user that has been recently deleted. For example, `alice@example.com?uid=123456789012345678901`. If the user is recovered, this value reverts to `user:{emailid\}` and the recovered user retains the role in the binding. * `deleted:serviceAccount:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a service account that has been recently deleted. For example, `my-other-app@appspot.gserviceaccount.com?uid=123456789012345678901`. If the service account is undeleted, this value reverts to `serviceAccount:{emailid\}` and the undeleted service account retains the role in the binding. * `deleted:group:{emailid\}?uid={uniqueid\}`: An email address (plus unique identifier) representing a Google group that has been recently deleted. For example, `admins@example.com?uid=123456789012345678901`. If the group is recovered, this value reverts to `group:{emailid\}` and the recovered group retains the role in the binding.
*/
members?: string[] | null;
/**
* Role that is assigned to the list of `members`, or principals. For example, `roles/viewer`, `roles/editor`, or `roles/owner`.
*/
role?: string | null;
}
/**
* Metadata associated with a parent-child relationship appearing in a PlanNode.
*/
export interface Schema$ChildLink {
/**
* The node to which the link points.
*/
childIndex?: number | null;
/**
* The type of the link. For example, in Hash Joins this could be used to distinguish between the build child and the probe child, or in the case of the child being an output variable, to represent the tag associated with the output variable.
*/
type?: string | null;
/**
* Only present if the child node is SCALAR and corresponds to an output variable of the parent node. The field carries the name of the output variable. For example, a `TableScan` operator that reads rows from a table will have child links to the `SCALAR` nodes representing the output variables created for each column that is read by the operator. The corresponding `variable` fields will be set to the variable names assigned to the columns.
*/
variable?: string | null;
}
/**
* The request for Commit.
*/
export interface Schema$CommitRequest {
/**
* The mutations to be executed when this transaction commits. All mutations are applied atomically, in the order they appear in this list.
*/
mutations?: Schema$Mutation[];
/**
* Common options for this request.
*/
requestOptions?: Schema$RequestOptions;
/**
* If `true`, then statistics related to the transaction will be included in the CommitResponse. Default value is `false`.
*/
returnCommitStats?: boolean | null;
/**
* Execute mutations in a temporary transaction. Note that unlike commit of a previously-started transaction, commit with a temporary transaction is non-idempotent. That is, if the `CommitRequest` is sent to Cloud Spanner more than once (for instance, due to retries in the application, or in the transport library), it is possible that the mutations are executed more than once. If this is undesirable, use BeginTransaction and Commit instead.
*/
singleUseTransaction?: Schema$TransactionOptions;
/**
* Commit a previously-started transaction.
*/
transactionId?: string | null;
}
/**
* The response for Commit.
*/
export interface Schema$CommitResponse {
/**
* The statistics about this Commit. Not returned by default. For more information, see CommitRequest.return_commit_stats.
*/
commitStats?: Schema$CommitStats;
/**
* The Cloud Spanner timestamp at which the transaction committed.
*/
commitTimestamp?: string | null;
}
/**
* Additional statistics about a commit.
*/
export interface Schema$CommitStats {
/**
* The total number of mutations for the transaction. Knowing the `mutation_count` value can help you maximize the number of mutations in a transaction and minimize the number of API round trips. You can also monitor this value to prevent transactions from exceeding the system [limit](https://cloud.google.com/spanner/quotas#limits_for_creating_reading_updating_and_deleting_data). If the number of mutations exceeds the limit, the server returns [INVALID_ARGUMENT](https://cloud.google.com/spanner/docs/reference/rest/v1/Code#ENUM_VALUES.INVALID_ARGUMENT).
*/
mutationCount?: string | null;
}
/**
* A message representing context for a KeyRangeInfo, including a label, value, unit, and severity.
*/
export interface Schema$ContextValue {
/**
* The label for the context value. e.g. "latency".
*/
label?: Schema$LocalizedString;
/**
* The severity of this context.
*/
severity?: string | null;
/**
* The unit of the context value.
*/
unit?: string | null;
/**
* The value for the context.
*/
value?: number | null;
}
/**
* Encryption configuration for the copied backup.
*/
export interface Schema$CopyBackupEncryptionConfig {
/**
* Required. The encryption type of the backup.
*/
encryptionType?: string | null;
/**
* Optional. The Cloud KMS key that will be used to protect the backup. This field should be set only when encryption_type is `CUSTOMER_MANAGED_ENCRYPTION`. Values are of the form `projects//locations//keyRings//cryptoKeys/`.
*/
kmsKeyName?: string | null;
}
/**
* Metadata type for the operation returned by CopyBackup.
*/
export interface Schema$CopyBackupMetadata {
/**
* The time at which cancellation of CopyBackup operation was received. Operations.CancelOperation starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
*/
cancelTime?: string | null;
/**
* The name of the backup being created through the copy operation. Values are of the form `projects//instances//backups/`.
*/
name?: string | null;
/**
* The progress of the CopyBackup operation.
*/
progress?: Schema$OperationProgress;
/**
* The name of the source backup that is being copied. Values are of the form `projects//instances//backups/`.
*/
sourceBackup?: string | null;
}
/**
* The request for CopyBackup.
*/
export interface Schema$CopyBackupRequest {
/**
* Required. The id of the backup copy. The `backup_id` appended to `parent` forms the full backup_uri of the form `projects//instances//backups/`.
*/
backupId?: string | null;
/**
* Optional. The encryption configuration used to encrypt the backup. If this field is not specified, the backup will use the same encryption configuration as the source backup by default, namely encryption_type = `USE_CONFIG_DEFAULT_OR_BACKUP_ENCRYPTION`.
*/
encryptionConfig?: Schema$CopyBackupEncryptionConfig;
/**
* Required. The expiration time of the backup in microsecond granularity. The expiration time must be at least 6 hours and at most 366 days from the `create_time` of the source backup. Once the `expire_time` has passed, the backup is eligible to be automatically deleted by Cloud Spanner to free the resources used by the backup.
*/
expireTime?: string | null;
/**
* Required. The source backup to be copied. The source backup needs to be in READY state for it to be copied. Once CopyBackup is in progress, the source backup cannot be deleted or cleaned up on expiration until CopyBackup is finished. Values are of the form: `projects//instances//backups/`.
*/
sourceBackup?: string | null;
}
/**
* Metadata type for the operation returned by CreateBackup.
*/
export interface Schema$CreateBackupMetadata {
/**
* The time at which cancellation of this operation was received. Operations.CancelOperation starts asynchronous cancellation on a long-running operation. The server makes a best effort to cancel the operation, but success is not guaranteed. Clients can use Operations.GetOperation or other methods to check whether the cancellation succeeded or whether the operation completed despite cancellation. On successful cancellation, the operation is not deleted; instead, it becomes an operation with an Operation.error value with a google.rpc.Status.code of 1, corresponding to `Code.CANCELLED`.
*/
cancelTime?: string | null;
/**
* The name of the database the backup is created from.
*/
database?: string | null;
/**
* The name of the backup being created.
*/
name?: string | null;
/**
* The progress of the CreateBackup operation.
*/
progress?: Schema$OperationProgress;
}
/**
* Metadata type for the operation returned by CreateDatabase.
*/
export interface Schema$CreateDatabaseMetadata {
/**
* The database being created.
*/
database?: string | null;
}
/**
* The request for CreateDatabase.
*/
export interface Schema$CreateDatabaseRequest {
/**
* 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 (`` ` ``).
*/
createStatement?: string | null;
/**
* Optional. The dialect of the Cloud Spanner Database.
*/
databaseDialect?: string | null;
/**
* 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.
*/
encryptionConfig?: Schema$EncryptionConfig;
/**
* 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.
*/
extraStatements?: string[] | null;
/**
* Optional. Proto descriptors used by CREATE/ALTER PROTO BUNDLE statements in 'extra_statements' above. Contains a protobuf-serialized [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). To generate it, [install](https://grpc.io/docs/protoc-installation/) 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](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
*/
protoDescriptors?: string | null;
}
/**
* Metadata type for the operation returned by CreateInstanceConfig.
*/
export interface Schema$CreateInstanceConfigMetadata {
/**
* The time at which this operation was cancelled.
*/
cancelTime?: string | null;
/**
* The target instance config end state.
*/
instanceConfig?: Schema$InstanceConfig;
/**
* The progress of the CreateInstanceConfig operation.
*/
progress?: Schema$InstanceOperationProgress;
}
/**
* The request for CreateInstanceConfigRequest.
*/
export interface Schema$CreateInstanceConfigRequest {
/**
* Required. The InstanceConfig proto of the configuration to create. instance_config.name must be `/instanceConfigs/`. instance_config.base_config must be a Google managed configuration name, e.g. /instanceConfigs/us-east1, /instanceConfigs/nam3.
*/
instanceConfig?: Schema$InstanceConfig;
/**
* Required. The ID of the instance config to create. Valid identifiers are of the form `custom-[-a-z0-9]*[a-z0-9]` and must be between 2 and 64 characters in length. The `custom-` prefix is required to avoid name conflicts with Google managed configurations.
*/
instanceConfigId?: string | null;
/**
* An option to validate, but not actually execute, a request, and provide the same response.
*/
validateOnly?: boolean | null;
}
/**
* Metadata type for the operation returned by CreateInstance.
*/
export interface Schema$CreateInstanceMetadata {
/**
* The time at which this operation was cancelled. If set, this operation is in the process of undoing itself (which is guaranteed to succeed) and cannot be cancelled again.
*/
cancelTime?: string | null;
/**
* The time at which this operation failed or was completed successfully.
*/
endTime?: string | null;
/**
* The instance being created.
*/
instance?: Schema$Instance;
/**
* The time at which the CreateInstance request was received.
*/
startTime?: string | null;
}
/**
* The request for CreateInstance.
*/
export interface Schema$CreateInstanceRequest {
/**
* Required. The instance to create. The name may be omitted, but if specified must be `/instances/`.
*/
instance?: Schema$Instance;
/**
* Required. The ID of the instance to create. Valid identifiers are of the form `a-z*[a-z0-9]` and must be between 2 and 64 characters in length.
*/
instanceId?: string | null;
}
/**
* The request for CreateSession.
*/
export interface Schema$CreateSessionRequest {
/**
* Required. The session to create.
*/
session?: Schema$Session;
}
/**
* A Cloud Spanner database.
*/
export interface Schema$Database {
/**
* Output only. If exists, the time at which the database creation started.
*/
createTime?: string | null;
/**
* Output only. The dialect of the Cloud Spanner Database.
*/
databaseDialect?: string | null;
/**
* Output only. The read-write region which contains the database's leader replicas. This is the same as the value of default_leader database option set using DatabaseAdmin.CreateDatabase or DatabaseAdmin.UpdateDatabaseDdl. If not explicitly set, this is empty.
*/
defaultLeader?: string | null;
/**
* 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.
*/
earliestVersionTime?: string | null;
/**
* Whether drop protection is enabled for this database. Defaults to false, if not set. For more details, please see how to [prevent accidental database deletion](https://cloud.google.com/spanner/docs/prevent-database-deletion).
*/
enableDropProtection?: boolean | null;
/**
* 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.
*/
encryptionConfig?: Schema$EncryptionConfig;
/**
* Output only. For databases that are using customer managed encryption, this field contains the encryption information for the database, such as all Cloud KMS key versions that are in use. The `encryption_status' field inside of each `EncryptionInfo` is not populated. 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.
*/
encryptionInfo?: Schema$EncryptionInfo[];
/**
* Required. The name of the database. Values are of the form `projects//instances//databases/`, where `` is as specified in the `CREATE DATABASE` statement. This name can be passed to other API methods to identify the database.
*/
name?: string | null;
/**
* Output only. If true, the database is being updated. If false, there are no ongoing update operations for the database.
*/
reconciling?: boolean | null;
/**
* Output only. Applicable only for restored databases. Contains information about the restore source.
*/
restoreInfo?: Schema$RestoreInfo;
/**
* Output only. The current database state.
*/
state?: string | null;
/**
* 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. Defaults to 1 hour, if not set.
*/
versionRetentionPeriod?: string | null;
}
/**
* A Cloud Spanner database role.
*/
export interface Schema$DatabaseRole {
/**
* Required. The name of the database role. Values are of the form `projects//instances//databases//databaseRoles/` where `` is as specified in the `CREATE ROLE` DDL statement.
*/
name?: string | null;
}
/**
* Action information extracted from a DDL statement. This proto is used to display the brief info of the DDL statement for the operation UpdateDatabaseDdl.
*/
export interface Schema$DdlStatementActionInfo {
/**
* The action for the DDL statement, e.g. CREATE, ALTER, DROP, GRANT, etc. This field is a non-empty string.
*/
action?: string | null;
/**
* The entity name(s) being operated on the DDL statement. E.g. 1. For statement "CREATE TABLE t1(...)", `entity_names` = ["t1"]. 2. For statement "GRANT ROLE r1, r2 ...", `entity_names` = ["r1", "r2"]. 3. For statement "ANALYZE", `entity_names` = [].
*/
entityNames?: string[] | null;
/**
* The entity type for the DDL statement, e.g. TABLE, INDEX, VIEW, etc. This field can be empty string for some DDL statement, e.g. for statement "ANALYZE", `entity_type` = "".
*/
entityType?: string | null;
}
/**
* Arguments to delete operations.
*/
export interface Schema$Delete {
/**
* Required. The primary keys of the rows within table to delete. The primary keys must be specified in the order in which they appear in the `PRIMARY KEY()` clause of the table's equivalent DDL statement (the DDL statement used to create the table). Delete is idempotent. The transaction will succeed even if some or all rows do not exist.
*/
keySet?: Schema$KeySet;
/**
* Required. The table whose rows will be deleted.
*/
table?: string | null;
}
/**
* A message representing a derived metric.
*/
export interface Schema$DerivedMetric {
/**
* The name of the denominator metric. e.g. "rows".
*/
denominator?: Schema$LocalizedString;
/**
* The name of the numerator metric. e.g. "latency".
*/
numerator?: Schema$LocalizedString;
}
/**
* A message representing the key visualizer diagnostic messages.
*/
export interface Schema$DiagnosticMessage {
/**
* Information about this diagnostic information.
*/
info?: Schema$LocalizedString;
/**
* The metric.
*/
metric?: Schema$LocalizedString;
/**
* Whether this message is specific only for the current metric. By default Diagnostics are shown for all metrics, regardless which metric is the currently selected metric in the UI. However occasionally a metric will generate so many messages that the resulting visual clutter becomes overwhelming. In this case setting this to true, will show the diagnostic messages for that metric only if it is the currently selected metric.
*/
metricSpecific?: boolean | null;
/**
* The severity of the diagnostic message.
*/
severity?: string | null;
/**
* The short message.
*/
shortMessage?: Schema$LocalizedString;
}
/**
* A generic empty message that you can re-use to avoid defining duplicated empty messages in your APIs. A typical example is to use it as the request or the response type of an API method. For instance: service Foo { rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty); \}
*/
export interface Schema$Empty {
}
/**
* Encryption configuration for a Cloud Spanner database.
*/
export interface Schema$EncryptionConfig {
/**
* The Cloud KMS key to be used for encrypting and decrypting the database. Values are of the form `projects//locations//keyRings//cryptoKeys/`.
*/
kmsKeyName?: string | null;
}
/**
* Encryption information for a Cloud Spanner database or backup.
*/
export interface Schema$EncryptionInfo {
/**
* Output only. If present, the status of a recent encrypt/decrypt call on underlying data for this database or backup. Regardless of status, data is always encrypted at rest.
*/
encryptionStatus?: Schema$Status;
/**
* Output only. The type of encryption.
*/
encryptionType?: string | null;
/**
* Output only. A Cloud KMS key version that is being used to protect the database or backup.
*/
kmsKeyVersion?: string | null;
}
/**
* The request for ExecuteBatchDml.
*/
export interface Schema$ExecuteBatchDmlRequest {
/**
* Common options for this request.
*/
requestOptions?: Schema$RequestOptions;
/**
* Required. A per-transaction sequence number used to identify this request. This field makes each request idempotent such that if the request is received multiple times, at most one will succeed. The sequence number must be monotonically increasing within the transaction. If a request arrives for the first time with an out-of-order sequence number, the transaction may be aborted. Replays of previously handled requests will yield the same response as the first execution.
*/
seqno?: string | null;
/**
* Required. The list of statements to execute in this batch. Statements are executed serially, such that the effects of statement `i` are visible to statement `i+1`. Each statement must be a DML statement. Execution stops at the first failed statement; the remaining statements are not executed. Callers must provide at least one statement.
*/
statements?: Schema$Statement[];
/**
* Required. The transaction to use. Must be a read-write transaction. To protect against replays, single-use transactions are not supported. The caller must either supply an existing transaction ID or begin a new transaction.
*/
transaction?: Schema$TransactionSelector;
}
/**
* The response for ExecuteBatchDml. Contains a list of ResultSet messages, one for each DML statement that has successfully executed, in the same order as the statements in the request. If a statement fails, the status in the response body identifies the cause of the failure. To check for DML statements that failed, use the following approach: 1. Check the status in the response message. The google.rpc.Code enum value `OK` indicates that all statements were executed successfully. 2. If the status was not `OK`, check the number of result sets in the response. If the response contains `N` ResultSet messages, then statement `N+1` in the request failed. Example 1: * Request: 5 DML statements, all executed successfully. * Response: 5 ResultSet messages, with the status `OK`. Example 2: * Request: 5 DML statements. The third statement has a syntax error. * Response: 2 ResultSet messages, and a syntax error (`INVALID_ARGUMENT`) status. The number of ResultSet messages indicates that the third statement failed, and the fourth and fifth statements were not executed.
*/
export interface Schema$ExecuteBatchDmlResponse {
/**
* One ResultSet for each statement in the request that ran successfully, in the same order as the statements in the request. Each ResultSet does not contain any rows. The ResultSetStats in each ResultSet contain the number of rows modified by the statement. Only the first ResultSet in the response contains valid ResultSetMetadata.
*/
resultSets?: Schema$ResultSet[];
/**
* If all DML statements are executed successfully, the status is `OK`. Otherwise, the error status of the first failed statement.
*/
status?: Schema$Status;
}
/**
* The request for ExecuteSql and ExecuteStreamingSql.
*/
export interface Schema$ExecuteSqlRequest {
/**
* If this is for a partitioned query and this field is set to `true`, the request is executed with Spanner Data Boost independent compute resources. If the field is set to `true` but the request does not set `partition_token`, the API returns an `INVALID_ARGUMENT` error.
*/
dataBoostEnabled?: boolean | null;
/**
* Parameter names and values that bind to placeholders in the SQL string. A parameter placeholder consists of the `@` character followed by the parameter name (for example, `@firstName`). Parameter names must conform to the naming requirements of identifiers as specified at https://cloud.google.com/spanner/docs/lexical#identifiers. Parameters can appear anywhere that a literal value is expected. The same parameter name can be used more than once, for example: `"WHERE id \> @msg_id AND id < @msg_id + 100"` It is an error to execute a SQL statement with unbound parameters.
*/
params?: {
[key: string]: any;
} | null;
/**
* It is not always possible for Cloud Spanner to infer the right SQL type from a JSON value. For example, values of type `BYTES` and values of type `STRING` both appear in params as JSON strings. In these cases, `param_types` can be used to specify the exact SQL type for some or all of the SQL statement parameters. See the definition of Type for more information about SQL types.
*/
paramTypes?: {
[key: string]: Schema$Type;
} | null;
/**
* If present, results will be restricted to the specified partition previously created using PartitionQuery(). There must be an exact match for the values of fields common to this message and the PartitionQueryRequest message used to create this partition_token.
*/
partitionToken?: string | null;
/**
* Used to control the amount of debugging information returned in ResultSetStats. If partition_token is set, query_mode can only be set to QueryMode.NORMAL.
*/
queryMode?: string | null;
/**
* Query optimizer configuration to use for the given query.
*/
queryOptions?: Schema$QueryOptions;
/**
* Common options for this request.
*/
requestOptions?: Schema$RequestOptions;
/**
* If this request is resuming a previously interrupted SQL statement execution, `resume_token` should be copied from the last PartialResultSet yielded before the interruption. Doing this enables the new SQL statement execution to resume where the last one left off. The rest of the request parameters must exactly match the request that yielded this token.
*/
resumeToken?: string | null;
/**
* A per-transaction sequence number used to identify this request. This field makes each request idempotent such that if the request is received multiple times, at most one will succeed. The sequence number must be monotonically increasing within the transaction. If a request arrives for the first time with an out-of-order sequence number, the transaction may be aborted. Replays of previously handled requests will yield the same response as the first execution. Required for DML statements. Ignored for queries.
*/
seqno?: string | null;
/**
* Required. The SQL string.
*/
sql?: string | null;
/**
* The transaction to use. For queries, if none is provided, the default is a temporary read-only transaction with strong concurrency. Standard DML statements require a read-write transaction. To protect against replays, single-use transactions are not supported. The caller must either supply an existing transaction ID or begin a new transaction. Partitioned DML requires an existing Partitioned DML transaction ID.
*/
transaction?: Schema$TransactionSelector;
}
/**
* Represents a textual expression in the Common Expression Language (CEL) syntax. CEL is a C-like expression language. The syntax and semantics of CEL are documented at https://github.com/google/cel-spec. Example (Comparison): title: "Summary size limit" description: "Determines if a summary is less than 100 chars" expression: "document.summary.size() < 100" Example (Equality): title: "Requestor is owner" description: "Determines if requestor is the document owner" expression: "document.owner == request.auth.claims.email" Example (Logic): title: "Public documents" description: "Determine whether the document should be publicly visible" expression: "document.type != 'private' && document.type != 'internal'" Example (Data Manipulation): title: "Notification string" description: "Create a notification string with a timestamp." expression: "'New message received at ' + string(document.create_time)" The exact variables and functions that may be referenced within an expression are determined by the service that evaluates it. See the service documentation for additional information.
*/
export interface Schema$Expr {
/**
* Optional. Description of the expression. This is a longer text which describes the expression, e.g. when hovered over it in a UI.
*/
description?: string | null;
/**
* Textual representation of an expression in Common Expression Language syntax.
*/
expression?: string | null;
/**
* Optional. String indicating the location of the expression for error reporting, e.g. a file name and a position in the file.
*/
location?: string | null;
/**
* Optional. Title for the expression, i.e. a short string describing its purpose. This can be used e.g. in UIs which allow to enter the expression.
*/
title?: string | null;
}
/**
* Message representing a single field of a struct.
*/
export interface Schema$Field {
/**
* The name of the field. For reads, this is the column name. For SQL queries, it is the column alias (e.g., `"Word"` in the query `"SELECT 'hello' AS Word"`), or the column name (e.g., `"ColName"` in the query `"SELECT ColName FROM Table"`). Some columns might have an empty name (e.g., `"SELECT UPPER(ColName)"`). Note that a query result can contain multiple fields with the same name.
*/
name?: string | null;
/**
* The type of the field.
*/
type?: Schema$Type;
}
/**
* Free instance specific metadata that is kept even after an instance has been upgraded for tracking purposes.
*/
export interface Schema$FreeInstanceMetadata {
/**
* Specifies the expiration behavior of a free instance. The default of ExpireBehavior is `REMOVE_AFTER_GRACE_PERIOD`. This can be modified during or after creation, and before expiration.
*/
expireBehavior?: string | null;
/**
* Output only. Timestamp after which the instance will either be upgraded or scheduled for deletion after a grace period. ExpireBehavior is used to choose between upgrading or scheduling the free instance for deletion. This timestamp is set during the creation of a free instance.
*/
expireTime?: string | null;
/**
* Output only. If present, the timestamp at which the free instance was upgraded to a provisioned instance.
*/
upgradeTime?: string | null;
}
/**
* The response for GetDatabaseDdl.
*/
export interface Schema$GetDatabaseDdlResponse {
/**
* Proto descriptors stored in the database. Contains a protobuf-serialized [google.protobuf.FileDescriptorSet](https://github.com/protocolbuffers/protobuf/blob/main/src/google/protobuf/descriptor.proto). For more details, see protobuffer [self description](https://developers.google.com/protocol-buffers/docs/techniques#self-description).
*/
protoDescriptors?: string | null;
/**
* A list of formatted DDL statements defining the schema of the database specified in the request.
*/
statements?: string[] | null;
}
/**
* Request message for `GetIamPolicy` method.
*/
export interface Schema$GetIamPolicyRequest {
/**
* OPTIONAL: A `GetPolicyOptions` object for specifying options to `GetIamPolicy`.
*/
options?: Schema$GetPolicyOptions;
}
/**
* Encapsulates settings provided to GetIamPolicy.
*/
export interface Schema$GetPolicyOptions {
/**
* Optional. The maximum policy version that will be used to format the policy. Valid values are 0, 1, and 3. Requests specifying an invalid value will be rejected. Requests for policies with any conditional role bindings must specify version 3. Policies with no conditional role bindings may specify any valid value or leave the field unset. The policy in the response might use the policy version that you specified, or it might use a lower policy version. For example, if you specify version 3, but the policy has no conditional role bindings, the response uses version 1. To learn which resources support conditions in their IAM policies, see the [IAM documentation](https://cloud.google.com/iam/help/conditions/resource-policies).
*/
requestedPolicyVersion?: number | null;
}
/**
* A message representing a (sparse) collection of hot keys for specific key buckets.
*/
export interface Schema$IndexedHotKey {
/**
* A (sparse) mapping from key bucket index to the index of the specific hot row key for that key bucket. The index of the hot row key can be translated to the actual row key via the ScanData.VisualizationData.indexed_keys repeated field.
*/
sparseHotKeys?: {
[key: string]: number;
} | null;
}
/**
* A message representing a (sparse) collection of KeyRangeInfos for specific key buckets.
*/
export interface Schema$IndexedKeyRangeInfos {
/**
* A (sparse) mapping from key bucket index to the KeyRangeInfos for that key bucket.
*/
keyRangeInfos?: {
[key: string]: Schema$KeyRangeInfos;
} | null;
}
/**
* An isolated set of Cloud Spanner resources on which databases can be hosted.
*/
export interface Schema$Instance {
/**
* Required. The name of the instance's configuration. Values are of the form `projects//instanceConfigs/`. See also InstanceConfig and ListInstanceConfigs.
*/
config?: string | null;
/**
* Output only. The time at which the instance was created.
*/
createTime?: string | null;
/**
* Required. The descriptive name for this instance as it appears in UIs. Must be unique per project and between 4 and 30 characters in length.
*/
displayName?: string | null;
/**
* Deprecated. This field is not populated.
*/
endpointUris?: string[] | null;
/**
* Free instance metadata. Only populated for free instances.
*/
freeInstanceMetadata?: Schema$FreeInstanceMetadata;
/**
* The `InstanceType` of the current instance.
*/
instanceType?: string | null;
/**
* Cloud Labels are a flexible and lightweight mechanism for organizing cloud resources into groups that reflect a customer's organizational needs and deployment strategies. Cloud Labels can be used to filter collections of resources. They can be used to control how resource metrics are aggregated. And they can be used as arguments to policy management rules (e.g. route, firewall, load balancing, etc.). * Label keys must be between 1 and 63 characters long and must conform to the following regular expression: `a-z{0,62\}`. * Label values must be between 0 and 63 characters long and must conform to the regular expression `[a-z0-9_-]{0,63\}`. * No more than 64 labels can be associated with a given resource. See https://goo.gl/xmQnxf for more information on and examples of labels. If you plan to use labels in your own code, please note that additional characters may be allowed in the future. And so you are advised to use an internal label representation, such as JSON, which doesn't rely upon specific characters being disallowed. For example, representing labels as the string: name + "_" + value would prove problematic if we were to allow "_" in a future release.
*/
labels?: {
[key: string]: string;
} | null;
/**
* Required. A unique identifier for the instance, which cannot be changed after the instance is created. Values are of the form `projects//instances/a-z*[a-z0-9]`. The final segment of the name must be between 2 and 64 characters in length.
*/
name?: string | null;
/*