diff --git a/protos/protos.json b/protos/protos.json index 3c43645b9..76ea9f7d2 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -2,2646 +2,2808 @@ "nested": { "google": { "nested": { - "spanner": { + "protobuf": { + "options": { + "go_package": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, "nested": { - "admin": { - "nested": { - "database": { - "nested": { - "v1": { - "options": { - "csharp_namespace": "Google.Cloud.Spanner.Admin.Database.V1", - "go_package": "google.golang.org/genproto/googleapis/spanner/admin/database/v1;database", - "java_multiple_files": true, - "java_outer_classname": "SpannerDatabaseAdminProto", - "java_package": "com.google.spanner.admin.database.v1", - "php_namespace": "Google\\Cloud\\Spanner\\Admin\\Database\\V1" - }, - "nested": { - "DatabaseAdmin": { - "methods": { - "ListDatabases": { - "requestType": "ListDatabasesRequest", - "responseType": "ListDatabasesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*/instances/*}/databases" - } - }, - "CreateDatabase": { - "requestType": "CreateDatabaseRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*/instances/*}/databases", - "(google.api.http).body": "*" - } - }, - "GetDatabase": { - "requestType": "GetDatabaseRequest", - "responseType": "Database", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/instances/*/databases/*}" - } - }, - "UpdateDatabaseDdl": { - "requestType": "UpdateDatabaseDdlRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{database=projects/*/instances/*/databases/*}/ddl", - "(google.api.http).body": "*" - } - }, - "DropDatabase": { - "requestType": "DropDatabaseRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{database=projects/*/instances/*/databases/*}" - } - }, - "GetDatabaseDdl": { - "requestType": "GetDatabaseDdlRequest", - "responseType": "GetDatabaseDdlResponse", - "options": { - "(google.api.http).get": "/v1/{database=projects/*/instances/*/databases/*}/ddl" - } - }, - "SetIamPolicy": { - "requestType": "google.iam.v1.SetIamPolicyRequest", - "responseType": "google.iam.v1.Policy", - "options": { - "(google.api.http).post": "/v1/{resource=projects/*/instances/*/databases/*}:setIamPolicy", - "(google.api.http).body": "*" - } - }, - "GetIamPolicy": { - "requestType": "google.iam.v1.GetIamPolicyRequest", - "responseType": "google.iam.v1.Policy", - "options": { - "(google.api.http).post": "/v1/{resource=projects/*/instances/*/databases/*}:getIamPolicy", - "(google.api.http).body": "*" - } - }, - "TestIamPermissions": { - "requestType": "google.iam.v1.TestIamPermissionsRequest", - "responseType": "google.iam.v1.TestIamPermissionsResponse", - "options": { - "(google.api.http).post": "/v1/{resource=projects/*/instances/*/databases/*}:testIamPermissions", - "(google.api.http).body": "*" - } - } - } - }, - "Database": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "state": { - "type": "State", - "id": 2 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "READY": 2 - } - } - } - }, - "ListDatabasesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "pageSize": { - "type": "int32", - "id": 3 - }, - "pageToken": { - "type": "string", - "id": 4 - } - } - }, - "ListDatabasesResponse": { - "fields": { - "databases": { - "rule": "repeated", - "type": "Database", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "CreateDatabaseRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "createStatement": { - "type": "string", - "id": 2 - }, - "extraStatements": { - "rule": "repeated", - "type": "string", - "id": 3 - } - } - }, - "CreateDatabaseMetadata": { - "fields": { - "database": { - "type": "string", - "id": 1 - } - } - }, - "GetDatabaseRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "UpdateDatabaseDdlRequest": { - "fields": { - "database": { - "type": "string", - "id": 1 - }, - "statements": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "operationId": { - "type": "string", - "id": 3 - } - } - }, - "UpdateDatabaseDdlMetadata": { - "fields": { - "database": { - "type": "string", - "id": 1 - }, - "statements": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "commitTimestamps": { - "rule": "repeated", - "type": "google.protobuf.Timestamp", - "id": 3 - } - } - }, - "DropDatabaseRequest": { - "fields": { - "database": { - "type": "string", - "id": 1 - } - } - }, - "GetDatabaseDdlRequest": { - "fields": { - "database": { - "type": "string", - "id": 1 - } - } - }, - "GetDatabaseDdlResponse": { - "fields": { - "statements": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - } - } - } - } + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 }, - "instance": { - "nested": { - "v1": { - "options": { - "csharp_namespace": "Google.Cloud.Spanner.Admin.Instance.V1", - "go_package": "google.golang.org/genproto/googleapis/spanner/admin/instance/v1;instance", - "java_multiple_files": true, - "java_outer_classname": "SpannerInstanceAdminProto", - "java_package": "com.google.spanner.admin.instance.v1", - "php_namespace": "Google\\Cloud\\Spanner\\Admin\\Instance\\V1" - }, - "nested": { - "InstanceAdmin": { - "methods": { - "ListInstanceConfigs": { - "requestType": "ListInstanceConfigsRequest", - "responseType": "ListInstanceConfigsResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*}/instanceConfigs" - } - }, - "GetInstanceConfig": { - "requestType": "GetInstanceConfigRequest", - "responseType": "InstanceConfig", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/instanceConfigs/*}" - } - }, - "ListInstances": { - "requestType": "ListInstancesRequest", - "responseType": "ListInstancesResponse", - "options": { - "(google.api.http).get": "/v1/{parent=projects/*}/instances" - } - }, - "GetInstance": { - "requestType": "GetInstanceRequest", - "responseType": "Instance", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/instances/*}" - } - }, - "CreateInstance": { - "requestType": "CreateInstanceRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).post": "/v1/{parent=projects/*}/instances", - "(google.api.http).body": "*" - } - }, - "UpdateInstance": { - "requestType": "UpdateInstanceRequest", - "responseType": "google.longrunning.Operation", - "options": { - "(google.api.http).patch": "/v1/{instance.name=projects/*/instances/*}", - "(google.api.http).body": "*" - } - }, - "DeleteInstance": { - "requestType": "DeleteInstanceRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/instances/*}" - } - }, - "SetIamPolicy": { - "requestType": "google.iam.v1.SetIamPolicyRequest", - "responseType": "google.iam.v1.Policy", - "options": { - "(google.api.http).post": "/v1/{resource=projects/*/instances/*}:setIamPolicy", - "(google.api.http).body": "*" - } - }, - "GetIamPolicy": { - "requestType": "google.iam.v1.GetIamPolicyRequest", - "responseType": "google.iam.v1.Policy", - "options": { - "(google.api.http).post": "/v1/{resource=projects/*/instances/*}:getIamPolicy", - "(google.api.http).body": "*" - } - }, - "TestIamPermissions": { - "requestType": "google.iam.v1.TestIamPermissionsRequest", - "responseType": "google.iam.v1.TestIamPermissionsResponse", - "options": { - "(google.api.http).post": "/v1/{resource=projects/*/instances/*}:testIamPermissions", - "(google.api.http).body": "*" - } - } - } - }, - "InstanceConfig": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "displayName": { - "type": "string", - "id": 2 - } - } - }, - "Instance": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "config": { - "type": "string", - "id": 2 - }, - "displayName": { - "type": "string", - "id": 3 - }, - "nodeCount": { - "type": "int32", - "id": 5 - }, - "state": { - "type": "State", - "id": 6 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 7 - } - }, - "nested": { - "State": { - "values": { - "STATE_UNSPECIFIED": 0, - "CREATING": 1, - "READY": 2 - } - } - } - }, - "ListInstanceConfigsRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - } - } - }, - "ListInstanceConfigsResponse": { - "fields": { - "instanceConfigs": { - "rule": "repeated", - "type": "InstanceConfig", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "GetInstanceConfigRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "GetInstanceRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "CreateInstanceRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "instanceId": { - "type": "string", - "id": 2 - }, - "instance": { - "type": "Instance", - "id": 3 - } - } - }, - "ListInstancesRequest": { - "fields": { - "parent": { - "type": "string", - "id": 1 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - } - } - }, - "ListInstancesResponse": { - "fields": { - "instances": { - "rule": "repeated", - "type": "Instance", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } - } - }, - "UpdateInstanceRequest": { - "fields": { - "instance": { - "type": "Instance", - "id": 1 - }, - "fieldMask": { - "type": "google.protobuf.FieldMask", - "id": 2 - } - } - }, - "DeleteInstanceRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } - } - }, - "CreateInstanceMetadata": { - "fields": { - "instance": { - "type": "Instance", - "id": 1 - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "cancelTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - } - } - }, - "UpdateInstanceMetadata": { - "fields": { - "instance": { - "type": "Instance", - "id": 1 - }, - "startTime": { - "type": "google.protobuf.Timestamp", - "id": 2 - }, - "cancelTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - }, - "endTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - } - } - } - } - } + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "FileDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 } } }, - "v1": { - "options": { - "csharp_namespace": "Google.Cloud.Spanner.V1", - "go_package": "google.golang.org/genproto/googleapis/spanner/v1;spanner", - "java_multiple_files": true, - "java_outer_classname": "TypeProto", - "java_package": "com.google.spanner.v1", - "php_namespace": "Google\\Cloud\\Spanner\\V1", - "cc_enable_arenas": true + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } }, "nested": { - "Spanner": { - "methods": { - "CreateSession": { - "requestType": "CreateSessionRequest", - "responseType": "Session", - "options": { - "(google.api.http).post": "/v1/{database=projects/*/instances/*/databases/*}/sessions", - "(google.api.http).body": "*" - } - }, - "BatchCreateSessions": { - "requestType": "BatchCreateSessionsRequest", - "responseType": "BatchCreateSessionsResponse", - "options": { - "(google.api.http).post": "/v1/{database=projects/*/instances/*/databases/*}/sessions:batchCreate", - "(google.api.http).body": "*" - } - }, - "GetSession": { - "requestType": "GetSessionRequest", - "responseType": "Session", - "options": { - "(google.api.http).get": "/v1/{name=projects/*/instances/*/databases/*/sessions/*}" - } - }, - "ListSessions": { - "requestType": "ListSessionsRequest", - "responseType": "ListSessionsResponse", - "options": { - "(google.api.http).get": "/v1/{database=projects/*/instances/*/databases/*}/sessions" - } - }, - "DeleteSession": { - "requestType": "DeleteSessionRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).delete": "/v1/{name=projects/*/instances/*/databases/*/sessions/*}" - } - }, - "ExecuteSql": { - "requestType": "ExecuteSqlRequest", - "responseType": "ResultSet", - "options": { - "(google.api.http).post": "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeSql", - "(google.api.http).body": "*" - } - }, - "ExecuteStreamingSql": { - "requestType": "ExecuteSqlRequest", - "responseType": "PartialResultSet", - "responseStream": true, - "options": { - "(google.api.http).post": "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeStreamingSql", - "(google.api.http).body": "*" - } - }, - "ExecuteBatchDml": { - "requestType": "ExecuteBatchDmlRequest", - "responseType": "ExecuteBatchDmlResponse", - "options": { - "(google.api.http).post": "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeBatchDml", - "(google.api.http).body": "*" - } - }, - "Read": { - "requestType": "ReadRequest", - "responseType": "ResultSet", - "options": { - "(google.api.http).post": "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:read", - "(google.api.http).body": "*" - } - }, - "StreamingRead": { - "requestType": "ReadRequest", - "responseType": "PartialResultSet", - "responseStream": true, - "options": { - "(google.api.http).post": "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:streamingRead", - "(google.api.http).body": "*" - } - }, - "BeginTransaction": { - "requestType": "BeginTransactionRequest", - "responseType": "Transaction", - "options": { - "(google.api.http).post": "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:beginTransaction", - "(google.api.http).body": "*" - } - }, - "Commit": { - "requestType": "CommitRequest", - "responseType": "CommitResponse", - "options": { - "(google.api.http).post": "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:commit", - "(google.api.http).body": "*" - } + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 }, - "Rollback": { - "requestType": "RollbackRequest", - "responseType": "google.protobuf.Empty", - "options": { - "(google.api.http).post": "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:rollback", - "(google.api.http).body": "*" - } + "end": { + "type": "int32", + "id": 2 }, - "PartitionQuery": { - "requestType": "PartitionQueryRequest", - "responseType": "PartitionResponse", - "options": { - "(google.api.http).post": "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:partitionQuery", - "(google.api.http).body": "*" - } + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 }, - "PartitionRead": { - "requestType": "PartitionReadRequest", - "responseType": "PartitionResponse", - "options": { - "(google.api.http).post": "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:partitionRead", - "(google.api.http).body": "*" - } + "end": { + "type": "int32", + "id": 2 } } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "FieldDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 3 + }, + "label": { + "type": "Label", + "id": 4 + }, + "type": { + "type": "Type", + "id": 5 + }, + "typeName": { + "type": "string", + "id": 6 + }, + "extendee": { + "type": "string", + "id": 2 + }, + "defaultValue": { + "type": "string", + "id": 7 + }, + "oneofIndex": { + "type": "int32", + "id": 9 + }, + "jsonName": { + "type": "string", + "id": 10 + }, + "options": { + "type": "FieldOptions", + "id": 8 + } + }, + "nested": { + "Type": { + "values": { + "TYPE_DOUBLE": 1, + "TYPE_FLOAT": 2, + "TYPE_INT64": 3, + "TYPE_UINT64": 4, + "TYPE_INT32": 5, + "TYPE_FIXED64": 6, + "TYPE_FIXED32": 7, + "TYPE_BOOL": 8, + "TYPE_STRING": 9, + "TYPE_GROUP": 10, + "TYPE_MESSAGE": 11, + "TYPE_BYTES": 12, + "TYPE_UINT32": 13, + "TYPE_ENUM": 14, + "TYPE_SFIXED32": 15, + "TYPE_SFIXED64": 16, + "TYPE_SINT32": 17, + "TYPE_SINT64": 18 + } }, - "CreateSessionRequest": { + "Label": { + "values": { + "LABEL_OPTIONAL": 1, + "LABEL_REQUIRED": 2, + "LABEL_REPEATED": 3 + } + } + } + }, + "OneofDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { "fields": { - "database": { - "type": "string", + "start": { + "type": "int32", "id": 1 }, - "session": { - "type": "Session", + "end": { + "type": "int32", "id": 2 } } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "phpGenericServices": { + "type": "bool", + "id": 42, + "options": { + "default": false + } }, - "BatchCreateSessionsRequest": { - "fields": { - "database": { - "type": "string", - "id": 1 - }, - "sessionTemplate": { - "type": "Session", - "id": 2 - }, - "sessionCount": { - "type": "int32", - "id": 3 - } + "deprecated": { + "type": "bool", + "id": 23, + "options": { + "default": false } }, - "BatchCreateSessionsResponse": { - "fields": { - "session": { - "rule": "repeated", - "type": "Session", - "id": 1 - } + "ccEnableArenas": { + "type": "bool", + "id": 31, + "options": { + "default": false } }, - "Session": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "labels": { - "keyType": "string", - "type": "string", - "id": 2 - }, - "createTime": { - "type": "google.protobuf.Timestamp", - "id": 3 - }, - "approximateLastUseTime": { - "type": "google.protobuf.Timestamp", - "id": 4 - } + "objcClassPrefix": { + "type": "string", + "id": 36 + }, + "csharpNamespace": { + "type": "string", + "id": 37 + }, + "swiftPrefix": { + "type": "string", + "id": 39 + }, + "phpClassPrefix": { + "type": "string", + "id": 40 + }, + "phpNamespace": { + "type": "string", + "id": 41 + }, + "phpMetadataNamespace": { + "type": "string", + "id": 44 + }, + "rubyPackage": { + "type": "string", + "id": 45 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 38, + 38 + ] + ], + "nested": { + "OptimizeMode": { + "values": { + "SPEED": 1, + "CODE_SIZE": 2, + "LITE_RUNTIME": 3 + } + } + } + }, + "MessageOptions": { + "fields": { + "messageSetWireFormat": { + "type": "bool", + "id": 1, + "options": { + "default": false } }, - "GetSessionRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } + "noStandardDescriptorAccessor": { + "type": "bool", + "id": 2, + "options": { + "default": false } }, - "ListSessionsRequest": { - "fields": { - "database": { - "type": "string", - "id": 1 - }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 - } + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false } }, - "ListSessionsResponse": { - "fields": { - "sessions": { - "rule": "repeated", - "type": "Session", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 - } + "mapEntry": { + "type": "bool", + "id": 7 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 8, + 8 + ], + [ + 9, + 9 + ] + ] + }, + "FieldOptions": { + "fields": { + "ctype": { + "type": "CType", + "id": 1, + "options": { + "default": "STRING" } }, - "DeleteSessionRequest": { - "fields": { - "name": { - "type": "string", - "id": 1 - } + "packed": { + "type": "bool", + "id": 2 + }, + "jstype": { + "type": "JSType", + "id": 6, + "options": { + "default": "JS_NORMAL" } }, - "ExecuteSqlRequest": { - "fields": { - "session": { - "type": "string", - "id": 1 - }, - "transaction": { - "type": "TransactionSelector", - "id": 2 - }, - "sql": { - "type": "string", - "id": 3 - }, - "params": { - "type": "google.protobuf.Struct", - "id": 4 - }, - "paramTypes": { - "keyType": "string", - "type": "Type", - "id": 5 - }, - "resumeToken": { - "type": "bytes", - "id": 6 - }, - "queryMode": { - "type": "QueryMode", - "id": 7 - }, - "partitionToken": { - "type": "bytes", - "id": 8 - }, - "seqno": { - "type": "int64", - "id": 9 - } - }, - "nested": { - "QueryMode": { - "values": { - "NORMAL": 0, - "PLAN": 1, - "PROFILE": 2 - } - } + "lazy": { + "type": "bool", + "id": 5, + "options": { + "default": false } }, - "ExecuteBatchDmlRequest": { - "fields": { - "session": { - "type": "string", - "id": 1 - }, - "transaction": { - "type": "TransactionSelector", - "id": 2 - }, - "statements": { - "rule": "repeated", - "type": "Statement", - "id": 3 - }, - "seqno": { - "type": "int64", - "id": 4 - } - }, - "nested": { - "Statement": { - "fields": { - "sql": { - "type": "string", - "id": 1 - }, - "params": { - "type": "google.protobuf.Struct", - "id": 2 - }, - "paramTypes": { - "keyType": "string", - "type": "Type", - "id": 3 - } - } - } + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false } }, - "ExecuteBatchDmlResponse": { - "fields": { - "resultSets": { - "rule": "repeated", - "type": "ResultSet", - "id": 1 - }, - "status": { - "type": "google.rpc.Status", - "id": 2 - } + "weak": { + "type": "bool", + "id": 10, + "options": { + "default": false } }, - "PartitionOptions": { - "fields": { - "partitionSizeBytes": { - "type": "int64", - "id": 1 - }, - "maxPartitions": { - "type": "int64", - "id": 2 - } + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 4, + 4 + ] + ], + "nested": { + "CType": { + "values": { + "STRING": 0, + "CORD": 1, + "STRING_PIECE": 2 } }, - "PartitionQueryRequest": { - "fields": { - "session": { - "type": "string", - "id": 1 - }, - "transaction": { - "type": "TransactionSelector", - "id": 2 - }, - "sql": { - "type": "string", - "id": 3 - }, - "params": { - "type": "google.protobuf.Struct", - "id": 4 - }, - "paramTypes": { - "keyType": "string", - "type": "Type", - "id": 5 - }, - "partitionOptions": { - "type": "PartitionOptions", - "id": 6 - } + "JSType": { + "values": { + "JS_NORMAL": 0, + "JS_STRING": 1, + "JS_NUMBER": 2 } + } + } + }, + "OneofOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 }, - "PartitionReadRequest": { - "fields": { - "session": { - "type": "string", - "id": 1 - }, - "transaction": { - "type": "TransactionSelector", - "id": 2 - }, - "table": { - "type": "string", - "id": 3 - }, - "index": { - "type": "string", - "id": 4 - }, - "columns": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "keySet": { - "type": "KeySet", - "id": 6 - }, - "partitionOptions": { - "type": "PartitionOptions", - "id": 9 - } + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "reserved": [ + [ + 5, + 5 + ] + ] + }, + "EnumValueOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 1, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "ServiceOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false + } + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "MethodOptions": { + "fields": { + "deprecated": { + "type": "bool", + "id": 33, + "options": { + "default": false } }, - "Partition": { - "fields": { - "partitionToken": { - "type": "bytes", - "id": 1 - } + "idempotencyLevel": { + "type": "IdempotencyLevel", + "id": 34, + "options": { + "default": "IDEMPOTENCY_UNKNOWN" } }, - "PartitionResponse": { - "fields": { - "partitions": { - "rule": "repeated", - "type": "Partition", - "id": 1 - }, - "transaction": { - "type": "Transaction", - "id": 2 - } + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ], + "nested": { + "IdempotencyLevel": { + "values": { + "IDEMPOTENCY_UNKNOWN": 0, + "NO_SIDE_EFFECTS": 1, + "IDEMPOTENT": 2 } + } + } + }, + "UninterpretedOption": { + "fields": { + "name": { + "rule": "repeated", + "type": "NamePart", + "id": 2 }, - "ReadRequest": { - "fields": { - "session": { - "type": "string", - "id": 1 - }, - "transaction": { - "type": "TransactionSelector", - "id": 2 - }, - "table": { - "type": "string", - "id": 3 - }, - "index": { - "type": "string", - "id": 4 - }, - "columns": { - "rule": "repeated", - "type": "string", - "id": 5 - }, - "keySet": { - "type": "KeySet", - "id": 6 - }, - "limit": { - "type": "int64", - "id": 8 - }, - "resumeToken": { - "type": "bytes", - "id": 9 - }, - "partitionToken": { - "type": "bytes", - "id": 10 - } - } + "identifierValue": { + "type": "string", + "id": 3 }, - "BeginTransactionRequest": { - "fields": { - "session": { - "type": "string", - "id": 1 - }, - "options": { - "type": "TransactionOptions", - "id": 2 - } - } + "positiveIntValue": { + "type": "uint64", + "id": 4 }, - "CommitRequest": { - "oneofs": { - "transaction": { - "oneof": [ - "transactionId", - "singleUseTransaction" - ] - } - }, - "fields": { - "session": { - "type": "string", - "id": 1 - }, - "transactionId": { - "type": "bytes", - "id": 2 - }, - "singleUseTransaction": { - "type": "TransactionOptions", - "id": 3 - }, - "mutations": { - "rule": "repeated", - "type": "Mutation", - "id": 4 - } - } + "negativeIntValue": { + "type": "int64", + "id": 5 }, - "CommitResponse": { - "fields": { - "commitTimestamp": { - "type": "google.protobuf.Timestamp", - "id": 1 - } - } + "doubleValue": { + "type": "double", + "id": 6 }, - "RollbackRequest": { + "stringValue": { + "type": "bytes", + "id": 7 + }, + "aggregateValue": { + "type": "string", + "id": 8 + } + }, + "nested": { + "NamePart": { "fields": { - "session": { + "namePart": { + "rule": "required", "type": "string", "id": 1 }, - "transactionId": { - "type": "bytes", + "isExtension": { + "rule": "required", + "type": "bool", "id": 2 } } - }, - "KeyRange": { - "oneofs": { - "startKeyType": { - "oneof": [ - "startClosed", - "startOpen" - ] - }, - "endKeyType": { - "oneof": [ - "endClosed", - "endOpen" - ] - } - }, + } + } + }, + "SourceCodeInfo": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { "fields": { - "startClosed": { - "type": "google.protobuf.ListValue", + "path": { + "rule": "repeated", + "type": "int32", "id": 1 }, - "startOpen": { - "type": "google.protobuf.ListValue", + "span": { + "rule": "repeated", + "type": "int32", "id": 2 }, - "endClosed": { - "type": "google.protobuf.ListValue", + "leadingComments": { + "type": "string", "id": 3 }, - "endOpen": { - "type": "google.protobuf.ListValue", + "trailingComments": { + "type": "string", "id": 4 - } - } - }, - "KeySet": { - "fields": { - "keys": { - "rule": "repeated", - "type": "google.protobuf.ListValue", - "id": 1 }, - "ranges": { + "leadingDetachedComments": { "rule": "repeated", - "type": "KeyRange", - "id": 2 - }, - "all": { - "type": "bool", - "id": 3 + "type": "string", + "id": 6 } } - }, - "Mutation": { - "oneofs": { - "operation": { - "oneof": [ - "insert", - "update", - "insertOrUpdate", - "replace", - "delete" - ] - } - }, + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { "fields": { - "insert": { - "type": "Write", + "path": { + "rule": "repeated", + "type": "int32", "id": 1 }, - "update": { - "type": "Write", + "sourceFile": { + "type": "string", "id": 2 }, - "insertOrUpdate": { - "type": "Write", + "begin": { + "type": "int32", "id": 3 }, - "replace": { - "type": "Write", + "end": { + "type": "int32", "id": 4 - }, - "delete": { - "type": "Delete", - "id": 5 - } - }, - "nested": { - "Write": { - "fields": { - "table": { - "type": "string", - "id": 1 - }, - "columns": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "values": { - "rule": "repeated", - "type": "google.protobuf.ListValue", - "id": 3 - } - } - }, - "Delete": { - "fields": { - "table": { - "type": "string", - "id": 1 - }, - "keySet": { - "type": "KeySet", - "id": 2 - } - } } } + } + } + }, + "Any": { + "fields": { + "type_url": { + "type": "string", + "id": 1 }, - "ResultSet": { + "value": { + "type": "bytes", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + }, + "Timestamp": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Struct": { + "fields": { + "fields": { + "keyType": "string", + "type": "Value", + "id": 1 + } + } + }, + "Value": { + "oneofs": { + "kind": { + "oneof": [ + "nullValue", + "numberValue", + "stringValue", + "boolValue", + "structValue", + "listValue" + ] + } + }, + "fields": { + "nullValue": { + "type": "NullValue", + "id": 1 + }, + "numberValue": { + "type": "double", + "id": 2 + }, + "stringValue": { + "type": "string", + "id": 3 + }, + "boolValue": { + "type": "bool", + "id": 4 + }, + "structValue": { + "type": "Struct", + "id": 5 + }, + "listValue": { + "type": "ListValue", + "id": 6 + } + } + }, + "NullValue": { + "values": { + "NULL_VALUE": 0 + } + }, + "ListValue": { + "fields": { + "values": { + "rule": "repeated", + "type": "Value", + "id": 1 + } + } + } + } + }, + "rpc": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", + "java_multiple_files": true, + "java_outer_classname": "StatusProto", + "java_package": "com.google.rpc", + "objc_class_prefix": "RPC" + }, + "nested": { + "RetryInfo": { + "fields": { + "retryDelay": { + "type": "google.protobuf.Duration", + "id": 1 + } + } + }, + "DebugInfo": { + "fields": { + "stackEntries": { + "rule": "repeated", + "type": "string", + "id": 1 + }, + "detail": { + "type": "string", + "id": 2 + } + } + }, + "QuotaFailure": { + "fields": { + "violations": { + "rule": "repeated", + "type": "Violation", + "id": 1 + } + }, + "nested": { + "Violation": { "fields": { - "metadata": { - "type": "ResultSetMetadata", + "subject": { + "type": "string", "id": 1 }, - "rows": { - "rule": "repeated", - "type": "google.protobuf.ListValue", + "description": { + "type": "string", "id": 2 - }, - "stats": { - "type": "ResultSetStats", - "id": 3 } } - }, - "PartialResultSet": { + } + } + }, + "BadRequest": { + "fields": { + "fieldViolations": { + "rule": "repeated", + "type": "FieldViolation", + "id": 1 + } + }, + "nested": { + "FieldViolation": { "fields": { - "metadata": { - "type": "ResultSetMetadata", + "field": { + "type": "string", "id": 1 }, - "values": { - "rule": "repeated", - "type": "google.protobuf.Value", + "description": { + "type": "string", "id": 2 - }, - "chunkedValue": { - "type": "bool", - "id": 3 - }, - "resumeToken": { - "type": "bytes", - "id": 4 - }, - "stats": { - "type": "ResultSetStats", - "id": 5 } } + } + } + }, + "RequestInfo": { + "fields": { + "requestId": { + "type": "string", + "id": 1 + }, + "servingData": { + "type": "string", + "id": 2 + } + } + }, + "ResourceInfo": { + "fields": { + "resourceType": { + "type": "string", + "id": 1 + }, + "resourceName": { + "type": "string", + "id": 2 + }, + "owner": { + "type": "string", + "id": 3 }, - "ResultSetMetadata": { + "description": { + "type": "string", + "id": 4 + } + } + }, + "Help": { + "fields": { + "links": { + "rule": "repeated", + "type": "Link", + "id": 1 + } + }, + "nested": { + "Link": { "fields": { - "rowType": { - "type": "StructType", + "description": { + "type": "string", "id": 1 }, - "transaction": { - "type": "Transaction", + "url": { + "type": "string", "id": 2 } } + } + } + }, + "LocalizedMessage": { + "fields": { + "locale": { + "type": "string", + "id": 1 }, - "ResultSetStats": { - "oneofs": { - "rowCount": { - "oneof": [ - "rowCountExact", - "rowCountLowerBound" - ] - } - }, - "fields": { - "queryPlan": { - "type": "QueryPlan", - "id": 1 - }, - "queryStats": { - "type": "google.protobuf.Struct", - "id": 2 - }, - "rowCountExact": { - "type": "int64", - "id": 3 - }, - "rowCountLowerBound": { - "type": "int64", - "id": 4 + "message": { + "type": "string", + "id": 2 + } + } + }, + "Status": { + "fields": { + "code": { + "type": "int32", + "id": 1 + }, + "message": { + "type": "string", + "id": 2 + }, + "details": { + "rule": "repeated", + "type": "google.protobuf.Any", + "id": 3 + } + } + } + } + }, + "spanner": { + "nested": { + "admin": { + "nested": { + "database": { + "nested": { + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.Spanner.Admin.Database.V1", + "go_package": "google.golang.org/genproto/googleapis/spanner/admin/database/v1;database", + "java_multiple_files": true, + "java_outer_classname": "SpannerDatabaseAdminProto", + "java_package": "com.google.spanner.admin.database.v1", + "php_namespace": "Google\\Cloud\\Spanner\\Admin\\Database\\V1" + }, + "nested": { + "DatabaseAdmin": { + "methods": { + "ListDatabases": { + "requestType": "ListDatabasesRequest", + "responseType": "ListDatabasesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*/instances/*}/databases" + } + }, + "CreateDatabase": { + "requestType": "CreateDatabaseRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/instances/*}/databases", + "(google.api.http).body": "*" + } + }, + "GetDatabase": { + "requestType": "GetDatabaseRequest", + "responseType": "Database", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/instances/*/databases/*}" + } + }, + "UpdateDatabaseDdl": { + "requestType": "UpdateDatabaseDdlRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{database=projects/*/instances/*/databases/*}/ddl", + "(google.api.http).body": "*" + } + }, + "DropDatabase": { + "requestType": "DropDatabaseRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{database=projects/*/instances/*/databases/*}" + } + }, + "GetDatabaseDdl": { + "requestType": "GetDatabaseDdlRequest", + "responseType": "GetDatabaseDdlResponse", + "options": { + "(google.api.http).get": "/v1/{database=projects/*/instances/*/databases/*}/ddl" + } + }, + "SetIamPolicy": { + "requestType": "google.iam.v1.SetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v1/{resource=projects/*/instances/*/databases/*}:setIamPolicy", + "(google.api.http).body": "*" + } + }, + "GetIamPolicy": { + "requestType": "google.iam.v1.GetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v1/{resource=projects/*/instances/*/databases/*}:getIamPolicy", + "(google.api.http).body": "*" + } + }, + "TestIamPermissions": { + "requestType": "google.iam.v1.TestIamPermissionsRequest", + "responseType": "google.iam.v1.TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v1/{resource=projects/*/instances/*/databases/*}:testIamPermissions", + "(google.api.http).body": "*" + } + } + } + }, + "Database": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "state": { + "type": "State", + "id": 2 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2 + } + } + } + }, + "ListDatabasesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 3 + }, + "pageToken": { + "type": "string", + "id": 4 + } + } + }, + "ListDatabasesResponse": { + "fields": { + "databases": { + "rule": "repeated", + "type": "Database", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateDatabaseRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "createStatement": { + "type": "string", + "id": 2 + }, + "extraStatements": { + "rule": "repeated", + "type": "string", + "id": 3 + } + } + }, + "CreateDatabaseMetadata": { + "fields": { + "database": { + "type": "string", + "id": 1 + } + } + }, + "GetDatabaseRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } + }, + "UpdateDatabaseDdlRequest": { + "fields": { + "database": { + "type": "string", + "id": 1 + }, + "statements": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "operationId": { + "type": "string", + "id": 3 + } + } + }, + "UpdateDatabaseDdlMetadata": { + "fields": { + "database": { + "type": "string", + "id": 1 + }, + "statements": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "commitTimestamps": { + "rule": "repeated", + "type": "google.protobuf.Timestamp", + "id": 3 + } + } + }, + "DropDatabaseRequest": { + "fields": { + "database": { + "type": "string", + "id": 1 + } + } + }, + "GetDatabaseDdlRequest": { + "fields": { + "database": { + "type": "string", + "id": 1 + } + } + }, + "GetDatabaseDdlResponse": { + "fields": { + "statements": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + } + } } } }, - "PlanNode": { - "fields": { - "index": { - "type": "int32", - "id": 1 - }, - "kind": { - "type": "Kind", - "id": 2 - }, - "displayName": { - "type": "string", - "id": 3 - }, - "childLinks": { - "rule": "repeated", - "type": "ChildLink", - "id": 4 - }, - "shortRepresentation": { - "type": "ShortRepresentation", - "id": 5 - }, - "metadata": { - "type": "google.protobuf.Struct", - "id": 6 - }, - "executionStats": { - "type": "google.protobuf.Struct", - "id": 7 - } - }, + "instance": { "nested": { - "ChildLink": { - "fields": { - "childIndex": { - "type": "int32", - "id": 1 + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.Spanner.Admin.Instance.V1", + "go_package": "google.golang.org/genproto/googleapis/spanner/admin/instance/v1;instance", + "java_multiple_files": true, + "java_outer_classname": "SpannerInstanceAdminProto", + "java_package": "com.google.spanner.admin.instance.v1", + "php_namespace": "Google\\Cloud\\Spanner\\Admin\\Instance\\V1" + }, + "nested": { + "InstanceAdmin": { + "methods": { + "ListInstanceConfigs": { + "requestType": "ListInstanceConfigsRequest", + "responseType": "ListInstanceConfigsResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*}/instanceConfigs" + } + }, + "GetInstanceConfig": { + "requestType": "GetInstanceConfigRequest", + "responseType": "InstanceConfig", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/instanceConfigs/*}" + } + }, + "ListInstances": { + "requestType": "ListInstancesRequest", + "responseType": "ListInstancesResponse", + "options": { + "(google.api.http).get": "/v1/{parent=projects/*}/instances" + } + }, + "GetInstance": { + "requestType": "GetInstanceRequest", + "responseType": "Instance", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/instances/*}" + } + }, + "CreateInstance": { + "requestType": "CreateInstanceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*}/instances", + "(google.api.http).body": "*" + } + }, + "UpdateInstance": { + "requestType": "UpdateInstanceRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).patch": "/v1/{instance.name=projects/*/instances/*}", + "(google.api.http).body": "*" + } + }, + "DeleteInstance": { + "requestType": "DeleteInstanceRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/instances/*}" + } + }, + "SetIamPolicy": { + "requestType": "google.iam.v1.SetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v1/{resource=projects/*/instances/*}:setIamPolicy", + "(google.api.http).body": "*" + } + }, + "GetIamPolicy": { + "requestType": "google.iam.v1.GetIamPolicyRequest", + "responseType": "google.iam.v1.Policy", + "options": { + "(google.api.http).post": "/v1/{resource=projects/*/instances/*}:getIamPolicy", + "(google.api.http).body": "*" + } + }, + "TestIamPermissions": { + "requestType": "google.iam.v1.TestIamPermissionsRequest", + "responseType": "google.iam.v1.TestIamPermissionsResponse", + "options": { + "(google.api.http).post": "/v1/{resource=projects/*/instances/*}:testIamPermissions", + "(google.api.http).body": "*" + } + } + } + }, + "InstanceConfig": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "displayName": { + "type": "string", + "id": 2 + } + } + }, + "Instance": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "config": { + "type": "string", + "id": 2 + }, + "displayName": { + "type": "string", + "id": 3 + }, + "nodeCount": { + "type": "int32", + "id": 5 + }, + "state": { + "type": "State", + "id": 6 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 7 + } + }, + "nested": { + "State": { + "values": { + "STATE_UNSPECIFIED": 0, + "CREATING": 1, + "READY": 2 + } + } + } + }, + "ListInstanceConfigsRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + } + } + }, + "ListInstanceConfigsResponse": { + "fields": { + "instanceConfigs": { + "rule": "repeated", + "type": "InstanceConfig", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } }, - "type": { - "type": "string", - "id": 2 + "GetInstanceConfigRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } }, - "variable": { - "type": "string", - "id": 3 - } - } - }, - "ShortRepresentation": { - "fields": { - "description": { - "type": "string", - "id": 1 + "GetInstanceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } }, - "subqueries": { - "keyType": "string", - "type": "int32", - "id": 2 - } - } - }, - "Kind": { - "values": { - "KIND_UNSPECIFIED": 0, - "RELATIONAL": 1, - "SCALAR": 2 - } - } - } - }, - "QueryPlan": { - "fields": { - "planNodes": { - "rule": "repeated", - "type": "PlanNode", - "id": 1 - } - } - }, - "TransactionOptions": { - "oneofs": { - "mode": { - "oneof": [ - "readWrite", - "partitionedDml", - "readOnly" - ] - } - }, - "fields": { - "readWrite": { - "type": "ReadWrite", - "id": 1 - }, - "partitionedDml": { - "type": "PartitionedDml", - "id": 3 - }, - "readOnly": { - "type": "ReadOnly", - "id": 2 - } - }, - "nested": { - "ReadWrite": { - "fields": {} - }, - "PartitionedDml": { - "fields": {} - }, - "ReadOnly": { - "oneofs": { - "timestampBound": { - "oneof": [ - "strong", - "minReadTimestamp", - "maxStaleness", - "readTimestamp", - "exactStaleness" - ] - } - }, - "fields": { - "strong": { - "type": "bool", - "id": 1 + "CreateInstanceRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "instanceId": { + "type": "string", + "id": 2 + }, + "instance": { + "type": "Instance", + "id": 3 + } + } }, - "minReadTimestamp": { - "type": "google.protobuf.Timestamp", - "id": 2 + "ListInstancesRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + } + } }, - "maxStaleness": { - "type": "google.protobuf.Duration", - "id": 3 + "ListInstancesResponse": { + "fields": { + "instances": { + "rule": "repeated", + "type": "Instance", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } }, - "readTimestamp": { - "type": "google.protobuf.Timestamp", - "id": 4 + "UpdateInstanceRequest": { + "fields": { + "instance": { + "type": "Instance", + "id": 1 + }, + "fieldMask": { + "type": "google.protobuf.FieldMask", + "id": 2 + } + } }, - "exactStaleness": { - "type": "google.protobuf.Duration", - "id": 5 + "DeleteInstanceRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } + } }, - "returnReadTimestamp": { - "type": "bool", - "id": 6 - } - } - } - } - }, - "Transaction": { - "fields": { - "id": { - "type": "bytes", - "id": 1 - }, - "readTimestamp": { - "type": "google.protobuf.Timestamp", - "id": 2 - } - } - }, - "TransactionSelector": { - "oneofs": { - "selector": { - "oneof": [ - "singleUse", - "id", - "begin" - ] - } - }, - "fields": { - "singleUse": { - "type": "TransactionOptions", - "id": 1 - }, - "id": { - "type": "bytes", - "id": 2 - }, - "begin": { - "type": "TransactionOptions", - "id": 3 - } - } - }, - "Type": { - "fields": { - "code": { - "type": "TypeCode", - "id": 1 - }, - "arrayElementType": { - "type": "Type", - "id": 2 - }, - "structType": { - "type": "StructType", - "id": 3 - } - } - }, - "StructType": { - "fields": { - "fields": { - "rule": "repeated", - "type": "Field", - "id": 1 - } - }, - "nested": { - "Field": { - "fields": { - "name": { - "type": "string", - "id": 1 + "CreateInstanceMetadata": { + "fields": { + "instance": { + "type": "Instance", + "id": 1 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "cancelTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + } + } }, - "type": { - "type": "Type", - "id": 2 - } - } - } - } - }, - "TypeCode": { - "values": { - "TYPE_CODE_UNSPECIFIED": 0, - "BOOL": 1, - "INT64": 2, - "FLOAT64": 3, - "TIMESTAMP": 4, - "DATE": 5, - "STRING": 6, - "BYTES": 7, - "ARRAY": 8, - "STRUCT": 9 - } - } - } - } - } - }, - "api": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", - "java_multiple_files": true, - "java_outer_classname": "ClientProto", - "java_package": "com.google.api", - "objc_class_prefix": "GAPI", - "cc_enable_arenas": true - }, - "nested": { - "http": { - "type": "HttpRule", - "id": 72295728, - "extend": "google.protobuf.MethodOptions" - }, - "Http": { - "fields": { - "rules": { - "rule": "repeated", - "type": "HttpRule", - "id": 1 - }, - "fullyDecodeReservedExpansion": { - "type": "bool", - "id": 2 - } - } - }, - "HttpRule": { - "oneofs": { - "pattern": { - "oneof": [ - "get", - "put", - "post", - "delete", - "patch", - "custom" - ] - } - }, - "fields": { - "selector": { - "type": "string", - "id": 1 - }, - "get": { - "type": "string", - "id": 2 - }, - "put": { - "type": "string", - "id": 3 - }, - "post": { - "type": "string", - "id": 4 - }, - "delete": { - "type": "string", - "id": 5 - }, - "patch": { - "type": "string", - "id": 6 - }, - "custom": { - "type": "CustomHttpPattern", - "id": 8 - }, - "body": { - "type": "string", - "id": 7 - }, - "responseBody": { - "type": "string", - "id": 12 - }, - "additionalBindings": { - "rule": "repeated", - "type": "HttpRule", - "id": 11 - } - } - }, - "CustomHttpPattern": { - "fields": { - "kind": { - "type": "string", - "id": 1 - }, - "path": { - "type": "string", - "id": 2 - } - } - }, - "methodSignature": { - "rule": "repeated", - "type": "string", - "id": 1051, - "extend": "google.protobuf.MethodOptions" - }, - "defaultHost": { - "type": "string", - "id": 1049, - "extend": "google.protobuf.ServiceOptions" - }, - "oauthScopes": { - "type": "string", - "id": 1050, - "extend": "google.protobuf.ServiceOptions" - } - } - }, - "protobuf": { - "options": { - "go_package": "github.com/golang/protobuf/protoc-gen-go/descriptor;descriptor", - "java_package": "com.google.protobuf", - "java_outer_classname": "DescriptorProtos", - "csharp_namespace": "Google.Protobuf.Reflection", - "objc_class_prefix": "GPB", - "cc_enable_arenas": true, - "optimize_for": "SPEED" - }, - "nested": { - "FileDescriptorSet": { - "fields": { - "file": { - "rule": "repeated", - "type": "FileDescriptorProto", - "id": 1 - } - } - }, - "FileDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "package": { - "type": "string", - "id": 2 - }, - "dependency": { - "rule": "repeated", - "type": "string", - "id": 3 - }, - "publicDependency": { - "rule": "repeated", - "type": "int32", - "id": 10, - "options": { - "packed": false - } - }, - "weakDependency": { - "rule": "repeated", - "type": "int32", - "id": 11, - "options": { - "packed": false - } - }, - "messageType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 4 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 5 - }, - "service": { - "rule": "repeated", - "type": "ServiceDescriptorProto", - "id": 6 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 7 - }, - "options": { - "type": "FileOptions", - "id": 8 - }, - "sourceCodeInfo": { - "type": "SourceCodeInfo", - "id": 9 - }, - "syntax": { - "type": "string", - "id": 12 + "UpdateInstanceMetadata": { + "fields": { + "instance": { + "type": "Instance", + "id": 1 + }, + "startTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "cancelTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + } + } + } + } + } + } } } }, - "DescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "field": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 2 - }, - "extension": { - "rule": "repeated", - "type": "FieldDescriptorProto", - "id": 6 - }, - "nestedType": { - "rule": "repeated", - "type": "DescriptorProto", - "id": 3 - }, - "enumType": { - "rule": "repeated", - "type": "EnumDescriptorProto", - "id": 4 - }, - "extensionRange": { - "rule": "repeated", - "type": "ExtensionRange", - "id": 5 - }, - "oneofDecl": { - "rule": "repeated", - "type": "OneofDescriptorProto", - "id": 8 - }, - "options": { - "type": "MessageOptions", - "id": 7 - }, - "reservedRange": { - "rule": "repeated", - "type": "ReservedRange", - "id": 9 - }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 10 - } + "v1": { + "options": { + "csharp_namespace": "Google.Cloud.Spanner.V1", + "go_package": "google.golang.org/genproto/googleapis/spanner/v1;spanner", + "java_multiple_files": true, + "java_outer_classname": "TypeProto", + "java_package": "com.google.spanner.v1", + "php_namespace": "Google\\Cloud\\Spanner\\V1", + "cc_enable_arenas": true }, "nested": { - "ExtensionRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 + "Spanner": { + "methods": { + "CreateSession": { + "requestType": "CreateSessionRequest", + "responseType": "Session", + "options": { + "(google.api.http).post": "/v1/{database=projects/*/instances/*/databases/*}/sessions", + "(google.api.http).body": "*" + } }, - "end": { - "type": "int32", - "id": 2 + "BatchCreateSessions": { + "requestType": "BatchCreateSessionsRequest", + "responseType": "BatchCreateSessionsResponse", + "options": { + "(google.api.http).post": "/v1/{database=projects/*/instances/*/databases/*}/sessions:batchCreate", + "(google.api.http).body": "*" + } }, - "options": { - "type": "ExtensionRangeOptions", - "id": 3 - } - } - }, - "ReservedRange": { - "fields": { - "start": { - "type": "int32", - "id": 1 + "GetSession": { + "requestType": "GetSessionRequest", + "responseType": "Session", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/instances/*/databases/*/sessions/*}" + } }, - "end": { - "type": "int32", - "id": 2 - } - } - } - } - }, - "ExtensionRangeOptions": { - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "FieldDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 3 - }, - "label": { - "type": "Label", - "id": 4 - }, - "type": { - "type": "Type", - "id": 5 - }, - "typeName": { - "type": "string", - "id": 6 - }, - "extendee": { - "type": "string", - "id": 2 - }, - "defaultValue": { - "type": "string", - "id": 7 - }, - "oneofIndex": { - "type": "int32", - "id": 9 - }, - "jsonName": { - "type": "string", - "id": 10 - }, - "options": { - "type": "FieldOptions", - "id": 8 - } - }, - "nested": { - "Type": { - "values": { - "TYPE_DOUBLE": 1, - "TYPE_FLOAT": 2, - "TYPE_INT64": 3, - "TYPE_UINT64": 4, - "TYPE_INT32": 5, - "TYPE_FIXED64": 6, - "TYPE_FIXED32": 7, - "TYPE_BOOL": 8, - "TYPE_STRING": 9, - "TYPE_GROUP": 10, - "TYPE_MESSAGE": 11, - "TYPE_BYTES": 12, - "TYPE_UINT32": 13, - "TYPE_ENUM": 14, - "TYPE_SFIXED32": 15, - "TYPE_SFIXED64": 16, - "TYPE_SINT32": 17, - "TYPE_SINT64": 18 - } - }, - "Label": { - "values": { - "LABEL_OPTIONAL": 1, - "LABEL_REQUIRED": 2, - "LABEL_REPEATED": 3 + "ListSessions": { + "requestType": "ListSessionsRequest", + "responseType": "ListSessionsResponse", + "options": { + "(google.api.http).get": "/v1/{database=projects/*/instances/*/databases/*}/sessions" + } + }, + "DeleteSession": { + "requestType": "DeleteSessionRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1/{name=projects/*/instances/*/databases/*/sessions/*}" + } + }, + "ExecuteSql": { + "requestType": "ExecuteSqlRequest", + "responseType": "ResultSet", + "options": { + "(google.api.http).post": "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeSql", + "(google.api.http).body": "*" + } + }, + "ExecuteStreamingSql": { + "requestType": "ExecuteSqlRequest", + "responseType": "PartialResultSet", + "responseStream": true, + "options": { + "(google.api.http).post": "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeStreamingSql", + "(google.api.http).body": "*" + } + }, + "ExecuteBatchDml": { + "requestType": "ExecuteBatchDmlRequest", + "responseType": "ExecuteBatchDmlResponse", + "options": { + "(google.api.http).post": "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:executeBatchDml", + "(google.api.http).body": "*" + } + }, + "Read": { + "requestType": "ReadRequest", + "responseType": "ResultSet", + "options": { + "(google.api.http).post": "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:read", + "(google.api.http).body": "*" + } + }, + "StreamingRead": { + "requestType": "ReadRequest", + "responseType": "PartialResultSet", + "responseStream": true, + "options": { + "(google.api.http).post": "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:streamingRead", + "(google.api.http).body": "*" + } + }, + "BeginTransaction": { + "requestType": "BeginTransactionRequest", + "responseType": "Transaction", + "options": { + "(google.api.http).post": "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:beginTransaction", + "(google.api.http).body": "*" + } + }, + "Commit": { + "requestType": "CommitRequest", + "responseType": "CommitResponse", + "options": { + "(google.api.http).post": "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:commit", + "(google.api.http).body": "*" + } + }, + "Rollback": { + "requestType": "RollbackRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).post": "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:rollback", + "(google.api.http).body": "*" + } + }, + "PartitionQuery": { + "requestType": "PartitionQueryRequest", + "responseType": "PartitionResponse", + "options": { + "(google.api.http).post": "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:partitionQuery", + "(google.api.http).body": "*" + } + }, + "PartitionRead": { + "requestType": "PartitionReadRequest", + "responseType": "PartitionResponse", + "options": { + "(google.api.http).post": "/v1/{session=projects/*/instances/*/databases/*/sessions/*}:partitionRead", + "(google.api.http).body": "*" + } + } } - } - } - }, - "OneofDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "options": { - "type": "OneofOptions", - "id": 2 - } - } - }, - "EnumDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "value": { - "rule": "repeated", - "type": "EnumValueDescriptorProto", - "id": 2 - }, - "options": { - "type": "EnumOptions", - "id": 3 - }, - "reservedRange": { - "rule": "repeated", - "type": "EnumReservedRange", - "id": 4 }, - "reservedName": { - "rule": "repeated", - "type": "string", - "id": 5 - } - }, - "nested": { - "EnumReservedRange": { + "CreateSessionRequest": { "fields": { - "start": { - "type": "int32", + "database": { + "type": "string", "id": 1 }, - "end": { - "type": "int32", + "session": { + "type": "Session", "id": 2 } } - } - } - }, - "EnumValueDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "number": { - "type": "int32", - "id": 2 - }, - "options": { - "type": "EnumValueOptions", - "id": 3 - } - } - }, - "ServiceDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "method": { - "rule": "repeated", - "type": "MethodDescriptorProto", - "id": 2 - }, - "options": { - "type": "ServiceOptions", - "id": 3 - } - } - }, - "MethodDescriptorProto": { - "fields": { - "name": { - "type": "string", - "id": 1 - }, - "inputType": { - "type": "string", - "id": 2 - }, - "outputType": { - "type": "string", - "id": 3 - }, - "options": { - "type": "MethodOptions", - "id": 4 - }, - "clientStreaming": { - "type": "bool", - "id": 5, - "options": { - "default": false - } - }, - "serverStreaming": { - "type": "bool", - "id": 6, - "options": { - "default": false - } - } - } - }, - "FileOptions": { - "fields": { - "javaPackage": { - "type": "string", - "id": 1 - }, - "javaOuterClassname": { - "type": "string", - "id": 8 - }, - "javaMultipleFiles": { - "type": "bool", - "id": 10, - "options": { - "default": false - } - }, - "javaGenerateEqualsAndHash": { - "type": "bool", - "id": 20, - "options": { - "deprecated": true - } - }, - "javaStringCheckUtf8": { - "type": "bool", - "id": 27, - "options": { - "default": false - } - }, - "optimizeFor": { - "type": "OptimizeMode", - "id": 9, - "options": { - "default": "SPEED" - } - }, - "goPackage": { - "type": "string", - "id": 11 }, - "ccGenericServices": { - "type": "bool", - "id": 16, - "options": { - "default": false + "BatchCreateSessionsRequest": { + "fields": { + "database": { + "type": "string", + "id": 1 + }, + "sessionTemplate": { + "type": "Session", + "id": 2 + }, + "sessionCount": { + "type": "int32", + "id": 3 + } } }, - "javaGenericServices": { - "type": "bool", - "id": 17, - "options": { - "default": false + "BatchCreateSessionsResponse": { + "fields": { + "session": { + "rule": "repeated", + "type": "Session", + "id": 1 + } } }, - "pyGenericServices": { - "type": "bool", - "id": 18, - "options": { - "default": false + "Session": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "labels": { + "keyType": "string", + "type": "string", + "id": 2 + }, + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 3 + }, + "approximateLastUseTime": { + "type": "google.protobuf.Timestamp", + "id": 4 + } } }, - "phpGenericServices": { - "type": "bool", - "id": 42, - "options": { - "default": false + "GetSessionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } } }, - "deprecated": { - "type": "bool", - "id": 23, - "options": { - "default": false + "ListSessionsRequest": { + "fields": { + "database": { + "type": "string", + "id": 1 + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + } } }, - "ccEnableArenas": { - "type": "bool", - "id": 31, - "options": { - "default": false + "ListSessionsResponse": { + "fields": { + "sessions": { + "rule": "repeated", + "type": "Session", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } } }, - "objcClassPrefix": { - "type": "string", - "id": 36 - }, - "csharpNamespace": { - "type": "string", - "id": 37 - }, - "swiftPrefix": { - "type": "string", - "id": 39 - }, - "phpClassPrefix": { - "type": "string", - "id": 40 - }, - "phpNamespace": { - "type": "string", - "id": 41 - }, - "phpMetadataNamespace": { - "type": "string", - "id": 44 - }, - "rubyPackage": { - "type": "string", - "id": 45 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 38, - 38 - ] - ], - "nested": { - "OptimizeMode": { - "values": { - "SPEED": 1, - "CODE_SIZE": 2, - "LITE_RUNTIME": 3 - } - } - } - }, - "MessageOptions": { - "fields": { - "messageSetWireFormat": { - "type": "bool", - "id": 1, - "options": { - "default": false + "DeleteSessionRequest": { + "fields": { + "name": { + "type": "string", + "id": 1 + } } }, - "noStandardDescriptorAccessor": { - "type": "bool", - "id": 2, - "options": { - "default": false + "ExecuteSqlRequest": { + "fields": { + "session": { + "type": "string", + "id": 1 + }, + "transaction": { + "type": "TransactionSelector", + "id": 2 + }, + "sql": { + "type": "string", + "id": 3 + }, + "params": { + "type": "google.protobuf.Struct", + "id": 4 + }, + "paramTypes": { + "keyType": "string", + "type": "Type", + "id": 5 + }, + "resumeToken": { + "type": "bytes", + "id": 6 + }, + "queryMode": { + "type": "QueryMode", + "id": 7 + }, + "partitionToken": { + "type": "bytes", + "id": 8 + }, + "seqno": { + "type": "int64", + "id": 9 + } + }, + "nested": { + "QueryMode": { + "values": { + "NORMAL": 0, + "PLAN": 1, + "PROFILE": 2 + } + } } }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false + "ExecuteBatchDmlRequest": { + "fields": { + "session": { + "type": "string", + "id": 1 + }, + "transaction": { + "type": "TransactionSelector", + "id": 2 + }, + "statements": { + "rule": "repeated", + "type": "Statement", + "id": 3 + }, + "seqno": { + "type": "int64", + "id": 4 + } + }, + "nested": { + "Statement": { + "fields": { + "sql": { + "type": "string", + "id": 1 + }, + "params": { + "type": "google.protobuf.Struct", + "id": 2 + }, + "paramTypes": { + "keyType": "string", + "type": "Type", + "id": 3 + } + } + } } }, - "mapEntry": { - "type": "bool", - "id": 7 - }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 8, - 8 - ], - [ - 9, - 9 - ] - ] - }, - "FieldOptions": { - "fields": { - "ctype": { - "type": "CType", - "id": 1, - "options": { - "default": "STRING" + "ExecuteBatchDmlResponse": { + "fields": { + "resultSets": { + "rule": "repeated", + "type": "ResultSet", + "id": 1 + }, + "status": { + "type": "google.rpc.Status", + "id": 2 + } } }, - "packed": { - "type": "bool", - "id": 2 - }, - "jstype": { - "type": "JSType", - "id": 6, - "options": { - "default": "JS_NORMAL" + "PartitionOptions": { + "fields": { + "partitionSizeBytes": { + "type": "int64", + "id": 1 + }, + "maxPartitions": { + "type": "int64", + "id": 2 + } } }, - "lazy": { - "type": "bool", - "id": 5, - "options": { - "default": false + "PartitionQueryRequest": { + "fields": { + "session": { + "type": "string", + "id": 1 + }, + "transaction": { + "type": "TransactionSelector", + "id": 2 + }, + "sql": { + "type": "string", + "id": 3 + }, + "params": { + "type": "google.protobuf.Struct", + "id": 4 + }, + "paramTypes": { + "keyType": "string", + "type": "Type", + "id": 5 + }, + "partitionOptions": { + "type": "PartitionOptions", + "id": 6 + } } }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false + "PartitionReadRequest": { + "fields": { + "session": { + "type": "string", + "id": 1 + }, + "transaction": { + "type": "TransactionSelector", + "id": 2 + }, + "table": { + "type": "string", + "id": 3 + }, + "index": { + "type": "string", + "id": 4 + }, + "columns": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "keySet": { + "type": "KeySet", + "id": 6 + }, + "partitionOptions": { + "type": "PartitionOptions", + "id": 9 + } } }, - "weak": { - "type": "bool", - "id": 10, - "options": { - "default": false + "Partition": { + "fields": { + "partitionToken": { + "type": "bytes", + "id": 1 + } } }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 4, - 4 - ] - ], - "nested": { - "CType": { - "values": { - "STRING": 0, - "CORD": 1, - "STRING_PIECE": 2 + "PartitionResponse": { + "fields": { + "partitions": { + "rule": "repeated", + "type": "Partition", + "id": 1 + }, + "transaction": { + "type": "Transaction", + "id": 2 + } } }, - "JSType": { - "values": { - "JS_NORMAL": 0, - "JS_STRING": 1, - "JS_NUMBER": 2 + "ReadRequest": { + "fields": { + "session": { + "type": "string", + "id": 1 + }, + "transaction": { + "type": "TransactionSelector", + "id": 2 + }, + "table": { + "type": "string", + "id": 3 + }, + "index": { + "type": "string", + "id": 4 + }, + "columns": { + "rule": "repeated", + "type": "string", + "id": 5 + }, + "keySet": { + "type": "KeySet", + "id": 6 + }, + "limit": { + "type": "int64", + "id": 8 + }, + "resumeToken": { + "type": "bytes", + "id": 9 + }, + "partitionToken": { + "type": "bytes", + "id": 10 + } } - } - } - }, - "OneofOptions": { - "fields": { - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "EnumOptions": { - "fields": { - "allowAlias": { - "type": "bool", - "id": 2 }, - "deprecated": { - "type": "bool", - "id": 3, - "options": { - "default": false + "BeginTransactionRequest": { + "fields": { + "session": { + "type": "string", + "id": 1 + }, + "options": { + "type": "TransactionOptions", + "id": 2 + } } }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "reserved": [ - [ - 5, - 5 - ] - ] - }, - "EnumValueOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 1, - "options": { - "default": false + "CommitRequest": { + "oneofs": { + "transaction": { + "oneof": [ + "transactionId", + "singleUseTransaction" + ] + } + }, + "fields": { + "session": { + "type": "string", + "id": 1 + }, + "transactionId": { + "type": "bytes", + "id": 2 + }, + "singleUseTransaction": { + "type": "TransactionOptions", + "id": 3 + }, + "mutations": { + "rule": "repeated", + "type": "Mutation", + "id": 4 + } } }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "ServiceOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false + "CommitResponse": { + "fields": { + "commitTimestamp": { + "type": "google.protobuf.Timestamp", + "id": 1 + } } }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ] - }, - "MethodOptions": { - "fields": { - "deprecated": { - "type": "bool", - "id": 33, - "options": { - "default": false + "RollbackRequest": { + "fields": { + "session": { + "type": "string", + "id": 1 + }, + "transactionId": { + "type": "bytes", + "id": 2 + } } }, - "idempotencyLevel": { - "type": "IdempotencyLevel", - "id": 34, - "options": { - "default": "IDEMPOTENCY_UNKNOWN" + "KeyRange": { + "oneofs": { + "startKeyType": { + "oneof": [ + "startClosed", + "startOpen" + ] + }, + "endKeyType": { + "oneof": [ + "endClosed", + "endOpen" + ] + } + }, + "fields": { + "startClosed": { + "type": "google.protobuf.ListValue", + "id": 1 + }, + "startOpen": { + "type": "google.protobuf.ListValue", + "id": 2 + }, + "endClosed": { + "type": "google.protobuf.ListValue", + "id": 3 + }, + "endOpen": { + "type": "google.protobuf.ListValue", + "id": 4 + } } }, - "uninterpretedOption": { - "rule": "repeated", - "type": "UninterpretedOption", - "id": 999 - } - }, - "extensions": [ - [ - 1000, - 536870911 - ] - ], - "nested": { - "IdempotencyLevel": { - "values": { - "IDEMPOTENCY_UNKNOWN": 0, - "NO_SIDE_EFFECTS": 1, - "IDEMPOTENT": 2 + "KeySet": { + "fields": { + "keys": { + "rule": "repeated", + "type": "google.protobuf.ListValue", + "id": 1 + }, + "ranges": { + "rule": "repeated", + "type": "KeyRange", + "id": 2 + }, + "all": { + "type": "bool", + "id": 3 + } } - } - } - }, - "UninterpretedOption": { - "fields": { - "name": { - "rule": "repeated", - "type": "NamePart", - "id": 2 - }, - "identifierValue": { - "type": "string", - "id": 3 }, - "positiveIntValue": { - "type": "uint64", - "id": 4 + "Mutation": { + "oneofs": { + "operation": { + "oneof": [ + "insert", + "update", + "insertOrUpdate", + "replace", + "delete" + ] + } + }, + "fields": { + "insert": { + "type": "Write", + "id": 1 + }, + "update": { + "type": "Write", + "id": 2 + }, + "insertOrUpdate": { + "type": "Write", + "id": 3 + }, + "replace": { + "type": "Write", + "id": 4 + }, + "delete": { + "type": "Delete", + "id": 5 + } + }, + "nested": { + "Write": { + "fields": { + "table": { + "type": "string", + "id": 1 + }, + "columns": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "values": { + "rule": "repeated", + "type": "google.protobuf.ListValue", + "id": 3 + } + } + }, + "Delete": { + "fields": { + "table": { + "type": "string", + "id": 1 + }, + "keySet": { + "type": "KeySet", + "id": 2 + } + } + } + } }, - "negativeIntValue": { - "type": "int64", - "id": 5 + "ResultSet": { + "fields": { + "metadata": { + "type": "ResultSetMetadata", + "id": 1 + }, + "rows": { + "rule": "repeated", + "type": "google.protobuf.ListValue", + "id": 2 + }, + "stats": { + "type": "ResultSetStats", + "id": 3 + } + } }, - "doubleValue": { - "type": "double", - "id": 6 + "PartialResultSet": { + "fields": { + "metadata": { + "type": "ResultSetMetadata", + "id": 1 + }, + "values": { + "rule": "repeated", + "type": "google.protobuf.Value", + "id": 2 + }, + "chunkedValue": { + "type": "bool", + "id": 3 + }, + "resumeToken": { + "type": "bytes", + "id": 4 + }, + "stats": { + "type": "ResultSetStats", + "id": 5 + } + } }, - "stringValue": { - "type": "bytes", - "id": 7 + "ResultSetMetadata": { + "fields": { + "rowType": { + "type": "StructType", + "id": 1 + }, + "transaction": { + "type": "Transaction", + "id": 2 + } + } }, - "aggregateValue": { - "type": "string", - "id": 8 - } - }, - "nested": { - "NamePart": { + "ResultSetStats": { + "oneofs": { + "rowCount": { + "oneof": [ + "rowCountExact", + "rowCountLowerBound" + ] + } + }, "fields": { - "namePart": { - "rule": "required", - "type": "string", + "queryPlan": { + "type": "QueryPlan", "id": 1 }, - "isExtension": { - "rule": "required", - "type": "bool", + "queryStats": { + "type": "google.protobuf.Struct", "id": 2 + }, + "rowCountExact": { + "type": "int64", + "id": 3 + }, + "rowCountLowerBound": { + "type": "int64", + "id": 4 } } - } - } - }, - "SourceCodeInfo": { - "fields": { - "location": { - "rule": "repeated", - "type": "Location", - "id": 1 - } - }, - "nested": { - "Location": { + }, + "PlanNode": { "fields": { - "path": { - "rule": "repeated", + "index": { "type": "int32", "id": 1 }, - "span": { - "rule": "repeated", - "type": "int32", + "kind": { + "type": "Kind", "id": 2 }, - "leadingComments": { + "displayName": { "type": "string", "id": 3 }, - "trailingComments": { - "type": "string", + "childLinks": { + "rule": "repeated", + "type": "ChildLink", "id": 4 }, - "leadingDetachedComments": { - "rule": "repeated", - "type": "string", + "shortRepresentation": { + "type": "ShortRepresentation", + "id": 5 + }, + "metadata": { + "type": "google.protobuf.Struct", "id": 6 + }, + "executionStats": { + "type": "google.protobuf.Struct", + "id": 7 + } + }, + "nested": { + "ChildLink": { + "fields": { + "childIndex": { + "type": "int32", + "id": 1 + }, + "type": { + "type": "string", + "id": 2 + }, + "variable": { + "type": "string", + "id": 3 + } + } + }, + "ShortRepresentation": { + "fields": { + "description": { + "type": "string", + "id": 1 + }, + "subqueries": { + "keyType": "string", + "type": "int32", + "id": 2 + } + } + }, + "Kind": { + "values": { + "KIND_UNSPECIFIED": 0, + "RELATIONAL": 1, + "SCALAR": 2 + } } } - } - } - }, - "GeneratedCodeInfo": { - "fields": { - "annotation": { - "rule": "repeated", - "type": "Annotation", - "id": 1 - } - }, - "nested": { - "Annotation": { + }, + "QueryPlan": { + "fields": { + "planNodes": { + "rule": "repeated", + "type": "PlanNode", + "id": 1 + } + } + }, + "TransactionOptions": { + "oneofs": { + "mode": { + "oneof": [ + "readWrite", + "partitionedDml", + "readOnly" + ] + } + }, + "fields": { + "readWrite": { + "type": "ReadWrite", + "id": 1 + }, + "partitionedDml": { + "type": "PartitionedDml", + "id": 3 + }, + "readOnly": { + "type": "ReadOnly", + "id": 2 + } + }, + "nested": { + "ReadWrite": { + "fields": {} + }, + "PartitionedDml": { + "fields": {} + }, + "ReadOnly": { + "oneofs": { + "timestampBound": { + "oneof": [ + "strong", + "minReadTimestamp", + "maxStaleness", + "readTimestamp", + "exactStaleness" + ] + } + }, + "fields": { + "strong": { + "type": "bool", + "id": 1 + }, + "minReadTimestamp": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "maxStaleness": { + "type": "google.protobuf.Duration", + "id": 3 + }, + "readTimestamp": { + "type": "google.protobuf.Timestamp", + "id": 4 + }, + "exactStaleness": { + "type": "google.protobuf.Duration", + "id": 5 + }, + "returnReadTimestamp": { + "type": "bool", + "id": 6 + } + } + } + } + }, + "Transaction": { + "fields": { + "id": { + "type": "bytes", + "id": 1 + }, + "readTimestamp": { + "type": "google.protobuf.Timestamp", + "id": 2 + } + } + }, + "TransactionSelector": { + "oneofs": { + "selector": { + "oneof": [ + "singleUse", + "id", + "begin" + ] + } + }, "fields": { - "path": { - "rule": "repeated", - "type": "int32", + "singleUse": { + "type": "TransactionOptions", "id": 1 }, - "sourceFile": { - "type": "string", + "id": { + "type": "bytes", "id": 2 }, "begin": { - "type": "int32", + "type": "TransactionOptions", "id": 3 + } + } + }, + "Type": { + "fields": { + "code": { + "type": "TypeCode", + "id": 1 }, - "end": { - "type": "int32", - "id": 4 + "arrayElementType": { + "type": "Type", + "id": 2 + }, + "structType": { + "type": "StructType", + "id": 3 } } - } - } - }, - "Any": { - "fields": { - "type_url": { - "type": "string", - "id": 1 }, - "value": { - "type": "bytes", - "id": 2 - } - } - }, - "Duration": { - "fields": { - "seconds": { - "type": "int64", - "id": 1 + "StructType": { + "fields": { + "fields": { + "rule": "repeated", + "type": "Field", + "id": 1 + } + }, + "nested": { + "Field": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "type": { + "type": "Type", + "id": 2 + } + } + } + } }, - "nanos": { - "type": "int32", - "id": 2 + "TypeCode": { + "values": { + "TYPE_CODE_UNSPECIFIED": 0, + "BOOL": 1, + "INT64": 2, + "FLOAT64": 3, + "TIMESTAMP": 4, + "DATE": 5, + "STRING": 6, + "BYTES": 7, + "ARRAY": 8, + "STRUCT": 9 + } } } + } + } + }, + "api": { + "options": { + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", + "java_multiple_files": true, + "java_outer_classname": "ClientProto", + "java_package": "com.google.api", + "objc_class_prefix": "GAPI", + "cc_enable_arenas": true + }, + "nested": { + "http": { + "type": "HttpRule", + "id": 72295728, + "extend": "google.protobuf.MethodOptions" }, - "Empty": { - "fields": {} - }, - "Timestamp": { + "Http": { "fields": { - "seconds": { - "type": "int64", + "rules": { + "rule": "repeated", + "type": "HttpRule", "id": 1 }, - "nanos": { - "type": "int32", + "fullyDecodeReservedExpansion": { + "type": "bool", "id": 2 } } }, - "FieldMask": { - "fields": { - "paths": { - "rule": "repeated", - "type": "string", - "id": 1 - } - } - }, - "Struct": { - "fields": { - "fields": { - "keyType": "string", - "type": "Value", - "id": 1 - } - } - }, - "Value": { + "HttpRule": { "oneofs": { - "kind": { + "pattern": { "oneof": [ - "nullValue", - "numberValue", - "stringValue", - "boolValue", - "structValue", - "listValue" + "get", + "put", + "post", + "delete", + "patch", + "custom" ] } }, "fields": { - "nullValue": { - "type": "NullValue", + "selector": { + "type": "string", "id": 1 }, - "numberValue": { - "type": "double", + "get": { + "type": "string", "id": 2 }, - "stringValue": { + "put": { "type": "string", "id": 3 }, - "boolValue": { - "type": "bool", + "post": { + "type": "string", "id": 4 }, - "structValue": { - "type": "Struct", + "delete": { + "type": "string", "id": 5 }, - "listValue": { - "type": "ListValue", + "patch": { + "type": "string", "id": 6 + }, + "custom": { + "type": "CustomHttpPattern", + "id": 8 + }, + "body": { + "type": "string", + "id": 7 + }, + "responseBody": { + "type": "string", + "id": 12 + }, + "additionalBindings": { + "rule": "repeated", + "type": "HttpRule", + "id": 11 } } }, - "NullValue": { - "values": { - "NULL_VALUE": 0 - } - }, - "ListValue": { + "CustomHttpPattern": { "fields": { - "values": { - "rule": "repeated", - "type": "Value", + "kind": { + "type": "string", "id": 1 + }, + "path": { + "type": "string", + "id": 2 } } + }, + "methodSignature": { + "rule": "repeated", + "type": "string", + "id": 1051, + "extend": "google.protobuf.MethodOptions" + }, + "defaultHost": { + "type": "string", + "id": 1049, + "extend": "google.protobuf.ServiceOptions" + }, + "oauthScopes": { + "type": "string", + "id": 1050, + "extend": "google.protobuf.ServiceOptions" } } }, @@ -3051,34 +3213,6 @@ } } } - }, - "rpc": { - "options": { - "go_package": "google.golang.org/genproto/googleapis/rpc/status;status", - "java_multiple_files": true, - "java_outer_classname": "StatusProto", - "java_package": "com.google.rpc", - "objc_class_prefix": "RPC" - }, - "nested": { - "Status": { - "fields": { - "code": { - "type": "int32", - "id": 1 - }, - "message": { - "type": "string", - "id": 2 - }, - "details": { - "rule": "repeated", - "type": "google.protobuf.Any", - "id": 3 - } - } - } - } } } } diff --git a/src/extra_proto_list.json b/src/extra_proto_list.json new file mode 100644 index 000000000..ab9f29a36 --- /dev/null +++ b/src/extra_proto_list.json @@ -0,0 +1 @@ +["../protos/google/rpc/error_details.proto"] diff --git a/src/transaction-runner.ts b/src/transaction-runner.ts index 49776f860..3a61c3901 100644 --- a/src/transaction-runner.ts +++ b/src/transaction-runner.ts @@ -15,24 +15,21 @@ */ import {promisify} from '@google-cloud/promisify'; -import {GoogleProtoFilesRoot} from 'google-gax'; import {Metadata, ServiceError, status} from 'grpc'; import {join} from 'path'; -import {common as p, loadSync} from 'protobufjs'; +import {Root} from 'protobufjs'; import * as through from 'through2'; import {Session} from './session'; import {Transaction} from './transaction'; +const jsonProtos = require('../protos/protos.json'); const RETRY_INFO = 'google.rpc.retryinfo-bin'; const RETRYABLE: status[] = [status.ABORTED, status.UNKNOWN]; // tslint:disable-next-line variable-name -const RetryInfo = loadSync( - join(__dirname, '..', 'protos', 'google/rpc/error_details.proto'), - new GoogleProtoFilesRoot() -).lookup('google.rpc.RetryInfo'); +const RetryInfo = Root.fromJSON(jsonProtos).lookup('google.rpc.RetryInfo'); /** * @typedef {object} RunTransactionOptions diff --git a/test/transaction-runner.ts b/test/transaction-runner.ts index 0d0eee8fa..e2d57a304 100644 --- a/test/transaction-runner.ts +++ b/test/transaction-runner.ts @@ -43,7 +43,7 @@ describe('TransactionRunner', () => { .stub() .withArgs(RETRY_KEY) .returns(RETRY_INFO); - const LOAD_SYNC = sandbox.stub().returns({lookup: LOOKUP}); + const FROM_JSON = sandbox.stub().returns({lookup: LOOKUP}); const SESSION = { transaction: () => fakeTransaction, @@ -60,7 +60,7 @@ describe('TransactionRunner', () => { before(() => { const runners = proxyquire('../src/transaction-runner', { - protobufjs: {loadSync: LOAD_SYNC}, + protobufjs: {Root: {fromJSON: FROM_JSON}}, }); Runner = runners.Runner;