From 46715e557efe8bd7ec8ad092df369d3fdef4aa7a Mon Sep 17 00:00:00 2001 From: Yoshi Automation Date: Tue, 8 Feb 2022 07:07:55 +0000 Subject: [PATCH] feat(spanner): update the api #### spanner:v1 The following keys were added: - schemas.Backup.properties.databaseDialect (Total Keys: 2) - schemas.CreateDatabaseRequest.properties.databaseDialect.type (Total Keys: 1) - schemas.Database.properties.databaseDialect (Total Keys: 2) - schemas.Type.properties.typeAnnotation.type (Total Keys: 1) --- ...1.projects.instances.backupOperations.html | 4 +- ...spanner_v1.projects.instances.backups.html | 5 ++ ...anner_v1.projects.instances.databases.html | 3 + ...projects.instances.databases.sessions.html | 70 +++++++++++-------- .../discovery_cache/documents/spanner.v1.json | 62 +++++++++++++++- 5 files changed, 110 insertions(+), 34 deletions(-) diff --git a/docs/dyn/spanner_v1.projects.instances.backupOperations.html b/docs/dyn/spanner_v1.projects.instances.backupOperations.html index 38095af8c51..606ec8420ff 100644 --- a/docs/dyn/spanner_v1.projects.instances.backupOperations.html +++ b/docs/dyn/spanner_v1.projects.instances.backupOperations.html @@ -95,7 +95,7 @@

Method Details

Args: parent: string, Required. The instance of the backup operations. Values are of the form `projects//instances/`. (required) - filter: string, An expression that filters the list of returned backup operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateBackupMetadata is `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * `metadata.` - any field in metadata.value. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `metadata.database:prod` - The database the backup was taken from has a name containing the string "prod". * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ `(metadata.name:howl) AND` \ `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ `(error:*)` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The backup name contains the string "howl". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error. + filter: string, An expression that filters the list of returned backup operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateBackupMetadata is `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * `metadata.` - any field in metadata.value. `metadata.type_url` must be specified if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ `metadata.database:prod` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The database the backup was taken from has a name containing the string "prod". * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \ `(metadata.name:howl) AND` \ `(metadata.progress.start_time < \"2018-03-28T14:50:00Z\") AND` \ `(error:*)` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The backup name contains the string "howl". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error. pageSize: integer, Number of operations to be returned in the response. If 0 or less, defaults to the server's maximum allowed page size. pageToken: string, If non-empty, `page_token` should contain a next_page_token from a previous ListBackupOperationsResponse to the same `parent` and with the same `filter`. x__xgafv: string, V1 error format. @@ -108,7 +108,7 @@

Method Details

{ # The response for ListBackupOperations. "nextPageToken": "A String", # `next_page_token` can be sent in a subsequent ListBackupOperations call to fetch more of the matching metadata. - "operations": [ # The list of matching backup long-running operations. Each operation's name will be prefixed by the backup's name and the operation's metadata will be of type CreateBackupMetadata. Operations returned include those that are pending or have completed/failed/canceled within the last 7 days. Operations returned are ordered by `operation.metadata.value.progress.start_time` in descending order starting from the most recently started operation. + "operations": [ # The list of matching backup long-running operations. Each operation's name will be prefixed by the backup's name. The operation's metadata field type `metadata.type_url` describes the type of the metadata. Operations returned include those that are pending or have completed/failed/canceled within the last 7 days. Operations returned are ordered by `operation.metadata.value.progress.start_time` in descending order starting from the most recently started operation. { # This resource represents a long-running operation that is the result of a network API call. "done": True or False, # If the value is `false`, it means the operation is still in progress. If `true`, the operation is completed, and either `error` or `response` is available. "error": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # The error result of the operation in case of failure or cancellation. diff --git a/docs/dyn/spanner_v1.projects.instances.backups.html b/docs/dyn/spanner_v1.projects.instances.backups.html index 3175f0f78ba..6ae6286bdb5 100644 --- a/docs/dyn/spanner_v1.projects.instances.backups.html +++ b/docs/dyn/spanner_v1.projects.instances.backups.html @@ -127,6 +127,7 @@

Method Details

{ # A backup of a Cloud Spanner database. "createTime": "A String", # 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`. "database": "A String", # 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/`. + "databaseDialect": "A String", # Output only. The database dialect information for the backup. "encryptionInfo": { # Encryption information for a Cloud Spanner database or backup. # Output only. The encryption information for the backup. "encryptionStatus": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # 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. "code": 42, # The status code, which should be an enum value of google.rpc.Code. @@ -222,6 +223,7 @@

Method Details

{ # A backup of a Cloud Spanner database. "createTime": "A String", # 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`. "database": "A String", # 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/`. + "databaseDialect": "A String", # Output only. The database dialect information for the backup. "encryptionInfo": { # Encryption information for a Cloud Spanner database or backup. # Output only. The encryption information for the backup. "encryptionStatus": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # 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. "code": 42, # The status code, which should be an enum value of google.rpc.Code. @@ -311,6 +313,7 @@

Method Details

{ # A backup of a Cloud Spanner database. "createTime": "A String", # 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`. "database": "A String", # 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/`. + "databaseDialect": "A String", # Output only. The database dialect information for the backup. "encryptionInfo": { # Encryption information for a Cloud Spanner database or backup. # Output only. The encryption information for the backup. "encryptionStatus": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # 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. "code": 42, # The status code, which should be an enum value of google.rpc.Code. @@ -364,6 +367,7 @@

Method Details

{ # A backup of a Cloud Spanner database. "createTime": "A String", # 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`. "database": "A String", # 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/`. + "databaseDialect": "A String", # Output only. The database dialect information for the backup. "encryptionInfo": { # Encryption information for a Cloud Spanner database or backup. # Output only. The encryption information for the backup. "encryptionStatus": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # 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. "code": 42, # The status code, which should be an enum value of google.rpc.Code. @@ -399,6 +403,7 @@

Method Details

{ # A backup of a Cloud Spanner database. "createTime": "A String", # 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`. "database": "A String", # 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/`. + "databaseDialect": "A String", # Output only. The database dialect information for the backup. "encryptionInfo": { # Encryption information for a Cloud Spanner database or backup. # Output only. The encryption information for the backup. "encryptionStatus": { # The `Status` type defines a logical error model that is suitable for different programming environments, including REST APIs and RPC APIs. It is used by [gRPC](https://github.com/grpc). Each `Status` message contains three pieces of data: error code, error message, and error details. You can find out more about this error model and how to work with it in the [API Design Guide](https://cloud.google.com/apis/design/errors). # 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. "code": 42, # The status code, which should be an enum value of google.rpc.Code. diff --git a/docs/dyn/spanner_v1.projects.instances.databases.html b/docs/dyn/spanner_v1.projects.instances.databases.html index 94195d291c1..4c15f91b7d0 100644 --- a/docs/dyn/spanner_v1.projects.instances.databases.html +++ b/docs/dyn/spanner_v1.projects.instances.databases.html @@ -140,6 +140,7 @@

Method Details

{ # The request for CreateDatabase. "createStatement": "A 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]` 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 (`` ` ``). + "databaseDialect": "A String", # Optional. The dialect of the Cloud Spanner Database. "encryptionConfig": { # Encryption configuration for a Cloud Spanner database. # 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. "kmsKeyName": "A String", # The Cloud KMS key to be used for encrypting and decrypting the database. Values are of the form `projects//locations//keyRings//cryptoKeys/`. }, @@ -211,6 +212,7 @@

Method Details

{ # A Cloud Spanner database. "createTime": "A String", # Output only. If exists, the time at which the database creation started. + "databaseDialect": "A String", # Output only. The dialect of the Cloud Spanner Database. "defaultLeader": "A String", # 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. "earliestVersionTime": "A String", # 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. "encryptionConfig": { # Encryption configuration for a Cloud Spanner database. # 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. @@ -535,6 +537,7 @@

Method Details

"databases": [ # Databases that matched the request. { # A Cloud Spanner database. "createTime": "A String", # Output only. If exists, the time at which the database creation started. + "databaseDialect": "A String", # Output only. The dialect of the Cloud Spanner Database. "defaultLeader": "A String", # 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. "earliestVersionTime": "A String", # 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. "encryptionConfig": { # Encryption configuration for a Cloud Spanner database. # 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. diff --git a/docs/dyn/spanner_v1.projects.instances.databases.sessions.html b/docs/dyn/spanner_v1.projects.instances.databases.sessions.html index 0dce47116b9..fcfd8152a6a 100644 --- a/docs/dyn/spanner_v1.projects.instances.databases.sessions.html +++ b/docs/dyn/spanner_v1.projects.instances.databases.sessions.html @@ -421,7 +421,15 @@

Method Details

"a_key": { # `Type` indicates the type of a Cloud Spanner value, as might be stored in a table cell or returned from an SQL query. "arrayElementType": # Object with schema name: Type # If code == ARRAY, then `array_element_type` is the type of the array elements. "code": "A String", # Required. The TypeCode for this type. - "structType": # Object with schema name: StructType # If code == STRUCT, then `struct_type` provides type information for the struct's fields. + "structType": { # `StructType` defines the fields of a STRUCT type. # If code == STRUCT, then `struct_type` provides type information for the struct's fields. + "fields": [ # The list of fields that make up this struct. Order is significant, because values of this struct type are represented as lists, where the order of field values matches the order of fields in the StructType. In turn, the order of fields matches the order of columns in a read request, or the order of fields in the `SELECT` clause of a query. + { # Message representing a single field of a struct. + "name": "A String", # 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. + "type": # Object with schema name: Type # The type of the field. + }, + ], + }, + "typeAnnotation": "A String", # The TypeAnnotationCode that disambiguates SQL type that Spanner will use to represent values of this type during query processing. This is necessary for some type codes because a single TypeCode can be mapped to different SQL types depending on the SQL dialect. type_annotation typically is not needed to process the content of a value (it doesn't affect serialization) and clients can ignore it on the read path. }, }, "params": { # Parameter names and values that bind to placeholders in the DML string. A parameter placeholder consists of the `@` character followed by the parameter name (for example, `@firstName`). Parameter names can contain letters, numbers, and underscores. 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. @@ -479,11 +487,7 @@

Method Details

"fields": [ # The list of fields that make up this struct. Order is significant, because values of this struct type are represented as lists, where the order of field values matches the order of fields in the StructType. In turn, the order of fields matches the order of columns in a read request, or the order of fields in the `SELECT` clause of a query. { # Message representing a single field of a struct. "name": "A String", # 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. - "type": { # `Type` indicates the type of a Cloud Spanner value, as might be stored in a table cell or returned from an SQL query. # The type of the field. - "arrayElementType": # Object with schema name: Type # If code == ARRAY, then `array_element_type` is the type of the array elements. - "code": "A String", # Required. The TypeCode for this type. - "structType": # Object with schema name: StructType # If code == STRUCT, then `struct_type` provides type information for the struct's fields. - }, + "type": # Object with schema name: Type # The type of the field. }, ], }, @@ -560,7 +564,15 @@

Method Details

"a_key": { # `Type` indicates the type of a Cloud Spanner value, as might be stored in a table cell or returned from an SQL query. "arrayElementType": # Object with schema name: Type # If code == ARRAY, then `array_element_type` is the type of the array elements. "code": "A String", # Required. The TypeCode for this type. - "structType": # Object with schema name: StructType # If code == STRUCT, then `struct_type` provides type information for the struct's fields. + "structType": { # `StructType` defines the fields of a STRUCT type. # If code == STRUCT, then `struct_type` provides type information for the struct's fields. + "fields": [ # The list of fields that make up this struct. Order is significant, because values of this struct type are represented as lists, where the order of field values matches the order of fields in the StructType. In turn, the order of fields matches the order of columns in a read request, or the order of fields in the `SELECT` clause of a query. + { # Message representing a single field of a struct. + "name": "A String", # 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. + "type": # Object with schema name: Type # The type of the field. + }, + ], + }, + "typeAnnotation": "A String", # The TypeAnnotationCode that disambiguates SQL type that Spanner will use to represent values of this type during query processing. This is necessary for some type codes because a single TypeCode can be mapped to different SQL types depending on the SQL dialect. type_annotation typically is not needed to process the content of a value (it doesn't affect serialization) and clients can ignore it on the read path. }, }, "params": { # 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. @@ -627,11 +639,7 @@

Method Details

"fields": [ # The list of fields that make up this struct. Order is significant, because values of this struct type are represented as lists, where the order of field values matches the order of fields in the StructType. In turn, the order of fields matches the order of columns in a read request, or the order of fields in the `SELECT` clause of a query. { # Message representing a single field of a struct. "name": "A String", # 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. - "type": { # `Type` indicates the type of a Cloud Spanner value, as might be stored in a table cell or returned from an SQL query. # The type of the field. - "arrayElementType": # Object with schema name: Type # If code == ARRAY, then `array_element_type` is the type of the array elements. - "code": "A String", # Required. The TypeCode for this type. - "structType": # Object with schema name: StructType # If code == STRUCT, then `struct_type` provides type information for the struct's fields. - }, + "type": # Object with schema name: Type # The type of the field. }, ], }, @@ -697,7 +705,15 @@

Method Details

"a_key": { # `Type` indicates the type of a Cloud Spanner value, as might be stored in a table cell or returned from an SQL query. "arrayElementType": # Object with schema name: Type # If code == ARRAY, then `array_element_type` is the type of the array elements. "code": "A String", # Required. The TypeCode for this type. - "structType": # Object with schema name: StructType # If code == STRUCT, then `struct_type` provides type information for the struct's fields. + "structType": { # `StructType` defines the fields of a STRUCT type. # If code == STRUCT, then `struct_type` provides type information for the struct's fields. + "fields": [ # The list of fields that make up this struct. Order is significant, because values of this struct type are represented as lists, where the order of field values matches the order of fields in the StructType. In turn, the order of fields matches the order of columns in a read request, or the order of fields in the `SELECT` clause of a query. + { # Message representing a single field of a struct. + "name": "A String", # 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. + "type": # Object with schema name: Type # The type of the field. + }, + ], + }, + "typeAnnotation": "A String", # The TypeAnnotationCode that disambiguates SQL type that Spanner will use to represent values of this type during query processing. This is necessary for some type codes because a single TypeCode can be mapped to different SQL types depending on the SQL dialect. type_annotation typically is not needed to process the content of a value (it doesn't affect serialization) and clients can ignore it on the read path. }, }, "params": { # 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. @@ -765,11 +781,7 @@

Method Details

"fields": [ # The list of fields that make up this struct. Order is significant, because values of this struct type are represented as lists, where the order of field values matches the order of fields in the StructType. In turn, the order of fields matches the order of columns in a read request, or the order of fields in the `SELECT` clause of a query. { # Message representing a single field of a struct. "name": "A String", # 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. - "type": { # `Type` indicates the type of a Cloud Spanner value, as might be stored in a table cell or returned from an SQL query. # The type of the field. - "arrayElementType": # Object with schema name: Type # If code == ARRAY, then `array_element_type` is the type of the array elements. - "code": "A String", # Required. The TypeCode for this type. - "structType": # Object with schema name: StructType # If code == STRUCT, then `struct_type` provides type information for the struct's fields. - }, + "type": # Object with schema name: Type # The type of the field. }, ], }, @@ -904,7 +916,15 @@

Method Details

"a_key": { # `Type` indicates the type of a Cloud Spanner value, as might be stored in a table cell or returned from an SQL query. "arrayElementType": # Object with schema name: Type # If code == ARRAY, then `array_element_type` is the type of the array elements. "code": "A String", # Required. The TypeCode for this type. - "structType": # Object with schema name: StructType # If code == STRUCT, then `struct_type` provides type information for the struct's fields. + "structType": { # `StructType` defines the fields of a STRUCT type. # If code == STRUCT, then `struct_type` provides type information for the struct's fields. + "fields": [ # The list of fields that make up this struct. Order is significant, because values of this struct type are represented as lists, where the order of field values matches the order of fields in the StructType. In turn, the order of fields matches the order of columns in a read request, or the order of fields in the `SELECT` clause of a query. + { # Message representing a single field of a struct. + "name": "A String", # 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. + "type": # Object with schema name: Type # The type of the field. + }, + ], + }, + "typeAnnotation": "A String", # The TypeAnnotationCode that disambiguates SQL type that Spanner will use to represent values of this type during query processing. This is necessary for some type codes because a single TypeCode can be mapped to different SQL types depending on the SQL dialect. type_annotation typically is not needed to process the content of a value (it doesn't affect serialization) and clients can ignore it on the read path. }, }, "params": { # 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 can contain letters, numbers, and underscores. 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. @@ -1160,11 +1180,7 @@

Method Details

"fields": [ # The list of fields that make up this struct. Order is significant, because values of this struct type are represented as lists, where the order of field values matches the order of fields in the StructType. In turn, the order of fields matches the order of columns in a read request, or the order of fields in the `SELECT` clause of a query. { # Message representing a single field of a struct. "name": "A String", # 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. - "type": { # `Type` indicates the type of a Cloud Spanner value, as might be stored in a table cell or returned from an SQL query. # The type of the field. - "arrayElementType": # Object with schema name: Type # If code == ARRAY, then `array_element_type` is the type of the array elements. - "code": "A String", # Required. The TypeCode for this type. - "structType": # Object with schema name: StructType # If code == STRUCT, then `struct_type` provides type information for the struct's fields. - }, + "type": # Object with schema name: Type # The type of the field. }, ], }, @@ -1336,11 +1352,7 @@

Method Details

"fields": [ # The list of fields that make up this struct. Order is significant, because values of this struct type are represented as lists, where the order of field values matches the order of fields in the StructType. In turn, the order of fields matches the order of columns in a read request, or the order of fields in the `SELECT` clause of a query. { # Message representing a single field of a struct. "name": "A String", # 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. - "type": { # `Type` indicates the type of a Cloud Spanner value, as might be stored in a table cell or returned from an SQL query. # The type of the field. - "arrayElementType": # Object with schema name: Type # If code == ARRAY, then `array_element_type` is the type of the array elements. - "code": "A String", # Required. The TypeCode for this type. - "structType": # Object with schema name: StructType # If code == STRUCT, then `struct_type` provides type information for the struct's fields. - }, + "type": # Object with schema name: Type # The type of the field. }, ], }, diff --git a/googleapiclient/discovery_cache/documents/spanner.v1.json b/googleapiclient/discovery_cache/documents/spanner.v1.json index 4d855389be0..321307f157d 100644 --- a/googleapiclient/discovery_cache/documents/spanner.v1.json +++ b/googleapiclient/discovery_cache/documents/spanner.v1.json @@ -447,7 +447,7 @@ ], "parameters": { "filter": { - "description": "An expression that filters the list of returned backup operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateBackupMetadata is `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * `metadata.` - any field in metadata.value. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `metadata.database:prod` - The database the backup was taken from has a name containing the string \"prod\". * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `(metadata.name:howl) AND` \\ `(metadata.progress.start_time < \\\"2018-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The backup name contains the string \"howl\". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error.", + "description": "An expression that filters the list of returned backup operations. A filter expression consists of a field name, a comparison operator, and a value for filtering. The value must be a string, a number, or a boolean. The comparison operator must be one of: `<`, `>`, `<=`, `>=`, `!=`, `=`, or `:`. Colon `:` is the contains operator. Filter rules are not case sensitive. The following fields in the operation are eligible for filtering: * `name` - The name of the long-running operation * `done` - False if the operation is in progress, else true. * `metadata.@type` - the type of metadata. For example, the type string for CreateBackupMetadata is `type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata`. * `metadata.` - any field in metadata.value. `metadata.type_url` must be specified if filtering on metadata fields. * `error` - Error associated with the long-running operation. * `response.@type` - the type of response. * `response.` - any field in response.value. You can combine multiple expressions by enclosing each expression in parentheses. By default, expressions are combined with AND logic, but you can specify AND, OR, and NOT logic explicitly. Here are a few examples: * `done:true` - The operation is complete. * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `metadata.database:prod` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The database the backup was taken from has a name containing the string \"prod\". * `(metadata.@type=type.googleapis.com/google.spanner.admin.database.v1.CreateBackupMetadata) AND` \\ `(metadata.name:howl) AND` \\ `(metadata.progress.start_time < \\\"2018-03-28T14:50:00Z\\\") AND` \\ `(error:*)` - Returns operations where: * The operation's metadata type is CreateBackupMetadata. * The backup name contains the string \"howl\". * The operation started before 2018-03-28T14:50:00Z. * The operation resulted in an error.", "location": "query", "type": "string" }, @@ -2037,7 +2037,7 @@ } } }, - "revision": "20220103", + "revision": "20220124", "rootUrl": "https://spanner.googleapis.com/", "schemas": { "Backup": { @@ -2054,6 +2054,21 @@ "description": "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/`.", "type": "string" }, + "databaseDialect": { + "description": "Output only. The database dialect information for the backup.", + "enum": [ + "DATABASE_DIALECT_UNSPECIFIED", + "GOOGLE_STANDARD_SQL", + "POSTGRESQL" + ], + "enumDescriptions": [ + "Default value. This value will create a database with the GOOGLE_STANDARD_SQL dialect.", + "Google standard SQL.", + "PostgreSQL supported SQL." + ], + "readOnly": true, + "type": "string" + }, "encryptionInfo": { "$ref": "EncryptionInfo", "description": "Output only. The encryption information for the backup.", @@ -2357,6 +2372,20 @@ "description": "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 (`` ` ``).", "type": "string" }, + "databaseDialect": { + "description": "Optional. The dialect of the Cloud Spanner Database.", + "enum": [ + "DATABASE_DIALECT_UNSPECIFIED", + "GOOGLE_STANDARD_SQL", + "POSTGRESQL" + ], + "enumDescriptions": [ + "Default value. This value will create a database with the GOOGLE_STANDARD_SQL dialect.", + "Google standard SQL.", + "PostgreSQL supported SQL." + ], + "type": "string" + }, "encryptionConfig": { "$ref": "EncryptionConfig", "description": "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." @@ -2433,6 +2462,21 @@ "readOnly": true, "type": "string" }, + "databaseDialect": { + "description": "Output only. The dialect of the Cloud Spanner Database.", + "enum": [ + "DATABASE_DIALECT_UNSPECIFIED", + "GOOGLE_STANDARD_SQL", + "POSTGRESQL" + ], + "enumDescriptions": [ + "Default value. This value will create a database with the GOOGLE_STANDARD_SQL dialect.", + "Google standard SQL.", + "PostgreSQL supported SQL." + ], + "readOnly": true, + "type": "string" + }, "defaultLeader": { "description": "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.", "readOnly": true, @@ -3056,7 +3100,7 @@ "type": "string" }, "operations": { - "description": "The list of matching backup long-running operations. Each operation's name will be prefixed by the backup's name and the operation's metadata will be of type CreateBackupMetadata. Operations returned include those that are pending or have completed/failed/canceled within the last 7 days. Operations returned are ordered by `operation.metadata.value.progress.start_time` in descending order starting from the most recently started operation.", + "description": "The list of matching backup long-running operations. Each operation's name will be prefixed by the backup's name. The operation's metadata field type `metadata.type_url` describes the type of the metadata. Operations returned include those that are pending or have completed/failed/canceled within the last 7 days. Operations returned are ordered by `operation.metadata.value.progress.start_time` in descending order starting from the most recently started operation.", "items": { "$ref": "Operation" }, @@ -4381,6 +4425,18 @@ "structType": { "$ref": "StructType", "description": "If code == STRUCT, then `struct_type` provides type information for the struct's fields." + }, + "typeAnnotation": { + "description": "The TypeAnnotationCode that disambiguates SQL type that Spanner will use to represent values of this type during query processing. This is necessary for some type codes because a single TypeCode can be mapped to different SQL types depending on the SQL dialect. type_annotation typically is not needed to process the content of a value (it doesn't affect serialization) and clients can ignore it on the read path.", + "enum": [ + "TYPE_ANNOTATION_CODE_UNSPECIFIED", + "PG_NUMERIC" + ], + "enumDescriptions": [ + "Not specified.", + "PostgreSQL compatible NUMERIC type. This annotation needs to be applied to Type instances having NUMERIC type code to specify that values of this type should be treated as PostgreSQL NUMERIC values. Currently this annotation is always needed for NUMERIC when a client interacts with PostgreSQL-enabled Spanner databases." + ], + "type": "string" } }, "type": "object"