diff --git a/.gitignore b/.gitignore index 14050d4e4..d4f03a0df 100644 --- a/.gitignore +++ b/.gitignore @@ -12,4 +12,3 @@ system-test/*key.json .DS_Store package-lock.json __pycache__ -.vscode \ No newline at end of file diff --git a/protos/google/spanner/admin/instance/v1/common.proto b/protos/google/spanner/admin/instance/v1/common.proto index 075b45fea..69717ec22 100644 --- a/protos/google/spanner/admin/instance/v1/common.proto +++ b/protos/google/spanner/admin/instance/v1/common.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.spanner.admin.instance.v1; +import "google/api/field_behavior.proto"; import "google/protobuf/timestamp.proto"; option csharp_namespace = "Google.Cloud.Spanner.Admin.Instance.V1"; @@ -54,3 +55,9 @@ enum FulfillmentPeriod { // to complete. FULFILLMENT_PERIOD_EXTENDED = 2; } + +// ReplicaSelection identifies replicas with common properties. +message ReplicaSelection { + // Required. Name of the location of the replicas (e.g., "us-central1"). + string location = 1 [(google.api.field_behavior) = REQUIRED]; +} diff --git a/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto b/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto index b8c49260a..ba6726b31 100644 --- a/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto +++ b/protos/google/spanner/admin/instance/v1/spanner_instance_admin.proto @@ -803,6 +803,34 @@ message InstanceConfig { State state = 11 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// ReplicaComputeCapacity describes the amount of server resources that are +// allocated to each replica identified by the replica selection. +message ReplicaComputeCapacity { + // Required. Identifies replicas by specified properties. + // All replicas in the selection have the same amount of compute capacity. + ReplicaSelection replica_selection = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Compute capacity allocated to each replica identified by the specified + // selection. + // The unit is selected based on the unit used to specify the instance size + // for non-autoscaling instances, or the unit used in autoscaling limit for + // autoscaling instances. + oneof compute_capacity { + // The number of nodes allocated to each replica. + // + // This may be zero in API responses for instances that are not yet in + // state `READY`. + int32 node_count = 2; + + // The number of processing units allocated to each replica. + // + // This may be zero in API responses for instances that are not yet in + // state `READY`. + int32 processing_units = 3; + } +} + // Autoscaling configuration for an instance. message AutoscalingConfig { // The autoscaling limits for the instance. Users can define the minimum and @@ -854,6 +882,37 @@ message AutoscalingConfig { [(google.api.field_behavior) = REQUIRED]; } + // AsymmetricAutoscalingOption specifies the scaling of replicas identified by + // the given selection. + message AsymmetricAutoscalingOption { + // Overrides the top-level autoscaling configuration for the replicas + // identified by `replica_selection`. All fields in this message are + // optional. Any unspecified fields will use the corresponding values from + // the top-level autoscaling configuration. + message AutoscalingConfigOverrides { + // Optional. If specified, overrides the min/max limit in the top-level + // autoscaling configuration for the selected replicas. + AutoscalingLimits autoscaling_limits = 1 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If specified, overrides the autoscaling target + // high_priority_cpu_utilization_percent in the top-level autoscaling + // configuration for the selected replicas. + int32 autoscaling_target_high_priority_cpu_utilization_percent = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Selects the replicas to which this AsymmetricAutoscalingOption + // applies. Only read-only replicas are supported. + ReplicaSelection replica_selection = 1 + [(google.api.field_behavior) = REQUIRED]; + + // Optional. Overrides applied to the top-level autoscaling configuration + // for the selected replicas. + AutoscalingConfigOverrides overrides = 2 + [(google.api.field_behavior) = OPTIONAL]; + } + // Required. Autoscaling limits for an instance. AutoscalingLimits autoscaling_limits = 1 [(google.api.field_behavior) = REQUIRED]; @@ -861,6 +920,18 @@ message AutoscalingConfig { // Required. The autoscaling targets for an instance. AutoscalingTargets autoscaling_targets = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Optional asymmetric autoscaling options. + // Replicas matching the replica selection criteria will be autoscaled + // independently from other replicas. The autoscaler will scale the replicas + // based on the utilization of replicas identified by the replica selection. + // Replica selections should not overlap with each other. + // + // Other replicas (those do not match any replica selection) will be + // autoscaled together and will have the same compute capacity allocated to + // them. + repeated AsymmetricAutoscalingOption asymmetric_autoscaling_options = 3 + [(google.api.field_behavior) = OPTIONAL]; } // An isolated set of Cloud Spanner resources on which databases can be hosted. @@ -901,6 +972,24 @@ message Instance { ENTERPRISE_PLUS = 3; } + // Indicates the default backup behavior for new databases within the + // instance. + enum DefaultBackupScheduleType { + // Not specified. + DEFAULT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED = 0; + + // No default backup schedule will be created automatically on creation of a + // database within the instance. + NONE = 1; + + // A default backup schedule will be created automatically on creation of a + // database within the instance. The default backup schedule creates a full + // backup every 24 hours and retains the backup for a period of 7 days. Once + // created, the default backup schedule can be edited/deleted similar to any + // other backup schedule. + AUTOMATIC = 2; + } + // Required. A unique identifier for the instance, which cannot be changed // after the instance is created. Values are of the form // `projects//instances/[a-z][-a-z0-9]*[a-z0-9]`. The final @@ -922,34 +1011,56 @@ message Instance { // Must be unique per project and between 4 and 30 characters in length. string display_name = 3 [(google.api.field_behavior) = REQUIRED]; - // The number of nodes allocated to this instance. At most one of either - // node_count or processing_units should be present in the message. + // The number of nodes allocated to this instance. At most, one of either + // `node_count` or `processing_units` should be present in the message. // - // Users can set the node_count field to specify the target number of nodes + // Users can set the `node_count` field to specify the target number of nodes // allocated to the instance. // - // This may be zero in API responses for instances that are not yet in state - // `READY`. + // If autoscaling is enabled, `node_count` is treated as an `OUTPUT_ONLY` + // field and reflects the current number of nodes allocated to the instance. // - // See [the - // documentation](https://cloud.google.com/spanner/docs/compute-capacity) - // for more information about nodes and processing units. + // This might be zero in API responses for instances that are not yet in the + // `READY` state. + // + // If the instance has varying node count across replicas (achieved by + // setting asymmetric_autoscaling_options in autoscaling config), the + // node_count here is the maximum node count across all replicas. + // + // For more information, see + // [Compute capacity, nodes, and processing + // units](https://cloud.google.com/spanner/docs/compute-capacity). int32 node_count = 5; - // The number of processing units allocated to this instance. At most one of - // processing_units or node_count should be present in the message. + // The number of processing units allocated to this instance. At most, one of + // either `processing_units` or `node_count` should be present in the message. // - // Users can set the processing_units field to specify the target number of + // Users can set the `processing_units` field to specify the target number of // processing units allocated to the instance. // - // This may be zero in API responses for instances that are not yet in state - // `READY`. + // If autoscaling is enabled, `processing_units` is treated as an + // `OUTPUT_ONLY` field and reflects the current number of processing units + // allocated to the instance. // - // See [the - // documentation](https://cloud.google.com/spanner/docs/compute-capacity) - // for more information about nodes and processing units. + // This might be zero in API responses for instances that are not yet in the + // `READY` state. + // + // If the instance has varying processing units per replica + // (achieved by setting asymmetric_autoscaling_options in autoscaling config), + // the processing_units here is the maximum processing units across all + // replicas. + // + // For more information, see + // [Compute capacity, nodes and processing + // units](https://cloud.google.com/spanner/docs/compute-capacity). int32 processing_units = 9; + // Output only. Lists the compute capacity per ReplicaSelection. A replica + // selection identifies a set of replicas with common properties. Replicas + // identified by a ReplicaSelection are scaled with the same compute capacity. + repeated ReplicaComputeCapacity replica_compute_capacity = 19 + [(google.api.field_behavior) = OUTPUT_ONLY]; + // Optional. The autoscaling configuration. Autoscaling is enabled if this // field is set. When autoscaling is enabled, node_count and processing_units // are treated as OUTPUT_ONLY fields and reflect the current compute capacity @@ -1000,6 +1111,18 @@ message Instance { // Optional. The `Edition` of the current instance. Edition edition = 20 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Controls the default backup behavior for new databases within the + // instance. + // + // Note that `AUTOMATIC` is not permitted for free instances, as backups and + // backup schedules are not allowed for free instances. + // + // In the `GetInstance` or `ListInstances` response, if the value of + // default_backup_schedule_type is unset or NONE, no default backup + // schedule will be created for new databases within the instance. + DefaultBackupScheduleType default_backup_schedule_type = 23 + [(google.api.field_behavior) = OPTIONAL]; } // The request for diff --git a/protos/google/spanner/v1/commit_response.proto b/protos/google/spanner/v1/commit_response.proto index d44aad63b..d5f9b15d5 100644 --- a/protos/google/spanner/v1/commit_response.proto +++ b/protos/google/spanner/v1/commit_response.proto @@ -17,6 +17,7 @@ syntax = "proto3"; package google.spanner.v1; import "google/protobuf/timestamp.proto"; +import "google/spanner/v1/transaction.proto"; option csharp_namespace = "Google.Cloud.Spanner.V1"; option go_package = "cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb"; @@ -47,4 +48,12 @@ message CommitResponse { // For more information, see // [CommitRequest.return_commit_stats][google.spanner.v1.CommitRequest.return_commit_stats]. CommitStats commit_stats = 2; + + // Clients should examine and retry the commit if any of the following + // reasons are populated. + oneof MultiplexedSessionRetry { + // If specified, transaction has not committed yet. + // Clients must retry the commit with the new precommit token. + MultiplexedSessionPrecommitToken precommit_token = 4; + } } diff --git a/protos/google/spanner/v1/result_set.proto b/protos/google/spanner/v1/result_set.proto index f392c1d7d..0b8aabf86 100644 --- a/protos/google/spanner/v1/result_set.proto +++ b/protos/google/spanner/v1/result_set.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.spanner.v1; +import "google/api/field_behavior.proto"; import "google/protobuf/struct.proto"; import "google/spanner/v1/query_plan.proto"; import "google/spanner/v1/transaction.proto"; @@ -53,6 +54,16 @@ message ResultSet { // Other fields may or may not be populated, based on the // [ExecuteSqlRequest.query_mode][google.spanner.v1.ExecuteSqlRequest.query_mode]. ResultSetStats stats = 3; + + // Optional. A precommit token will be included if the read-write transaction + // is on a multiplexed session. + // The precommit token with the highest sequence number from this transaction + // attempt should be passed to the + // [Commit][google.spanner.v1.Spanner.Commit] request for this transaction. + // This feature is not yet supported and will result in an UNIMPLEMENTED + // error. + MultiplexedSessionPrecommitToken precommit_token = 5 + [(google.api.field_behavior) = OPTIONAL]; } // Partial results from a streaming read or SQL query. Streaming reads and @@ -157,6 +168,16 @@ message PartialResultSet { // This field will also be present in the last response for DML // statements. ResultSetStats stats = 5; + + // Optional. A precommit token will be included if the read-write transaction + // is on a multiplexed session. + // The precommit token with the highest sequence number from this transaction + // attempt should be passed to the + // [Commit][google.spanner.v1.Spanner.Commit] request for this transaction. + // This feature is not yet supported and will result in an UNIMPLEMENTED + // error. + MultiplexedSessionPrecommitToken precommit_token = 8 + [(google.api.field_behavior) = OPTIONAL]; } // Metadata about a [ResultSet][google.spanner.v1.ResultSet] or [PartialResultSet][google.spanner.v1.PartialResultSet]. diff --git a/protos/google/spanner/v1/spanner.proto b/protos/google/spanner/v1/spanner.proto index 301139210..847815464 100644 --- a/protos/google/spanner/v1/spanner.proto +++ b/protos/google/spanner/v1/spanner.proto @@ -628,9 +628,19 @@ message ExecuteSqlRequest { // execution statistics information. PLAN = 1; - // This mode returns both the query plan and the execution statistics along - // with the results. + // This mode returns the query plan, overall execution statistics, + // operator level execution statistics along with the results. This has a + // performance overhead compared to the other modes. It is not recommended + // to use this mode for production traffic. PROFILE = 2; + + // This mode returns the overall (but not operator-level) execution + // statistics along with the results. + WITH_STATS = 3; + + // This mode returns the query plan, overall (but not operator-level) + // execution statistics along with the results. + WITH_PLAN_AND_STATS = 4; } // Query optimizer configuration. @@ -899,6 +909,16 @@ message ExecuteBatchDmlResponse { // If all DML statements are executed successfully, the status is `OK`. // Otherwise, the error status of the first failed statement. google.rpc.Status status = 2; + + // Optional. A precommit token will be included if the read-write transaction + // is on a multiplexed session. + // The precommit token with the highest sequence number from this transaction + // attempt should be passed to the + // [Commit][google.spanner.v1.Spanner.Commit] request for this transaction. + // This feature is not yet supported and will result in an UNIMPLEMENTED + // error. + MultiplexedSessionPrecommitToken precommit_token = 3 + [(google.api.field_behavior) = OPTIONAL]; } // Options for a PartitionQueryRequest and @@ -1215,6 +1235,14 @@ message BeginTransactionRequest { // transaction, set it on the reads and writes that are part of this // transaction instead. RequestOptions request_options = 3; + + // Optional. Required for read-write transactions on a multiplexed session + // that commit mutations but do not perform any reads or queries. Clients + // should randomly select one of the mutations from the mutation set and send + // it as a part of this request. + // This feature is not yet supported and will result in an UNIMPLEMENTED + // error. + Mutation mutation_key = 4 [(google.api.field_behavior) = OPTIONAL]; } // The request for [Commit][google.spanner.v1.Spanner.Commit]. @@ -1262,6 +1290,15 @@ message CommitRequest { // Common options for this request. RequestOptions request_options = 6; + + // Optional. If the read-write transaction was executed on a multiplexed + // session, the precommit token with the highest sequence number received in + // this transaction attempt, should be included here. Failing to do so will + // result in a FailedPrecondition error. + // This feature is not yet supported and will result in an UNIMPLEMENTED + // error. + MultiplexedSessionPrecommitToken precommit_token = 9 + [(google.api.field_behavior) = OPTIONAL]; } // The request for [Rollback][google.spanner.v1.Spanner.Rollback]. diff --git a/protos/google/spanner/v1/transaction.proto b/protos/google/spanner/v1/transaction.proto index 8af513d15..fe5645384 100644 --- a/protos/google/spanner/v1/transaction.proto +++ b/protos/google/spanner/v1/transaction.proto @@ -16,6 +16,7 @@ syntax = "proto3"; package google.spanner.v1; +import "google/api/field_behavior.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; @@ -378,6 +379,14 @@ message TransactionOptions { // Read lock mode for the transaction. ReadLockMode read_lock_mode = 1; + + // Optional. Clients should pass the transaction ID of the previous + // transaction attempt that was aborted if this transaction is being + // executed on a multiplexed session. + // This feature is not yet supported and will result in an UNIMPLEMENTED + // error. + bytes multiplexed_session_previous_transaction_id = 2 + [(google.api.field_behavior) = OPTIONAL]; } // Message type to initiate a Partitioned DML transaction. @@ -512,6 +521,17 @@ message Transaction { // A timestamp in RFC3339 UTC \"Zulu\" format, accurate to nanoseconds. // Example: `"2014-10-02T15:01:23.045123456Z"`. google.protobuf.Timestamp read_timestamp = 2; + + // A precommit token will be included in the response of a BeginTransaction + // request if the read-write transaction is on a multiplexed session and + // a mutation_key was specified in the + // [BeginTransaction][google.spanner.v1.BeginTransactionRequest]. + // The precommit token with the highest sequence number from this transaction + // attempt should be passed to the [Commit][google.spanner.v1.Spanner.Commit] + // request for this transaction. + // This feature is not yet supported and will result in an UNIMPLEMENTED + // error. + MultiplexedSessionPrecommitToken precommit_token = 3; } // This message is used to select the transaction in which a @@ -539,3 +559,17 @@ message TransactionSelector { TransactionOptions begin = 3; } } + +// When a read-write transaction is executed on a multiplexed session, +// this precommit token is sent back to the client +// as a part of the [Transaction] message in the BeginTransaction response and +// also as a part of the [ResultSet] and [PartialResultSet] responses. +message MultiplexedSessionPrecommitToken { + // Opaque precommit token. + bytes precommit_token = 1; + + // An incrementing seq number is generated on every precommit token + // that is returned. Clients should remember the precommit token with the + // highest sequence number from the current transaction attempt. + int32 seq_num = 2; +} diff --git a/protos/google/spanner/v1/type.proto b/protos/google/spanner/v1/type.proto index 4e77106c9..734cfb54c 100644 --- a/protos/google/spanner/v1/type.proto +++ b/protos/google/spanner/v1/type.proto @@ -32,20 +32,24 @@ message Type { // Required. The [TypeCode][google.spanner.v1.TypeCode] for this type. TypeCode code = 1 [(google.api.field_behavior) = REQUIRED]; - // If [code][google.spanner.v1.Type.code] == [ARRAY][google.spanner.v1.TypeCode.ARRAY], then `array_element_type` - // is the type of the array elements. + // If [code][google.spanner.v1.Type.code] == + // [ARRAY][google.spanner.v1.TypeCode.ARRAY], then `array_element_type` is the + // type of the array elements. Type array_element_type = 2; - // If [code][google.spanner.v1.Type.code] == [STRUCT][google.spanner.v1.TypeCode.STRUCT], then `struct_type` - // provides type information for the struct's fields. + // If [code][google.spanner.v1.Type.code] == + // [STRUCT][google.spanner.v1.TypeCode.STRUCT], then `struct_type` provides + // type information for the struct's fields. StructType struct_type = 3; - // The [TypeAnnotationCode][google.spanner.v1.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][google.spanner.v1.TypeCode] can be mapped - // to different SQL types depending on the SQL dialect. [type_annotation][google.spanner.v1.Type.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. + // The [TypeAnnotationCode][google.spanner.v1.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][google.spanner.v1.TypeCode] can be mapped to different + // SQL types depending on the SQL dialect. + // [type_annotation][google.spanner.v1.Type.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. TypeAnnotationCode type_annotation = 4; // If [code][google.spanner.v1.Type.code] == @@ -56,7 +60,8 @@ message Type { string proto_type_fqn = 5; } -// `StructType` defines the fields of a [STRUCT][google.spanner.v1.TypeCode.STRUCT] type. +// `StructType` defines the fields of a +// [STRUCT][google.spanner.v1.TypeCode.STRUCT] type. message StructType { // Message representing a single field of a struct. message Field { @@ -76,9 +81,9 @@ message StructType { // 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][google.spanner.v1.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. + // fields in the [StructType][google.spanner.v1.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. repeated Field fields = 1; } @@ -137,14 +142,14 @@ enum TypeCode { STRUCT = 9; // Encoded as `string`, in decimal format or scientific notation format. - //
Decimal format: - //
`[+-]Digits[.[Digits]]` or - //
`[+-][Digits].Digits` + // Decimal format: + // `[+-]Digits[.[Digits]]` or + // `[+-][Digits].Digits` // // Scientific notation: - //
`[+-]Digits[.[Digits]][ExponentIndicator[+-]Digits]` or - //
`[+-][Digits].Digits[ExponentIndicator[+-]Digits]` - //
(ExponentIndicator is `"e"` or `"E"`) + // `[+-]Digits[.[Digits]][ExponentIndicator[+-]Digits]` or + // `[+-][Digits].Digits[ExponentIndicator[+-]Digits]` + // (ExponentIndicator is `"e"` or `"E"`) NUMERIC = 10; // Encoded as a JSON-formatted `string` as described in RFC 7159. The @@ -163,6 +168,13 @@ enum TypeCode { // Encoded as `string`, in decimal format. ENUM = 14; + + // Encoded as `string`, in `ISO8601` duration format - + // `P[n]Y[n]M[n]DT[n]H[n]M[n[.fraction]]S` + // where `n` is an integer. + // For example, `P1Y2M3DT4H5M6.5S` represents time duration of 1 year, 2 + // months, 3 days, 4 hours, 5 minutes, and 6.5 seconds. + INTERVAL = 16; } // `TypeAnnotationCode` is used as a part of [Type][google.spanner.v1.Type] to @@ -175,19 +187,20 @@ enum TypeAnnotationCode { TYPE_ANNOTATION_CODE_UNSPECIFIED = 0; // PostgreSQL compatible NUMERIC type. This annotation needs to be applied to - // [Type][google.spanner.v1.Type] instances having [NUMERIC][google.spanner.v1.TypeCode.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][google.spanner.v1.TypeCode.NUMERIC] when a client interacts with PostgreSQL-enabled - // Spanner databases. + // [Type][google.spanner.v1.Type] instances having + // [NUMERIC][google.spanner.v1.TypeCode.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][google.spanner.v1.TypeCode.NUMERIC] when a client interacts with + // PostgreSQL-enabled Spanner databases. PG_NUMERIC = 2; // PostgreSQL compatible JSONB type. This annotation needs to be applied to - // [Type][google.spanner.v1.Type] instances having [JSON][google.spanner.v1.TypeCode.JSON] - // type code to specify that values of this type should be treated as - // PostgreSQL JSONB values. Currently this annotation is always needed for - // [JSON][google.spanner.v1.TypeCode.JSON] when a client interacts with PostgreSQL-enabled - // Spanner databases. + // [Type][google.spanner.v1.Type] instances having + // [JSON][google.spanner.v1.TypeCode.JSON] type code to specify that values of + // this type should be treated as PostgreSQL JSONB values. Currently this + // annotation is always needed for [JSON][google.spanner.v1.TypeCode.JSON] + // when a client interacts with PostgreSQL-enabled Spanner databases. PG_JSONB = 3; // PostgreSQL compatible OID type. This annotation can be used by a client diff --git a/protos/protos.d.ts b/protos/protos.d.ts index c922b8d9f..d64ef1eb3 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -13124,6 +13124,103 @@ export namespace google { FULFILLMENT_PERIOD_EXTENDED = 2 } + /** Properties of a ReplicaSelection. */ + interface IReplicaSelection { + + /** ReplicaSelection location */ + location?: (string|null); + } + + /** Represents a ReplicaSelection. */ + class ReplicaSelection implements IReplicaSelection { + + /** + * Constructs a new ReplicaSelection. + * @param [properties] Properties to set + */ + constructor(properties?: google.spanner.admin.instance.v1.IReplicaSelection); + + /** ReplicaSelection location. */ + public location: string; + + /** + * Creates a new ReplicaSelection instance using the specified properties. + * @param [properties] Properties to set + * @returns ReplicaSelection instance + */ + public static create(properties?: google.spanner.admin.instance.v1.IReplicaSelection): google.spanner.admin.instance.v1.ReplicaSelection; + + /** + * Encodes the specified ReplicaSelection message. Does not implicitly {@link google.spanner.admin.instance.v1.ReplicaSelection.verify|verify} messages. + * @param message ReplicaSelection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.spanner.admin.instance.v1.IReplicaSelection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReplicaSelection message, length delimited. Does not implicitly {@link google.spanner.admin.instance.v1.ReplicaSelection.verify|verify} messages. + * @param message ReplicaSelection message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.spanner.admin.instance.v1.IReplicaSelection, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReplicaSelection message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReplicaSelection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.admin.instance.v1.ReplicaSelection; + + /** + * Decodes a ReplicaSelection message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReplicaSelection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.admin.instance.v1.ReplicaSelection; + + /** + * Verifies a ReplicaSelection message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReplicaSelection message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReplicaSelection + */ + public static fromObject(object: { [k: string]: any }): google.spanner.admin.instance.v1.ReplicaSelection; + + /** + * Creates a plain object from a ReplicaSelection message. Also converts values to other types if specified. + * @param message ReplicaSelection + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.spanner.admin.instance.v1.ReplicaSelection, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReplicaSelection to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReplicaSelection + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Represents an InstanceAdmin */ class InstanceAdmin extends $protobuf.rpc.Service { @@ -13883,6 +13980,118 @@ export namespace google { } } + /** Properties of a ReplicaComputeCapacity. */ + interface IReplicaComputeCapacity { + + /** ReplicaComputeCapacity replicaSelection */ + replicaSelection?: (google.spanner.admin.instance.v1.IReplicaSelection|null); + + /** ReplicaComputeCapacity nodeCount */ + nodeCount?: (number|null); + + /** ReplicaComputeCapacity processingUnits */ + processingUnits?: (number|null); + } + + /** Represents a ReplicaComputeCapacity. */ + class ReplicaComputeCapacity implements IReplicaComputeCapacity { + + /** + * Constructs a new ReplicaComputeCapacity. + * @param [properties] Properties to set + */ + constructor(properties?: google.spanner.admin.instance.v1.IReplicaComputeCapacity); + + /** ReplicaComputeCapacity replicaSelection. */ + public replicaSelection?: (google.spanner.admin.instance.v1.IReplicaSelection|null); + + /** ReplicaComputeCapacity nodeCount. */ + public nodeCount?: (number|null); + + /** ReplicaComputeCapacity processingUnits. */ + public processingUnits?: (number|null); + + /** ReplicaComputeCapacity computeCapacity. */ + public computeCapacity?: ("nodeCount"|"processingUnits"); + + /** + * Creates a new ReplicaComputeCapacity instance using the specified properties. + * @param [properties] Properties to set + * @returns ReplicaComputeCapacity instance + */ + public static create(properties?: google.spanner.admin.instance.v1.IReplicaComputeCapacity): google.spanner.admin.instance.v1.ReplicaComputeCapacity; + + /** + * Encodes the specified ReplicaComputeCapacity message. Does not implicitly {@link google.spanner.admin.instance.v1.ReplicaComputeCapacity.verify|verify} messages. + * @param message ReplicaComputeCapacity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.spanner.admin.instance.v1.IReplicaComputeCapacity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReplicaComputeCapacity message, length delimited. Does not implicitly {@link google.spanner.admin.instance.v1.ReplicaComputeCapacity.verify|verify} messages. + * @param message ReplicaComputeCapacity message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.spanner.admin.instance.v1.IReplicaComputeCapacity, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReplicaComputeCapacity message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReplicaComputeCapacity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.admin.instance.v1.ReplicaComputeCapacity; + + /** + * Decodes a ReplicaComputeCapacity message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReplicaComputeCapacity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.admin.instance.v1.ReplicaComputeCapacity; + + /** + * Verifies a ReplicaComputeCapacity message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReplicaComputeCapacity message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReplicaComputeCapacity + */ + public static fromObject(object: { [k: string]: any }): google.spanner.admin.instance.v1.ReplicaComputeCapacity; + + /** + * Creates a plain object from a ReplicaComputeCapacity message. Also converts values to other types if specified. + * @param message ReplicaComputeCapacity + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.spanner.admin.instance.v1.ReplicaComputeCapacity, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReplicaComputeCapacity to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReplicaComputeCapacity + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an AutoscalingConfig. */ interface IAutoscalingConfig { @@ -13891,6 +14100,9 @@ export namespace google { /** AutoscalingConfig autoscalingTargets */ autoscalingTargets?: (google.spanner.admin.instance.v1.AutoscalingConfig.IAutoscalingTargets|null); + + /** AutoscalingConfig asymmetricAutoscalingOptions */ + asymmetricAutoscalingOptions?: (google.spanner.admin.instance.v1.AutoscalingConfig.IAsymmetricAutoscalingOption[]|null); } /** Represents an AutoscalingConfig. */ @@ -13908,6 +14120,9 @@ export namespace google { /** AutoscalingConfig autoscalingTargets. */ public autoscalingTargets?: (google.spanner.admin.instance.v1.AutoscalingConfig.IAutoscalingTargets|null); + /** AutoscalingConfig asymmetricAutoscalingOptions. */ + public asymmetricAutoscalingOptions: google.spanner.admin.instance.v1.AutoscalingConfig.IAsymmetricAutoscalingOption[]; + /** * Creates a new AutoscalingConfig instance using the specified properties. * @param [properties] Properties to set @@ -14211,6 +14426,215 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } + + /** Properties of an AsymmetricAutoscalingOption. */ + interface IAsymmetricAutoscalingOption { + + /** AsymmetricAutoscalingOption replicaSelection */ + replicaSelection?: (google.spanner.admin.instance.v1.IReplicaSelection|null); + + /** AsymmetricAutoscalingOption overrides */ + overrides?: (google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.IAutoscalingConfigOverrides|null); + } + + /** Represents an AsymmetricAutoscalingOption. */ + class AsymmetricAutoscalingOption implements IAsymmetricAutoscalingOption { + + /** + * Constructs a new AsymmetricAutoscalingOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.spanner.admin.instance.v1.AutoscalingConfig.IAsymmetricAutoscalingOption); + + /** AsymmetricAutoscalingOption replicaSelection. */ + public replicaSelection?: (google.spanner.admin.instance.v1.IReplicaSelection|null); + + /** AsymmetricAutoscalingOption overrides. */ + public overrides?: (google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.IAutoscalingConfigOverrides|null); + + /** + * Creates a new AsymmetricAutoscalingOption instance using the specified properties. + * @param [properties] Properties to set + * @returns AsymmetricAutoscalingOption instance + */ + public static create(properties?: google.spanner.admin.instance.v1.AutoscalingConfig.IAsymmetricAutoscalingOption): google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption; + + /** + * Encodes the specified AsymmetricAutoscalingOption message. Does not implicitly {@link google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.verify|verify} messages. + * @param message AsymmetricAutoscalingOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.spanner.admin.instance.v1.AutoscalingConfig.IAsymmetricAutoscalingOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AsymmetricAutoscalingOption message, length delimited. Does not implicitly {@link google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.verify|verify} messages. + * @param message AsymmetricAutoscalingOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.spanner.admin.instance.v1.AutoscalingConfig.IAsymmetricAutoscalingOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AsymmetricAutoscalingOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AsymmetricAutoscalingOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption; + + /** + * Decodes an AsymmetricAutoscalingOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AsymmetricAutoscalingOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption; + + /** + * Verifies an AsymmetricAutoscalingOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AsymmetricAutoscalingOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AsymmetricAutoscalingOption + */ + public static fromObject(object: { [k: string]: any }): google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption; + + /** + * Creates a plain object from an AsymmetricAutoscalingOption message. Also converts values to other types if specified. + * @param message AsymmetricAutoscalingOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AsymmetricAutoscalingOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AsymmetricAutoscalingOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace AsymmetricAutoscalingOption { + + /** Properties of an AutoscalingConfigOverrides. */ + interface IAutoscalingConfigOverrides { + + /** AutoscalingConfigOverrides autoscalingLimits */ + autoscalingLimits?: (google.spanner.admin.instance.v1.AutoscalingConfig.IAutoscalingLimits|null); + + /** AutoscalingConfigOverrides autoscalingTargetHighPriorityCpuUtilizationPercent */ + autoscalingTargetHighPriorityCpuUtilizationPercent?: (number|null); + } + + /** Represents an AutoscalingConfigOverrides. */ + class AutoscalingConfigOverrides implements IAutoscalingConfigOverrides { + + /** + * Constructs a new AutoscalingConfigOverrides. + * @param [properties] Properties to set + */ + constructor(properties?: google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.IAutoscalingConfigOverrides); + + /** AutoscalingConfigOverrides autoscalingLimits. */ + public autoscalingLimits?: (google.spanner.admin.instance.v1.AutoscalingConfig.IAutoscalingLimits|null); + + /** AutoscalingConfigOverrides autoscalingTargetHighPriorityCpuUtilizationPercent. */ + public autoscalingTargetHighPriorityCpuUtilizationPercent: number; + + /** + * Creates a new AutoscalingConfigOverrides instance using the specified properties. + * @param [properties] Properties to set + * @returns AutoscalingConfigOverrides instance + */ + public static create(properties?: google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.IAutoscalingConfigOverrides): google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides; + + /** + * Encodes the specified AutoscalingConfigOverrides message. Does not implicitly {@link google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.verify|verify} messages. + * @param message AutoscalingConfigOverrides message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.IAutoscalingConfigOverrides, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AutoscalingConfigOverrides message, length delimited. Does not implicitly {@link google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.verify|verify} messages. + * @param message AutoscalingConfigOverrides message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.IAutoscalingConfigOverrides, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutoscalingConfigOverrides message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutoscalingConfigOverrides + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides; + + /** + * Decodes an AutoscalingConfigOverrides message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutoscalingConfigOverrides + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides; + + /** + * Verifies an AutoscalingConfigOverrides message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AutoscalingConfigOverrides message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutoscalingConfigOverrides + */ + public static fromObject(object: { [k: string]: any }): google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides; + + /** + * Creates a plain object from an AutoscalingConfigOverrides message. Also converts values to other types if specified. + * @param message AutoscalingConfigOverrides + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutoscalingConfigOverrides to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutoscalingConfigOverrides + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } } /** Properties of an Instance. */ @@ -14231,6 +14655,9 @@ export namespace google { /** Instance processingUnits */ processingUnits?: (number|null); + /** Instance replicaComputeCapacity */ + replicaComputeCapacity?: (google.spanner.admin.instance.v1.IReplicaComputeCapacity[]|null); + /** Instance autoscalingConfig */ autoscalingConfig?: (google.spanner.admin.instance.v1.IAutoscalingConfig|null); @@ -14251,6 +14678,9 @@ export namespace google { /** Instance edition */ edition?: (google.spanner.admin.instance.v1.Instance.Edition|keyof typeof google.spanner.admin.instance.v1.Instance.Edition|null); + + /** Instance defaultBackupScheduleType */ + defaultBackupScheduleType?: (google.spanner.admin.instance.v1.Instance.DefaultBackupScheduleType|keyof typeof google.spanner.admin.instance.v1.Instance.DefaultBackupScheduleType|null); } /** Represents an Instance. */ @@ -14277,6 +14707,9 @@ export namespace google { /** Instance processingUnits. */ public processingUnits: number; + /** Instance replicaComputeCapacity. */ + public replicaComputeCapacity: google.spanner.admin.instance.v1.IReplicaComputeCapacity[]; + /** Instance autoscalingConfig. */ public autoscalingConfig?: (google.spanner.admin.instance.v1.IAutoscalingConfig|null); @@ -14298,6 +14731,9 @@ export namespace google { /** Instance edition. */ public edition: (google.spanner.admin.instance.v1.Instance.Edition|keyof typeof google.spanner.admin.instance.v1.Instance.Edition); + /** Instance defaultBackupScheduleType. */ + public defaultBackupScheduleType: (google.spanner.admin.instance.v1.Instance.DefaultBackupScheduleType|keyof typeof google.spanner.admin.instance.v1.Instance.DefaultBackupScheduleType); + /** * Creates a new Instance instance using the specified properties. * @param [properties] Properties to set @@ -14392,6 +14828,13 @@ export namespace google { ENTERPRISE = 2, ENTERPRISE_PLUS = 3 } + + /** DefaultBackupScheduleType enum. */ + enum DefaultBackupScheduleType { + DEFAULT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED = 0, + NONE = 1, + AUTOMATIC = 2 + } } /** Properties of a ListInstanceConfigsRequest. */ @@ -29206,7 +29649,9 @@ export namespace google { enum QueryMode { NORMAL = 0, PLAN = 1, - PROFILE = 2 + PROFILE = 2, + WITH_STATS = 3, + WITH_PLAN_AND_STATS = 4 } /** Properties of a QueryOptions. */ @@ -29554,6 +29999,9 @@ export namespace google { /** ExecuteBatchDmlResponse status */ status?: (google.rpc.IStatus|null); + + /** ExecuteBatchDmlResponse precommitToken */ + precommitToken?: (google.spanner.v1.IMultiplexedSessionPrecommitToken|null); } /** Represents an ExecuteBatchDmlResponse. */ @@ -29571,6 +30019,9 @@ export namespace google { /** ExecuteBatchDmlResponse status. */ public status?: (google.rpc.IStatus|null); + /** ExecuteBatchDmlResponse precommitToken. */ + public precommitToken?: (google.spanner.v1.IMultiplexedSessionPrecommitToken|null); + /** * Creates a new ExecuteBatchDmlResponse instance using the specified properties. * @param [properties] Properties to set @@ -30415,6 +30866,9 @@ export namespace google { /** BeginTransactionRequest requestOptions */ requestOptions?: (google.spanner.v1.IRequestOptions|null); + + /** BeginTransactionRequest mutationKey */ + mutationKey?: (google.spanner.v1.IMutation|null); } /** Represents a BeginTransactionRequest. */ @@ -30435,6 +30889,9 @@ export namespace google { /** BeginTransactionRequest requestOptions. */ public requestOptions?: (google.spanner.v1.IRequestOptions|null); + /** BeginTransactionRequest mutationKey. */ + public mutationKey?: (google.spanner.v1.IMutation|null); + /** * Creates a new BeginTransactionRequest instance using the specified properties. * @param [properties] Properties to set @@ -30536,6 +30993,9 @@ export namespace google { /** CommitRequest requestOptions */ requestOptions?: (google.spanner.v1.IRequestOptions|null); + + /** CommitRequest precommitToken */ + precommitToken?: (google.spanner.v1.IMultiplexedSessionPrecommitToken|null); } /** Represents a CommitRequest. */ @@ -30568,6 +31028,9 @@ export namespace google { /** CommitRequest requestOptions. */ public requestOptions?: (google.spanner.v1.IRequestOptions|null); + /** CommitRequest precommitToken. */ + public precommitToken?: (google.spanner.v1.IMultiplexedSessionPrecommitToken|null); + /** CommitRequest transaction. */ public transaction?: ("transactionId"|"singleUseTransaction"); @@ -31084,6 +31547,9 @@ export namespace google { /** CommitResponse commitStats */ commitStats?: (google.spanner.v1.CommitResponse.ICommitStats|null); + + /** CommitResponse precommitToken */ + precommitToken?: (google.spanner.v1.IMultiplexedSessionPrecommitToken|null); } /** Represents a CommitResponse. */ @@ -31101,6 +31567,12 @@ export namespace google { /** CommitResponse commitStats. */ public commitStats?: (google.spanner.v1.CommitResponse.ICommitStats|null); + /** CommitResponse precommitToken. */ + public precommitToken?: (google.spanner.v1.IMultiplexedSessionPrecommitToken|null); + + /** CommitResponse MultiplexedSessionRetry. */ + public MultiplexedSessionRetry?: "precommitToken"; + /** * Creates a new CommitResponse instance using the specified properties. * @param [properties] Properties to set @@ -31279,568 +31751,454 @@ export namespace google { } } - /** Properties of a KeyRange. */ - interface IKeyRange { + /** Properties of a TransactionOptions. */ + interface ITransactionOptions { - /** KeyRange startClosed */ - startClosed?: (google.protobuf.IListValue|null); + /** TransactionOptions readWrite */ + readWrite?: (google.spanner.v1.TransactionOptions.IReadWrite|null); - /** KeyRange startOpen */ - startOpen?: (google.protobuf.IListValue|null); + /** TransactionOptions partitionedDml */ + partitionedDml?: (google.spanner.v1.TransactionOptions.IPartitionedDml|null); - /** KeyRange endClosed */ - endClosed?: (google.protobuf.IListValue|null); + /** TransactionOptions readOnly */ + readOnly?: (google.spanner.v1.TransactionOptions.IReadOnly|null); - /** KeyRange endOpen */ - endOpen?: (google.protobuf.IListValue|null); + /** TransactionOptions excludeTxnFromChangeStreams */ + excludeTxnFromChangeStreams?: (boolean|null); } - /** Represents a KeyRange. */ - class KeyRange implements IKeyRange { + /** Represents a TransactionOptions. */ + class TransactionOptions implements ITransactionOptions { /** - * Constructs a new KeyRange. + * Constructs a new TransactionOptions. * @param [properties] Properties to set */ - constructor(properties?: google.spanner.v1.IKeyRange); + constructor(properties?: google.spanner.v1.ITransactionOptions); - /** KeyRange startClosed. */ - public startClosed?: (google.protobuf.IListValue|null); + /** TransactionOptions readWrite. */ + public readWrite?: (google.spanner.v1.TransactionOptions.IReadWrite|null); - /** KeyRange startOpen. */ - public startOpen?: (google.protobuf.IListValue|null); - - /** KeyRange endClosed. */ - public endClosed?: (google.protobuf.IListValue|null); + /** TransactionOptions partitionedDml. */ + public partitionedDml?: (google.spanner.v1.TransactionOptions.IPartitionedDml|null); - /** KeyRange endOpen. */ - public endOpen?: (google.protobuf.IListValue|null); + /** TransactionOptions readOnly. */ + public readOnly?: (google.spanner.v1.TransactionOptions.IReadOnly|null); - /** KeyRange startKeyType. */ - public startKeyType?: ("startClosed"|"startOpen"); + /** TransactionOptions excludeTxnFromChangeStreams. */ + public excludeTxnFromChangeStreams: boolean; - /** KeyRange endKeyType. */ - public endKeyType?: ("endClosed"|"endOpen"); + /** TransactionOptions mode. */ + public mode?: ("readWrite"|"partitionedDml"|"readOnly"); /** - * Creates a new KeyRange instance using the specified properties. + * Creates a new TransactionOptions instance using the specified properties. * @param [properties] Properties to set - * @returns KeyRange instance + * @returns TransactionOptions instance */ - public static create(properties?: google.spanner.v1.IKeyRange): google.spanner.v1.KeyRange; + public static create(properties?: google.spanner.v1.ITransactionOptions): google.spanner.v1.TransactionOptions; /** - * Encodes the specified KeyRange message. Does not implicitly {@link google.spanner.v1.KeyRange.verify|verify} messages. - * @param message KeyRange message or plain object to encode + * Encodes the specified TransactionOptions message. Does not implicitly {@link google.spanner.v1.TransactionOptions.verify|verify} messages. + * @param message TransactionOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.spanner.v1.IKeyRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.spanner.v1.ITransactionOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified KeyRange message, length delimited. Does not implicitly {@link google.spanner.v1.KeyRange.verify|verify} messages. - * @param message KeyRange message or plain object to encode + * Encodes the specified TransactionOptions message, length delimited. Does not implicitly {@link google.spanner.v1.TransactionOptions.verify|verify} messages. + * @param message TransactionOptions message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.spanner.v1.IKeyRange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.spanner.v1.ITransactionOptions, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a KeyRange message from the specified reader or buffer. + * Decodes a TransactionOptions message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns KeyRange + * @returns TransactionOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.KeyRange; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.TransactionOptions; /** - * Decodes a KeyRange message from the specified reader or buffer, length delimited. + * Decodes a TransactionOptions message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns KeyRange + * @returns TransactionOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.KeyRange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.TransactionOptions; /** - * Verifies a KeyRange message. + * Verifies a TransactionOptions message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a KeyRange message from a plain object. Also converts values to their respective internal types. + * Creates a TransactionOptions message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns KeyRange + * @returns TransactionOptions */ - public static fromObject(object: { [k: string]: any }): google.spanner.v1.KeyRange; + public static fromObject(object: { [k: string]: any }): google.spanner.v1.TransactionOptions; /** - * Creates a plain object from a KeyRange message. Also converts values to other types if specified. - * @param message KeyRange + * Creates a plain object from a TransactionOptions message. Also converts values to other types if specified. + * @param message TransactionOptions * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.spanner.v1.KeyRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.spanner.v1.TransactionOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this KeyRange to JSON. + * Converts this TransactionOptions to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for KeyRange + * Gets the default type url for TransactionOptions * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a KeySet. */ - interface IKeySet { - - /** KeySet keys */ - keys?: (google.protobuf.IListValue[]|null); + namespace TransactionOptions { - /** KeySet ranges */ - ranges?: (google.spanner.v1.IKeyRange[]|null); + /** Properties of a ReadWrite. */ + interface IReadWrite { - /** KeySet all */ - all?: (boolean|null); - } + /** ReadWrite readLockMode */ + readLockMode?: (google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode|keyof typeof google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode|null); - /** Represents a KeySet. */ - class KeySet implements IKeySet { + /** ReadWrite multiplexedSessionPreviousTransactionId */ + multiplexedSessionPreviousTransactionId?: (Uint8Array|string|null); + } - /** - * Constructs a new KeySet. - * @param [properties] Properties to set - */ - constructor(properties?: google.spanner.v1.IKeySet); + /** Represents a ReadWrite. */ + class ReadWrite implements IReadWrite { - /** KeySet keys. */ - public keys: google.protobuf.IListValue[]; + /** + * Constructs a new ReadWrite. + * @param [properties] Properties to set + */ + constructor(properties?: google.spanner.v1.TransactionOptions.IReadWrite); - /** KeySet ranges. */ - public ranges: google.spanner.v1.IKeyRange[]; + /** ReadWrite readLockMode. */ + public readLockMode: (google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode|keyof typeof google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode); - /** KeySet all. */ - public all: boolean; + /** ReadWrite multiplexedSessionPreviousTransactionId. */ + public multiplexedSessionPreviousTransactionId: (Uint8Array|string); - /** - * Creates a new KeySet instance using the specified properties. - * @param [properties] Properties to set - * @returns KeySet instance - */ - public static create(properties?: google.spanner.v1.IKeySet): google.spanner.v1.KeySet; + /** + * Creates a new ReadWrite instance using the specified properties. + * @param [properties] Properties to set + * @returns ReadWrite instance + */ + public static create(properties?: google.spanner.v1.TransactionOptions.IReadWrite): google.spanner.v1.TransactionOptions.ReadWrite; - /** - * Encodes the specified KeySet message. Does not implicitly {@link google.spanner.v1.KeySet.verify|verify} messages. - * @param message KeySet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.spanner.v1.IKeySet, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ReadWrite message. Does not implicitly {@link google.spanner.v1.TransactionOptions.ReadWrite.verify|verify} messages. + * @param message ReadWrite message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.spanner.v1.TransactionOptions.IReadWrite, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Encodes the specified KeySet message, length delimited. Does not implicitly {@link google.spanner.v1.KeySet.verify|verify} messages. - * @param message KeySet message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.spanner.v1.IKeySet, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Encodes the specified ReadWrite message, length delimited. Does not implicitly {@link google.spanner.v1.TransactionOptions.ReadWrite.verify|verify} messages. + * @param message ReadWrite message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.spanner.v1.TransactionOptions.IReadWrite, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Decodes a KeySet message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns KeySet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.KeySet; + /** + * Decodes a ReadWrite message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReadWrite + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.TransactionOptions.ReadWrite; - /** - * Decodes a KeySet message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns KeySet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.KeySet; + /** + * Decodes a ReadWrite message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReadWrite + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.TransactionOptions.ReadWrite; - /** - * Verifies a KeySet message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Verifies a ReadWrite message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Creates a KeySet message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns KeySet - */ - public static fromObject(object: { [k: string]: any }): google.spanner.v1.KeySet; + /** + * Creates a ReadWrite message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReadWrite + */ + public static fromObject(object: { [k: string]: any }): google.spanner.v1.TransactionOptions.ReadWrite; - /** - * Creates a plain object from a KeySet message. Also converts values to other types if specified. - * @param message KeySet - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.spanner.v1.KeySet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** + * Creates a plain object from a ReadWrite message. Also converts values to other types if specified. + * @param message ReadWrite + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.spanner.v1.TransactionOptions.ReadWrite, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Converts this KeySet to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Converts this ReadWrite to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Gets the default type url for KeySet - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } + /** + * Gets the default type url for ReadWrite + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** Properties of a Mutation. */ - interface IMutation { + namespace ReadWrite { - /** Mutation insert */ - insert?: (google.spanner.v1.Mutation.IWrite|null); + /** ReadLockMode enum. */ + enum ReadLockMode { + READ_LOCK_MODE_UNSPECIFIED = 0, + PESSIMISTIC = 1, + OPTIMISTIC = 2 + } + } - /** Mutation update */ - update?: (google.spanner.v1.Mutation.IWrite|null); + /** Properties of a PartitionedDml. */ + interface IPartitionedDml { + } - /** Mutation insertOrUpdate */ - insertOrUpdate?: (google.spanner.v1.Mutation.IWrite|null); - - /** Mutation replace */ - replace?: (google.spanner.v1.Mutation.IWrite|null); - - /** Mutation delete */ - "delete"?: (google.spanner.v1.Mutation.IDelete|null); - } - - /** Represents a Mutation. */ - class Mutation implements IMutation { - - /** - * Constructs a new Mutation. - * @param [properties] Properties to set - */ - constructor(properties?: google.spanner.v1.IMutation); - - /** Mutation insert. */ - public insert?: (google.spanner.v1.Mutation.IWrite|null); - - /** Mutation update. */ - public update?: (google.spanner.v1.Mutation.IWrite|null); - - /** Mutation insertOrUpdate. */ - public insertOrUpdate?: (google.spanner.v1.Mutation.IWrite|null); - - /** Mutation replace. */ - public replace?: (google.spanner.v1.Mutation.IWrite|null); - - /** Mutation delete. */ - public delete?: (google.spanner.v1.Mutation.IDelete|null); - - /** Mutation operation. */ - public operation?: ("insert"|"update"|"insertOrUpdate"|"replace"|"delete"); - - /** - * Creates a new Mutation instance using the specified properties. - * @param [properties] Properties to set - * @returns Mutation instance - */ - public static create(properties?: google.spanner.v1.IMutation): google.spanner.v1.Mutation; - - /** - * Encodes the specified Mutation message. Does not implicitly {@link google.spanner.v1.Mutation.verify|verify} messages. - * @param message Mutation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.spanner.v1.IMutation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Mutation message, length delimited. Does not implicitly {@link google.spanner.v1.Mutation.verify|verify} messages. - * @param message Mutation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.spanner.v1.IMutation, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Mutation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Mutation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.Mutation; - - /** - * Decodes a Mutation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Mutation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.Mutation; - - /** - * Verifies a Mutation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Mutation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Mutation - */ - public static fromObject(object: { [k: string]: any }): google.spanner.v1.Mutation; - - /** - * Creates a plain object from a Mutation message. Also converts values to other types if specified. - * @param message Mutation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.spanner.v1.Mutation, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Mutation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Mutation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace Mutation { - - /** Properties of a Write. */ - interface IWrite { - - /** Write table */ - table?: (string|null); - - /** Write columns */ - columns?: (string[]|null); - - /** Write values */ - values?: (google.protobuf.IListValue[]|null); - } - - /** Represents a Write. */ - class Write implements IWrite { + /** Represents a PartitionedDml. */ + class PartitionedDml implements IPartitionedDml { /** - * Constructs a new Write. + * Constructs a new PartitionedDml. * @param [properties] Properties to set */ - constructor(properties?: google.spanner.v1.Mutation.IWrite); - - /** Write table. */ - public table: string; - - /** Write columns. */ - public columns: string[]; - - /** Write values. */ - public values: google.protobuf.IListValue[]; + constructor(properties?: google.spanner.v1.TransactionOptions.IPartitionedDml); /** - * Creates a new Write instance using the specified properties. + * Creates a new PartitionedDml instance using the specified properties. * @param [properties] Properties to set - * @returns Write instance + * @returns PartitionedDml instance */ - public static create(properties?: google.spanner.v1.Mutation.IWrite): google.spanner.v1.Mutation.Write; + public static create(properties?: google.spanner.v1.TransactionOptions.IPartitionedDml): google.spanner.v1.TransactionOptions.PartitionedDml; /** - * Encodes the specified Write message. Does not implicitly {@link google.spanner.v1.Mutation.Write.verify|verify} messages. - * @param message Write message or plain object to encode + * Encodes the specified PartitionedDml message. Does not implicitly {@link google.spanner.v1.TransactionOptions.PartitionedDml.verify|verify} messages. + * @param message PartitionedDml message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.spanner.v1.Mutation.IWrite, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.spanner.v1.TransactionOptions.IPartitionedDml, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Write message, length delimited. Does not implicitly {@link google.spanner.v1.Mutation.Write.verify|verify} messages. - * @param message Write message or plain object to encode + * Encodes the specified PartitionedDml message, length delimited. Does not implicitly {@link google.spanner.v1.TransactionOptions.PartitionedDml.verify|verify} messages. + * @param message PartitionedDml message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.spanner.v1.Mutation.IWrite, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.spanner.v1.TransactionOptions.IPartitionedDml, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Write message from the specified reader or buffer. + * Decodes a PartitionedDml message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Write + * @returns PartitionedDml * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.Mutation.Write; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.TransactionOptions.PartitionedDml; /** - * Decodes a Write message from the specified reader or buffer, length delimited. + * Decodes a PartitionedDml message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Write + * @returns PartitionedDml * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.Mutation.Write; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.TransactionOptions.PartitionedDml; /** - * Verifies a Write message. + * Verifies a PartitionedDml message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Write message from a plain object. Also converts values to their respective internal types. + * Creates a PartitionedDml message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Write + * @returns PartitionedDml */ - public static fromObject(object: { [k: string]: any }): google.spanner.v1.Mutation.Write; + public static fromObject(object: { [k: string]: any }): google.spanner.v1.TransactionOptions.PartitionedDml; /** - * Creates a plain object from a Write message. Also converts values to other types if specified. - * @param message Write + * Creates a plain object from a PartitionedDml message. Also converts values to other types if specified. + * @param message PartitionedDml * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.spanner.v1.Mutation.Write, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.spanner.v1.TransactionOptions.PartitionedDml, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Write to JSON. + * Converts this PartitionedDml to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Write + * Gets the default type url for PartitionedDml * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Delete. */ - interface IDelete { + /** Properties of a ReadOnly. */ + interface IReadOnly { - /** Delete table */ - table?: (string|null); + /** ReadOnly strong */ + strong?: (boolean|null); - /** Delete keySet */ - keySet?: (google.spanner.v1.IKeySet|null); + /** ReadOnly minReadTimestamp */ + minReadTimestamp?: (google.protobuf.ITimestamp|null); + + /** ReadOnly maxStaleness */ + maxStaleness?: (google.protobuf.IDuration|null); + + /** ReadOnly readTimestamp */ + readTimestamp?: (google.protobuf.ITimestamp|null); + + /** ReadOnly exactStaleness */ + exactStaleness?: (google.protobuf.IDuration|null); + + /** ReadOnly returnReadTimestamp */ + returnReadTimestamp?: (boolean|null); } - /** Represents a Delete. */ - class Delete implements IDelete { + /** Represents a ReadOnly. */ + class ReadOnly implements IReadOnly { /** - * Constructs a new Delete. + * Constructs a new ReadOnly. * @param [properties] Properties to set */ - constructor(properties?: google.spanner.v1.Mutation.IDelete); + constructor(properties?: google.spanner.v1.TransactionOptions.IReadOnly); - /** Delete table. */ - public table: string; + /** ReadOnly strong. */ + public strong?: (boolean|null); - /** Delete keySet. */ - public keySet?: (google.spanner.v1.IKeySet|null); + /** ReadOnly minReadTimestamp. */ + public minReadTimestamp?: (google.protobuf.ITimestamp|null); + + /** ReadOnly maxStaleness. */ + public maxStaleness?: (google.protobuf.IDuration|null); + + /** ReadOnly readTimestamp. */ + public readTimestamp?: (google.protobuf.ITimestamp|null); + + /** ReadOnly exactStaleness. */ + public exactStaleness?: (google.protobuf.IDuration|null); + + /** ReadOnly returnReadTimestamp. */ + public returnReadTimestamp: boolean; + + /** ReadOnly timestampBound. */ + public timestampBound?: ("strong"|"minReadTimestamp"|"maxStaleness"|"readTimestamp"|"exactStaleness"); /** - * Creates a new Delete instance using the specified properties. + * Creates a new ReadOnly instance using the specified properties. * @param [properties] Properties to set - * @returns Delete instance + * @returns ReadOnly instance */ - public static create(properties?: google.spanner.v1.Mutation.IDelete): google.spanner.v1.Mutation.Delete; + public static create(properties?: google.spanner.v1.TransactionOptions.IReadOnly): google.spanner.v1.TransactionOptions.ReadOnly; /** - * Encodes the specified Delete message. Does not implicitly {@link google.spanner.v1.Mutation.Delete.verify|verify} messages. - * @param message Delete message or plain object to encode + * Encodes the specified ReadOnly message. Does not implicitly {@link google.spanner.v1.TransactionOptions.ReadOnly.verify|verify} messages. + * @param message ReadOnly message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.spanner.v1.Mutation.IDelete, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.spanner.v1.TransactionOptions.IReadOnly, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Delete message, length delimited. Does not implicitly {@link google.spanner.v1.Mutation.Delete.verify|verify} messages. - * @param message Delete message or plain object to encode + * Encodes the specified ReadOnly message, length delimited. Does not implicitly {@link google.spanner.v1.TransactionOptions.ReadOnly.verify|verify} messages. + * @param message ReadOnly message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.spanner.v1.Mutation.IDelete, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.spanner.v1.TransactionOptions.IReadOnly, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Delete message from the specified reader or buffer. + * Decodes a ReadOnly message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Delete + * @returns ReadOnly * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.Mutation.Delete; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.TransactionOptions.ReadOnly; /** - * Decodes a Delete message from the specified reader or buffer, length delimited. + * Decodes a ReadOnly message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Delete + * @returns ReadOnly * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.Mutation.Delete; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.TransactionOptions.ReadOnly; /** - * Verifies a Delete message. + * Verifies a ReadOnly message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Delete message from a plain object. Also converts values to their respective internal types. + * Creates a ReadOnly message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Delete + * @returns ReadOnly */ - public static fromObject(object: { [k: string]: any }): google.spanner.v1.Mutation.Delete; + public static fromObject(object: { [k: string]: any }): google.spanner.v1.TransactionOptions.ReadOnly; /** - * Creates a plain object from a Delete message. Also converts values to other types if specified. - * @param message Delete + * Creates a plain object from a ReadOnly message. Also converts values to other types if specified. + * @param message ReadOnly * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.spanner.v1.Mutation.Delete, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.spanner.v1.TransactionOptions.ReadOnly, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Delete to JSON. + * Converts this ReadOnly to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Delete + * Gets the default type url for ReadOnly * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -31848,1357 +32206,1716 @@ export namespace google { } } - /** Properties of a ResultSet. */ - interface IResultSet { + /** Properties of a Transaction. */ + interface ITransaction { - /** ResultSet metadata */ - metadata?: (google.spanner.v1.IResultSetMetadata|null); + /** Transaction id */ + id?: (Uint8Array|string|null); - /** ResultSet rows */ - rows?: (google.protobuf.IListValue[]|null); + /** Transaction readTimestamp */ + readTimestamp?: (google.protobuf.ITimestamp|null); - /** ResultSet stats */ - stats?: (google.spanner.v1.IResultSetStats|null); + /** Transaction precommitToken */ + precommitToken?: (google.spanner.v1.IMultiplexedSessionPrecommitToken|null); } - /** Represents a ResultSet. */ - class ResultSet implements IResultSet { + /** Represents a Transaction. */ + class Transaction implements ITransaction { /** - * Constructs a new ResultSet. + * Constructs a new Transaction. * @param [properties] Properties to set */ - constructor(properties?: google.spanner.v1.IResultSet); + constructor(properties?: google.spanner.v1.ITransaction); - /** ResultSet metadata. */ - public metadata?: (google.spanner.v1.IResultSetMetadata|null); + /** Transaction id. */ + public id: (Uint8Array|string); - /** ResultSet rows. */ - public rows: google.protobuf.IListValue[]; + /** Transaction readTimestamp. */ + public readTimestamp?: (google.protobuf.ITimestamp|null); - /** ResultSet stats. */ - public stats?: (google.spanner.v1.IResultSetStats|null); + /** Transaction precommitToken. */ + public precommitToken?: (google.spanner.v1.IMultiplexedSessionPrecommitToken|null); /** - * Creates a new ResultSet instance using the specified properties. + * Creates a new Transaction instance using the specified properties. * @param [properties] Properties to set - * @returns ResultSet instance + * @returns Transaction instance */ - public static create(properties?: google.spanner.v1.IResultSet): google.spanner.v1.ResultSet; + public static create(properties?: google.spanner.v1.ITransaction): google.spanner.v1.Transaction; /** - * Encodes the specified ResultSet message. Does not implicitly {@link google.spanner.v1.ResultSet.verify|verify} messages. - * @param message ResultSet message or plain object to encode + * Encodes the specified Transaction message. Does not implicitly {@link google.spanner.v1.Transaction.verify|verify} messages. + * @param message Transaction message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.spanner.v1.IResultSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.spanner.v1.ITransaction, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResultSet message, length delimited. Does not implicitly {@link google.spanner.v1.ResultSet.verify|verify} messages. - * @param message ResultSet message or plain object to encode + * Encodes the specified Transaction message, length delimited. Does not implicitly {@link google.spanner.v1.Transaction.verify|verify} messages. + * @param message Transaction message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.spanner.v1.IResultSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.spanner.v1.ITransaction, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResultSet message from the specified reader or buffer. + * Decodes a Transaction message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ResultSet + * @returns Transaction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.ResultSet; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.Transaction; /** - * Decodes a ResultSet message from the specified reader or buffer, length delimited. + * Decodes a Transaction message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResultSet + * @returns Transaction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.ResultSet; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.Transaction; /** - * Verifies a ResultSet message. + * Verifies a Transaction message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ResultSet message from a plain object. Also converts values to their respective internal types. + * Creates a Transaction message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResultSet + * @returns Transaction */ - public static fromObject(object: { [k: string]: any }): google.spanner.v1.ResultSet; + public static fromObject(object: { [k: string]: any }): google.spanner.v1.Transaction; /** - * Creates a plain object from a ResultSet message. Also converts values to other types if specified. - * @param message ResultSet + * Creates a plain object from a Transaction message. Also converts values to other types if specified. + * @param message Transaction * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.spanner.v1.ResultSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.spanner.v1.Transaction, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResultSet to JSON. + * Converts this Transaction to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ResultSet + * Gets the default type url for Transaction * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PartialResultSet. */ - interface IPartialResultSet { - - /** PartialResultSet metadata */ - metadata?: (google.spanner.v1.IResultSetMetadata|null); - - /** PartialResultSet values */ - values?: (google.protobuf.IValue[]|null); + /** Properties of a TransactionSelector. */ + interface ITransactionSelector { - /** PartialResultSet chunkedValue */ - chunkedValue?: (boolean|null); + /** TransactionSelector singleUse */ + singleUse?: (google.spanner.v1.ITransactionOptions|null); - /** PartialResultSet resumeToken */ - resumeToken?: (Uint8Array|string|null); + /** TransactionSelector id */ + id?: (Uint8Array|string|null); - /** PartialResultSet stats */ - stats?: (google.spanner.v1.IResultSetStats|null); + /** TransactionSelector begin */ + begin?: (google.spanner.v1.ITransactionOptions|null); } - /** Represents a PartialResultSet. */ - class PartialResultSet implements IPartialResultSet { + /** Represents a TransactionSelector. */ + class TransactionSelector implements ITransactionSelector { /** - * Constructs a new PartialResultSet. + * Constructs a new TransactionSelector. * @param [properties] Properties to set */ - constructor(properties?: google.spanner.v1.IPartialResultSet); - - /** PartialResultSet metadata. */ - public metadata?: (google.spanner.v1.IResultSetMetadata|null); + constructor(properties?: google.spanner.v1.ITransactionSelector); - /** PartialResultSet values. */ - public values: google.protobuf.IValue[]; + /** TransactionSelector singleUse. */ + public singleUse?: (google.spanner.v1.ITransactionOptions|null); - /** PartialResultSet chunkedValue. */ - public chunkedValue: boolean; + /** TransactionSelector id. */ + public id?: (Uint8Array|string|null); - /** PartialResultSet resumeToken. */ - public resumeToken: (Uint8Array|string); + /** TransactionSelector begin. */ + public begin?: (google.spanner.v1.ITransactionOptions|null); - /** PartialResultSet stats. */ - public stats?: (google.spanner.v1.IResultSetStats|null); + /** TransactionSelector selector. */ + public selector?: ("singleUse"|"id"|"begin"); /** - * Creates a new PartialResultSet instance using the specified properties. + * Creates a new TransactionSelector instance using the specified properties. * @param [properties] Properties to set - * @returns PartialResultSet instance + * @returns TransactionSelector instance */ - public static create(properties?: google.spanner.v1.IPartialResultSet): google.spanner.v1.PartialResultSet; + public static create(properties?: google.spanner.v1.ITransactionSelector): google.spanner.v1.TransactionSelector; /** - * Encodes the specified PartialResultSet message. Does not implicitly {@link google.spanner.v1.PartialResultSet.verify|verify} messages. - * @param message PartialResultSet message or plain object to encode + * Encodes the specified TransactionSelector message. Does not implicitly {@link google.spanner.v1.TransactionSelector.verify|verify} messages. + * @param message TransactionSelector message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.spanner.v1.IPartialResultSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.spanner.v1.ITransactionSelector, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PartialResultSet message, length delimited. Does not implicitly {@link google.spanner.v1.PartialResultSet.verify|verify} messages. - * @param message PartialResultSet message or plain object to encode + * Encodes the specified TransactionSelector message, length delimited. Does not implicitly {@link google.spanner.v1.TransactionSelector.verify|verify} messages. + * @param message TransactionSelector message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.spanner.v1.IPartialResultSet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.spanner.v1.ITransactionSelector, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PartialResultSet message from the specified reader or buffer. + * Decodes a TransactionSelector message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PartialResultSet + * @returns TransactionSelector * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.PartialResultSet; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.TransactionSelector; /** - * Decodes a PartialResultSet message from the specified reader or buffer, length delimited. + * Decodes a TransactionSelector message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PartialResultSet + * @returns TransactionSelector * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.PartialResultSet; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.TransactionSelector; /** - * Verifies a PartialResultSet message. + * Verifies a TransactionSelector message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PartialResultSet message from a plain object. Also converts values to their respective internal types. + * Creates a TransactionSelector message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PartialResultSet + * @returns TransactionSelector */ - public static fromObject(object: { [k: string]: any }): google.spanner.v1.PartialResultSet; + public static fromObject(object: { [k: string]: any }): google.spanner.v1.TransactionSelector; /** - * Creates a plain object from a PartialResultSet message. Also converts values to other types if specified. - * @param message PartialResultSet + * Creates a plain object from a TransactionSelector message. Also converts values to other types if specified. + * @param message TransactionSelector * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.spanner.v1.PartialResultSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.spanner.v1.TransactionSelector, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PartialResultSet to JSON. + * Converts this TransactionSelector to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PartialResultSet + * Gets the default type url for TransactionSelector * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ResultSetMetadata. */ - interface IResultSetMetadata { - - /** ResultSetMetadata rowType */ - rowType?: (google.spanner.v1.IStructType|null); + /** Properties of a MultiplexedSessionPrecommitToken. */ + interface IMultiplexedSessionPrecommitToken { - /** ResultSetMetadata transaction */ - transaction?: (google.spanner.v1.ITransaction|null); + /** MultiplexedSessionPrecommitToken precommitToken */ + precommitToken?: (Uint8Array|string|null); - /** ResultSetMetadata undeclaredParameters */ - undeclaredParameters?: (google.spanner.v1.IStructType|null); + /** MultiplexedSessionPrecommitToken seqNum */ + seqNum?: (number|null); } - /** Represents a ResultSetMetadata. */ - class ResultSetMetadata implements IResultSetMetadata { + /** Represents a MultiplexedSessionPrecommitToken. */ + class MultiplexedSessionPrecommitToken implements IMultiplexedSessionPrecommitToken { /** - * Constructs a new ResultSetMetadata. + * Constructs a new MultiplexedSessionPrecommitToken. * @param [properties] Properties to set */ - constructor(properties?: google.spanner.v1.IResultSetMetadata); + constructor(properties?: google.spanner.v1.IMultiplexedSessionPrecommitToken); - /** ResultSetMetadata rowType. */ - public rowType?: (google.spanner.v1.IStructType|null); - - /** ResultSetMetadata transaction. */ - public transaction?: (google.spanner.v1.ITransaction|null); + /** MultiplexedSessionPrecommitToken precommitToken. */ + public precommitToken: (Uint8Array|string); - /** ResultSetMetadata undeclaredParameters. */ - public undeclaredParameters?: (google.spanner.v1.IStructType|null); + /** MultiplexedSessionPrecommitToken seqNum. */ + public seqNum: number; /** - * Creates a new ResultSetMetadata instance using the specified properties. + * Creates a new MultiplexedSessionPrecommitToken instance using the specified properties. * @param [properties] Properties to set - * @returns ResultSetMetadata instance + * @returns MultiplexedSessionPrecommitToken instance */ - public static create(properties?: google.spanner.v1.IResultSetMetadata): google.spanner.v1.ResultSetMetadata; + public static create(properties?: google.spanner.v1.IMultiplexedSessionPrecommitToken): google.spanner.v1.MultiplexedSessionPrecommitToken; /** - * Encodes the specified ResultSetMetadata message. Does not implicitly {@link google.spanner.v1.ResultSetMetadata.verify|verify} messages. - * @param message ResultSetMetadata message or plain object to encode + * Encodes the specified MultiplexedSessionPrecommitToken message. Does not implicitly {@link google.spanner.v1.MultiplexedSessionPrecommitToken.verify|verify} messages. + * @param message MultiplexedSessionPrecommitToken message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.spanner.v1.IResultSetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.spanner.v1.IMultiplexedSessionPrecommitToken, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResultSetMetadata message, length delimited. Does not implicitly {@link google.spanner.v1.ResultSetMetadata.verify|verify} messages. - * @param message ResultSetMetadata message or plain object to encode + * Encodes the specified MultiplexedSessionPrecommitToken message, length delimited. Does not implicitly {@link google.spanner.v1.MultiplexedSessionPrecommitToken.verify|verify} messages. + * @param message MultiplexedSessionPrecommitToken message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.spanner.v1.IResultSetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.spanner.v1.IMultiplexedSessionPrecommitToken, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResultSetMetadata message from the specified reader or buffer. + * Decodes a MultiplexedSessionPrecommitToken message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ResultSetMetadata + * @returns MultiplexedSessionPrecommitToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.ResultSetMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.MultiplexedSessionPrecommitToken; /** - * Decodes a ResultSetMetadata message from the specified reader or buffer, length delimited. + * Decodes a MultiplexedSessionPrecommitToken message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResultSetMetadata + * @returns MultiplexedSessionPrecommitToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.ResultSetMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.MultiplexedSessionPrecommitToken; /** - * Verifies a ResultSetMetadata message. + * Verifies a MultiplexedSessionPrecommitToken message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ResultSetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a MultiplexedSessionPrecommitToken message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResultSetMetadata + * @returns MultiplexedSessionPrecommitToken */ - public static fromObject(object: { [k: string]: any }): google.spanner.v1.ResultSetMetadata; + public static fromObject(object: { [k: string]: any }): google.spanner.v1.MultiplexedSessionPrecommitToken; /** - * Creates a plain object from a ResultSetMetadata message. Also converts values to other types if specified. - * @param message ResultSetMetadata + * Creates a plain object from a MultiplexedSessionPrecommitToken message. Also converts values to other types if specified. + * @param message MultiplexedSessionPrecommitToken * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.spanner.v1.ResultSetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.spanner.v1.MultiplexedSessionPrecommitToken, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResultSetMetadata to JSON. + * Converts this MultiplexedSessionPrecommitToken to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ResultSetMetadata + * Gets the default type url for MultiplexedSessionPrecommitToken * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ResultSetStats. */ - interface IResultSetStats { + /** Properties of a KeyRange. */ + interface IKeyRange { - /** ResultSetStats queryPlan */ - queryPlan?: (google.spanner.v1.IQueryPlan|null); + /** KeyRange startClosed */ + startClosed?: (google.protobuf.IListValue|null); - /** ResultSetStats queryStats */ - queryStats?: (google.protobuf.IStruct|null); + /** KeyRange startOpen */ + startOpen?: (google.protobuf.IListValue|null); - /** ResultSetStats rowCountExact */ - rowCountExact?: (number|Long|string|null); + /** KeyRange endClosed */ + endClosed?: (google.protobuf.IListValue|null); - /** ResultSetStats rowCountLowerBound */ - rowCountLowerBound?: (number|Long|string|null); + /** KeyRange endOpen */ + endOpen?: (google.protobuf.IListValue|null); } - /** Represents a ResultSetStats. */ - class ResultSetStats implements IResultSetStats { + /** Represents a KeyRange. */ + class KeyRange implements IKeyRange { /** - * Constructs a new ResultSetStats. + * Constructs a new KeyRange. * @param [properties] Properties to set */ - constructor(properties?: google.spanner.v1.IResultSetStats); + constructor(properties?: google.spanner.v1.IKeyRange); - /** ResultSetStats queryPlan. */ - public queryPlan?: (google.spanner.v1.IQueryPlan|null); + /** KeyRange startClosed. */ + public startClosed?: (google.protobuf.IListValue|null); - /** ResultSetStats queryStats. */ - public queryStats?: (google.protobuf.IStruct|null); + /** KeyRange startOpen. */ + public startOpen?: (google.protobuf.IListValue|null); - /** ResultSetStats rowCountExact. */ - public rowCountExact?: (number|Long|string|null); + /** KeyRange endClosed. */ + public endClosed?: (google.protobuf.IListValue|null); - /** ResultSetStats rowCountLowerBound. */ - public rowCountLowerBound?: (number|Long|string|null); + /** KeyRange endOpen. */ + public endOpen?: (google.protobuf.IListValue|null); - /** ResultSetStats rowCount. */ - public rowCount?: ("rowCountExact"|"rowCountLowerBound"); + /** KeyRange startKeyType. */ + public startKeyType?: ("startClosed"|"startOpen"); + + /** KeyRange endKeyType. */ + public endKeyType?: ("endClosed"|"endOpen"); /** - * Creates a new ResultSetStats instance using the specified properties. + * Creates a new KeyRange instance using the specified properties. * @param [properties] Properties to set - * @returns ResultSetStats instance + * @returns KeyRange instance */ - public static create(properties?: google.spanner.v1.IResultSetStats): google.spanner.v1.ResultSetStats; + public static create(properties?: google.spanner.v1.IKeyRange): google.spanner.v1.KeyRange; /** - * Encodes the specified ResultSetStats message. Does not implicitly {@link google.spanner.v1.ResultSetStats.verify|verify} messages. - * @param message ResultSetStats message or plain object to encode + * Encodes the specified KeyRange message. Does not implicitly {@link google.spanner.v1.KeyRange.verify|verify} messages. + * @param message KeyRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.spanner.v1.IResultSetStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.spanner.v1.IKeyRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ResultSetStats message, length delimited. Does not implicitly {@link google.spanner.v1.ResultSetStats.verify|verify} messages. - * @param message ResultSetStats message or plain object to encode + * Encodes the specified KeyRange message, length delimited. Does not implicitly {@link google.spanner.v1.KeyRange.verify|verify} messages. + * @param message KeyRange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.spanner.v1.IResultSetStats, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.spanner.v1.IKeyRange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ResultSetStats message from the specified reader or buffer. + * Decodes a KeyRange message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ResultSetStats + * @returns KeyRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.ResultSetStats; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.KeyRange; /** - * Decodes a ResultSetStats message from the specified reader or buffer, length delimited. + * Decodes a KeyRange message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ResultSetStats + * @returns KeyRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.ResultSetStats; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.KeyRange; /** - * Verifies a ResultSetStats message. + * Verifies a KeyRange message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ResultSetStats message from a plain object. Also converts values to their respective internal types. + * Creates a KeyRange message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ResultSetStats + * @returns KeyRange */ - public static fromObject(object: { [k: string]: any }): google.spanner.v1.ResultSetStats; + public static fromObject(object: { [k: string]: any }): google.spanner.v1.KeyRange; /** - * Creates a plain object from a ResultSetStats message. Also converts values to other types if specified. - * @param message ResultSetStats + * Creates a plain object from a KeyRange message. Also converts values to other types if specified. + * @param message KeyRange * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.spanner.v1.ResultSetStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.spanner.v1.KeyRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ResultSetStats to JSON. + * Converts this KeyRange to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ResultSetStats + * Gets the default type url for KeyRange * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PlanNode. */ - interface IPlanNode { - - /** PlanNode index */ - index?: (number|null); - - /** PlanNode kind */ - kind?: (google.spanner.v1.PlanNode.Kind|keyof typeof google.spanner.v1.PlanNode.Kind|null); - - /** PlanNode displayName */ - displayName?: (string|null); - - /** PlanNode childLinks */ - childLinks?: (google.spanner.v1.PlanNode.IChildLink[]|null); + /** Properties of a KeySet. */ + interface IKeySet { - /** PlanNode shortRepresentation */ - shortRepresentation?: (google.spanner.v1.PlanNode.IShortRepresentation|null); + /** KeySet keys */ + keys?: (google.protobuf.IListValue[]|null); - /** PlanNode metadata */ - metadata?: (google.protobuf.IStruct|null); + /** KeySet ranges */ + ranges?: (google.spanner.v1.IKeyRange[]|null); - /** PlanNode executionStats */ - executionStats?: (google.protobuf.IStruct|null); + /** KeySet all */ + all?: (boolean|null); } - /** Represents a PlanNode. */ - class PlanNode implements IPlanNode { + /** Represents a KeySet. */ + class KeySet implements IKeySet { /** - * Constructs a new PlanNode. + * Constructs a new KeySet. * @param [properties] Properties to set */ - constructor(properties?: google.spanner.v1.IPlanNode); - - /** PlanNode index. */ - public index: number; - - /** PlanNode kind. */ - public kind: (google.spanner.v1.PlanNode.Kind|keyof typeof google.spanner.v1.PlanNode.Kind); - - /** PlanNode displayName. */ - public displayName: string; - - /** PlanNode childLinks. */ - public childLinks: google.spanner.v1.PlanNode.IChildLink[]; + constructor(properties?: google.spanner.v1.IKeySet); - /** PlanNode shortRepresentation. */ - public shortRepresentation?: (google.spanner.v1.PlanNode.IShortRepresentation|null); + /** KeySet keys. */ + public keys: google.protobuf.IListValue[]; - /** PlanNode metadata. */ - public metadata?: (google.protobuf.IStruct|null); + /** KeySet ranges. */ + public ranges: google.spanner.v1.IKeyRange[]; - /** PlanNode executionStats. */ - public executionStats?: (google.protobuf.IStruct|null); + /** KeySet all. */ + public all: boolean; /** - * Creates a new PlanNode instance using the specified properties. + * Creates a new KeySet instance using the specified properties. * @param [properties] Properties to set - * @returns PlanNode instance + * @returns KeySet instance */ - public static create(properties?: google.spanner.v1.IPlanNode): google.spanner.v1.PlanNode; + public static create(properties?: google.spanner.v1.IKeySet): google.spanner.v1.KeySet; /** - * Encodes the specified PlanNode message. Does not implicitly {@link google.spanner.v1.PlanNode.verify|verify} messages. - * @param message PlanNode message or plain object to encode + * Encodes the specified KeySet message. Does not implicitly {@link google.spanner.v1.KeySet.verify|verify} messages. + * @param message KeySet message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.spanner.v1.IPlanNode, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.spanner.v1.IKeySet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PlanNode message, length delimited. Does not implicitly {@link google.spanner.v1.PlanNode.verify|verify} messages. - * @param message PlanNode message or plain object to encode + * Encodes the specified KeySet message, length delimited. Does not implicitly {@link google.spanner.v1.KeySet.verify|verify} messages. + * @param message KeySet message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.spanner.v1.IPlanNode, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.spanner.v1.IKeySet, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PlanNode message from the specified reader or buffer. + * Decodes a KeySet message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PlanNode + * @returns KeySet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.PlanNode; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.KeySet; /** - * Decodes a PlanNode message from the specified reader or buffer, length delimited. + * Decodes a KeySet message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PlanNode + * @returns KeySet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.PlanNode; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.KeySet; /** - * Verifies a PlanNode message. + * Verifies a KeySet message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PlanNode message from a plain object. Also converts values to their respective internal types. + * Creates a KeySet message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PlanNode + * @returns KeySet */ - public static fromObject(object: { [k: string]: any }): google.spanner.v1.PlanNode; + public static fromObject(object: { [k: string]: any }): google.spanner.v1.KeySet; /** - * Creates a plain object from a PlanNode message. Also converts values to other types if specified. - * @param message PlanNode + * Creates a plain object from a KeySet message. Also converts values to other types if specified. + * @param message KeySet * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.spanner.v1.PlanNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.spanner.v1.KeySet, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PlanNode to JSON. + * Converts this KeySet to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PlanNode + * Gets the default type url for KeySet * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace PlanNode { - - /** Kind enum. */ - enum Kind { - KIND_UNSPECIFIED = 0, - RELATIONAL = 1, - SCALAR = 2 - } - - /** Properties of a ChildLink. */ - interface IChildLink { + /** Properties of a Mutation. */ + interface IMutation { - /** ChildLink childIndex */ - childIndex?: (number|null); + /** Mutation insert */ + insert?: (google.spanner.v1.Mutation.IWrite|null); - /** ChildLink type */ - type?: (string|null); + /** Mutation update */ + update?: (google.spanner.v1.Mutation.IWrite|null); - /** ChildLink variable */ - variable?: (string|null); - } + /** Mutation insertOrUpdate */ + insertOrUpdate?: (google.spanner.v1.Mutation.IWrite|null); - /** Represents a ChildLink. */ - class ChildLink implements IChildLink { + /** Mutation replace */ + replace?: (google.spanner.v1.Mutation.IWrite|null); - /** - * Constructs a new ChildLink. - * @param [properties] Properties to set - */ - constructor(properties?: google.spanner.v1.PlanNode.IChildLink); + /** Mutation delete */ + "delete"?: (google.spanner.v1.Mutation.IDelete|null); + } - /** ChildLink childIndex. */ - public childIndex: number; + /** Represents a Mutation. */ + class Mutation implements IMutation { - /** ChildLink type. */ - public type: string; + /** + * Constructs a new Mutation. + * @param [properties] Properties to set + */ + constructor(properties?: google.spanner.v1.IMutation); - /** ChildLink variable. */ - public variable: string; + /** Mutation insert. */ + public insert?: (google.spanner.v1.Mutation.IWrite|null); + + /** Mutation update. */ + public update?: (google.spanner.v1.Mutation.IWrite|null); + + /** Mutation insertOrUpdate. */ + public insertOrUpdate?: (google.spanner.v1.Mutation.IWrite|null); + + /** Mutation replace. */ + public replace?: (google.spanner.v1.Mutation.IWrite|null); + + /** Mutation delete. */ + public delete?: (google.spanner.v1.Mutation.IDelete|null); + + /** Mutation operation. */ + public operation?: ("insert"|"update"|"insertOrUpdate"|"replace"|"delete"); + + /** + * Creates a new Mutation instance using the specified properties. + * @param [properties] Properties to set + * @returns Mutation instance + */ + public static create(properties?: google.spanner.v1.IMutation): google.spanner.v1.Mutation; + + /** + * Encodes the specified Mutation message. Does not implicitly {@link google.spanner.v1.Mutation.verify|verify} messages. + * @param message Mutation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.spanner.v1.IMutation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Mutation message, length delimited. Does not implicitly {@link google.spanner.v1.Mutation.verify|verify} messages. + * @param message Mutation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.spanner.v1.IMutation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Mutation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Mutation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.Mutation; + + /** + * Decodes a Mutation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Mutation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.Mutation; + + /** + * Verifies a Mutation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Mutation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Mutation + */ + public static fromObject(object: { [k: string]: any }): google.spanner.v1.Mutation; + + /** + * Creates a plain object from a Mutation message. Also converts values to other types if specified. + * @param message Mutation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.spanner.v1.Mutation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Mutation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Mutation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Mutation { + + /** Properties of a Write. */ + interface IWrite { + + /** Write table */ + table?: (string|null); + + /** Write columns */ + columns?: (string[]|null); + + /** Write values */ + values?: (google.protobuf.IListValue[]|null); + } + + /** Represents a Write. */ + class Write implements IWrite { /** - * Creates a new ChildLink instance using the specified properties. + * Constructs a new Write. * @param [properties] Properties to set - * @returns ChildLink instance */ - public static create(properties?: google.spanner.v1.PlanNode.IChildLink): google.spanner.v1.PlanNode.ChildLink; + constructor(properties?: google.spanner.v1.Mutation.IWrite); + + /** Write table. */ + public table: string; + + /** Write columns. */ + public columns: string[]; + + /** Write values. */ + public values: google.protobuf.IListValue[]; /** - * Encodes the specified ChildLink message. Does not implicitly {@link google.spanner.v1.PlanNode.ChildLink.verify|verify} messages. - * @param message ChildLink message or plain object to encode + * Creates a new Write instance using the specified properties. + * @param [properties] Properties to set + * @returns Write instance + */ + public static create(properties?: google.spanner.v1.Mutation.IWrite): google.spanner.v1.Mutation.Write; + + /** + * Encodes the specified Write message. Does not implicitly {@link google.spanner.v1.Mutation.Write.verify|verify} messages. + * @param message Write message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.spanner.v1.PlanNode.IChildLink, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.spanner.v1.Mutation.IWrite, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ChildLink message, length delimited. Does not implicitly {@link google.spanner.v1.PlanNode.ChildLink.verify|verify} messages. - * @param message ChildLink message or plain object to encode + * Encodes the specified Write message, length delimited. Does not implicitly {@link google.spanner.v1.Mutation.Write.verify|verify} messages. + * @param message Write message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.spanner.v1.PlanNode.IChildLink, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.spanner.v1.Mutation.IWrite, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ChildLink message from the specified reader or buffer. + * Decodes a Write message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ChildLink + * @returns Write * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.PlanNode.ChildLink; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.Mutation.Write; /** - * Decodes a ChildLink message from the specified reader or buffer, length delimited. + * Decodes a Write message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ChildLink + * @returns Write * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.PlanNode.ChildLink; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.Mutation.Write; /** - * Verifies a ChildLink message. + * Verifies a Write message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ChildLink message from a plain object. Also converts values to their respective internal types. + * Creates a Write message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ChildLink + * @returns Write */ - public static fromObject(object: { [k: string]: any }): google.spanner.v1.PlanNode.ChildLink; + public static fromObject(object: { [k: string]: any }): google.spanner.v1.Mutation.Write; /** - * Creates a plain object from a ChildLink message. Also converts values to other types if specified. - * @param message ChildLink + * Creates a plain object from a Write message. Also converts values to other types if specified. + * @param message Write * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.spanner.v1.PlanNode.ChildLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.spanner.v1.Mutation.Write, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ChildLink to JSON. + * Converts this Write to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ChildLink + * Gets the default type url for Write * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ShortRepresentation. */ - interface IShortRepresentation { + /** Properties of a Delete. */ + interface IDelete { - /** ShortRepresentation description */ - description?: (string|null); + /** Delete table */ + table?: (string|null); - /** ShortRepresentation subqueries */ - subqueries?: ({ [k: string]: number }|null); + /** Delete keySet */ + keySet?: (google.spanner.v1.IKeySet|null); } - /** Represents a ShortRepresentation. */ - class ShortRepresentation implements IShortRepresentation { + /** Represents a Delete. */ + class Delete implements IDelete { /** - * Constructs a new ShortRepresentation. + * Constructs a new Delete. * @param [properties] Properties to set */ - constructor(properties?: google.spanner.v1.PlanNode.IShortRepresentation); + constructor(properties?: google.spanner.v1.Mutation.IDelete); - /** ShortRepresentation description. */ - public description: string; + /** Delete table. */ + public table: string; - /** ShortRepresentation subqueries. */ - public subqueries: { [k: string]: number }; + /** Delete keySet. */ + public keySet?: (google.spanner.v1.IKeySet|null); /** - * Creates a new ShortRepresentation instance using the specified properties. + * Creates a new Delete instance using the specified properties. * @param [properties] Properties to set - * @returns ShortRepresentation instance + * @returns Delete instance */ - public static create(properties?: google.spanner.v1.PlanNode.IShortRepresentation): google.spanner.v1.PlanNode.ShortRepresentation; + public static create(properties?: google.spanner.v1.Mutation.IDelete): google.spanner.v1.Mutation.Delete; /** - * Encodes the specified ShortRepresentation message. Does not implicitly {@link google.spanner.v1.PlanNode.ShortRepresentation.verify|verify} messages. - * @param message ShortRepresentation message or plain object to encode + * Encodes the specified Delete message. Does not implicitly {@link google.spanner.v1.Mutation.Delete.verify|verify} messages. + * @param message Delete message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.spanner.v1.PlanNode.IShortRepresentation, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.spanner.v1.Mutation.IDelete, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Delete message, length delimited. Does not implicitly {@link google.spanner.v1.Mutation.Delete.verify|verify} messages. + * @param message Delete message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.spanner.v1.Mutation.IDelete, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Delete message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Delete + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.Mutation.Delete; + + /** + * Decodes a Delete message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Delete + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.Mutation.Delete; + + /** + * Verifies a Delete message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Delete message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Delete + */ + public static fromObject(object: { [k: string]: any }): google.spanner.v1.Mutation.Delete; + + /** + * Creates a plain object from a Delete message. Also converts values to other types if specified. + * @param message Delete + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.spanner.v1.Mutation.Delete, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Delete to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Delete + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ResultSet. */ + interface IResultSet { + + /** ResultSet metadata */ + metadata?: (google.spanner.v1.IResultSetMetadata|null); + + /** ResultSet rows */ + rows?: (google.protobuf.IListValue[]|null); + + /** ResultSet stats */ + stats?: (google.spanner.v1.IResultSetStats|null); + + /** ResultSet precommitToken */ + precommitToken?: (google.spanner.v1.IMultiplexedSessionPrecommitToken|null); + } + + /** Represents a ResultSet. */ + class ResultSet implements IResultSet { + + /** + * Constructs a new ResultSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.spanner.v1.IResultSet); + + /** ResultSet metadata. */ + public metadata?: (google.spanner.v1.IResultSetMetadata|null); + + /** ResultSet rows. */ + public rows: google.protobuf.IListValue[]; + + /** ResultSet stats. */ + public stats?: (google.spanner.v1.IResultSetStats|null); + + /** ResultSet precommitToken. */ + public precommitToken?: (google.spanner.v1.IMultiplexedSessionPrecommitToken|null); + + /** + * Creates a new ResultSet instance using the specified properties. + * @param [properties] Properties to set + * @returns ResultSet instance + */ + public static create(properties?: google.spanner.v1.IResultSet): google.spanner.v1.ResultSet; + + /** + * Encodes the specified ResultSet message. Does not implicitly {@link google.spanner.v1.ResultSet.verify|verify} messages. + * @param message ResultSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.spanner.v1.IResultSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResultSet message, length delimited. Does not implicitly {@link google.spanner.v1.ResultSet.verify|verify} messages. + * @param message ResultSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.spanner.v1.IResultSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResultSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResultSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.ResultSet; + + /** + * Decodes a ResultSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResultSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.ResultSet; + + /** + * Verifies a ResultSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResultSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResultSet + */ + public static fromObject(object: { [k: string]: any }): google.spanner.v1.ResultSet; + + /** + * Creates a plain object from a ResultSet message. Also converts values to other types if specified. + * @param message ResultSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.spanner.v1.ResultSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResultSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResultSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PartialResultSet. */ + interface IPartialResultSet { + + /** PartialResultSet metadata */ + metadata?: (google.spanner.v1.IResultSetMetadata|null); + + /** PartialResultSet values */ + values?: (google.protobuf.IValue[]|null); + + /** PartialResultSet chunkedValue */ + chunkedValue?: (boolean|null); + + /** PartialResultSet resumeToken */ + resumeToken?: (Uint8Array|string|null); + + /** PartialResultSet stats */ + stats?: (google.spanner.v1.IResultSetStats|null); + + /** PartialResultSet precommitToken */ + precommitToken?: (google.spanner.v1.IMultiplexedSessionPrecommitToken|null); + } + + /** Represents a PartialResultSet. */ + class PartialResultSet implements IPartialResultSet { + + /** + * Constructs a new PartialResultSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.spanner.v1.IPartialResultSet); + + /** PartialResultSet metadata. */ + public metadata?: (google.spanner.v1.IResultSetMetadata|null); + + /** PartialResultSet values. */ + public values: google.protobuf.IValue[]; + + /** PartialResultSet chunkedValue. */ + public chunkedValue: boolean; + + /** PartialResultSet resumeToken. */ + public resumeToken: (Uint8Array|string); + + /** PartialResultSet stats. */ + public stats?: (google.spanner.v1.IResultSetStats|null); + + /** PartialResultSet precommitToken. */ + public precommitToken?: (google.spanner.v1.IMultiplexedSessionPrecommitToken|null); + + /** + * Creates a new PartialResultSet instance using the specified properties. + * @param [properties] Properties to set + * @returns PartialResultSet instance + */ + public static create(properties?: google.spanner.v1.IPartialResultSet): google.spanner.v1.PartialResultSet; + + /** + * Encodes the specified PartialResultSet message. Does not implicitly {@link google.spanner.v1.PartialResultSet.verify|verify} messages. + * @param message PartialResultSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.spanner.v1.IPartialResultSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PartialResultSet message, length delimited. Does not implicitly {@link google.spanner.v1.PartialResultSet.verify|verify} messages. + * @param message PartialResultSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.spanner.v1.IPartialResultSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PartialResultSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PartialResultSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.PartialResultSet; + + /** + * Decodes a PartialResultSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PartialResultSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.PartialResultSet; + + /** + * Verifies a PartialResultSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PartialResultSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PartialResultSet + */ + public static fromObject(object: { [k: string]: any }): google.spanner.v1.PartialResultSet; + + /** + * Creates a plain object from a PartialResultSet message. Also converts values to other types if specified. + * @param message PartialResultSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.spanner.v1.PartialResultSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PartialResultSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PartialResultSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ResultSetMetadata. */ + interface IResultSetMetadata { + + /** ResultSetMetadata rowType */ + rowType?: (google.spanner.v1.IStructType|null); + + /** ResultSetMetadata transaction */ + transaction?: (google.spanner.v1.ITransaction|null); + + /** ResultSetMetadata undeclaredParameters */ + undeclaredParameters?: (google.spanner.v1.IStructType|null); + } + + /** Represents a ResultSetMetadata. */ + class ResultSetMetadata implements IResultSetMetadata { + + /** + * Constructs a new ResultSetMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.spanner.v1.IResultSetMetadata); + + /** ResultSetMetadata rowType. */ + public rowType?: (google.spanner.v1.IStructType|null); + + /** ResultSetMetadata transaction. */ + public transaction?: (google.spanner.v1.ITransaction|null); + + /** ResultSetMetadata undeclaredParameters. */ + public undeclaredParameters?: (google.spanner.v1.IStructType|null); + + /** + * Creates a new ResultSetMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ResultSetMetadata instance + */ + public static create(properties?: google.spanner.v1.IResultSetMetadata): google.spanner.v1.ResultSetMetadata; + + /** + * Encodes the specified ResultSetMetadata message. Does not implicitly {@link google.spanner.v1.ResultSetMetadata.verify|verify} messages. + * @param message ResultSetMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.spanner.v1.IResultSetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResultSetMetadata message, length delimited. Does not implicitly {@link google.spanner.v1.ResultSetMetadata.verify|verify} messages. + * @param message ResultSetMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.spanner.v1.IResultSetMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResultSetMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResultSetMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.ResultSetMetadata; + + /** + * Decodes a ResultSetMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResultSetMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.ResultSetMetadata; - /** - * Encodes the specified ShortRepresentation message, length delimited. Does not implicitly {@link google.spanner.v1.PlanNode.ShortRepresentation.verify|verify} messages. - * @param message ShortRepresentation message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.spanner.v1.PlanNode.IShortRepresentation, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Verifies a ResultSetMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** - * Decodes a ShortRepresentation message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ShortRepresentation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.PlanNode.ShortRepresentation; + /** + * Creates a ResultSetMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResultSetMetadata + */ + public static fromObject(object: { [k: string]: any }): google.spanner.v1.ResultSetMetadata; - /** - * Decodes a ShortRepresentation message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ShortRepresentation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.PlanNode.ShortRepresentation; + /** + * Creates a plain object from a ResultSetMetadata message. Also converts values to other types if specified. + * @param message ResultSetMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.spanner.v1.ResultSetMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Verifies a ShortRepresentation message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** + * Converts this ResultSetMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Creates a ShortRepresentation message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ShortRepresentation - */ - public static fromObject(object: { [k: string]: any }): google.spanner.v1.PlanNode.ShortRepresentation; + /** + * Gets the default type url for ResultSetMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Creates a plain object from a ShortRepresentation message. Also converts values to other types if specified. - * @param message ShortRepresentation - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.spanner.v1.PlanNode.ShortRepresentation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** Properties of a ResultSetStats. */ + interface IResultSetStats { - /** - * Converts this ShortRepresentation to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** ResultSetStats queryPlan */ + queryPlan?: (google.spanner.v1.IQueryPlan|null); - /** - * Gets the default type url for ShortRepresentation - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } + /** ResultSetStats queryStats */ + queryStats?: (google.protobuf.IStruct|null); - /** Properties of a QueryPlan. */ - interface IQueryPlan { + /** ResultSetStats rowCountExact */ + rowCountExact?: (number|Long|string|null); - /** QueryPlan planNodes */ - planNodes?: (google.spanner.v1.IPlanNode[]|null); + /** ResultSetStats rowCountLowerBound */ + rowCountLowerBound?: (number|Long|string|null); } - /** Represents a QueryPlan. */ - class QueryPlan implements IQueryPlan { + /** Represents a ResultSetStats. */ + class ResultSetStats implements IResultSetStats { /** - * Constructs a new QueryPlan. + * Constructs a new ResultSetStats. * @param [properties] Properties to set */ - constructor(properties?: google.spanner.v1.IQueryPlan); + constructor(properties?: google.spanner.v1.IResultSetStats); - /** QueryPlan planNodes. */ - public planNodes: google.spanner.v1.IPlanNode[]; + /** ResultSetStats queryPlan. */ + public queryPlan?: (google.spanner.v1.IQueryPlan|null); + + /** ResultSetStats queryStats. */ + public queryStats?: (google.protobuf.IStruct|null); + + /** ResultSetStats rowCountExact. */ + public rowCountExact?: (number|Long|string|null); + + /** ResultSetStats rowCountLowerBound. */ + public rowCountLowerBound?: (number|Long|string|null); + + /** ResultSetStats rowCount. */ + public rowCount?: ("rowCountExact"|"rowCountLowerBound"); /** - * Creates a new QueryPlan instance using the specified properties. + * Creates a new ResultSetStats instance using the specified properties. * @param [properties] Properties to set - * @returns QueryPlan instance + * @returns ResultSetStats instance */ - public static create(properties?: google.spanner.v1.IQueryPlan): google.spanner.v1.QueryPlan; + public static create(properties?: google.spanner.v1.IResultSetStats): google.spanner.v1.ResultSetStats; /** - * Encodes the specified QueryPlan message. Does not implicitly {@link google.spanner.v1.QueryPlan.verify|verify} messages. - * @param message QueryPlan message or plain object to encode + * Encodes the specified ResultSetStats message. Does not implicitly {@link google.spanner.v1.ResultSetStats.verify|verify} messages. + * @param message ResultSetStats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.spanner.v1.IQueryPlan, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.spanner.v1.IResultSetStats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified QueryPlan message, length delimited. Does not implicitly {@link google.spanner.v1.QueryPlan.verify|verify} messages. - * @param message QueryPlan message or plain object to encode + * Encodes the specified ResultSetStats message, length delimited. Does not implicitly {@link google.spanner.v1.ResultSetStats.verify|verify} messages. + * @param message ResultSetStats message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.spanner.v1.IQueryPlan, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.spanner.v1.IResultSetStats, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a QueryPlan message from the specified reader or buffer. + * Decodes a ResultSetStats message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns QueryPlan + * @returns ResultSetStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.QueryPlan; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.ResultSetStats; /** - * Decodes a QueryPlan message from the specified reader or buffer, length delimited. + * Decodes a ResultSetStats message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns QueryPlan + * @returns ResultSetStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.QueryPlan; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.ResultSetStats; /** - * Verifies a QueryPlan message. + * Verifies a ResultSetStats message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a QueryPlan message from a plain object. Also converts values to their respective internal types. + * Creates a ResultSetStats message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns QueryPlan + * @returns ResultSetStats */ - public static fromObject(object: { [k: string]: any }): google.spanner.v1.QueryPlan; + public static fromObject(object: { [k: string]: any }): google.spanner.v1.ResultSetStats; /** - * Creates a plain object from a QueryPlan message. Also converts values to other types if specified. - * @param message QueryPlan + * Creates a plain object from a ResultSetStats message. Also converts values to other types if specified. + * @param message ResultSetStats * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.spanner.v1.QueryPlan, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.spanner.v1.ResultSetStats, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this QueryPlan to JSON. + * Converts this ResultSetStats to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for QueryPlan + * Gets the default type url for ResultSetStats * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a TransactionOptions. */ - interface ITransactionOptions { + /** Properties of a PlanNode. */ + interface IPlanNode { - /** TransactionOptions readWrite */ - readWrite?: (google.spanner.v1.TransactionOptions.IReadWrite|null); + /** PlanNode index */ + index?: (number|null); - /** TransactionOptions partitionedDml */ - partitionedDml?: (google.spanner.v1.TransactionOptions.IPartitionedDml|null); + /** PlanNode kind */ + kind?: (google.spanner.v1.PlanNode.Kind|keyof typeof google.spanner.v1.PlanNode.Kind|null); - /** TransactionOptions readOnly */ - readOnly?: (google.spanner.v1.TransactionOptions.IReadOnly|null); + /** PlanNode displayName */ + displayName?: (string|null); - /** TransactionOptions excludeTxnFromChangeStreams */ - excludeTxnFromChangeStreams?: (boolean|null); + /** PlanNode childLinks */ + childLinks?: (google.spanner.v1.PlanNode.IChildLink[]|null); + + /** PlanNode shortRepresentation */ + shortRepresentation?: (google.spanner.v1.PlanNode.IShortRepresentation|null); + + /** PlanNode metadata */ + metadata?: (google.protobuf.IStruct|null); + + /** PlanNode executionStats */ + executionStats?: (google.protobuf.IStruct|null); } - /** Represents a TransactionOptions. */ - class TransactionOptions implements ITransactionOptions { + /** Represents a PlanNode. */ + class PlanNode implements IPlanNode { /** - * Constructs a new TransactionOptions. + * Constructs a new PlanNode. * @param [properties] Properties to set */ - constructor(properties?: google.spanner.v1.ITransactionOptions); + constructor(properties?: google.spanner.v1.IPlanNode); - /** TransactionOptions readWrite. */ - public readWrite?: (google.spanner.v1.TransactionOptions.IReadWrite|null); + /** PlanNode index. */ + public index: number; - /** TransactionOptions partitionedDml. */ - public partitionedDml?: (google.spanner.v1.TransactionOptions.IPartitionedDml|null); + /** PlanNode kind. */ + public kind: (google.spanner.v1.PlanNode.Kind|keyof typeof google.spanner.v1.PlanNode.Kind); - /** TransactionOptions readOnly. */ - public readOnly?: (google.spanner.v1.TransactionOptions.IReadOnly|null); + /** PlanNode displayName. */ + public displayName: string; - /** TransactionOptions excludeTxnFromChangeStreams. */ - public excludeTxnFromChangeStreams: boolean; + /** PlanNode childLinks. */ + public childLinks: google.spanner.v1.PlanNode.IChildLink[]; - /** TransactionOptions mode. */ - public mode?: ("readWrite"|"partitionedDml"|"readOnly"); + /** PlanNode shortRepresentation. */ + public shortRepresentation?: (google.spanner.v1.PlanNode.IShortRepresentation|null); + + /** PlanNode metadata. */ + public metadata?: (google.protobuf.IStruct|null); + + /** PlanNode executionStats. */ + public executionStats?: (google.protobuf.IStruct|null); /** - * Creates a new TransactionOptions instance using the specified properties. + * Creates a new PlanNode instance using the specified properties. * @param [properties] Properties to set - * @returns TransactionOptions instance + * @returns PlanNode instance */ - public static create(properties?: google.spanner.v1.ITransactionOptions): google.spanner.v1.TransactionOptions; + public static create(properties?: google.spanner.v1.IPlanNode): google.spanner.v1.PlanNode; /** - * Encodes the specified TransactionOptions message. Does not implicitly {@link google.spanner.v1.TransactionOptions.verify|verify} messages. - * @param message TransactionOptions message or plain object to encode + * Encodes the specified PlanNode message. Does not implicitly {@link google.spanner.v1.PlanNode.verify|verify} messages. + * @param message PlanNode message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.spanner.v1.ITransactionOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.spanner.v1.IPlanNode, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TransactionOptions message, length delimited. Does not implicitly {@link google.spanner.v1.TransactionOptions.verify|verify} messages. - * @param message TransactionOptions message or plain object to encode + * Encodes the specified PlanNode message, length delimited. Does not implicitly {@link google.spanner.v1.PlanNode.verify|verify} messages. + * @param message PlanNode message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.spanner.v1.ITransactionOptions, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.spanner.v1.IPlanNode, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TransactionOptions message from the specified reader or buffer. + * Decodes a PlanNode message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TransactionOptions + * @returns PlanNode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.TransactionOptions; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.PlanNode; /** - * Decodes a TransactionOptions message from the specified reader or buffer, length delimited. + * Decodes a PlanNode message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TransactionOptions + * @returns PlanNode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.TransactionOptions; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.PlanNode; /** - * Verifies a TransactionOptions message. + * Verifies a PlanNode message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TransactionOptions message from a plain object. Also converts values to their respective internal types. + * Creates a PlanNode message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TransactionOptions + * @returns PlanNode */ - public static fromObject(object: { [k: string]: any }): google.spanner.v1.TransactionOptions; + public static fromObject(object: { [k: string]: any }): google.spanner.v1.PlanNode; /** - * Creates a plain object from a TransactionOptions message. Also converts values to other types if specified. - * @param message TransactionOptions + * Creates a plain object from a PlanNode message. Also converts values to other types if specified. + * @param message PlanNode * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.spanner.v1.TransactionOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.spanner.v1.PlanNode, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TransactionOptions to JSON. + * Converts this PlanNode to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for TransactionOptions + * Gets the default type url for PlanNode * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace TransactionOptions { - - /** Properties of a ReadWrite. */ - interface IReadWrite { + namespace PlanNode { - /** ReadWrite readLockMode */ - readLockMode?: (google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode|keyof typeof google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode|null); + /** Kind enum. */ + enum Kind { + KIND_UNSPECIFIED = 0, + RELATIONAL = 1, + SCALAR = 2 } - /** Represents a ReadWrite. */ - class ReadWrite implements IReadWrite { - - /** - * Constructs a new ReadWrite. - * @param [properties] Properties to set - */ - constructor(properties?: google.spanner.v1.TransactionOptions.IReadWrite); - - /** ReadWrite readLockMode. */ - public readLockMode: (google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode|keyof typeof google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode); - - /** - * Creates a new ReadWrite instance using the specified properties. - * @param [properties] Properties to set - * @returns ReadWrite instance - */ - public static create(properties?: google.spanner.v1.TransactionOptions.IReadWrite): google.spanner.v1.TransactionOptions.ReadWrite; - - /** - * Encodes the specified ReadWrite message. Does not implicitly {@link google.spanner.v1.TransactionOptions.ReadWrite.verify|verify} messages. - * @param message ReadWrite message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.spanner.v1.TransactionOptions.IReadWrite, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified ReadWrite message, length delimited. Does not implicitly {@link google.spanner.v1.TransactionOptions.ReadWrite.verify|verify} messages. - * @param message ReadWrite message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.spanner.v1.TransactionOptions.IReadWrite, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a ReadWrite message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ReadWrite - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.TransactionOptions.ReadWrite; - - /** - * Decodes a ReadWrite message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns ReadWrite - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.TransactionOptions.ReadWrite; + /** Properties of a ChildLink. */ + interface IChildLink { - /** - * Verifies a ReadWrite message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); + /** ChildLink childIndex */ + childIndex?: (number|null); - /** - * Creates a ReadWrite message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ReadWrite - */ - public static fromObject(object: { [k: string]: any }): google.spanner.v1.TransactionOptions.ReadWrite; + /** ChildLink type */ + type?: (string|null); - /** - * Creates a plain object from a ReadWrite message. Also converts values to other types if specified. - * @param message ReadWrite - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.spanner.v1.TransactionOptions.ReadWrite, options?: $protobuf.IConversionOptions): { [k: string]: any }; + /** ChildLink variable */ + variable?: (string|null); + } - /** - * Converts this ReadWrite to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Represents a ChildLink. */ + class ChildLink implements IChildLink { /** - * Gets the default type url for ReadWrite - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Constructs a new ChildLink. + * @param [properties] Properties to set */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - namespace ReadWrite { - - /** ReadLockMode enum. */ - enum ReadLockMode { - READ_LOCK_MODE_UNSPECIFIED = 0, - PESSIMISTIC = 1, - OPTIMISTIC = 2 - } - } + constructor(properties?: google.spanner.v1.PlanNode.IChildLink); - /** Properties of a PartitionedDml. */ - interface IPartitionedDml { - } + /** ChildLink childIndex. */ + public childIndex: number; - /** Represents a PartitionedDml. */ - class PartitionedDml implements IPartitionedDml { + /** ChildLink type. */ + public type: string; - /** - * Constructs a new PartitionedDml. - * @param [properties] Properties to set - */ - constructor(properties?: google.spanner.v1.TransactionOptions.IPartitionedDml); + /** ChildLink variable. */ + public variable: string; /** - * Creates a new PartitionedDml instance using the specified properties. + * Creates a new ChildLink instance using the specified properties. * @param [properties] Properties to set - * @returns PartitionedDml instance + * @returns ChildLink instance */ - public static create(properties?: google.spanner.v1.TransactionOptions.IPartitionedDml): google.spanner.v1.TransactionOptions.PartitionedDml; + public static create(properties?: google.spanner.v1.PlanNode.IChildLink): google.spanner.v1.PlanNode.ChildLink; /** - * Encodes the specified PartitionedDml message. Does not implicitly {@link google.spanner.v1.TransactionOptions.PartitionedDml.verify|verify} messages. - * @param message PartitionedDml message or plain object to encode + * Encodes the specified ChildLink message. Does not implicitly {@link google.spanner.v1.PlanNode.ChildLink.verify|verify} messages. + * @param message ChildLink message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.spanner.v1.TransactionOptions.IPartitionedDml, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.spanner.v1.PlanNode.IChildLink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PartitionedDml message, length delimited. Does not implicitly {@link google.spanner.v1.TransactionOptions.PartitionedDml.verify|verify} messages. - * @param message PartitionedDml message or plain object to encode + * Encodes the specified ChildLink message, length delimited. Does not implicitly {@link google.spanner.v1.PlanNode.ChildLink.verify|verify} messages. + * @param message ChildLink message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.spanner.v1.TransactionOptions.IPartitionedDml, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.spanner.v1.PlanNode.IChildLink, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PartitionedDml message from the specified reader or buffer. + * Decodes a ChildLink message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PartitionedDml + * @returns ChildLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.TransactionOptions.PartitionedDml; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.PlanNode.ChildLink; /** - * Decodes a PartitionedDml message from the specified reader or buffer, length delimited. + * Decodes a ChildLink message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PartitionedDml + * @returns ChildLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.TransactionOptions.PartitionedDml; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.PlanNode.ChildLink; /** - * Verifies a PartitionedDml message. + * Verifies a ChildLink message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PartitionedDml message from a plain object. Also converts values to their respective internal types. + * Creates a ChildLink message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PartitionedDml + * @returns ChildLink */ - public static fromObject(object: { [k: string]: any }): google.spanner.v1.TransactionOptions.PartitionedDml; + public static fromObject(object: { [k: string]: any }): google.spanner.v1.PlanNode.ChildLink; /** - * Creates a plain object from a PartitionedDml message. Also converts values to other types if specified. - * @param message PartitionedDml + * Creates a plain object from a ChildLink message. Also converts values to other types if specified. + * @param message ChildLink * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.spanner.v1.TransactionOptions.PartitionedDml, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.spanner.v1.PlanNode.ChildLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PartitionedDml to JSON. + * Converts this ChildLink to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PartitionedDml + * Gets the default type url for ChildLink * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ReadOnly. */ - interface IReadOnly { - - /** ReadOnly strong */ - strong?: (boolean|null); - - /** ReadOnly minReadTimestamp */ - minReadTimestamp?: (google.protobuf.ITimestamp|null); - - /** ReadOnly maxStaleness */ - maxStaleness?: (google.protobuf.IDuration|null); - - /** ReadOnly readTimestamp */ - readTimestamp?: (google.protobuf.ITimestamp|null); - - /** ReadOnly exactStaleness */ - exactStaleness?: (google.protobuf.IDuration|null); - - /** ReadOnly returnReadTimestamp */ - returnReadTimestamp?: (boolean|null); - } - - /** Represents a ReadOnly. */ - class ReadOnly implements IReadOnly { - - /** - * Constructs a new ReadOnly. - * @param [properties] Properties to set - */ - constructor(properties?: google.spanner.v1.TransactionOptions.IReadOnly); - - /** ReadOnly strong. */ - public strong?: (boolean|null); + /** Properties of a ShortRepresentation. */ + interface IShortRepresentation { - /** ReadOnly minReadTimestamp. */ - public minReadTimestamp?: (google.protobuf.ITimestamp|null); + /** ShortRepresentation description */ + description?: (string|null); - /** ReadOnly maxStaleness. */ - public maxStaleness?: (google.protobuf.IDuration|null); + /** ShortRepresentation subqueries */ + subqueries?: ({ [k: string]: number }|null); + } - /** ReadOnly readTimestamp. */ - public readTimestamp?: (google.protobuf.ITimestamp|null); + /** Represents a ShortRepresentation. */ + class ShortRepresentation implements IShortRepresentation { - /** ReadOnly exactStaleness. */ - public exactStaleness?: (google.protobuf.IDuration|null); + /** + * Constructs a new ShortRepresentation. + * @param [properties] Properties to set + */ + constructor(properties?: google.spanner.v1.PlanNode.IShortRepresentation); - /** ReadOnly returnReadTimestamp. */ - public returnReadTimestamp: boolean; + /** ShortRepresentation description. */ + public description: string; - /** ReadOnly timestampBound. */ - public timestampBound?: ("strong"|"minReadTimestamp"|"maxStaleness"|"readTimestamp"|"exactStaleness"); + /** ShortRepresentation subqueries. */ + public subqueries: { [k: string]: number }; /** - * Creates a new ReadOnly instance using the specified properties. + * Creates a new ShortRepresentation instance using the specified properties. * @param [properties] Properties to set - * @returns ReadOnly instance + * @returns ShortRepresentation instance */ - public static create(properties?: google.spanner.v1.TransactionOptions.IReadOnly): google.spanner.v1.TransactionOptions.ReadOnly; + public static create(properties?: google.spanner.v1.PlanNode.IShortRepresentation): google.spanner.v1.PlanNode.ShortRepresentation; /** - * Encodes the specified ReadOnly message. Does not implicitly {@link google.spanner.v1.TransactionOptions.ReadOnly.verify|verify} messages. - * @param message ReadOnly message or plain object to encode + * Encodes the specified ShortRepresentation message. Does not implicitly {@link google.spanner.v1.PlanNode.ShortRepresentation.verify|verify} messages. + * @param message ShortRepresentation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.spanner.v1.TransactionOptions.IReadOnly, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.spanner.v1.PlanNode.IShortRepresentation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ReadOnly message, length delimited. Does not implicitly {@link google.spanner.v1.TransactionOptions.ReadOnly.verify|verify} messages. - * @param message ReadOnly message or plain object to encode + * Encodes the specified ShortRepresentation message, length delimited. Does not implicitly {@link google.spanner.v1.PlanNode.ShortRepresentation.verify|verify} messages. + * @param message ShortRepresentation message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.spanner.v1.TransactionOptions.IReadOnly, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.spanner.v1.PlanNode.IShortRepresentation, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ReadOnly message from the specified reader or buffer. + * Decodes a ShortRepresentation message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ReadOnly + * @returns ShortRepresentation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.TransactionOptions.ReadOnly; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.PlanNode.ShortRepresentation; /** - * Decodes a ReadOnly message from the specified reader or buffer, length delimited. + * Decodes a ShortRepresentation message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ReadOnly + * @returns ShortRepresentation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.TransactionOptions.ReadOnly; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.PlanNode.ShortRepresentation; /** - * Verifies a ReadOnly message. + * Verifies a ShortRepresentation message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ReadOnly message from a plain object. Also converts values to their respective internal types. + * Creates a ShortRepresentation message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ReadOnly + * @returns ShortRepresentation */ - public static fromObject(object: { [k: string]: any }): google.spanner.v1.TransactionOptions.ReadOnly; + public static fromObject(object: { [k: string]: any }): google.spanner.v1.PlanNode.ShortRepresentation; /** - * Creates a plain object from a ReadOnly message. Also converts values to other types if specified. - * @param message ReadOnly + * Creates a plain object from a ShortRepresentation message. Also converts values to other types if specified. + * @param message ShortRepresentation * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.spanner.v1.TransactionOptions.ReadOnly, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.spanner.v1.PlanNode.ShortRepresentation, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ReadOnly to JSON. + * Converts this ShortRepresentation to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ReadOnly + * Gets the default type url for ShortRepresentation * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -33206,215 +33923,97 @@ export namespace google { } } - /** Properties of a Transaction. */ - interface ITransaction { - - /** Transaction id */ - id?: (Uint8Array|string|null); - - /** Transaction readTimestamp */ - readTimestamp?: (google.protobuf.ITimestamp|null); - } - - /** Represents a Transaction. */ - class Transaction implements ITransaction { - - /** - * Constructs a new Transaction. - * @param [properties] Properties to set - */ - constructor(properties?: google.spanner.v1.ITransaction); - - /** Transaction id. */ - public id: (Uint8Array|string); - - /** Transaction readTimestamp. */ - public readTimestamp?: (google.protobuf.ITimestamp|null); - - /** - * Creates a new Transaction instance using the specified properties. - * @param [properties] Properties to set - * @returns Transaction instance - */ - public static create(properties?: google.spanner.v1.ITransaction): google.spanner.v1.Transaction; - - /** - * Encodes the specified Transaction message. Does not implicitly {@link google.spanner.v1.Transaction.verify|verify} messages. - * @param message Transaction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.spanner.v1.ITransaction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Transaction message, length delimited. Does not implicitly {@link google.spanner.v1.Transaction.verify|verify} messages. - * @param message Transaction message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.spanner.v1.ITransaction, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Transaction message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Transaction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.Transaction; - - /** - * Decodes a Transaction message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Transaction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.Transaction; - - /** - * Verifies a Transaction message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Transaction message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Transaction - */ - public static fromObject(object: { [k: string]: any }): google.spanner.v1.Transaction; - - /** - * Creates a plain object from a Transaction message. Also converts values to other types if specified. - * @param message Transaction - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.spanner.v1.Transaction, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Transaction to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Transaction - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - - /** Properties of a TransactionSelector. */ - interface ITransactionSelector { - - /** TransactionSelector singleUse */ - singleUse?: (google.spanner.v1.ITransactionOptions|null); - - /** TransactionSelector id */ - id?: (Uint8Array|string|null); + /** Properties of a QueryPlan. */ + interface IQueryPlan { - /** TransactionSelector begin */ - begin?: (google.spanner.v1.ITransactionOptions|null); + /** QueryPlan planNodes */ + planNodes?: (google.spanner.v1.IPlanNode[]|null); } - /** Represents a TransactionSelector. */ - class TransactionSelector implements ITransactionSelector { + /** Represents a QueryPlan. */ + class QueryPlan implements IQueryPlan { /** - * Constructs a new TransactionSelector. + * Constructs a new QueryPlan. * @param [properties] Properties to set */ - constructor(properties?: google.spanner.v1.ITransactionSelector); - - /** TransactionSelector singleUse. */ - public singleUse?: (google.spanner.v1.ITransactionOptions|null); - - /** TransactionSelector id. */ - public id?: (Uint8Array|string|null); - - /** TransactionSelector begin. */ - public begin?: (google.spanner.v1.ITransactionOptions|null); + constructor(properties?: google.spanner.v1.IQueryPlan); - /** TransactionSelector selector. */ - public selector?: ("singleUse"|"id"|"begin"); + /** QueryPlan planNodes. */ + public planNodes: google.spanner.v1.IPlanNode[]; /** - * Creates a new TransactionSelector instance using the specified properties. + * Creates a new QueryPlan instance using the specified properties. * @param [properties] Properties to set - * @returns TransactionSelector instance + * @returns QueryPlan instance */ - public static create(properties?: google.spanner.v1.ITransactionSelector): google.spanner.v1.TransactionSelector; + public static create(properties?: google.spanner.v1.IQueryPlan): google.spanner.v1.QueryPlan; /** - * Encodes the specified TransactionSelector message. Does not implicitly {@link google.spanner.v1.TransactionSelector.verify|verify} messages. - * @param message TransactionSelector message or plain object to encode + * Encodes the specified QueryPlan message. Does not implicitly {@link google.spanner.v1.QueryPlan.verify|verify} messages. + * @param message QueryPlan message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.spanner.v1.ITransactionSelector, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.spanner.v1.IQueryPlan, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified TransactionSelector message, length delimited. Does not implicitly {@link google.spanner.v1.TransactionSelector.verify|verify} messages. - * @param message TransactionSelector message or plain object to encode + * Encodes the specified QueryPlan message, length delimited. Does not implicitly {@link google.spanner.v1.QueryPlan.verify|verify} messages. + * @param message QueryPlan message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.spanner.v1.ITransactionSelector, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.spanner.v1.IQueryPlan, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a TransactionSelector message from the specified reader or buffer. + * Decodes a QueryPlan message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns TransactionSelector + * @returns QueryPlan * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.TransactionSelector; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.spanner.v1.QueryPlan; /** - * Decodes a TransactionSelector message from the specified reader or buffer, length delimited. + * Decodes a QueryPlan message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns TransactionSelector + * @returns QueryPlan * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.TransactionSelector; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.spanner.v1.QueryPlan; /** - * Verifies a TransactionSelector message. + * Verifies a QueryPlan message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a TransactionSelector message from a plain object. Also converts values to their respective internal types. + * Creates a QueryPlan message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns TransactionSelector + * @returns QueryPlan */ - public static fromObject(object: { [k: string]: any }): google.spanner.v1.TransactionSelector; + public static fromObject(object: { [k: string]: any }): google.spanner.v1.QueryPlan; /** - * Creates a plain object from a TransactionSelector message. Also converts values to other types if specified. - * @param message TransactionSelector + * Creates a plain object from a QueryPlan message. Also converts values to other types if specified. + * @param message QueryPlan * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.spanner.v1.TransactionSelector, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.spanner.v1.QueryPlan, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this TransactionSelector to JSON. + * Converts this QueryPlan to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for TransactionSelector + * Gets the default type url for QueryPlan * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -33761,7 +34360,8 @@ export namespace google { NUMERIC = 10, JSON = 11, PROTO = 13, - ENUM = 14 + ENUM = 14, + INTERVAL = 16 } /** TypeAnnotationCode enum. */ diff --git a/protos/protos.js b/protos/protos.js index 46bf7d127..3d9b1fbe7 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -33533,6 +33533,209 @@ return values; })(); + v1.ReplicaSelection = (function() { + + /** + * Properties of a ReplicaSelection. + * @memberof google.spanner.admin.instance.v1 + * @interface IReplicaSelection + * @property {string|null} [location] ReplicaSelection location + */ + + /** + * Constructs a new ReplicaSelection. + * @memberof google.spanner.admin.instance.v1 + * @classdesc Represents a ReplicaSelection. + * @implements IReplicaSelection + * @constructor + * @param {google.spanner.admin.instance.v1.IReplicaSelection=} [properties] Properties to set + */ + function ReplicaSelection(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReplicaSelection location. + * @member {string} location + * @memberof google.spanner.admin.instance.v1.ReplicaSelection + * @instance + */ + ReplicaSelection.prototype.location = ""; + + /** + * Creates a new ReplicaSelection instance using the specified properties. + * @function create + * @memberof google.spanner.admin.instance.v1.ReplicaSelection + * @static + * @param {google.spanner.admin.instance.v1.IReplicaSelection=} [properties] Properties to set + * @returns {google.spanner.admin.instance.v1.ReplicaSelection} ReplicaSelection instance + */ + ReplicaSelection.create = function create(properties) { + return new ReplicaSelection(properties); + }; + + /** + * Encodes the specified ReplicaSelection message. Does not implicitly {@link google.spanner.admin.instance.v1.ReplicaSelection.verify|verify} messages. + * @function encode + * @memberof google.spanner.admin.instance.v1.ReplicaSelection + * @static + * @param {google.spanner.admin.instance.v1.IReplicaSelection} message ReplicaSelection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReplicaSelection.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.location != null && Object.hasOwnProperty.call(message, "location")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.location); + return writer; + }; + + /** + * Encodes the specified ReplicaSelection message, length delimited. Does not implicitly {@link google.spanner.admin.instance.v1.ReplicaSelection.verify|verify} messages. + * @function encodeDelimited + * @memberof google.spanner.admin.instance.v1.ReplicaSelection + * @static + * @param {google.spanner.admin.instance.v1.IReplicaSelection} message ReplicaSelection message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReplicaSelection.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReplicaSelection message from the specified reader or buffer. + * @function decode + * @memberof google.spanner.admin.instance.v1.ReplicaSelection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.spanner.admin.instance.v1.ReplicaSelection} ReplicaSelection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReplicaSelection.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.admin.instance.v1.ReplicaSelection(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.location = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReplicaSelection message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.spanner.admin.instance.v1.ReplicaSelection + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.spanner.admin.instance.v1.ReplicaSelection} ReplicaSelection + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReplicaSelection.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReplicaSelection message. + * @function verify + * @memberof google.spanner.admin.instance.v1.ReplicaSelection + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReplicaSelection.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) + if (!$util.isString(message.location)) + return "location: string expected"; + return null; + }; + + /** + * Creates a ReplicaSelection message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.spanner.admin.instance.v1.ReplicaSelection + * @static + * @param {Object.} object Plain object + * @returns {google.spanner.admin.instance.v1.ReplicaSelection} ReplicaSelection + */ + ReplicaSelection.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.admin.instance.v1.ReplicaSelection) + return object; + var message = new $root.google.spanner.admin.instance.v1.ReplicaSelection(); + if (object.location != null) + message.location = String(object.location); + return message; + }; + + /** + * Creates a plain object from a ReplicaSelection message. Also converts values to other types if specified. + * @function toObject + * @memberof google.spanner.admin.instance.v1.ReplicaSelection + * @static + * @param {google.spanner.admin.instance.v1.ReplicaSelection} message ReplicaSelection + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReplicaSelection.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.location = ""; + if (message.location != null && message.hasOwnProperty("location")) + object.location = message.location; + return object; + }; + + /** + * Converts this ReplicaSelection to JSON. + * @function toJSON + * @memberof google.spanner.admin.instance.v1.ReplicaSelection + * @instance + * @returns {Object.} JSON object + */ + ReplicaSelection.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReplicaSelection + * @function getTypeUrl + * @memberof google.spanner.admin.instance.v1.ReplicaSelection + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReplicaSelection.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.spanner.admin.instance.v1.ReplicaSelection"; + }; + + return ReplicaSelection; + })(); + v1.InstanceAdmin = (function() { /** @@ -35168,6 +35371,285 @@ return InstanceConfig; })(); + v1.ReplicaComputeCapacity = (function() { + + /** + * Properties of a ReplicaComputeCapacity. + * @memberof google.spanner.admin.instance.v1 + * @interface IReplicaComputeCapacity + * @property {google.spanner.admin.instance.v1.IReplicaSelection|null} [replicaSelection] ReplicaComputeCapacity replicaSelection + * @property {number|null} [nodeCount] ReplicaComputeCapacity nodeCount + * @property {number|null} [processingUnits] ReplicaComputeCapacity processingUnits + */ + + /** + * Constructs a new ReplicaComputeCapacity. + * @memberof google.spanner.admin.instance.v1 + * @classdesc Represents a ReplicaComputeCapacity. + * @implements IReplicaComputeCapacity + * @constructor + * @param {google.spanner.admin.instance.v1.IReplicaComputeCapacity=} [properties] Properties to set + */ + function ReplicaComputeCapacity(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReplicaComputeCapacity replicaSelection. + * @member {google.spanner.admin.instance.v1.IReplicaSelection|null|undefined} replicaSelection + * @memberof google.spanner.admin.instance.v1.ReplicaComputeCapacity + * @instance + */ + ReplicaComputeCapacity.prototype.replicaSelection = null; + + /** + * ReplicaComputeCapacity nodeCount. + * @member {number|null|undefined} nodeCount + * @memberof google.spanner.admin.instance.v1.ReplicaComputeCapacity + * @instance + */ + ReplicaComputeCapacity.prototype.nodeCount = null; + + /** + * ReplicaComputeCapacity processingUnits. + * @member {number|null|undefined} processingUnits + * @memberof google.spanner.admin.instance.v1.ReplicaComputeCapacity + * @instance + */ + ReplicaComputeCapacity.prototype.processingUnits = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ReplicaComputeCapacity computeCapacity. + * @member {"nodeCount"|"processingUnits"|undefined} computeCapacity + * @memberof google.spanner.admin.instance.v1.ReplicaComputeCapacity + * @instance + */ + Object.defineProperty(ReplicaComputeCapacity.prototype, "computeCapacity", { + get: $util.oneOfGetter($oneOfFields = ["nodeCount", "processingUnits"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ReplicaComputeCapacity instance using the specified properties. + * @function create + * @memberof google.spanner.admin.instance.v1.ReplicaComputeCapacity + * @static + * @param {google.spanner.admin.instance.v1.IReplicaComputeCapacity=} [properties] Properties to set + * @returns {google.spanner.admin.instance.v1.ReplicaComputeCapacity} ReplicaComputeCapacity instance + */ + ReplicaComputeCapacity.create = function create(properties) { + return new ReplicaComputeCapacity(properties); + }; + + /** + * Encodes the specified ReplicaComputeCapacity message. Does not implicitly {@link google.spanner.admin.instance.v1.ReplicaComputeCapacity.verify|verify} messages. + * @function encode + * @memberof google.spanner.admin.instance.v1.ReplicaComputeCapacity + * @static + * @param {google.spanner.admin.instance.v1.IReplicaComputeCapacity} message ReplicaComputeCapacity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReplicaComputeCapacity.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.replicaSelection != null && Object.hasOwnProperty.call(message, "replicaSelection")) + $root.google.spanner.admin.instance.v1.ReplicaSelection.encode(message.replicaSelection, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nodeCount != null && Object.hasOwnProperty.call(message, "nodeCount")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nodeCount); + if (message.processingUnits != null && Object.hasOwnProperty.call(message, "processingUnits")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.processingUnits); + return writer; + }; + + /** + * Encodes the specified ReplicaComputeCapacity message, length delimited. Does not implicitly {@link google.spanner.admin.instance.v1.ReplicaComputeCapacity.verify|verify} messages. + * @function encodeDelimited + * @memberof google.spanner.admin.instance.v1.ReplicaComputeCapacity + * @static + * @param {google.spanner.admin.instance.v1.IReplicaComputeCapacity} message ReplicaComputeCapacity message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReplicaComputeCapacity.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReplicaComputeCapacity message from the specified reader or buffer. + * @function decode + * @memberof google.spanner.admin.instance.v1.ReplicaComputeCapacity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.spanner.admin.instance.v1.ReplicaComputeCapacity} ReplicaComputeCapacity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReplicaComputeCapacity.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.admin.instance.v1.ReplicaComputeCapacity(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.replicaSelection = $root.google.spanner.admin.instance.v1.ReplicaSelection.decode(reader, reader.uint32()); + break; + } + case 2: { + message.nodeCount = reader.int32(); + break; + } + case 3: { + message.processingUnits = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReplicaComputeCapacity message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.spanner.admin.instance.v1.ReplicaComputeCapacity + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.spanner.admin.instance.v1.ReplicaComputeCapacity} ReplicaComputeCapacity + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReplicaComputeCapacity.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReplicaComputeCapacity message. + * @function verify + * @memberof google.spanner.admin.instance.v1.ReplicaComputeCapacity + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReplicaComputeCapacity.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.replicaSelection != null && message.hasOwnProperty("replicaSelection")) { + var error = $root.google.spanner.admin.instance.v1.ReplicaSelection.verify(message.replicaSelection); + if (error) + return "replicaSelection." + error; + } + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) { + properties.computeCapacity = 1; + if (!$util.isInteger(message.nodeCount)) + return "nodeCount: integer expected"; + } + if (message.processingUnits != null && message.hasOwnProperty("processingUnits")) { + if (properties.computeCapacity === 1) + return "computeCapacity: multiple values"; + properties.computeCapacity = 1; + if (!$util.isInteger(message.processingUnits)) + return "processingUnits: integer expected"; + } + return null; + }; + + /** + * Creates a ReplicaComputeCapacity message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.spanner.admin.instance.v1.ReplicaComputeCapacity + * @static + * @param {Object.} object Plain object + * @returns {google.spanner.admin.instance.v1.ReplicaComputeCapacity} ReplicaComputeCapacity + */ + ReplicaComputeCapacity.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.admin.instance.v1.ReplicaComputeCapacity) + return object; + var message = new $root.google.spanner.admin.instance.v1.ReplicaComputeCapacity(); + if (object.replicaSelection != null) { + if (typeof object.replicaSelection !== "object") + throw TypeError(".google.spanner.admin.instance.v1.ReplicaComputeCapacity.replicaSelection: object expected"); + message.replicaSelection = $root.google.spanner.admin.instance.v1.ReplicaSelection.fromObject(object.replicaSelection); + } + if (object.nodeCount != null) + message.nodeCount = object.nodeCount | 0; + if (object.processingUnits != null) + message.processingUnits = object.processingUnits | 0; + return message; + }; + + /** + * Creates a plain object from a ReplicaComputeCapacity message. Also converts values to other types if specified. + * @function toObject + * @memberof google.spanner.admin.instance.v1.ReplicaComputeCapacity + * @static + * @param {google.spanner.admin.instance.v1.ReplicaComputeCapacity} message ReplicaComputeCapacity + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReplicaComputeCapacity.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.replicaSelection = null; + if (message.replicaSelection != null && message.hasOwnProperty("replicaSelection")) + object.replicaSelection = $root.google.spanner.admin.instance.v1.ReplicaSelection.toObject(message.replicaSelection, options); + if (message.nodeCount != null && message.hasOwnProperty("nodeCount")) { + object.nodeCount = message.nodeCount; + if (options.oneofs) + object.computeCapacity = "nodeCount"; + } + if (message.processingUnits != null && message.hasOwnProperty("processingUnits")) { + object.processingUnits = message.processingUnits; + if (options.oneofs) + object.computeCapacity = "processingUnits"; + } + return object; + }; + + /** + * Converts this ReplicaComputeCapacity to JSON. + * @function toJSON + * @memberof google.spanner.admin.instance.v1.ReplicaComputeCapacity + * @instance + * @returns {Object.} JSON object + */ + ReplicaComputeCapacity.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReplicaComputeCapacity + * @function getTypeUrl + * @memberof google.spanner.admin.instance.v1.ReplicaComputeCapacity + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReplicaComputeCapacity.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.spanner.admin.instance.v1.ReplicaComputeCapacity"; + }; + + return ReplicaComputeCapacity; + })(); + v1.AutoscalingConfig = (function() { /** @@ -35176,6 +35658,7 @@ * @interface IAutoscalingConfig * @property {google.spanner.admin.instance.v1.AutoscalingConfig.IAutoscalingLimits|null} [autoscalingLimits] AutoscalingConfig autoscalingLimits * @property {google.spanner.admin.instance.v1.AutoscalingConfig.IAutoscalingTargets|null} [autoscalingTargets] AutoscalingConfig autoscalingTargets + * @property {Array.|null} [asymmetricAutoscalingOptions] AutoscalingConfig asymmetricAutoscalingOptions */ /** @@ -35187,6 +35670,7 @@ * @param {google.spanner.admin.instance.v1.IAutoscalingConfig=} [properties] Properties to set */ function AutoscalingConfig(properties) { + this.asymmetricAutoscalingOptions = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -35209,6 +35693,14 @@ */ AutoscalingConfig.prototype.autoscalingTargets = null; + /** + * AutoscalingConfig asymmetricAutoscalingOptions. + * @member {Array.} asymmetricAutoscalingOptions + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig + * @instance + */ + AutoscalingConfig.prototype.asymmetricAutoscalingOptions = $util.emptyArray; + /** * Creates a new AutoscalingConfig instance using the specified properties. * @function create @@ -35237,6 +35729,9 @@ $root.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.encode(message.autoscalingLimits, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.autoscalingTargets != null && Object.hasOwnProperty.call(message, "autoscalingTargets")) $root.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.encode(message.autoscalingTargets, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.asymmetricAutoscalingOptions != null && message.asymmetricAutoscalingOptions.length) + for (var i = 0; i < message.asymmetricAutoscalingOptions.length; ++i) + $root.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.encode(message.asymmetricAutoscalingOptions[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -35279,6 +35774,12 @@ message.autoscalingTargets = $root.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.decode(reader, reader.uint32()); break; } + case 3: { + if (!(message.asymmetricAutoscalingOptions && message.asymmetricAutoscalingOptions.length)) + message.asymmetricAutoscalingOptions = []; + message.asymmetricAutoscalingOptions.push($root.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.decode(reader, reader.uint32())); + break; + } default: reader.skipType(tag & 7); break; @@ -35324,6 +35825,15 @@ if (error) return "autoscalingTargets." + error; } + if (message.asymmetricAutoscalingOptions != null && message.hasOwnProperty("asymmetricAutoscalingOptions")) { + if (!Array.isArray(message.asymmetricAutoscalingOptions)) + return "asymmetricAutoscalingOptions: array expected"; + for (var i = 0; i < message.asymmetricAutoscalingOptions.length; ++i) { + var error = $root.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.verify(message.asymmetricAutoscalingOptions[i]); + if (error) + return "asymmetricAutoscalingOptions." + error; + } + } return null; }; @@ -35349,6 +35859,16 @@ throw TypeError(".google.spanner.admin.instance.v1.AutoscalingConfig.autoscalingTargets: object expected"); message.autoscalingTargets = $root.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.fromObject(object.autoscalingTargets); } + if (object.asymmetricAutoscalingOptions) { + if (!Array.isArray(object.asymmetricAutoscalingOptions)) + throw TypeError(".google.spanner.admin.instance.v1.AutoscalingConfig.asymmetricAutoscalingOptions: array expected"); + message.asymmetricAutoscalingOptions = []; + for (var i = 0; i < object.asymmetricAutoscalingOptions.length; ++i) { + if (typeof object.asymmetricAutoscalingOptions[i] !== "object") + throw TypeError(".google.spanner.admin.instance.v1.AutoscalingConfig.asymmetricAutoscalingOptions: object expected"); + message.asymmetricAutoscalingOptions[i] = $root.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.fromObject(object.asymmetricAutoscalingOptions[i]); + } + } return message; }; @@ -35365,6 +35885,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.asymmetricAutoscalingOptions = []; if (options.defaults) { object.autoscalingLimits = null; object.autoscalingTargets = null; @@ -35373,6 +35895,11 @@ object.autoscalingLimits = $root.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.toObject(message.autoscalingLimits, options); if (message.autoscalingTargets != null && message.hasOwnProperty("autoscalingTargets")) object.autoscalingTargets = $root.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingTargets.toObject(message.autoscalingTargets, options); + if (message.asymmetricAutoscalingOptions && message.asymmetricAutoscalingOptions.length) { + object.asymmetricAutoscalingOptions = []; + for (var j = 0; j < message.asymmetricAutoscalingOptions.length; ++j) + object.asymmetricAutoscalingOptions[j] = $root.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.toObject(message.asymmetricAutoscalingOptions[j], options); + } return object; }; @@ -35946,6 +36473,475 @@ return AutoscalingTargets; })(); + AutoscalingConfig.AsymmetricAutoscalingOption = (function() { + + /** + * Properties of an AsymmetricAutoscalingOption. + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig + * @interface IAsymmetricAutoscalingOption + * @property {google.spanner.admin.instance.v1.IReplicaSelection|null} [replicaSelection] AsymmetricAutoscalingOption replicaSelection + * @property {google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.IAutoscalingConfigOverrides|null} [overrides] AsymmetricAutoscalingOption overrides + */ + + /** + * Constructs a new AsymmetricAutoscalingOption. + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig + * @classdesc Represents an AsymmetricAutoscalingOption. + * @implements IAsymmetricAutoscalingOption + * @constructor + * @param {google.spanner.admin.instance.v1.AutoscalingConfig.IAsymmetricAutoscalingOption=} [properties] Properties to set + */ + function AsymmetricAutoscalingOption(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AsymmetricAutoscalingOption replicaSelection. + * @member {google.spanner.admin.instance.v1.IReplicaSelection|null|undefined} replicaSelection + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + * @instance + */ + AsymmetricAutoscalingOption.prototype.replicaSelection = null; + + /** + * AsymmetricAutoscalingOption overrides. + * @member {google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.IAutoscalingConfigOverrides|null|undefined} overrides + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + * @instance + */ + AsymmetricAutoscalingOption.prototype.overrides = null; + + /** + * Creates a new AsymmetricAutoscalingOption instance using the specified properties. + * @function create + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + * @static + * @param {google.spanner.admin.instance.v1.AutoscalingConfig.IAsymmetricAutoscalingOption=} [properties] Properties to set + * @returns {google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption} AsymmetricAutoscalingOption instance + */ + AsymmetricAutoscalingOption.create = function create(properties) { + return new AsymmetricAutoscalingOption(properties); + }; + + /** + * Encodes the specified AsymmetricAutoscalingOption message. Does not implicitly {@link google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.verify|verify} messages. + * @function encode + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + * @static + * @param {google.spanner.admin.instance.v1.AutoscalingConfig.IAsymmetricAutoscalingOption} message AsymmetricAutoscalingOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AsymmetricAutoscalingOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.replicaSelection != null && Object.hasOwnProperty.call(message, "replicaSelection")) + $root.google.spanner.admin.instance.v1.ReplicaSelection.encode(message.replicaSelection, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.overrides != null && Object.hasOwnProperty.call(message, "overrides")) + $root.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.encode(message.overrides, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AsymmetricAutoscalingOption message, length delimited. Does not implicitly {@link google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + * @static + * @param {google.spanner.admin.instance.v1.AutoscalingConfig.IAsymmetricAutoscalingOption} message AsymmetricAutoscalingOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AsymmetricAutoscalingOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AsymmetricAutoscalingOption message from the specified reader or buffer. + * @function decode + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption} AsymmetricAutoscalingOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AsymmetricAutoscalingOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.replicaSelection = $root.google.spanner.admin.instance.v1.ReplicaSelection.decode(reader, reader.uint32()); + break; + } + case 2: { + message.overrides = $root.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AsymmetricAutoscalingOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption} AsymmetricAutoscalingOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AsymmetricAutoscalingOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AsymmetricAutoscalingOption message. + * @function verify + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AsymmetricAutoscalingOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.replicaSelection != null && message.hasOwnProperty("replicaSelection")) { + var error = $root.google.spanner.admin.instance.v1.ReplicaSelection.verify(message.replicaSelection); + if (error) + return "replicaSelection." + error; + } + if (message.overrides != null && message.hasOwnProperty("overrides")) { + var error = $root.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.verify(message.overrides); + if (error) + return "overrides." + error; + } + return null; + }; + + /** + * Creates an AsymmetricAutoscalingOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + * @static + * @param {Object.} object Plain object + * @returns {google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption} AsymmetricAutoscalingOption + */ + AsymmetricAutoscalingOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption) + return object; + var message = new $root.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption(); + if (object.replicaSelection != null) { + if (typeof object.replicaSelection !== "object") + throw TypeError(".google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.replicaSelection: object expected"); + message.replicaSelection = $root.google.spanner.admin.instance.v1.ReplicaSelection.fromObject(object.replicaSelection); + } + if (object.overrides != null) { + if (typeof object.overrides !== "object") + throw TypeError(".google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.overrides: object expected"); + message.overrides = $root.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.fromObject(object.overrides); + } + return message; + }; + + /** + * Creates a plain object from an AsymmetricAutoscalingOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + * @static + * @param {google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption} message AsymmetricAutoscalingOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AsymmetricAutoscalingOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.replicaSelection = null; + object.overrides = null; + } + if (message.replicaSelection != null && message.hasOwnProperty("replicaSelection")) + object.replicaSelection = $root.google.spanner.admin.instance.v1.ReplicaSelection.toObject(message.replicaSelection, options); + if (message.overrides != null && message.hasOwnProperty("overrides")) + object.overrides = $root.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.toObject(message.overrides, options); + return object; + }; + + /** + * Converts this AsymmetricAutoscalingOption to JSON. + * @function toJSON + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + * @instance + * @returns {Object.} JSON object + */ + AsymmetricAutoscalingOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AsymmetricAutoscalingOption + * @function getTypeUrl + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AsymmetricAutoscalingOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption"; + }; + + AsymmetricAutoscalingOption.AutoscalingConfigOverrides = (function() { + + /** + * Properties of an AutoscalingConfigOverrides. + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + * @interface IAutoscalingConfigOverrides + * @property {google.spanner.admin.instance.v1.AutoscalingConfig.IAutoscalingLimits|null} [autoscalingLimits] AutoscalingConfigOverrides autoscalingLimits + * @property {number|null} [autoscalingTargetHighPriorityCpuUtilizationPercent] AutoscalingConfigOverrides autoscalingTargetHighPriorityCpuUtilizationPercent + */ + + /** + * Constructs a new AutoscalingConfigOverrides. + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption + * @classdesc Represents an AutoscalingConfigOverrides. + * @implements IAutoscalingConfigOverrides + * @constructor + * @param {google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.IAutoscalingConfigOverrides=} [properties] Properties to set + */ + function AutoscalingConfigOverrides(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutoscalingConfigOverrides autoscalingLimits. + * @member {google.spanner.admin.instance.v1.AutoscalingConfig.IAutoscalingLimits|null|undefined} autoscalingLimits + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides + * @instance + */ + AutoscalingConfigOverrides.prototype.autoscalingLimits = null; + + /** + * AutoscalingConfigOverrides autoscalingTargetHighPriorityCpuUtilizationPercent. + * @member {number} autoscalingTargetHighPriorityCpuUtilizationPercent + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides + * @instance + */ + AutoscalingConfigOverrides.prototype.autoscalingTargetHighPriorityCpuUtilizationPercent = 0; + + /** + * Creates a new AutoscalingConfigOverrides instance using the specified properties. + * @function create + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides + * @static + * @param {google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.IAutoscalingConfigOverrides=} [properties] Properties to set + * @returns {google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides} AutoscalingConfigOverrides instance + */ + AutoscalingConfigOverrides.create = function create(properties) { + return new AutoscalingConfigOverrides(properties); + }; + + /** + * Encodes the specified AutoscalingConfigOverrides message. Does not implicitly {@link google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.verify|verify} messages. + * @function encode + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides + * @static + * @param {google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.IAutoscalingConfigOverrides} message AutoscalingConfigOverrides message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoscalingConfigOverrides.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.autoscalingLimits != null && Object.hasOwnProperty.call(message, "autoscalingLimits")) + $root.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.encode(message.autoscalingLimits, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.autoscalingTargetHighPriorityCpuUtilizationPercent != null && Object.hasOwnProperty.call(message, "autoscalingTargetHighPriorityCpuUtilizationPercent")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.autoscalingTargetHighPriorityCpuUtilizationPercent); + return writer; + }; + + /** + * Encodes the specified AutoscalingConfigOverrides message, length delimited. Does not implicitly {@link google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.verify|verify} messages. + * @function encodeDelimited + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides + * @static + * @param {google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.IAutoscalingConfigOverrides} message AutoscalingConfigOverrides message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoscalingConfigOverrides.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutoscalingConfigOverrides message from the specified reader or buffer. + * @function decode + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides} AutoscalingConfigOverrides + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoscalingConfigOverrides.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.autoscalingLimits = $root.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.decode(reader, reader.uint32()); + break; + } + case 2: { + message.autoscalingTargetHighPriorityCpuUtilizationPercent = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutoscalingConfigOverrides message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides} AutoscalingConfigOverrides + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoscalingConfigOverrides.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutoscalingConfigOverrides message. + * @function verify + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutoscalingConfigOverrides.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.autoscalingLimits != null && message.hasOwnProperty("autoscalingLimits")) { + var error = $root.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.verify(message.autoscalingLimits); + if (error) + return "autoscalingLimits." + error; + } + if (message.autoscalingTargetHighPriorityCpuUtilizationPercent != null && message.hasOwnProperty("autoscalingTargetHighPriorityCpuUtilizationPercent")) + if (!$util.isInteger(message.autoscalingTargetHighPriorityCpuUtilizationPercent)) + return "autoscalingTargetHighPriorityCpuUtilizationPercent: integer expected"; + return null; + }; + + /** + * Creates an AutoscalingConfigOverrides message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides + * @static + * @param {Object.} object Plain object + * @returns {google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides} AutoscalingConfigOverrides + */ + AutoscalingConfigOverrides.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides) + return object; + var message = new $root.google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides(); + if (object.autoscalingLimits != null) { + if (typeof object.autoscalingLimits !== "object") + throw TypeError(".google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides.autoscalingLimits: object expected"); + message.autoscalingLimits = $root.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.fromObject(object.autoscalingLimits); + } + if (object.autoscalingTargetHighPriorityCpuUtilizationPercent != null) + message.autoscalingTargetHighPriorityCpuUtilizationPercent = object.autoscalingTargetHighPriorityCpuUtilizationPercent | 0; + return message; + }; + + /** + * Creates a plain object from an AutoscalingConfigOverrides message. Also converts values to other types if specified. + * @function toObject + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides + * @static + * @param {google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides} message AutoscalingConfigOverrides + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutoscalingConfigOverrides.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.autoscalingLimits = null; + object.autoscalingTargetHighPriorityCpuUtilizationPercent = 0; + } + if (message.autoscalingLimits != null && message.hasOwnProperty("autoscalingLimits")) + object.autoscalingLimits = $root.google.spanner.admin.instance.v1.AutoscalingConfig.AutoscalingLimits.toObject(message.autoscalingLimits, options); + if (message.autoscalingTargetHighPriorityCpuUtilizationPercent != null && message.hasOwnProperty("autoscalingTargetHighPriorityCpuUtilizationPercent")) + object.autoscalingTargetHighPriorityCpuUtilizationPercent = message.autoscalingTargetHighPriorityCpuUtilizationPercent; + return object; + }; + + /** + * Converts this AutoscalingConfigOverrides to JSON. + * @function toJSON + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides + * @instance + * @returns {Object.} JSON object + */ + AutoscalingConfigOverrides.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutoscalingConfigOverrides + * @function getTypeUrl + * @memberof google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutoscalingConfigOverrides.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.spanner.admin.instance.v1.AutoscalingConfig.AsymmetricAutoscalingOption.AutoscalingConfigOverrides"; + }; + + return AutoscalingConfigOverrides; + })(); + + return AsymmetricAutoscalingOption; + })(); + return AutoscalingConfig; })(); @@ -35960,6 +36956,7 @@ * @property {string|null} [displayName] Instance displayName * @property {number|null} [nodeCount] Instance nodeCount * @property {number|null} [processingUnits] Instance processingUnits + * @property {Array.|null} [replicaComputeCapacity] Instance replicaComputeCapacity * @property {google.spanner.admin.instance.v1.IAutoscalingConfig|null} [autoscalingConfig] Instance autoscalingConfig * @property {google.spanner.admin.instance.v1.Instance.State|null} [state] Instance state * @property {Object.|null} [labels] Instance labels @@ -35967,6 +36964,7 @@ * @property {google.protobuf.ITimestamp|null} [createTime] Instance createTime * @property {google.protobuf.ITimestamp|null} [updateTime] Instance updateTime * @property {google.spanner.admin.instance.v1.Instance.Edition|null} [edition] Instance edition + * @property {google.spanner.admin.instance.v1.Instance.DefaultBackupScheduleType|null} [defaultBackupScheduleType] Instance defaultBackupScheduleType */ /** @@ -35978,6 +36976,7 @@ * @param {google.spanner.admin.instance.v1.IInstance=} [properties] Properties to set */ function Instance(properties) { + this.replicaComputeCapacity = []; this.labels = {}; this.endpointUris = []; if (properties) @@ -36026,6 +37025,14 @@ */ Instance.prototype.processingUnits = 0; + /** + * Instance replicaComputeCapacity. + * @member {Array.} replicaComputeCapacity + * @memberof google.spanner.admin.instance.v1.Instance + * @instance + */ + Instance.prototype.replicaComputeCapacity = $util.emptyArray; + /** * Instance autoscalingConfig. * @member {google.spanner.admin.instance.v1.IAutoscalingConfig|null|undefined} autoscalingConfig @@ -36082,6 +37089,14 @@ */ Instance.prototype.edition = 0; + /** + * Instance defaultBackupScheduleType. + * @member {google.spanner.admin.instance.v1.Instance.DefaultBackupScheduleType} defaultBackupScheduleType + * @memberof google.spanner.admin.instance.v1.Instance + * @instance + */ + Instance.prototype.defaultBackupScheduleType = 0; + /** * Creates a new Instance instance using the specified properties. * @function create @@ -36130,8 +37145,13 @@ $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); if (message.autoscalingConfig != null && Object.hasOwnProperty.call(message, "autoscalingConfig")) $root.google.spanner.admin.instance.v1.AutoscalingConfig.encode(message.autoscalingConfig, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); + if (message.replicaComputeCapacity != null && message.replicaComputeCapacity.length) + for (var i = 0; i < message.replicaComputeCapacity.length; ++i) + $root.google.spanner.admin.instance.v1.ReplicaComputeCapacity.encode(message.replicaComputeCapacity[i], writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); if (message.edition != null && Object.hasOwnProperty.call(message, "edition")) writer.uint32(/* id 20, wireType 0 =*/160).int32(message.edition); + if (message.defaultBackupScheduleType != null && Object.hasOwnProperty.call(message, "defaultBackupScheduleType")) + writer.uint32(/* id 23, wireType 0 =*/184).int32(message.defaultBackupScheduleType); return writer; }; @@ -36186,6 +37206,12 @@ message.processingUnits = reader.int32(); break; } + case 19: { + if (!(message.replicaComputeCapacity && message.replicaComputeCapacity.length)) + message.replicaComputeCapacity = []; + message.replicaComputeCapacity.push($root.google.spanner.admin.instance.v1.ReplicaComputeCapacity.decode(reader, reader.uint32())); + break; + } case 17: { message.autoscalingConfig = $root.google.spanner.admin.instance.v1.AutoscalingConfig.decode(reader, reader.uint32()); break; @@ -36235,6 +37261,10 @@ message.edition = reader.int32(); break; } + case 23: { + message.defaultBackupScheduleType = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -36285,6 +37315,15 @@ if (message.processingUnits != null && message.hasOwnProperty("processingUnits")) if (!$util.isInteger(message.processingUnits)) return "processingUnits: integer expected"; + if (message.replicaComputeCapacity != null && message.hasOwnProperty("replicaComputeCapacity")) { + if (!Array.isArray(message.replicaComputeCapacity)) + return "replicaComputeCapacity: array expected"; + for (var i = 0; i < message.replicaComputeCapacity.length; ++i) { + var error = $root.google.spanner.admin.instance.v1.ReplicaComputeCapacity.verify(message.replicaComputeCapacity[i]); + if (error) + return "replicaComputeCapacity." + error; + } + } if (message.autoscalingConfig != null && message.hasOwnProperty("autoscalingConfig")) { var error = $root.google.spanner.admin.instance.v1.AutoscalingConfig.verify(message.autoscalingConfig); if (error) @@ -36334,6 +37373,15 @@ case 3: break; } + if (message.defaultBackupScheduleType != null && message.hasOwnProperty("defaultBackupScheduleType")) + switch (message.defaultBackupScheduleType) { + default: + return "defaultBackupScheduleType: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -36359,6 +37407,16 @@ message.nodeCount = object.nodeCount | 0; if (object.processingUnits != null) message.processingUnits = object.processingUnits | 0; + if (object.replicaComputeCapacity) { + if (!Array.isArray(object.replicaComputeCapacity)) + throw TypeError(".google.spanner.admin.instance.v1.Instance.replicaComputeCapacity: array expected"); + message.replicaComputeCapacity = []; + for (var i = 0; i < object.replicaComputeCapacity.length; ++i) { + if (typeof object.replicaComputeCapacity[i] !== "object") + throw TypeError(".google.spanner.admin.instance.v1.Instance.replicaComputeCapacity: object expected"); + message.replicaComputeCapacity[i] = $root.google.spanner.admin.instance.v1.ReplicaComputeCapacity.fromObject(object.replicaComputeCapacity[i]); + } + } if (object.autoscalingConfig != null) { if (typeof object.autoscalingConfig !== "object") throw TypeError(".google.spanner.admin.instance.v1.Instance.autoscalingConfig: object expected"); @@ -36432,6 +37490,26 @@ message.edition = 3; break; } + switch (object.defaultBackupScheduleType) { + default: + if (typeof object.defaultBackupScheduleType === "number") { + message.defaultBackupScheduleType = object.defaultBackupScheduleType; + break; + } + break; + case "DEFAULT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED": + case 0: + message.defaultBackupScheduleType = 0; + break; + case "NONE": + case 1: + message.defaultBackupScheduleType = 1; + break; + case "AUTOMATIC": + case 2: + message.defaultBackupScheduleType = 2; + break; + } return message; }; @@ -36448,8 +37526,10 @@ if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) + if (options.arrays || options.defaults) { object.endpointUris = []; + object.replicaComputeCapacity = []; + } if (options.objects || options.defaults) object.labels = {}; if (options.defaults) { @@ -36463,6 +37543,7 @@ object.updateTime = null; object.autoscalingConfig = null; object.edition = options.enums === String ? "EDITION_UNSPECIFIED" : 0; + object.defaultBackupScheduleType = options.enums === String ? "DEFAULT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED" : 0; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -36493,8 +37574,15 @@ object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); if (message.autoscalingConfig != null && message.hasOwnProperty("autoscalingConfig")) object.autoscalingConfig = $root.google.spanner.admin.instance.v1.AutoscalingConfig.toObject(message.autoscalingConfig, options); + if (message.replicaComputeCapacity && message.replicaComputeCapacity.length) { + object.replicaComputeCapacity = []; + for (var j = 0; j < message.replicaComputeCapacity.length; ++j) + object.replicaComputeCapacity[j] = $root.google.spanner.admin.instance.v1.ReplicaComputeCapacity.toObject(message.replicaComputeCapacity[j], options); + } if (message.edition != null && message.hasOwnProperty("edition")) object.edition = options.enums === String ? $root.google.spanner.admin.instance.v1.Instance.Edition[message.edition] === undefined ? message.edition : $root.google.spanner.admin.instance.v1.Instance.Edition[message.edition] : message.edition; + if (message.defaultBackupScheduleType != null && message.hasOwnProperty("defaultBackupScheduleType")) + object.defaultBackupScheduleType = options.enums === String ? $root.google.spanner.admin.instance.v1.Instance.DefaultBackupScheduleType[message.defaultBackupScheduleType] === undefined ? message.defaultBackupScheduleType : $root.google.spanner.admin.instance.v1.Instance.DefaultBackupScheduleType[message.defaultBackupScheduleType] : message.defaultBackupScheduleType; return object; }; @@ -36558,6 +37646,22 @@ return values; })(); + /** + * DefaultBackupScheduleType enum. + * @name google.spanner.admin.instance.v1.Instance.DefaultBackupScheduleType + * @enum {number} + * @property {number} DEFAULT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED=0 DEFAULT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED value + * @property {number} NONE=1 NONE value + * @property {number} AUTOMATIC=2 AUTOMATIC value + */ + Instance.DefaultBackupScheduleType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DEFAULT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "NONE"] = 1; + values[valuesById[2] = "AUTOMATIC"] = 2; + return values; + })(); + return Instance; })(); @@ -74314,6 +75418,8 @@ case 0: case 1: case 2: + case 3: + case 4: break; } if (message.partitionToken != null && message.hasOwnProperty("partitionToken")) @@ -74403,6 +75509,14 @@ case 2: message.queryMode = 2; break; + case "WITH_STATS": + case 3: + message.queryMode = 3; + break; + case "WITH_PLAN_AND_STATS": + case 4: + message.queryMode = 4; + break; } if (object.partitionToken != null) if (typeof object.partitionToken === "string") @@ -74552,12 +75666,16 @@ * @property {number} NORMAL=0 NORMAL value * @property {number} PLAN=1 PLAN value * @property {number} PROFILE=2 PROFILE value + * @property {number} WITH_STATS=3 WITH_STATS value + * @property {number} WITH_PLAN_AND_STATS=4 WITH_PLAN_AND_STATS value */ ExecuteSqlRequest.QueryMode = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "NORMAL"] = 0; values[valuesById[1] = "PLAN"] = 1; values[valuesById[2] = "PROFILE"] = 2; + values[valuesById[3] = "WITH_STATS"] = 3; + values[valuesById[4] = "WITH_PLAN_AND_STATS"] = 4; return values; })(); @@ -75439,6 +76557,7 @@ * @interface IExecuteBatchDmlResponse * @property {Array.|null} [resultSets] ExecuteBatchDmlResponse resultSets * @property {google.rpc.IStatus|null} [status] ExecuteBatchDmlResponse status + * @property {google.spanner.v1.IMultiplexedSessionPrecommitToken|null} [precommitToken] ExecuteBatchDmlResponse precommitToken */ /** @@ -75473,6 +76592,14 @@ */ ExecuteBatchDmlResponse.prototype.status = null; + /** + * ExecuteBatchDmlResponse precommitToken. + * @member {google.spanner.v1.IMultiplexedSessionPrecommitToken|null|undefined} precommitToken + * @memberof google.spanner.v1.ExecuteBatchDmlResponse + * @instance + */ + ExecuteBatchDmlResponse.prototype.precommitToken = null; + /** * Creates a new ExecuteBatchDmlResponse instance using the specified properties. * @function create @@ -75502,6 +76629,8 @@ $root.google.spanner.v1.ResultSet.encode(message.resultSets[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.status != null && Object.hasOwnProperty.call(message, "status")) $root.google.rpc.Status.encode(message.status, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.precommitToken != null && Object.hasOwnProperty.call(message, "precommitToken")) + $root.google.spanner.v1.MultiplexedSessionPrecommitToken.encode(message.precommitToken, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; @@ -75546,6 +76675,10 @@ message.status = $root.google.rpc.Status.decode(reader, reader.uint32()); break; } + case 3: { + message.precommitToken = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -75595,6 +76728,11 @@ if (error) return "status." + error; } + if (message.precommitToken != null && message.hasOwnProperty("precommitToken")) { + var error = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.verify(message.precommitToken); + if (error) + return "precommitToken." + error; + } return null; }; @@ -75625,6 +76763,11 @@ throw TypeError(".google.spanner.v1.ExecuteBatchDmlResponse.status: object expected"); message.status = $root.google.rpc.Status.fromObject(object.status); } + if (object.precommitToken != null) { + if (typeof object.precommitToken !== "object") + throw TypeError(".google.spanner.v1.ExecuteBatchDmlResponse.precommitToken: object expected"); + message.precommitToken = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.fromObject(object.precommitToken); + } return message; }; @@ -75643,8 +76786,10 @@ var object = {}; if (options.arrays || options.defaults) object.resultSets = []; - if (options.defaults) + if (options.defaults) { object.status = null; + object.precommitToken = null; + } if (message.resultSets && message.resultSets.length) { object.resultSets = []; for (var j = 0; j < message.resultSets.length; ++j) @@ -75652,6 +76797,8 @@ } if (message.status != null && message.hasOwnProperty("status")) object.status = $root.google.rpc.Status.toObject(message.status, options); + if (message.precommitToken != null && message.hasOwnProperty("precommitToken")) + object.precommitToken = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.toObject(message.precommitToken, options); return object; }; @@ -77816,6 +78963,7 @@ * @property {string|null} [session] BeginTransactionRequest session * @property {google.spanner.v1.ITransactionOptions|null} [options] BeginTransactionRequest options * @property {google.spanner.v1.IRequestOptions|null} [requestOptions] BeginTransactionRequest requestOptions + * @property {google.spanner.v1.IMutation|null} [mutationKey] BeginTransactionRequest mutationKey */ /** @@ -77857,6 +79005,14 @@ */ BeginTransactionRequest.prototype.requestOptions = null; + /** + * BeginTransactionRequest mutationKey. + * @member {google.spanner.v1.IMutation|null|undefined} mutationKey + * @memberof google.spanner.v1.BeginTransactionRequest + * @instance + */ + BeginTransactionRequest.prototype.mutationKey = null; + /** * Creates a new BeginTransactionRequest instance using the specified properties. * @function create @@ -77887,6 +79043,8 @@ $root.google.spanner.v1.TransactionOptions.encode(message.options, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.requestOptions != null && Object.hasOwnProperty.call(message, "requestOptions")) $root.google.spanner.v1.RequestOptions.encode(message.requestOptions, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.mutationKey != null && Object.hasOwnProperty.call(message, "mutationKey")) + $root.google.spanner.v1.Mutation.encode(message.mutationKey, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -77933,6 +79091,10 @@ message.requestOptions = $root.google.spanner.v1.RequestOptions.decode(reader, reader.uint32()); break; } + case 4: { + message.mutationKey = $root.google.spanner.v1.Mutation.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -77981,6 +79143,11 @@ if (error) return "requestOptions." + error; } + if (message.mutationKey != null && message.hasOwnProperty("mutationKey")) { + var error = $root.google.spanner.v1.Mutation.verify(message.mutationKey); + if (error) + return "mutationKey." + error; + } return null; }; @@ -78008,6 +79175,11 @@ throw TypeError(".google.spanner.v1.BeginTransactionRequest.requestOptions: object expected"); message.requestOptions = $root.google.spanner.v1.RequestOptions.fromObject(object.requestOptions); } + if (object.mutationKey != null) { + if (typeof object.mutationKey !== "object") + throw TypeError(".google.spanner.v1.BeginTransactionRequest.mutationKey: object expected"); + message.mutationKey = $root.google.spanner.v1.Mutation.fromObject(object.mutationKey); + } return message; }; @@ -78028,6 +79200,7 @@ object.session = ""; object.options = null; object.requestOptions = null; + object.mutationKey = null; } if (message.session != null && message.hasOwnProperty("session")) object.session = message.session; @@ -78035,6 +79208,8 @@ object.options = $root.google.spanner.v1.TransactionOptions.toObject(message.options, options); if (message.requestOptions != null && message.hasOwnProperty("requestOptions")) object.requestOptions = $root.google.spanner.v1.RequestOptions.toObject(message.requestOptions, options); + if (message.mutationKey != null && message.hasOwnProperty("mutationKey")) + object.mutationKey = $root.google.spanner.v1.Mutation.toObject(message.mutationKey, options); return object; }; @@ -78080,6 +79255,7 @@ * @property {boolean|null} [returnCommitStats] CommitRequest returnCommitStats * @property {google.protobuf.IDuration|null} [maxCommitDelay] CommitRequest maxCommitDelay * @property {google.spanner.v1.IRequestOptions|null} [requestOptions] CommitRequest requestOptions + * @property {google.spanner.v1.IMultiplexedSessionPrecommitToken|null} [precommitToken] CommitRequest precommitToken */ /** @@ -78154,6 +79330,14 @@ */ CommitRequest.prototype.requestOptions = null; + /** + * CommitRequest precommitToken. + * @member {google.spanner.v1.IMultiplexedSessionPrecommitToken|null|undefined} precommitToken + * @memberof google.spanner.v1.CommitRequest + * @instance + */ + CommitRequest.prototype.precommitToken = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -78207,6 +79391,8 @@ $root.google.spanner.v1.RequestOptions.encode(message.requestOptions, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); if (message.maxCommitDelay != null && Object.hasOwnProperty.call(message, "maxCommitDelay")) $root.google.protobuf.Duration.encode(message.maxCommitDelay, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.precommitToken != null && Object.hasOwnProperty.call(message, "precommitToken")) + $root.google.spanner.v1.MultiplexedSessionPrecommitToken.encode(message.precommitToken, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); return writer; }; @@ -78271,6 +79457,10 @@ message.requestOptions = $root.google.spanner.v1.RequestOptions.decode(reader, reader.uint32()); break; } + case 9: { + message.precommitToken = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -78347,6 +79537,11 @@ if (error) return "requestOptions." + error; } + if (message.precommitToken != null && message.hasOwnProperty("precommitToken")) { + var error = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.verify(message.precommitToken); + if (error) + return "precommitToken." + error; + } return null; }; @@ -78396,6 +79591,11 @@ throw TypeError(".google.spanner.v1.CommitRequest.requestOptions: object expected"); message.requestOptions = $root.google.spanner.v1.RequestOptions.fromObject(object.requestOptions); } + if (object.precommitToken != null) { + if (typeof object.precommitToken !== "object") + throw TypeError(".google.spanner.v1.CommitRequest.precommitToken: object expected"); + message.precommitToken = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.fromObject(object.precommitToken); + } return message; }; @@ -78419,6 +79619,7 @@ object.returnCommitStats = false; object.requestOptions = null; object.maxCommitDelay = null; + object.precommitToken = null; } if (message.session != null && message.hasOwnProperty("session")) object.session = message.session; @@ -78443,6 +79644,8 @@ object.requestOptions = $root.google.spanner.v1.RequestOptions.toObject(message.requestOptions, options); if (message.maxCommitDelay != null && message.hasOwnProperty("maxCommitDelay")) object.maxCommitDelay = $root.google.protobuf.Duration.toObject(message.maxCommitDelay, options); + if (message.precommitToken != null && message.hasOwnProperty("precommitToken")) + object.precommitToken = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.toObject(message.precommitToken, options); return object; }; @@ -79528,6 +80731,7 @@ * @interface ICommitResponse * @property {google.protobuf.ITimestamp|null} [commitTimestamp] CommitResponse commitTimestamp * @property {google.spanner.v1.CommitResponse.ICommitStats|null} [commitStats] CommitResponse commitStats + * @property {google.spanner.v1.IMultiplexedSessionPrecommitToken|null} [precommitToken] CommitResponse precommitToken */ /** @@ -79561,6 +80765,28 @@ */ CommitResponse.prototype.commitStats = null; + /** + * CommitResponse precommitToken. + * @member {google.spanner.v1.IMultiplexedSessionPrecommitToken|null|undefined} precommitToken + * @memberof google.spanner.v1.CommitResponse + * @instance + */ + CommitResponse.prototype.precommitToken = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * CommitResponse MultiplexedSessionRetry. + * @member {"precommitToken"|undefined} MultiplexedSessionRetry + * @memberof google.spanner.v1.CommitResponse + * @instance + */ + Object.defineProperty(CommitResponse.prototype, "MultiplexedSessionRetry", { + get: $util.oneOfGetter($oneOfFields = ["precommitToken"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new CommitResponse instance using the specified properties. * @function create @@ -79589,6 +80815,8 @@ $root.google.protobuf.Timestamp.encode(message.commitTimestamp, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.commitStats != null && Object.hasOwnProperty.call(message, "commitStats")) $root.google.spanner.v1.CommitResponse.CommitStats.encode(message.commitStats, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.precommitToken != null && Object.hasOwnProperty.call(message, "precommitToken")) + $root.google.spanner.v1.MultiplexedSessionPrecommitToken.encode(message.precommitToken, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; @@ -79631,6 +80859,10 @@ message.commitStats = $root.google.spanner.v1.CommitResponse.CommitStats.decode(reader, reader.uint32()); break; } + case 4: { + message.precommitToken = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -79666,6 +80898,7 @@ CommitResponse.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.commitTimestamp != null && message.hasOwnProperty("commitTimestamp")) { var error = $root.google.protobuf.Timestamp.verify(message.commitTimestamp); if (error) @@ -79676,6 +80909,14 @@ if (error) return "commitStats." + error; } + if (message.precommitToken != null && message.hasOwnProperty("precommitToken")) { + properties.MultiplexedSessionRetry = 1; + { + var error = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.verify(message.precommitToken); + if (error) + return "precommitToken." + error; + } + } return null; }; @@ -79701,6 +80942,11 @@ throw TypeError(".google.spanner.v1.CommitResponse.commitStats: object expected"); message.commitStats = $root.google.spanner.v1.CommitResponse.CommitStats.fromObject(object.commitStats); } + if (object.precommitToken != null) { + if (typeof object.precommitToken !== "object") + throw TypeError(".google.spanner.v1.CommitResponse.precommitToken: object expected"); + message.precommitToken = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.fromObject(object.precommitToken); + } return message; }; @@ -79725,6 +80971,11 @@ object.commitTimestamp = $root.google.protobuf.Timestamp.toObject(message.commitTimestamp, options); if (message.commitStats != null && message.hasOwnProperty("commitStats")) object.commitStats = $root.google.spanner.v1.CommitResponse.CommitStats.toObject(message.commitStats, options); + if (message.precommitToken != null && message.hasOwnProperty("precommitToken")) { + object.precommitToken = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.toObject(message.precommitToken, options); + if (options.oneofs) + object.MultiplexedSessionRetry = "precommitToken"; + } return object; }; @@ -79974,27 +81225,27 @@ return CommitResponse; })(); - v1.KeyRange = (function() { + v1.TransactionOptions = (function() { /** - * Properties of a KeyRange. + * Properties of a TransactionOptions. * @memberof google.spanner.v1 - * @interface IKeyRange - * @property {google.protobuf.IListValue|null} [startClosed] KeyRange startClosed - * @property {google.protobuf.IListValue|null} [startOpen] KeyRange startOpen - * @property {google.protobuf.IListValue|null} [endClosed] KeyRange endClosed - * @property {google.protobuf.IListValue|null} [endOpen] KeyRange endOpen + * @interface ITransactionOptions + * @property {google.spanner.v1.TransactionOptions.IReadWrite|null} [readWrite] TransactionOptions readWrite + * @property {google.spanner.v1.TransactionOptions.IPartitionedDml|null} [partitionedDml] TransactionOptions partitionedDml + * @property {google.spanner.v1.TransactionOptions.IReadOnly|null} [readOnly] TransactionOptions readOnly + * @property {boolean|null} [excludeTxnFromChangeStreams] TransactionOptions excludeTxnFromChangeStreams */ /** - * Constructs a new KeyRange. + * Constructs a new TransactionOptions. * @memberof google.spanner.v1 - * @classdesc Represents a KeyRange. - * @implements IKeyRange + * @classdesc Represents a TransactionOptions. + * @implements ITransactionOptions * @constructor - * @param {google.spanner.v1.IKeyRange=} [properties] Properties to set + * @param {google.spanner.v1.ITransactionOptions=} [properties] Properties to set */ - function KeyRange(properties) { + function TransactionOptions(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -80002,142 +81253,131 @@ } /** - * KeyRange startClosed. - * @member {google.protobuf.IListValue|null|undefined} startClosed - * @memberof google.spanner.v1.KeyRange + * TransactionOptions readWrite. + * @member {google.spanner.v1.TransactionOptions.IReadWrite|null|undefined} readWrite + * @memberof google.spanner.v1.TransactionOptions * @instance */ - KeyRange.prototype.startClosed = null; + TransactionOptions.prototype.readWrite = null; /** - * KeyRange startOpen. - * @member {google.protobuf.IListValue|null|undefined} startOpen - * @memberof google.spanner.v1.KeyRange + * TransactionOptions partitionedDml. + * @member {google.spanner.v1.TransactionOptions.IPartitionedDml|null|undefined} partitionedDml + * @memberof google.spanner.v1.TransactionOptions * @instance */ - KeyRange.prototype.startOpen = null; + TransactionOptions.prototype.partitionedDml = null; /** - * KeyRange endClosed. - * @member {google.protobuf.IListValue|null|undefined} endClosed - * @memberof google.spanner.v1.KeyRange + * TransactionOptions readOnly. + * @member {google.spanner.v1.TransactionOptions.IReadOnly|null|undefined} readOnly + * @memberof google.spanner.v1.TransactionOptions * @instance */ - KeyRange.prototype.endClosed = null; + TransactionOptions.prototype.readOnly = null; /** - * KeyRange endOpen. - * @member {google.protobuf.IListValue|null|undefined} endOpen - * @memberof google.spanner.v1.KeyRange + * TransactionOptions excludeTxnFromChangeStreams. + * @member {boolean} excludeTxnFromChangeStreams + * @memberof google.spanner.v1.TransactionOptions * @instance */ - KeyRange.prototype.endOpen = null; + TransactionOptions.prototype.excludeTxnFromChangeStreams = false; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * KeyRange startKeyType. - * @member {"startClosed"|"startOpen"|undefined} startKeyType - * @memberof google.spanner.v1.KeyRange - * @instance - */ - Object.defineProperty(KeyRange.prototype, "startKeyType", { - get: $util.oneOfGetter($oneOfFields = ["startClosed", "startOpen"]), - set: $util.oneOfSetter($oneOfFields) - }); - - /** - * KeyRange endKeyType. - * @member {"endClosed"|"endOpen"|undefined} endKeyType - * @memberof google.spanner.v1.KeyRange + * TransactionOptions mode. + * @member {"readWrite"|"partitionedDml"|"readOnly"|undefined} mode + * @memberof google.spanner.v1.TransactionOptions * @instance */ - Object.defineProperty(KeyRange.prototype, "endKeyType", { - get: $util.oneOfGetter($oneOfFields = ["endClosed", "endOpen"]), + Object.defineProperty(TransactionOptions.prototype, "mode", { + get: $util.oneOfGetter($oneOfFields = ["readWrite", "partitionedDml", "readOnly"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new KeyRange instance using the specified properties. + * Creates a new TransactionOptions instance using the specified properties. * @function create - * @memberof google.spanner.v1.KeyRange + * @memberof google.spanner.v1.TransactionOptions * @static - * @param {google.spanner.v1.IKeyRange=} [properties] Properties to set - * @returns {google.spanner.v1.KeyRange} KeyRange instance + * @param {google.spanner.v1.ITransactionOptions=} [properties] Properties to set + * @returns {google.spanner.v1.TransactionOptions} TransactionOptions instance */ - KeyRange.create = function create(properties) { - return new KeyRange(properties); + TransactionOptions.create = function create(properties) { + return new TransactionOptions(properties); }; /** - * Encodes the specified KeyRange message. Does not implicitly {@link google.spanner.v1.KeyRange.verify|verify} messages. + * Encodes the specified TransactionOptions message. Does not implicitly {@link google.spanner.v1.TransactionOptions.verify|verify} messages. * @function encode - * @memberof google.spanner.v1.KeyRange + * @memberof google.spanner.v1.TransactionOptions * @static - * @param {google.spanner.v1.IKeyRange} message KeyRange message or plain object to encode + * @param {google.spanner.v1.ITransactionOptions} message TransactionOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KeyRange.encode = function encode(message, writer) { + TransactionOptions.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.startClosed != null && Object.hasOwnProperty.call(message, "startClosed")) - $root.google.protobuf.ListValue.encode(message.startClosed, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.startOpen != null && Object.hasOwnProperty.call(message, "startOpen")) - $root.google.protobuf.ListValue.encode(message.startOpen, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.endClosed != null && Object.hasOwnProperty.call(message, "endClosed")) - $root.google.protobuf.ListValue.encode(message.endClosed, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.endOpen != null && Object.hasOwnProperty.call(message, "endOpen")) - $root.google.protobuf.ListValue.encode(message.endOpen, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.readWrite != null && Object.hasOwnProperty.call(message, "readWrite")) + $root.google.spanner.v1.TransactionOptions.ReadWrite.encode(message.readWrite, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.readOnly != null && Object.hasOwnProperty.call(message, "readOnly")) + $root.google.spanner.v1.TransactionOptions.ReadOnly.encode(message.readOnly, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.partitionedDml != null && Object.hasOwnProperty.call(message, "partitionedDml")) + $root.google.spanner.v1.TransactionOptions.PartitionedDml.encode(message.partitionedDml, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.excludeTxnFromChangeStreams != null && Object.hasOwnProperty.call(message, "excludeTxnFromChangeStreams")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.excludeTxnFromChangeStreams); return writer; }; /** - * Encodes the specified KeyRange message, length delimited. Does not implicitly {@link google.spanner.v1.KeyRange.verify|verify} messages. + * Encodes the specified TransactionOptions message, length delimited. Does not implicitly {@link google.spanner.v1.TransactionOptions.verify|verify} messages. * @function encodeDelimited - * @memberof google.spanner.v1.KeyRange + * @memberof google.spanner.v1.TransactionOptions * @static - * @param {google.spanner.v1.IKeyRange} message KeyRange message or plain object to encode + * @param {google.spanner.v1.ITransactionOptions} message TransactionOptions message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - KeyRange.encodeDelimited = function encodeDelimited(message, writer) { + TransactionOptions.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a KeyRange message from the specified reader or buffer. + * Decodes a TransactionOptions message from the specified reader or buffer. * @function decode - * @memberof google.spanner.v1.KeyRange + * @memberof google.spanner.v1.TransactionOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.spanner.v1.KeyRange} KeyRange + * @returns {google.spanner.v1.TransactionOptions} TransactionOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KeyRange.decode = function decode(reader, length) { + TransactionOptions.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.KeyRange(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.TransactionOptions(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.startClosed = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); + message.readWrite = $root.google.spanner.v1.TransactionOptions.ReadWrite.decode(reader, reader.uint32()); break; } - case 2: { - message.startOpen = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); + case 3: { + message.partitionedDml = $root.google.spanner.v1.TransactionOptions.PartitionedDml.decode(reader, reader.uint32()); break; } - case 3: { - message.endClosed = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); + case 2: { + message.readOnly = $root.google.spanner.v1.TransactionOptions.ReadOnly.decode(reader, reader.uint32()); break; } - case 4: { - message.endOpen = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); + case 5: { + message.excludeTxnFromChangeStreams = reader.bool(); break; } default: @@ -80149,851 +81389,634 @@ }; /** - * Decodes a KeyRange message from the specified reader or buffer, length delimited. + * Decodes a TransactionOptions message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.spanner.v1.KeyRange + * @memberof google.spanner.v1.TransactionOptions * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.spanner.v1.KeyRange} KeyRange + * @returns {google.spanner.v1.TransactionOptions} TransactionOptions * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - KeyRange.decodeDelimited = function decodeDelimited(reader) { + TransactionOptions.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a KeyRange message. + * Verifies a TransactionOptions message. * @function verify - * @memberof google.spanner.v1.KeyRange + * @memberof google.spanner.v1.TransactionOptions * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - KeyRange.verify = function verify(message) { + TransactionOptions.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.startClosed != null && message.hasOwnProperty("startClosed")) { - properties.startKeyType = 1; - { - var error = $root.google.protobuf.ListValue.verify(message.startClosed); - if (error) - return "startClosed." + error; - } - } - if (message.startOpen != null && message.hasOwnProperty("startOpen")) { - if (properties.startKeyType === 1) - return "startKeyType: multiple values"; - properties.startKeyType = 1; + if (message.readWrite != null && message.hasOwnProperty("readWrite")) { + properties.mode = 1; { - var error = $root.google.protobuf.ListValue.verify(message.startOpen); + var error = $root.google.spanner.v1.TransactionOptions.ReadWrite.verify(message.readWrite); if (error) - return "startOpen." + error; + return "readWrite." + error; } } - if (message.endClosed != null && message.hasOwnProperty("endClosed")) { - properties.endKeyType = 1; + if (message.partitionedDml != null && message.hasOwnProperty("partitionedDml")) { + if (properties.mode === 1) + return "mode: multiple values"; + properties.mode = 1; { - var error = $root.google.protobuf.ListValue.verify(message.endClosed); + var error = $root.google.spanner.v1.TransactionOptions.PartitionedDml.verify(message.partitionedDml); if (error) - return "endClosed." + error; + return "partitionedDml." + error; } } - if (message.endOpen != null && message.hasOwnProperty("endOpen")) { - if (properties.endKeyType === 1) - return "endKeyType: multiple values"; - properties.endKeyType = 1; + if (message.readOnly != null && message.hasOwnProperty("readOnly")) { + if (properties.mode === 1) + return "mode: multiple values"; + properties.mode = 1; { - var error = $root.google.protobuf.ListValue.verify(message.endOpen); + var error = $root.google.spanner.v1.TransactionOptions.ReadOnly.verify(message.readOnly); if (error) - return "endOpen." + error; + return "readOnly." + error; } } + if (message.excludeTxnFromChangeStreams != null && message.hasOwnProperty("excludeTxnFromChangeStreams")) + if (typeof message.excludeTxnFromChangeStreams !== "boolean") + return "excludeTxnFromChangeStreams: boolean expected"; return null; }; /** - * Creates a KeyRange message from a plain object. Also converts values to their respective internal types. + * Creates a TransactionOptions message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.spanner.v1.KeyRange + * @memberof google.spanner.v1.TransactionOptions * @static * @param {Object.} object Plain object - * @returns {google.spanner.v1.KeyRange} KeyRange + * @returns {google.spanner.v1.TransactionOptions} TransactionOptions */ - KeyRange.fromObject = function fromObject(object) { - if (object instanceof $root.google.spanner.v1.KeyRange) + TransactionOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.v1.TransactionOptions) return object; - var message = new $root.google.spanner.v1.KeyRange(); - if (object.startClosed != null) { - if (typeof object.startClosed !== "object") - throw TypeError(".google.spanner.v1.KeyRange.startClosed: object expected"); - message.startClosed = $root.google.protobuf.ListValue.fromObject(object.startClosed); - } - if (object.startOpen != null) { - if (typeof object.startOpen !== "object") - throw TypeError(".google.spanner.v1.KeyRange.startOpen: object expected"); - message.startOpen = $root.google.protobuf.ListValue.fromObject(object.startOpen); + var message = new $root.google.spanner.v1.TransactionOptions(); + if (object.readWrite != null) { + if (typeof object.readWrite !== "object") + throw TypeError(".google.spanner.v1.TransactionOptions.readWrite: object expected"); + message.readWrite = $root.google.spanner.v1.TransactionOptions.ReadWrite.fromObject(object.readWrite); } - if (object.endClosed != null) { - if (typeof object.endClosed !== "object") - throw TypeError(".google.spanner.v1.KeyRange.endClosed: object expected"); - message.endClosed = $root.google.protobuf.ListValue.fromObject(object.endClosed); + if (object.partitionedDml != null) { + if (typeof object.partitionedDml !== "object") + throw TypeError(".google.spanner.v1.TransactionOptions.partitionedDml: object expected"); + message.partitionedDml = $root.google.spanner.v1.TransactionOptions.PartitionedDml.fromObject(object.partitionedDml); } - if (object.endOpen != null) { - if (typeof object.endOpen !== "object") - throw TypeError(".google.spanner.v1.KeyRange.endOpen: object expected"); - message.endOpen = $root.google.protobuf.ListValue.fromObject(object.endOpen); + if (object.readOnly != null) { + if (typeof object.readOnly !== "object") + throw TypeError(".google.spanner.v1.TransactionOptions.readOnly: object expected"); + message.readOnly = $root.google.spanner.v1.TransactionOptions.ReadOnly.fromObject(object.readOnly); } + if (object.excludeTxnFromChangeStreams != null) + message.excludeTxnFromChangeStreams = Boolean(object.excludeTxnFromChangeStreams); return message; }; /** - * Creates a plain object from a KeyRange message. Also converts values to other types if specified. + * Creates a plain object from a TransactionOptions message. Also converts values to other types if specified. * @function toObject - * @memberof google.spanner.v1.KeyRange + * @memberof google.spanner.v1.TransactionOptions * @static - * @param {google.spanner.v1.KeyRange} message KeyRange + * @param {google.spanner.v1.TransactionOptions} message TransactionOptions * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - KeyRange.toObject = function toObject(message, options) { + TransactionOptions.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.startClosed != null && message.hasOwnProperty("startClosed")) { - object.startClosed = $root.google.protobuf.ListValue.toObject(message.startClosed, options); - if (options.oneofs) - object.startKeyType = "startClosed"; - } - if (message.startOpen != null && message.hasOwnProperty("startOpen")) { - object.startOpen = $root.google.protobuf.ListValue.toObject(message.startOpen, options); + if (options.defaults) + object.excludeTxnFromChangeStreams = false; + if (message.readWrite != null && message.hasOwnProperty("readWrite")) { + object.readWrite = $root.google.spanner.v1.TransactionOptions.ReadWrite.toObject(message.readWrite, options); if (options.oneofs) - object.startKeyType = "startOpen"; + object.mode = "readWrite"; } - if (message.endClosed != null && message.hasOwnProperty("endClosed")) { - object.endClosed = $root.google.protobuf.ListValue.toObject(message.endClosed, options); + if (message.readOnly != null && message.hasOwnProperty("readOnly")) { + object.readOnly = $root.google.spanner.v1.TransactionOptions.ReadOnly.toObject(message.readOnly, options); if (options.oneofs) - object.endKeyType = "endClosed"; + object.mode = "readOnly"; } - if (message.endOpen != null && message.hasOwnProperty("endOpen")) { - object.endOpen = $root.google.protobuf.ListValue.toObject(message.endOpen, options); + if (message.partitionedDml != null && message.hasOwnProperty("partitionedDml")) { + object.partitionedDml = $root.google.spanner.v1.TransactionOptions.PartitionedDml.toObject(message.partitionedDml, options); if (options.oneofs) - object.endKeyType = "endOpen"; + object.mode = "partitionedDml"; } + if (message.excludeTxnFromChangeStreams != null && message.hasOwnProperty("excludeTxnFromChangeStreams")) + object.excludeTxnFromChangeStreams = message.excludeTxnFromChangeStreams; return object; }; /** - * Converts this KeyRange to JSON. + * Converts this TransactionOptions to JSON. * @function toJSON - * @memberof google.spanner.v1.KeyRange + * @memberof google.spanner.v1.TransactionOptions * @instance * @returns {Object.} JSON object */ - KeyRange.prototype.toJSON = function toJSON() { + TransactionOptions.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for KeyRange + * Gets the default type url for TransactionOptions * @function getTypeUrl - * @memberof google.spanner.v1.KeyRange + * @memberof google.spanner.v1.TransactionOptions * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - KeyRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TransactionOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.spanner.v1.KeyRange"; + return typeUrlPrefix + "/google.spanner.v1.TransactionOptions"; }; - return KeyRange; - })(); - - v1.KeySet = (function() { - - /** - * Properties of a KeySet. - * @memberof google.spanner.v1 - * @interface IKeySet - * @property {Array.|null} [keys] KeySet keys - * @property {Array.|null} [ranges] KeySet ranges - * @property {boolean|null} [all] KeySet all - */ + TransactionOptions.ReadWrite = (function() { - /** - * Constructs a new KeySet. - * @memberof google.spanner.v1 - * @classdesc Represents a KeySet. - * @implements IKeySet - * @constructor - * @param {google.spanner.v1.IKeySet=} [properties] Properties to set - */ - function KeySet(properties) { - this.keys = []; - this.ranges = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a ReadWrite. + * @memberof google.spanner.v1.TransactionOptions + * @interface IReadWrite + * @property {google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode|null} [readLockMode] ReadWrite readLockMode + * @property {Uint8Array|null} [multiplexedSessionPreviousTransactionId] ReadWrite multiplexedSessionPreviousTransactionId + */ - /** - * KeySet keys. - * @member {Array.} keys - * @memberof google.spanner.v1.KeySet - * @instance - */ - KeySet.prototype.keys = $util.emptyArray; + /** + * Constructs a new ReadWrite. + * @memberof google.spanner.v1.TransactionOptions + * @classdesc Represents a ReadWrite. + * @implements IReadWrite + * @constructor + * @param {google.spanner.v1.TransactionOptions.IReadWrite=} [properties] Properties to set + */ + function ReadWrite(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * KeySet ranges. - * @member {Array.} ranges - * @memberof google.spanner.v1.KeySet - * @instance - */ - KeySet.prototype.ranges = $util.emptyArray; + /** + * ReadWrite readLockMode. + * @member {google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode} readLockMode + * @memberof google.spanner.v1.TransactionOptions.ReadWrite + * @instance + */ + ReadWrite.prototype.readLockMode = 0; - /** - * KeySet all. - * @member {boolean} all - * @memberof google.spanner.v1.KeySet - * @instance - */ - KeySet.prototype.all = false; + /** + * ReadWrite multiplexedSessionPreviousTransactionId. + * @member {Uint8Array} multiplexedSessionPreviousTransactionId + * @memberof google.spanner.v1.TransactionOptions.ReadWrite + * @instance + */ + ReadWrite.prototype.multiplexedSessionPreviousTransactionId = $util.newBuffer([]); - /** - * Creates a new KeySet instance using the specified properties. - * @function create - * @memberof google.spanner.v1.KeySet - * @static - * @param {google.spanner.v1.IKeySet=} [properties] Properties to set - * @returns {google.spanner.v1.KeySet} KeySet instance - */ - KeySet.create = function create(properties) { - return new KeySet(properties); - }; + /** + * Creates a new ReadWrite instance using the specified properties. + * @function create + * @memberof google.spanner.v1.TransactionOptions.ReadWrite + * @static + * @param {google.spanner.v1.TransactionOptions.IReadWrite=} [properties] Properties to set + * @returns {google.spanner.v1.TransactionOptions.ReadWrite} ReadWrite instance + */ + ReadWrite.create = function create(properties) { + return new ReadWrite(properties); + }; - /** - * Encodes the specified KeySet message. Does not implicitly {@link google.spanner.v1.KeySet.verify|verify} messages. - * @function encode - * @memberof google.spanner.v1.KeySet - * @static - * @param {google.spanner.v1.IKeySet} message KeySet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KeySet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.keys != null && message.keys.length) - for (var i = 0; i < message.keys.length; ++i) - $root.google.protobuf.ListValue.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.ranges != null && message.ranges.length) - for (var i = 0; i < message.ranges.length; ++i) - $root.google.spanner.v1.KeyRange.encode(message.ranges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.all != null && Object.hasOwnProperty.call(message, "all")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.all); - return writer; - }; + /** + * Encodes the specified ReadWrite message. Does not implicitly {@link google.spanner.v1.TransactionOptions.ReadWrite.verify|verify} messages. + * @function encode + * @memberof google.spanner.v1.TransactionOptions.ReadWrite + * @static + * @param {google.spanner.v1.TransactionOptions.IReadWrite} message ReadWrite message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadWrite.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.readLockMode != null && Object.hasOwnProperty.call(message, "readLockMode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.readLockMode); + if (message.multiplexedSessionPreviousTransactionId != null && Object.hasOwnProperty.call(message, "multiplexedSessionPreviousTransactionId")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.multiplexedSessionPreviousTransactionId); + return writer; + }; - /** - * Encodes the specified KeySet message, length delimited. Does not implicitly {@link google.spanner.v1.KeySet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.spanner.v1.KeySet - * @static - * @param {google.spanner.v1.IKeySet} message KeySet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - KeySet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified ReadWrite message, length delimited. Does not implicitly {@link google.spanner.v1.TransactionOptions.ReadWrite.verify|verify} messages. + * @function encodeDelimited + * @memberof google.spanner.v1.TransactionOptions.ReadWrite + * @static + * @param {google.spanner.v1.TransactionOptions.IReadWrite} message ReadWrite message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReadWrite.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Decodes a KeySet message from the specified reader or buffer. - * @function decode - * @memberof google.spanner.v1.KeySet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.spanner.v1.KeySet} KeySet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KeySet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.KeySet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (!(message.keys && message.keys.length)) - message.keys = []; - message.keys.push($root.google.protobuf.ListValue.decode(reader, reader.uint32())); + /** + * Decodes a ReadWrite message from the specified reader or buffer. + * @function decode + * @memberof google.spanner.v1.TransactionOptions.ReadWrite + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.spanner.v1.TransactionOptions.ReadWrite} ReadWrite + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadWrite.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.TransactionOptions.ReadWrite(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.readLockMode = reader.int32(); + break; + } + case 2: { + message.multiplexedSessionPreviousTransactionId = reader.bytes(); + break; + } + default: + reader.skipType(tag & 7); break; } - case 2: { - if (!(message.ranges && message.ranges.length)) - message.ranges = []; - message.ranges.push($root.google.spanner.v1.KeyRange.decode(reader, reader.uint32())); + } + return message; + }; + + /** + * Decodes a ReadWrite message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.spanner.v1.TransactionOptions.ReadWrite + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.spanner.v1.TransactionOptions.ReadWrite} ReadWrite + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReadWrite.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReadWrite message. + * @function verify + * @memberof google.spanner.v1.TransactionOptions.ReadWrite + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReadWrite.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.readLockMode != null && message.hasOwnProperty("readLockMode")) + switch (message.readLockMode) { + default: + return "readLockMode: enum value expected"; + case 0: + case 1: + case 2: break; } - case 3: { - message.all = reader.bool(); + if (message.multiplexedSessionPreviousTransactionId != null && message.hasOwnProperty("multiplexedSessionPreviousTransactionId")) + if (!(message.multiplexedSessionPreviousTransactionId && typeof message.multiplexedSessionPreviousTransactionId.length === "number" || $util.isString(message.multiplexedSessionPreviousTransactionId))) + return "multiplexedSessionPreviousTransactionId: buffer expected"; + return null; + }; + + /** + * Creates a ReadWrite message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.spanner.v1.TransactionOptions.ReadWrite + * @static + * @param {Object.} object Plain object + * @returns {google.spanner.v1.TransactionOptions.ReadWrite} ReadWrite + */ + ReadWrite.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.v1.TransactionOptions.ReadWrite) + return object; + var message = new $root.google.spanner.v1.TransactionOptions.ReadWrite(); + switch (object.readLockMode) { + default: + if (typeof object.readLockMode === "number") { + message.readLockMode = object.readLockMode; break; } - default: - reader.skipType(tag & 7); + break; + case "READ_LOCK_MODE_UNSPECIFIED": + case 0: + message.readLockMode = 0; + break; + case "PESSIMISTIC": + case 1: + message.readLockMode = 1; + break; + case "OPTIMISTIC": + case 2: + message.readLockMode = 2; break; } - } - return message; - }; - - /** - * Decodes a KeySet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.spanner.v1.KeySet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.spanner.v1.KeySet} KeySet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - KeySet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + if (object.multiplexedSessionPreviousTransactionId != null) + if (typeof object.multiplexedSessionPreviousTransactionId === "string") + $util.base64.decode(object.multiplexedSessionPreviousTransactionId, message.multiplexedSessionPreviousTransactionId = $util.newBuffer($util.base64.length(object.multiplexedSessionPreviousTransactionId)), 0); + else if (object.multiplexedSessionPreviousTransactionId.length >= 0) + message.multiplexedSessionPreviousTransactionId = object.multiplexedSessionPreviousTransactionId; + return message; + }; - /** - * Verifies a KeySet message. - * @function verify - * @memberof google.spanner.v1.KeySet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - KeySet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.keys != null && message.hasOwnProperty("keys")) { - if (!Array.isArray(message.keys)) - return "keys: array expected"; - for (var i = 0; i < message.keys.length; ++i) { - var error = $root.google.protobuf.ListValue.verify(message.keys[i]); - if (error) - return "keys." + error; - } - } - if (message.ranges != null && message.hasOwnProperty("ranges")) { - if (!Array.isArray(message.ranges)) - return "ranges: array expected"; - for (var i = 0; i < message.ranges.length; ++i) { - var error = $root.google.spanner.v1.KeyRange.verify(message.ranges[i]); - if (error) - return "ranges." + error; + /** + * Creates a plain object from a ReadWrite message. Also converts values to other types if specified. + * @function toObject + * @memberof google.spanner.v1.TransactionOptions.ReadWrite + * @static + * @param {google.spanner.v1.TransactionOptions.ReadWrite} message ReadWrite + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReadWrite.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.readLockMode = options.enums === String ? "READ_LOCK_MODE_UNSPECIFIED" : 0; + if (options.bytes === String) + object.multiplexedSessionPreviousTransactionId = ""; + else { + object.multiplexedSessionPreviousTransactionId = []; + if (options.bytes !== Array) + object.multiplexedSessionPreviousTransactionId = $util.newBuffer(object.multiplexedSessionPreviousTransactionId); + } } - } - if (message.all != null && message.hasOwnProperty("all")) - if (typeof message.all !== "boolean") - return "all: boolean expected"; - return null; - }; - - /** - * Creates a KeySet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.spanner.v1.KeySet - * @static - * @param {Object.} object Plain object - * @returns {google.spanner.v1.KeySet} KeySet - */ - KeySet.fromObject = function fromObject(object) { - if (object instanceof $root.google.spanner.v1.KeySet) + if (message.readLockMode != null && message.hasOwnProperty("readLockMode")) + object.readLockMode = options.enums === String ? $root.google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode[message.readLockMode] === undefined ? message.readLockMode : $root.google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode[message.readLockMode] : message.readLockMode; + if (message.multiplexedSessionPreviousTransactionId != null && message.hasOwnProperty("multiplexedSessionPreviousTransactionId")) + object.multiplexedSessionPreviousTransactionId = options.bytes === String ? $util.base64.encode(message.multiplexedSessionPreviousTransactionId, 0, message.multiplexedSessionPreviousTransactionId.length) : options.bytes === Array ? Array.prototype.slice.call(message.multiplexedSessionPreviousTransactionId) : message.multiplexedSessionPreviousTransactionId; return object; - var message = new $root.google.spanner.v1.KeySet(); - if (object.keys) { - if (!Array.isArray(object.keys)) - throw TypeError(".google.spanner.v1.KeySet.keys: array expected"); - message.keys = []; - for (var i = 0; i < object.keys.length; ++i) { - if (typeof object.keys[i] !== "object") - throw TypeError(".google.spanner.v1.KeySet.keys: object expected"); - message.keys[i] = $root.google.protobuf.ListValue.fromObject(object.keys[i]); - } - } - if (object.ranges) { - if (!Array.isArray(object.ranges)) - throw TypeError(".google.spanner.v1.KeySet.ranges: array expected"); - message.ranges = []; - for (var i = 0; i < object.ranges.length; ++i) { - if (typeof object.ranges[i] !== "object") - throw TypeError(".google.spanner.v1.KeySet.ranges: object expected"); - message.ranges[i] = $root.google.spanner.v1.KeyRange.fromObject(object.ranges[i]); - } - } - if (object.all != null) - message.all = Boolean(object.all); - return message; - }; - - /** - * Creates a plain object from a KeySet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.spanner.v1.KeySet - * @static - * @param {google.spanner.v1.KeySet} message KeySet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - KeySet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) { - object.keys = []; - object.ranges = []; - } - if (options.defaults) - object.all = false; - if (message.keys && message.keys.length) { - object.keys = []; - for (var j = 0; j < message.keys.length; ++j) - object.keys[j] = $root.google.protobuf.ListValue.toObject(message.keys[j], options); - } - if (message.ranges && message.ranges.length) { - object.ranges = []; - for (var j = 0; j < message.ranges.length; ++j) - object.ranges[j] = $root.google.spanner.v1.KeyRange.toObject(message.ranges[j], options); - } - if (message.all != null && message.hasOwnProperty("all")) - object.all = message.all; - return object; - }; + }; - /** - * Converts this KeySet to JSON. - * @function toJSON - * @memberof google.spanner.v1.KeySet - * @instance - * @returns {Object.} JSON object - */ - KeySet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this ReadWrite to JSON. + * @function toJSON + * @memberof google.spanner.v1.TransactionOptions.ReadWrite + * @instance + * @returns {Object.} JSON object + */ + ReadWrite.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for KeySet - * @function getTypeUrl - * @memberof google.spanner.v1.KeySet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - KeySet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.spanner.v1.KeySet"; - }; + /** + * Gets the default type url for ReadWrite + * @function getTypeUrl + * @memberof google.spanner.v1.TransactionOptions.ReadWrite + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReadWrite.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.spanner.v1.TransactionOptions.ReadWrite"; + }; - return KeySet; - })(); + /** + * ReadLockMode enum. + * @name google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode + * @enum {number} + * @property {number} READ_LOCK_MODE_UNSPECIFIED=0 READ_LOCK_MODE_UNSPECIFIED value + * @property {number} PESSIMISTIC=1 PESSIMISTIC value + * @property {number} OPTIMISTIC=2 OPTIMISTIC value + */ + ReadWrite.ReadLockMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "READ_LOCK_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "PESSIMISTIC"] = 1; + values[valuesById[2] = "OPTIMISTIC"] = 2; + return values; + })(); - v1.Mutation = (function() { + return ReadWrite; + })(); - /** - * Properties of a Mutation. - * @memberof google.spanner.v1 - * @interface IMutation - * @property {google.spanner.v1.Mutation.IWrite|null} [insert] Mutation insert - * @property {google.spanner.v1.Mutation.IWrite|null} [update] Mutation update - * @property {google.spanner.v1.Mutation.IWrite|null} [insertOrUpdate] Mutation insertOrUpdate - * @property {google.spanner.v1.Mutation.IWrite|null} [replace] Mutation replace - * @property {google.spanner.v1.Mutation.IDelete|null} ["delete"] Mutation delete - */ + TransactionOptions.PartitionedDml = (function() { - /** - * Constructs a new Mutation. - * @memberof google.spanner.v1 - * @classdesc Represents a Mutation. - * @implements IMutation - * @constructor - * @param {google.spanner.v1.IMutation=} [properties] Properties to set - */ - function Mutation(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Properties of a PartitionedDml. + * @memberof google.spanner.v1.TransactionOptions + * @interface IPartitionedDml + */ - /** - * Mutation insert. - * @member {google.spanner.v1.Mutation.IWrite|null|undefined} insert - * @memberof google.spanner.v1.Mutation - * @instance - */ - Mutation.prototype.insert = null; + /** + * Constructs a new PartitionedDml. + * @memberof google.spanner.v1.TransactionOptions + * @classdesc Represents a PartitionedDml. + * @implements IPartitionedDml + * @constructor + * @param {google.spanner.v1.TransactionOptions.IPartitionedDml=} [properties] Properties to set + */ + function PartitionedDml(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Mutation update. - * @member {google.spanner.v1.Mutation.IWrite|null|undefined} update - * @memberof google.spanner.v1.Mutation - * @instance - */ - Mutation.prototype.update = null; + /** + * Creates a new PartitionedDml instance using the specified properties. + * @function create + * @memberof google.spanner.v1.TransactionOptions.PartitionedDml + * @static + * @param {google.spanner.v1.TransactionOptions.IPartitionedDml=} [properties] Properties to set + * @returns {google.spanner.v1.TransactionOptions.PartitionedDml} PartitionedDml instance + */ + PartitionedDml.create = function create(properties) { + return new PartitionedDml(properties); + }; - /** - * Mutation insertOrUpdate. - * @member {google.spanner.v1.Mutation.IWrite|null|undefined} insertOrUpdate - * @memberof google.spanner.v1.Mutation - * @instance - */ - Mutation.prototype.insertOrUpdate = null; + /** + * Encodes the specified PartitionedDml message. Does not implicitly {@link google.spanner.v1.TransactionOptions.PartitionedDml.verify|verify} messages. + * @function encode + * @memberof google.spanner.v1.TransactionOptions.PartitionedDml + * @static + * @param {google.spanner.v1.TransactionOptions.IPartitionedDml} message PartitionedDml message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartitionedDml.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * Mutation replace. - * @member {google.spanner.v1.Mutation.IWrite|null|undefined} replace - * @memberof google.spanner.v1.Mutation - * @instance - */ - Mutation.prototype.replace = null; + /** + * Encodes the specified PartitionedDml message, length delimited. Does not implicitly {@link google.spanner.v1.TransactionOptions.PartitionedDml.verify|verify} messages. + * @function encodeDelimited + * @memberof google.spanner.v1.TransactionOptions.PartitionedDml + * @static + * @param {google.spanner.v1.TransactionOptions.IPartitionedDml} message PartitionedDml message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartitionedDml.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * Mutation delete. - * @member {google.spanner.v1.Mutation.IDelete|null|undefined} delete - * @memberof google.spanner.v1.Mutation - * @instance - */ - Mutation.prototype["delete"] = null; + /** + * Decodes a PartitionedDml message from the specified reader or buffer. + * @function decode + * @memberof google.spanner.v1.TransactionOptions.PartitionedDml + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.spanner.v1.TransactionOptions.PartitionedDml} PartitionedDml + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartitionedDml.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.TransactionOptions.PartitionedDml(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Decodes a PartitionedDml message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.spanner.v1.TransactionOptions.PartitionedDml + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.spanner.v1.TransactionOptions.PartitionedDml} PartitionedDml + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartitionedDml.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Mutation operation. - * @member {"insert"|"update"|"insertOrUpdate"|"replace"|"delete"|undefined} operation - * @memberof google.spanner.v1.Mutation - * @instance - */ - Object.defineProperty(Mutation.prototype, "operation", { - get: $util.oneOfGetter($oneOfFields = ["insert", "update", "insertOrUpdate", "replace", "delete"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Verifies a PartitionedDml message. + * @function verify + * @memberof google.spanner.v1.TransactionOptions.PartitionedDml + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartitionedDml.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * Creates a new Mutation instance using the specified properties. - * @function create - * @memberof google.spanner.v1.Mutation - * @static - * @param {google.spanner.v1.IMutation=} [properties] Properties to set - * @returns {google.spanner.v1.Mutation} Mutation instance - */ - Mutation.create = function create(properties) { - return new Mutation(properties); - }; - - /** - * Encodes the specified Mutation message. Does not implicitly {@link google.spanner.v1.Mutation.verify|verify} messages. - * @function encode - * @memberof google.spanner.v1.Mutation - * @static - * @param {google.spanner.v1.IMutation} message Mutation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Mutation.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.insert != null && Object.hasOwnProperty.call(message, "insert")) - $root.google.spanner.v1.Mutation.Write.encode(message.insert, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.update != null && Object.hasOwnProperty.call(message, "update")) - $root.google.spanner.v1.Mutation.Write.encode(message.update, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.insertOrUpdate != null && Object.hasOwnProperty.call(message, "insertOrUpdate")) - $root.google.spanner.v1.Mutation.Write.encode(message.insertOrUpdate, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.replace != null && Object.hasOwnProperty.call(message, "replace")) - $root.google.spanner.v1.Mutation.Write.encode(message.replace, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - $root.google.spanner.v1.Mutation.Delete.encode(message["delete"], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Mutation message, length delimited. Does not implicitly {@link google.spanner.v1.Mutation.verify|verify} messages. - * @function encodeDelimited - * @memberof google.spanner.v1.Mutation - * @static - * @param {google.spanner.v1.IMutation} message Mutation message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Mutation.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a PartitionedDml message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.spanner.v1.TransactionOptions.PartitionedDml + * @static + * @param {Object.} object Plain object + * @returns {google.spanner.v1.TransactionOptions.PartitionedDml} PartitionedDml + */ + PartitionedDml.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.v1.TransactionOptions.PartitionedDml) + return object; + return new $root.google.spanner.v1.TransactionOptions.PartitionedDml(); + }; - /** - * Decodes a Mutation message from the specified reader or buffer. - * @function decode - * @memberof google.spanner.v1.Mutation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.spanner.v1.Mutation} Mutation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Mutation.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.Mutation(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.insert = $root.google.spanner.v1.Mutation.Write.decode(reader, reader.uint32()); - break; - } - case 2: { - message.update = $root.google.spanner.v1.Mutation.Write.decode(reader, reader.uint32()); - break; - } - case 3: { - message.insertOrUpdate = $root.google.spanner.v1.Mutation.Write.decode(reader, reader.uint32()); - break; - } - case 4: { - message.replace = $root.google.spanner.v1.Mutation.Write.decode(reader, reader.uint32()); - break; - } - case 5: { - message["delete"] = $root.google.spanner.v1.Mutation.Delete.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Creates a plain object from a PartitionedDml message. Also converts values to other types if specified. + * @function toObject + * @memberof google.spanner.v1.TransactionOptions.PartitionedDml + * @static + * @param {google.spanner.v1.TransactionOptions.PartitionedDml} message PartitionedDml + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartitionedDml.toObject = function toObject() { + return {}; + }; - /** - * Decodes a Mutation message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.spanner.v1.Mutation - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.spanner.v1.Mutation} Mutation - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Mutation.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Converts this PartitionedDml to JSON. + * @function toJSON + * @memberof google.spanner.v1.TransactionOptions.PartitionedDml + * @instance + * @returns {Object.} JSON object + */ + PartitionedDml.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Verifies a Mutation message. - * @function verify - * @memberof google.spanner.v1.Mutation - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Mutation.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.insert != null && message.hasOwnProperty("insert")) { - properties.operation = 1; - { - var error = $root.google.spanner.v1.Mutation.Write.verify(message.insert); - if (error) - return "insert." + error; - } - } - if (message.update != null && message.hasOwnProperty("update")) { - if (properties.operation === 1) - return "operation: multiple values"; - properties.operation = 1; - { - var error = $root.google.spanner.v1.Mutation.Write.verify(message.update); - if (error) - return "update." + error; - } - } - if (message.insertOrUpdate != null && message.hasOwnProperty("insertOrUpdate")) { - if (properties.operation === 1) - return "operation: multiple values"; - properties.operation = 1; - { - var error = $root.google.spanner.v1.Mutation.Write.verify(message.insertOrUpdate); - if (error) - return "insertOrUpdate." + error; - } - } - if (message.replace != null && message.hasOwnProperty("replace")) { - if (properties.operation === 1) - return "operation: multiple values"; - properties.operation = 1; - { - var error = $root.google.spanner.v1.Mutation.Write.verify(message.replace); - if (error) - return "replace." + error; - } - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - if (properties.operation === 1) - return "operation: multiple values"; - properties.operation = 1; - { - var error = $root.google.spanner.v1.Mutation.Delete.verify(message["delete"]); - if (error) - return "delete." + error; + /** + * Gets the default type url for PartitionedDml + * @function getTypeUrl + * @memberof google.spanner.v1.TransactionOptions.PartitionedDml + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartitionedDml.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; } - } - return null; - }; - - /** - * Creates a Mutation message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.spanner.v1.Mutation - * @static - * @param {Object.} object Plain object - * @returns {google.spanner.v1.Mutation} Mutation - */ - Mutation.fromObject = function fromObject(object) { - if (object instanceof $root.google.spanner.v1.Mutation) - return object; - var message = new $root.google.spanner.v1.Mutation(); - if (object.insert != null) { - if (typeof object.insert !== "object") - throw TypeError(".google.spanner.v1.Mutation.insert: object expected"); - message.insert = $root.google.spanner.v1.Mutation.Write.fromObject(object.insert); - } - if (object.update != null) { - if (typeof object.update !== "object") - throw TypeError(".google.spanner.v1.Mutation.update: object expected"); - message.update = $root.google.spanner.v1.Mutation.Write.fromObject(object.update); - } - if (object.insertOrUpdate != null) { - if (typeof object.insertOrUpdate !== "object") - throw TypeError(".google.spanner.v1.Mutation.insertOrUpdate: object expected"); - message.insertOrUpdate = $root.google.spanner.v1.Mutation.Write.fromObject(object.insertOrUpdate); - } - if (object.replace != null) { - if (typeof object.replace !== "object") - throw TypeError(".google.spanner.v1.Mutation.replace: object expected"); - message.replace = $root.google.spanner.v1.Mutation.Write.fromObject(object.replace); - } - if (object["delete"] != null) { - if (typeof object["delete"] !== "object") - throw TypeError(".google.spanner.v1.Mutation.delete: object expected"); - message["delete"] = $root.google.spanner.v1.Mutation.Delete.fromObject(object["delete"]); - } - return message; - }; - - /** - * Creates a plain object from a Mutation message. Also converts values to other types if specified. - * @function toObject - * @memberof google.spanner.v1.Mutation - * @static - * @param {google.spanner.v1.Mutation} message Mutation - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Mutation.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.insert != null && message.hasOwnProperty("insert")) { - object.insert = $root.google.spanner.v1.Mutation.Write.toObject(message.insert, options); - if (options.oneofs) - object.operation = "insert"; - } - if (message.update != null && message.hasOwnProperty("update")) { - object.update = $root.google.spanner.v1.Mutation.Write.toObject(message.update, options); - if (options.oneofs) - object.operation = "update"; - } - if (message.insertOrUpdate != null && message.hasOwnProperty("insertOrUpdate")) { - object.insertOrUpdate = $root.google.spanner.v1.Mutation.Write.toObject(message.insertOrUpdate, options); - if (options.oneofs) - object.operation = "insertOrUpdate"; - } - if (message.replace != null && message.hasOwnProperty("replace")) { - object.replace = $root.google.spanner.v1.Mutation.Write.toObject(message.replace, options); - if (options.oneofs) - object.operation = "replace"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = $root.google.spanner.v1.Mutation.Delete.toObject(message["delete"], options); - if (options.oneofs) - object.operation = "delete"; - } - return object; - }; - - /** - * Converts this Mutation to JSON. - * @function toJSON - * @memberof google.spanner.v1.Mutation - * @instance - * @returns {Object.} JSON object - */ - Mutation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + return typeUrlPrefix + "/google.spanner.v1.TransactionOptions.PartitionedDml"; + }; - /** - * Gets the default type url for Mutation - * @function getTypeUrl - * @memberof google.spanner.v1.Mutation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Mutation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.spanner.v1.Mutation"; - }; + return PartitionedDml; + })(); - Mutation.Write = (function() { + TransactionOptions.ReadOnly = (function() { /** - * Properties of a Write. - * @memberof google.spanner.v1.Mutation - * @interface IWrite - * @property {string|null} [table] Write table - * @property {Array.|null} [columns] Write columns - * @property {Array.|null} [values] Write values + * Properties of a ReadOnly. + * @memberof google.spanner.v1.TransactionOptions + * @interface IReadOnly + * @property {boolean|null} [strong] ReadOnly strong + * @property {google.protobuf.ITimestamp|null} [minReadTimestamp] ReadOnly minReadTimestamp + * @property {google.protobuf.IDuration|null} [maxStaleness] ReadOnly maxStaleness + * @property {google.protobuf.ITimestamp|null} [readTimestamp] ReadOnly readTimestamp + * @property {google.protobuf.IDuration|null} [exactStaleness] ReadOnly exactStaleness + * @property {boolean|null} [returnReadTimestamp] ReadOnly returnReadTimestamp */ /** - * Constructs a new Write. - * @memberof google.spanner.v1.Mutation - * @classdesc Represents a Write. - * @implements IWrite + * Constructs a new ReadOnly. + * @memberof google.spanner.v1.TransactionOptions + * @classdesc Represents a ReadOnly. + * @implements IReadOnly * @constructor - * @param {google.spanner.v1.Mutation.IWrite=} [properties] Properties to set + * @param {google.spanner.v1.TransactionOptions.IReadOnly=} [properties] Properties to set */ - function Write(properties) { - this.columns = []; - this.values = []; + function ReadOnly(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -81001,109 +82024,159 @@ } /** - * Write table. - * @member {string} table - * @memberof google.spanner.v1.Mutation.Write + * ReadOnly strong. + * @member {boolean|null|undefined} strong + * @memberof google.spanner.v1.TransactionOptions.ReadOnly * @instance */ - Write.prototype.table = ""; + ReadOnly.prototype.strong = null; /** - * Write columns. - * @member {Array.} columns - * @memberof google.spanner.v1.Mutation.Write + * ReadOnly minReadTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} minReadTimestamp + * @memberof google.spanner.v1.TransactionOptions.ReadOnly * @instance */ - Write.prototype.columns = $util.emptyArray; + ReadOnly.prototype.minReadTimestamp = null; /** - * Write values. - * @member {Array.} values - * @memberof google.spanner.v1.Mutation.Write + * ReadOnly maxStaleness. + * @member {google.protobuf.IDuration|null|undefined} maxStaleness + * @memberof google.spanner.v1.TransactionOptions.ReadOnly * @instance */ - Write.prototype.values = $util.emptyArray; + ReadOnly.prototype.maxStaleness = null; /** - * Creates a new Write instance using the specified properties. + * ReadOnly readTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} readTimestamp + * @memberof google.spanner.v1.TransactionOptions.ReadOnly + * @instance + */ + ReadOnly.prototype.readTimestamp = null; + + /** + * ReadOnly exactStaleness. + * @member {google.protobuf.IDuration|null|undefined} exactStaleness + * @memberof google.spanner.v1.TransactionOptions.ReadOnly + * @instance + */ + ReadOnly.prototype.exactStaleness = null; + + /** + * ReadOnly returnReadTimestamp. + * @member {boolean} returnReadTimestamp + * @memberof google.spanner.v1.TransactionOptions.ReadOnly + * @instance + */ + ReadOnly.prototype.returnReadTimestamp = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ReadOnly timestampBound. + * @member {"strong"|"minReadTimestamp"|"maxStaleness"|"readTimestamp"|"exactStaleness"|undefined} timestampBound + * @memberof google.spanner.v1.TransactionOptions.ReadOnly + * @instance + */ + Object.defineProperty(ReadOnly.prototype, "timestampBound", { + get: $util.oneOfGetter($oneOfFields = ["strong", "minReadTimestamp", "maxStaleness", "readTimestamp", "exactStaleness"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ReadOnly instance using the specified properties. * @function create - * @memberof google.spanner.v1.Mutation.Write + * @memberof google.spanner.v1.TransactionOptions.ReadOnly * @static - * @param {google.spanner.v1.Mutation.IWrite=} [properties] Properties to set - * @returns {google.spanner.v1.Mutation.Write} Write instance + * @param {google.spanner.v1.TransactionOptions.IReadOnly=} [properties] Properties to set + * @returns {google.spanner.v1.TransactionOptions.ReadOnly} ReadOnly instance */ - Write.create = function create(properties) { - return new Write(properties); + ReadOnly.create = function create(properties) { + return new ReadOnly(properties); }; /** - * Encodes the specified Write message. Does not implicitly {@link google.spanner.v1.Mutation.Write.verify|verify} messages. + * Encodes the specified ReadOnly message. Does not implicitly {@link google.spanner.v1.TransactionOptions.ReadOnly.verify|verify} messages. * @function encode - * @memberof google.spanner.v1.Mutation.Write + * @memberof google.spanner.v1.TransactionOptions.ReadOnly * @static - * @param {google.spanner.v1.Mutation.IWrite} message Write message or plain object to encode + * @param {google.spanner.v1.TransactionOptions.IReadOnly} message ReadOnly message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Write.encode = function encode(message, writer) { + ReadOnly.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); - if (message.columns != null && message.columns.length) - for (var i = 0; i < message.columns.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.columns[i]); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - $root.google.protobuf.ListValue.encode(message.values[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.strong != null && Object.hasOwnProperty.call(message, "strong")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.strong); + if (message.minReadTimestamp != null && Object.hasOwnProperty.call(message, "minReadTimestamp")) + $root.google.protobuf.Timestamp.encode(message.minReadTimestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.maxStaleness != null && Object.hasOwnProperty.call(message, "maxStaleness")) + $root.google.protobuf.Duration.encode(message.maxStaleness, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.readTimestamp != null && Object.hasOwnProperty.call(message, "readTimestamp")) + $root.google.protobuf.Timestamp.encode(message.readTimestamp, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.exactStaleness != null && Object.hasOwnProperty.call(message, "exactStaleness")) + $root.google.protobuf.Duration.encode(message.exactStaleness, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.returnReadTimestamp != null && Object.hasOwnProperty.call(message, "returnReadTimestamp")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.returnReadTimestamp); return writer; }; /** - * Encodes the specified Write message, length delimited. Does not implicitly {@link google.spanner.v1.Mutation.Write.verify|verify} messages. + * Encodes the specified ReadOnly message, length delimited. Does not implicitly {@link google.spanner.v1.TransactionOptions.ReadOnly.verify|verify} messages. * @function encodeDelimited - * @memberof google.spanner.v1.Mutation.Write + * @memberof google.spanner.v1.TransactionOptions.ReadOnly * @static - * @param {google.spanner.v1.Mutation.IWrite} message Write message or plain object to encode + * @param {google.spanner.v1.TransactionOptions.IReadOnly} message ReadOnly message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Write.encodeDelimited = function encodeDelimited(message, writer) { + ReadOnly.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Write message from the specified reader or buffer. + * Decodes a ReadOnly message from the specified reader or buffer. * @function decode - * @memberof google.spanner.v1.Mutation.Write + * @memberof google.spanner.v1.TransactionOptions.ReadOnly * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.spanner.v1.Mutation.Write} Write + * @returns {google.spanner.v1.TransactionOptions.ReadOnly} ReadOnly * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Write.decode = function decode(reader, length) { + ReadOnly.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.Mutation.Write(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.TransactionOptions.ReadOnly(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.table = reader.string(); + message.strong = reader.bool(); break; } case 2: { - if (!(message.columns && message.columns.length)) - message.columns = []; - message.columns.push(reader.string()); + message.minReadTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.google.protobuf.ListValue.decode(reader, reader.uint32())); + message.maxStaleness = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 4: { + message.readTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 5: { + message.exactStaleness = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 6: { + message.returnReadTimestamp = reader.bool(); break; } default: @@ -81115,407 +82188,220 @@ }; /** - * Decodes a Write message from the specified reader or buffer, length delimited. + * Decodes a ReadOnly message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.spanner.v1.Mutation.Write + * @memberof google.spanner.v1.TransactionOptions.ReadOnly * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.spanner.v1.Mutation.Write} Write + * @returns {google.spanner.v1.TransactionOptions.ReadOnly} ReadOnly * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Write.decodeDelimited = function decodeDelimited(reader) { + ReadOnly.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Write message. + * Verifies a ReadOnly message. * @function verify - * @memberof google.spanner.v1.Mutation.Write + * @memberof google.spanner.v1.TransactionOptions.ReadOnly * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Write.verify = function verify(message) { + ReadOnly.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - if (message.columns != null && message.hasOwnProperty("columns")) { - if (!Array.isArray(message.columns)) - return "columns: array expected"; - for (var i = 0; i < message.columns.length; ++i) - if (!$util.isString(message.columns[i])) - return "columns: string[] expected"; + var properties = {}; + if (message.strong != null && message.hasOwnProperty("strong")) { + properties.timestampBound = 1; + if (typeof message.strong !== "boolean") + return "strong: boolean expected"; } - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) { - var error = $root.google.protobuf.ListValue.verify(message.values[i]); + if (message.minReadTimestamp != null && message.hasOwnProperty("minReadTimestamp")) { + if (properties.timestampBound === 1) + return "timestampBound: multiple values"; + properties.timestampBound = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.minReadTimestamp); if (error) - return "values." + error; + return "minReadTimestamp." + error; + } + } + if (message.maxStaleness != null && message.hasOwnProperty("maxStaleness")) { + if (properties.timestampBound === 1) + return "timestampBound: multiple values"; + properties.timestampBound = 1; + { + var error = $root.google.protobuf.Duration.verify(message.maxStaleness); + if (error) + return "maxStaleness." + error; } } + if (message.readTimestamp != null && message.hasOwnProperty("readTimestamp")) { + if (properties.timestampBound === 1) + return "timestampBound: multiple values"; + properties.timestampBound = 1; + { + var error = $root.google.protobuf.Timestamp.verify(message.readTimestamp); + if (error) + return "readTimestamp." + error; + } + } + if (message.exactStaleness != null && message.hasOwnProperty("exactStaleness")) { + if (properties.timestampBound === 1) + return "timestampBound: multiple values"; + properties.timestampBound = 1; + { + var error = $root.google.protobuf.Duration.verify(message.exactStaleness); + if (error) + return "exactStaleness." + error; + } + } + if (message.returnReadTimestamp != null && message.hasOwnProperty("returnReadTimestamp")) + if (typeof message.returnReadTimestamp !== "boolean") + return "returnReadTimestamp: boolean expected"; return null; }; /** - * Creates a Write message from a plain object. Also converts values to their respective internal types. + * Creates a ReadOnly message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.spanner.v1.Mutation.Write + * @memberof google.spanner.v1.TransactionOptions.ReadOnly * @static * @param {Object.} object Plain object - * @returns {google.spanner.v1.Mutation.Write} Write + * @returns {google.spanner.v1.TransactionOptions.ReadOnly} ReadOnly */ - Write.fromObject = function fromObject(object) { - if (object instanceof $root.google.spanner.v1.Mutation.Write) + ReadOnly.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.v1.TransactionOptions.ReadOnly) return object; - var message = new $root.google.spanner.v1.Mutation.Write(); - if (object.table != null) - message.table = String(object.table); - if (object.columns) { - if (!Array.isArray(object.columns)) - throw TypeError(".google.spanner.v1.Mutation.Write.columns: array expected"); - message.columns = []; - for (var i = 0; i < object.columns.length; ++i) - message.columns[i] = String(object.columns[i]); + var message = new $root.google.spanner.v1.TransactionOptions.ReadOnly(); + if (object.strong != null) + message.strong = Boolean(object.strong); + if (object.minReadTimestamp != null) { + if (typeof object.minReadTimestamp !== "object") + throw TypeError(".google.spanner.v1.TransactionOptions.ReadOnly.minReadTimestamp: object expected"); + message.minReadTimestamp = $root.google.protobuf.Timestamp.fromObject(object.minReadTimestamp); } - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.spanner.v1.Mutation.Write.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".google.spanner.v1.Mutation.Write.values: object expected"); - message.values[i] = $root.google.protobuf.ListValue.fromObject(object.values[i]); - } + if (object.maxStaleness != null) { + if (typeof object.maxStaleness !== "object") + throw TypeError(".google.spanner.v1.TransactionOptions.ReadOnly.maxStaleness: object expected"); + message.maxStaleness = $root.google.protobuf.Duration.fromObject(object.maxStaleness); + } + if (object.readTimestamp != null) { + if (typeof object.readTimestamp !== "object") + throw TypeError(".google.spanner.v1.TransactionOptions.ReadOnly.readTimestamp: object expected"); + message.readTimestamp = $root.google.protobuf.Timestamp.fromObject(object.readTimestamp); + } + if (object.exactStaleness != null) { + if (typeof object.exactStaleness !== "object") + throw TypeError(".google.spanner.v1.TransactionOptions.ReadOnly.exactStaleness: object expected"); + message.exactStaleness = $root.google.protobuf.Duration.fromObject(object.exactStaleness); } + if (object.returnReadTimestamp != null) + message.returnReadTimestamp = Boolean(object.returnReadTimestamp); return message; }; /** - * Creates a plain object from a Write message. Also converts values to other types if specified. + * Creates a plain object from a ReadOnly message. Also converts values to other types if specified. * @function toObject - * @memberof google.spanner.v1.Mutation.Write + * @memberof google.spanner.v1.TransactionOptions.ReadOnly * @static - * @param {google.spanner.v1.Mutation.Write} message Write + * @param {google.spanner.v1.TransactionOptions.ReadOnly} message ReadOnly * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Write.toObject = function toObject(message, options) { + ReadOnly.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.columns = []; - object.values = []; - } if (options.defaults) - object.table = ""; - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; - if (message.columns && message.columns.length) { - object.columns = []; - for (var j = 0; j < message.columns.length; ++j) - object.columns[j] = message.columns[j]; - } - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.google.protobuf.ListValue.toObject(message.values[j], options); - } - return object; - }; - - /** - * Converts this Write to JSON. - * @function toJSON - * @memberof google.spanner.v1.Mutation.Write - * @instance - * @returns {Object.} JSON object - */ - Write.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Write - * @function getTypeUrl - * @memberof google.spanner.v1.Mutation.Write - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Write.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; + object.returnReadTimestamp = false; + if (message.strong != null && message.hasOwnProperty("strong")) { + object.strong = message.strong; + if (options.oneofs) + object.timestampBound = "strong"; } - return typeUrlPrefix + "/google.spanner.v1.Mutation.Write"; - }; - - return Write; - })(); - - Mutation.Delete = (function() { - - /** - * Properties of a Delete. - * @memberof google.spanner.v1.Mutation - * @interface IDelete - * @property {string|null} [table] Delete table - * @property {google.spanner.v1.IKeySet|null} [keySet] Delete keySet - */ - - /** - * Constructs a new Delete. - * @memberof google.spanner.v1.Mutation - * @classdesc Represents a Delete. - * @implements IDelete - * @constructor - * @param {google.spanner.v1.Mutation.IDelete=} [properties] Properties to set - */ - function Delete(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Delete table. - * @member {string} table - * @memberof google.spanner.v1.Mutation.Delete - * @instance - */ - Delete.prototype.table = ""; - - /** - * Delete keySet. - * @member {google.spanner.v1.IKeySet|null|undefined} keySet - * @memberof google.spanner.v1.Mutation.Delete - * @instance - */ - Delete.prototype.keySet = null; - - /** - * Creates a new Delete instance using the specified properties. - * @function create - * @memberof google.spanner.v1.Mutation.Delete - * @static - * @param {google.spanner.v1.Mutation.IDelete=} [properties] Properties to set - * @returns {google.spanner.v1.Mutation.Delete} Delete instance - */ - Delete.create = function create(properties) { - return new Delete(properties); - }; - - /** - * Encodes the specified Delete message. Does not implicitly {@link google.spanner.v1.Mutation.Delete.verify|verify} messages. - * @function encode - * @memberof google.spanner.v1.Mutation.Delete - * @static - * @param {google.spanner.v1.Mutation.IDelete} message Delete message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Delete.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.table != null && Object.hasOwnProperty.call(message, "table")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); - if (message.keySet != null && Object.hasOwnProperty.call(message, "keySet")) - $root.google.spanner.v1.KeySet.encode(message.keySet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Delete message, length delimited. Does not implicitly {@link google.spanner.v1.Mutation.Delete.verify|verify} messages. - * @function encodeDelimited - * @memberof google.spanner.v1.Mutation.Delete - * @static - * @param {google.spanner.v1.Mutation.IDelete} message Delete message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Delete.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Delete message from the specified reader or buffer. - * @function decode - * @memberof google.spanner.v1.Mutation.Delete - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.spanner.v1.Mutation.Delete} Delete - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Delete.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.Mutation.Delete(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.table = reader.string(); - break; - } - case 2: { - message.keySet = $root.google.spanner.v1.KeySet.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } + if (message.minReadTimestamp != null && message.hasOwnProperty("minReadTimestamp")) { + object.minReadTimestamp = $root.google.protobuf.Timestamp.toObject(message.minReadTimestamp, options); + if (options.oneofs) + object.timestampBound = "minReadTimestamp"; } - return message; - }; - - /** - * Decodes a Delete message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.spanner.v1.Mutation.Delete - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.spanner.v1.Mutation.Delete} Delete - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Delete.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Delete message. - * @function verify - * @memberof google.spanner.v1.Mutation.Delete - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Delete.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.table != null && message.hasOwnProperty("table")) - if (!$util.isString(message.table)) - return "table: string expected"; - if (message.keySet != null && message.hasOwnProperty("keySet")) { - var error = $root.google.spanner.v1.KeySet.verify(message.keySet); - if (error) - return "keySet." + error; + if (message.maxStaleness != null && message.hasOwnProperty("maxStaleness")) { + object.maxStaleness = $root.google.protobuf.Duration.toObject(message.maxStaleness, options); + if (options.oneofs) + object.timestampBound = "maxStaleness"; } - return null; - }; - - /** - * Creates a Delete message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.spanner.v1.Mutation.Delete - * @static - * @param {Object.} object Plain object - * @returns {google.spanner.v1.Mutation.Delete} Delete - */ - Delete.fromObject = function fromObject(object) { - if (object instanceof $root.google.spanner.v1.Mutation.Delete) - return object; - var message = new $root.google.spanner.v1.Mutation.Delete(); - if (object.table != null) - message.table = String(object.table); - if (object.keySet != null) { - if (typeof object.keySet !== "object") - throw TypeError(".google.spanner.v1.Mutation.Delete.keySet: object expected"); - message.keySet = $root.google.spanner.v1.KeySet.fromObject(object.keySet); + if (message.readTimestamp != null && message.hasOwnProperty("readTimestamp")) { + object.readTimestamp = $root.google.protobuf.Timestamp.toObject(message.readTimestamp, options); + if (options.oneofs) + object.timestampBound = "readTimestamp"; } - return message; - }; - - /** - * Creates a plain object from a Delete message. Also converts values to other types if specified. - * @function toObject - * @memberof google.spanner.v1.Mutation.Delete - * @static - * @param {google.spanner.v1.Mutation.Delete} message Delete - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Delete.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.table = ""; - object.keySet = null; + if (message.exactStaleness != null && message.hasOwnProperty("exactStaleness")) { + object.exactStaleness = $root.google.protobuf.Duration.toObject(message.exactStaleness, options); + if (options.oneofs) + object.timestampBound = "exactStaleness"; } - if (message.table != null && message.hasOwnProperty("table")) - object.table = message.table; - if (message.keySet != null && message.hasOwnProperty("keySet")) - object.keySet = $root.google.spanner.v1.KeySet.toObject(message.keySet, options); + if (message.returnReadTimestamp != null && message.hasOwnProperty("returnReadTimestamp")) + object.returnReadTimestamp = message.returnReadTimestamp; return object; }; /** - * Converts this Delete to JSON. + * Converts this ReadOnly to JSON. * @function toJSON - * @memberof google.spanner.v1.Mutation.Delete + * @memberof google.spanner.v1.TransactionOptions.ReadOnly * @instance * @returns {Object.} JSON object */ - Delete.prototype.toJSON = function toJSON() { + ReadOnly.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Delete + * Gets the default type url for ReadOnly * @function getTypeUrl - * @memberof google.spanner.v1.Mutation.Delete + * @memberof google.spanner.v1.TransactionOptions.ReadOnly * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Delete.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ReadOnly.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.spanner.v1.Mutation.Delete"; + return typeUrlPrefix + "/google.spanner.v1.TransactionOptions.ReadOnly"; }; - return Delete; + return ReadOnly; })(); - return Mutation; + return TransactionOptions; })(); - v1.ResultSet = (function() { + v1.Transaction = (function() { /** - * Properties of a ResultSet. + * Properties of a Transaction. * @memberof google.spanner.v1 - * @interface IResultSet - * @property {google.spanner.v1.IResultSetMetadata|null} [metadata] ResultSet metadata - * @property {Array.|null} [rows] ResultSet rows - * @property {google.spanner.v1.IResultSetStats|null} [stats] ResultSet stats + * @interface ITransaction + * @property {Uint8Array|null} [id] Transaction id + * @property {google.protobuf.ITimestamp|null} [readTimestamp] Transaction readTimestamp + * @property {google.spanner.v1.IMultiplexedSessionPrecommitToken|null} [precommitToken] Transaction precommitToken */ /** - * Constructs a new ResultSet. + * Constructs a new Transaction. * @memberof google.spanner.v1 - * @classdesc Represents a ResultSet. - * @implements IResultSet + * @classdesc Represents a Transaction. + * @implements ITransaction * @constructor - * @param {google.spanner.v1.IResultSet=} [properties] Properties to set + * @param {google.spanner.v1.ITransaction=} [properties] Properties to set */ - function ResultSet(properties) { - this.rows = []; + function Transaction(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -81523,106 +82409,103 @@ } /** - * ResultSet metadata. - * @member {google.spanner.v1.IResultSetMetadata|null|undefined} metadata - * @memberof google.spanner.v1.ResultSet + * Transaction id. + * @member {Uint8Array} id + * @memberof google.spanner.v1.Transaction * @instance */ - ResultSet.prototype.metadata = null; + Transaction.prototype.id = $util.newBuffer([]); /** - * ResultSet rows. - * @member {Array.} rows - * @memberof google.spanner.v1.ResultSet + * Transaction readTimestamp. + * @member {google.protobuf.ITimestamp|null|undefined} readTimestamp + * @memberof google.spanner.v1.Transaction * @instance */ - ResultSet.prototype.rows = $util.emptyArray; + Transaction.prototype.readTimestamp = null; /** - * ResultSet stats. - * @member {google.spanner.v1.IResultSetStats|null|undefined} stats - * @memberof google.spanner.v1.ResultSet + * Transaction precommitToken. + * @member {google.spanner.v1.IMultiplexedSessionPrecommitToken|null|undefined} precommitToken + * @memberof google.spanner.v1.Transaction * @instance */ - ResultSet.prototype.stats = null; + Transaction.prototype.precommitToken = null; /** - * Creates a new ResultSet instance using the specified properties. + * Creates a new Transaction instance using the specified properties. * @function create - * @memberof google.spanner.v1.ResultSet + * @memberof google.spanner.v1.Transaction * @static - * @param {google.spanner.v1.IResultSet=} [properties] Properties to set - * @returns {google.spanner.v1.ResultSet} ResultSet instance + * @param {google.spanner.v1.ITransaction=} [properties] Properties to set + * @returns {google.spanner.v1.Transaction} Transaction instance */ - ResultSet.create = function create(properties) { - return new ResultSet(properties); + Transaction.create = function create(properties) { + return new Transaction(properties); }; /** - * Encodes the specified ResultSet message. Does not implicitly {@link google.spanner.v1.ResultSet.verify|verify} messages. + * Encodes the specified Transaction message. Does not implicitly {@link google.spanner.v1.Transaction.verify|verify} messages. * @function encode - * @memberof google.spanner.v1.ResultSet + * @memberof google.spanner.v1.Transaction * @static - * @param {google.spanner.v1.IResultSet} message ResultSet message or plain object to encode + * @param {google.spanner.v1.ITransaction} message Transaction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResultSet.encode = function encode(message, writer) { + Transaction.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.spanner.v1.ResultSetMetadata.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.rows != null && message.rows.length) - for (var i = 0; i < message.rows.length; ++i) - $root.google.protobuf.ListValue.encode(message.rows[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.stats != null && Object.hasOwnProperty.call(message, "stats")) - $root.google.spanner.v1.ResultSetStats.encode(message.stats, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.id); + if (message.readTimestamp != null && Object.hasOwnProperty.call(message, "readTimestamp")) + $root.google.protobuf.Timestamp.encode(message.readTimestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.precommitToken != null && Object.hasOwnProperty.call(message, "precommitToken")) + $root.google.spanner.v1.MultiplexedSessionPrecommitToken.encode(message.precommitToken, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ResultSet message, length delimited. Does not implicitly {@link google.spanner.v1.ResultSet.verify|verify} messages. + * Encodes the specified Transaction message, length delimited. Does not implicitly {@link google.spanner.v1.Transaction.verify|verify} messages. * @function encodeDelimited - * @memberof google.spanner.v1.ResultSet + * @memberof google.spanner.v1.Transaction * @static - * @param {google.spanner.v1.IResultSet} message ResultSet message or plain object to encode + * @param {google.spanner.v1.ITransaction} message Transaction message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResultSet.encodeDelimited = function encodeDelimited(message, writer) { + Transaction.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResultSet message from the specified reader or buffer. + * Decodes a Transaction message from the specified reader or buffer. * @function decode - * @memberof google.spanner.v1.ResultSet + * @memberof google.spanner.v1.Transaction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.spanner.v1.ResultSet} ResultSet + * @returns {google.spanner.v1.Transaction} Transaction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResultSet.decode = function decode(reader, length) { + Transaction.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.ResultSet(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.Transaction(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.metadata = $root.google.spanner.v1.ResultSetMetadata.decode(reader, reader.uint32()); + message.id = reader.bytes(); break; } case 2: { - if (!(message.rows && message.rows.length)) - message.rows = []; - message.rows.push($root.google.protobuf.ListValue.decode(reader, reader.uint32())); + message.readTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 3: { - message.stats = $root.google.spanner.v1.ResultSetStats.decode(reader, reader.uint32()); + message.precommitToken = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.decode(reader, reader.uint32()); break; } default: @@ -81634,172 +82517,160 @@ }; /** - * Decodes a ResultSet message from the specified reader or buffer, length delimited. + * Decodes a Transaction message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.spanner.v1.ResultSet + * @memberof google.spanner.v1.Transaction * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.spanner.v1.ResultSet} ResultSet + * @returns {google.spanner.v1.Transaction} Transaction * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResultSet.decodeDelimited = function decodeDelimited(reader) { + Transaction.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResultSet message. + * Verifies a Transaction message. * @function verify - * @memberof google.spanner.v1.ResultSet + * @memberof google.spanner.v1.Transaction * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResultSet.verify = function verify(message) { + Transaction.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.spanner.v1.ResultSetMetadata.verify(message.metadata); + if (message.id != null && message.hasOwnProperty("id")) + if (!(message.id && typeof message.id.length === "number" || $util.isString(message.id))) + return "id: buffer expected"; + if (message.readTimestamp != null && message.hasOwnProperty("readTimestamp")) { + var error = $root.google.protobuf.Timestamp.verify(message.readTimestamp); if (error) - return "metadata." + error; - } - if (message.rows != null && message.hasOwnProperty("rows")) { - if (!Array.isArray(message.rows)) - return "rows: array expected"; - for (var i = 0; i < message.rows.length; ++i) { - var error = $root.google.protobuf.ListValue.verify(message.rows[i]); - if (error) - return "rows." + error; - } + return "readTimestamp." + error; } - if (message.stats != null && message.hasOwnProperty("stats")) { - var error = $root.google.spanner.v1.ResultSetStats.verify(message.stats); + if (message.precommitToken != null && message.hasOwnProperty("precommitToken")) { + var error = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.verify(message.precommitToken); if (error) - return "stats." + error; + return "precommitToken." + error; } return null; }; /** - * Creates a ResultSet message from a plain object. Also converts values to their respective internal types. + * Creates a Transaction message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.spanner.v1.ResultSet + * @memberof google.spanner.v1.Transaction * @static * @param {Object.} object Plain object - * @returns {google.spanner.v1.ResultSet} ResultSet + * @returns {google.spanner.v1.Transaction} Transaction */ - ResultSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.spanner.v1.ResultSet) + Transaction.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.v1.Transaction) return object; - var message = new $root.google.spanner.v1.ResultSet(); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.spanner.v1.ResultSet.metadata: object expected"); - message.metadata = $root.google.spanner.v1.ResultSetMetadata.fromObject(object.metadata); - } - if (object.rows) { - if (!Array.isArray(object.rows)) - throw TypeError(".google.spanner.v1.ResultSet.rows: array expected"); - message.rows = []; - for (var i = 0; i < object.rows.length; ++i) { - if (typeof object.rows[i] !== "object") - throw TypeError(".google.spanner.v1.ResultSet.rows: object expected"); - message.rows[i] = $root.google.protobuf.ListValue.fromObject(object.rows[i]); - } + var message = new $root.google.spanner.v1.Transaction(); + if (object.id != null) + if (typeof object.id === "string") + $util.base64.decode(object.id, message.id = $util.newBuffer($util.base64.length(object.id)), 0); + else if (object.id.length >= 0) + message.id = object.id; + if (object.readTimestamp != null) { + if (typeof object.readTimestamp !== "object") + throw TypeError(".google.spanner.v1.Transaction.readTimestamp: object expected"); + message.readTimestamp = $root.google.protobuf.Timestamp.fromObject(object.readTimestamp); } - if (object.stats != null) { - if (typeof object.stats !== "object") - throw TypeError(".google.spanner.v1.ResultSet.stats: object expected"); - message.stats = $root.google.spanner.v1.ResultSetStats.fromObject(object.stats); + if (object.precommitToken != null) { + if (typeof object.precommitToken !== "object") + throw TypeError(".google.spanner.v1.Transaction.precommitToken: object expected"); + message.precommitToken = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.fromObject(object.precommitToken); } return message; }; /** - * Creates a plain object from a ResultSet message. Also converts values to other types if specified. + * Creates a plain object from a Transaction message. Also converts values to other types if specified. * @function toObject - * @memberof google.spanner.v1.ResultSet + * @memberof google.spanner.v1.Transaction * @static - * @param {google.spanner.v1.ResultSet} message ResultSet + * @param {google.spanner.v1.Transaction} message Transaction * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResultSet.toObject = function toObject(message, options) { + Transaction.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.rows = []; if (options.defaults) { - object.metadata = null; - object.stats = null; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.spanner.v1.ResultSetMetadata.toObject(message.metadata, options); - if (message.rows && message.rows.length) { - object.rows = []; - for (var j = 0; j < message.rows.length; ++j) - object.rows[j] = $root.google.protobuf.ListValue.toObject(message.rows[j], options); + if (options.bytes === String) + object.id = ""; + else { + object.id = []; + if (options.bytes !== Array) + object.id = $util.newBuffer(object.id); + } + object.readTimestamp = null; + object.precommitToken = null; } - if (message.stats != null && message.hasOwnProperty("stats")) - object.stats = $root.google.spanner.v1.ResultSetStats.toObject(message.stats, options); + if (message.id != null && message.hasOwnProperty("id")) + object.id = options.bytes === String ? $util.base64.encode(message.id, 0, message.id.length) : options.bytes === Array ? Array.prototype.slice.call(message.id) : message.id; + if (message.readTimestamp != null && message.hasOwnProperty("readTimestamp")) + object.readTimestamp = $root.google.protobuf.Timestamp.toObject(message.readTimestamp, options); + if (message.precommitToken != null && message.hasOwnProperty("precommitToken")) + object.precommitToken = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.toObject(message.precommitToken, options); return object; }; /** - * Converts this ResultSet to JSON. + * Converts this Transaction to JSON. * @function toJSON - * @memberof google.spanner.v1.ResultSet + * @memberof google.spanner.v1.Transaction * @instance * @returns {Object.} JSON object */ - ResultSet.prototype.toJSON = function toJSON() { + Transaction.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResultSet + * Gets the default type url for Transaction * @function getTypeUrl - * @memberof google.spanner.v1.ResultSet + * @memberof google.spanner.v1.Transaction * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResultSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Transaction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.spanner.v1.ResultSet"; + return typeUrlPrefix + "/google.spanner.v1.Transaction"; }; - return ResultSet; + return Transaction; })(); - v1.PartialResultSet = (function() { + v1.TransactionSelector = (function() { /** - * Properties of a PartialResultSet. + * Properties of a TransactionSelector. * @memberof google.spanner.v1 - * @interface IPartialResultSet - * @property {google.spanner.v1.IResultSetMetadata|null} [metadata] PartialResultSet metadata - * @property {Array.|null} [values] PartialResultSet values - * @property {boolean|null} [chunkedValue] PartialResultSet chunkedValue - * @property {Uint8Array|null} [resumeToken] PartialResultSet resumeToken - * @property {google.spanner.v1.IResultSetStats|null} [stats] PartialResultSet stats + * @interface ITransactionSelector + * @property {google.spanner.v1.ITransactionOptions|null} [singleUse] TransactionSelector singleUse + * @property {Uint8Array|null} [id] TransactionSelector id + * @property {google.spanner.v1.ITransactionOptions|null} [begin] TransactionSelector begin */ /** - * Constructs a new PartialResultSet. + * Constructs a new TransactionSelector. * @memberof google.spanner.v1 - * @classdesc Represents a PartialResultSet. - * @implements IPartialResultSet + * @classdesc Represents a TransactionSelector. + * @implements ITransactionSelector * @constructor - * @param {google.spanner.v1.IPartialResultSet=} [properties] Properties to set + * @param {google.spanner.v1.ITransactionSelector=} [properties] Properties to set */ - function PartialResultSet(properties) { - this.values = []; + function TransactionSelector(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -81807,134 +82678,117 @@ } /** - * PartialResultSet metadata. - * @member {google.spanner.v1.IResultSetMetadata|null|undefined} metadata - * @memberof google.spanner.v1.PartialResultSet + * TransactionSelector singleUse. + * @member {google.spanner.v1.ITransactionOptions|null|undefined} singleUse + * @memberof google.spanner.v1.TransactionSelector * @instance */ - PartialResultSet.prototype.metadata = null; + TransactionSelector.prototype.singleUse = null; /** - * PartialResultSet values. - * @member {Array.} values - * @memberof google.spanner.v1.PartialResultSet + * TransactionSelector id. + * @member {Uint8Array|null|undefined} id + * @memberof google.spanner.v1.TransactionSelector * @instance */ - PartialResultSet.prototype.values = $util.emptyArray; + TransactionSelector.prototype.id = null; /** - * PartialResultSet chunkedValue. - * @member {boolean} chunkedValue - * @memberof google.spanner.v1.PartialResultSet + * TransactionSelector begin. + * @member {google.spanner.v1.ITransactionOptions|null|undefined} begin + * @memberof google.spanner.v1.TransactionSelector * @instance */ - PartialResultSet.prototype.chunkedValue = false; + TransactionSelector.prototype.begin = null; - /** - * PartialResultSet resumeToken. - * @member {Uint8Array} resumeToken - * @memberof google.spanner.v1.PartialResultSet - * @instance - */ - PartialResultSet.prototype.resumeToken = $util.newBuffer([]); + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * PartialResultSet stats. - * @member {google.spanner.v1.IResultSetStats|null|undefined} stats - * @memberof google.spanner.v1.PartialResultSet + * TransactionSelector selector. + * @member {"singleUse"|"id"|"begin"|undefined} selector + * @memberof google.spanner.v1.TransactionSelector * @instance */ - PartialResultSet.prototype.stats = null; + Object.defineProperty(TransactionSelector.prototype, "selector", { + get: $util.oneOfGetter($oneOfFields = ["singleUse", "id", "begin"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new PartialResultSet instance using the specified properties. + * Creates a new TransactionSelector instance using the specified properties. * @function create - * @memberof google.spanner.v1.PartialResultSet + * @memberof google.spanner.v1.TransactionSelector * @static - * @param {google.spanner.v1.IPartialResultSet=} [properties] Properties to set - * @returns {google.spanner.v1.PartialResultSet} PartialResultSet instance + * @param {google.spanner.v1.ITransactionSelector=} [properties] Properties to set + * @returns {google.spanner.v1.TransactionSelector} TransactionSelector instance */ - PartialResultSet.create = function create(properties) { - return new PartialResultSet(properties); + TransactionSelector.create = function create(properties) { + return new TransactionSelector(properties); }; /** - * Encodes the specified PartialResultSet message. Does not implicitly {@link google.spanner.v1.PartialResultSet.verify|verify} messages. + * Encodes the specified TransactionSelector message. Does not implicitly {@link google.spanner.v1.TransactionSelector.verify|verify} messages. * @function encode - * @memberof google.spanner.v1.PartialResultSet + * @memberof google.spanner.v1.TransactionSelector * @static - * @param {google.spanner.v1.IPartialResultSet} message PartialResultSet message or plain object to encode + * @param {google.spanner.v1.ITransactionSelector} message TransactionSelector message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PartialResultSet.encode = function encode(message, writer) { + TransactionSelector.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.spanner.v1.ResultSetMetadata.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.values != null && message.values.length) - for (var i = 0; i < message.values.length; ++i) - $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.chunkedValue != null && Object.hasOwnProperty.call(message, "chunkedValue")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.chunkedValue); - if (message.resumeToken != null && Object.hasOwnProperty.call(message, "resumeToken")) - writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.resumeToken); - if (message.stats != null && Object.hasOwnProperty.call(message, "stats")) - $root.google.spanner.v1.ResultSetStats.encode(message.stats, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.singleUse != null && Object.hasOwnProperty.call(message, "singleUse")) + $root.google.spanner.v1.TransactionOptions.encode(message.singleUse, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.id != null && Object.hasOwnProperty.call(message, "id")) + writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.id); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + $root.google.spanner.v1.TransactionOptions.encode(message.begin, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified PartialResultSet message, length delimited. Does not implicitly {@link google.spanner.v1.PartialResultSet.verify|verify} messages. + * Encodes the specified TransactionSelector message, length delimited. Does not implicitly {@link google.spanner.v1.TransactionSelector.verify|verify} messages. * @function encodeDelimited - * @memberof google.spanner.v1.PartialResultSet + * @memberof google.spanner.v1.TransactionSelector * @static - * @param {google.spanner.v1.IPartialResultSet} message PartialResultSet message or plain object to encode + * @param {google.spanner.v1.ITransactionSelector} message TransactionSelector message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PartialResultSet.encodeDelimited = function encodeDelimited(message, writer) { + TransactionSelector.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PartialResultSet message from the specified reader or buffer. + * Decodes a TransactionSelector message from the specified reader or buffer. * @function decode - * @memberof google.spanner.v1.PartialResultSet + * @memberof google.spanner.v1.TransactionSelector * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.spanner.v1.PartialResultSet} PartialResultSet + * @returns {google.spanner.v1.TransactionSelector} TransactionSelector * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PartialResultSet.decode = function decode(reader, length) { + TransactionSelector.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.PartialResultSet(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.TransactionSelector(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.metadata = $root.google.spanner.v1.ResultSetMetadata.decode(reader, reader.uint32()); + message.singleUse = $root.google.spanner.v1.TransactionOptions.decode(reader, reader.uint32()); break; } case 2: { - if (!(message.values && message.values.length)) - message.values = []; - message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + message.id = reader.bytes(); break; } case 3: { - message.chunkedValue = reader.bool(); - break; - } - case 4: { - message.resumeToken = reader.bytes(); - break; - } - case 5: { - message.stats = $root.google.spanner.v1.ResultSetStats.decode(reader, reader.uint32()); + message.begin = $root.google.spanner.v1.TransactionOptions.decode(reader, reader.uint32()); break; } default: @@ -81946,194 +82800,170 @@ }; /** - * Decodes a PartialResultSet message from the specified reader or buffer, length delimited. + * Decodes a TransactionSelector message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.spanner.v1.PartialResultSet + * @memberof google.spanner.v1.TransactionSelector * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.spanner.v1.PartialResultSet} PartialResultSet + * @returns {google.spanner.v1.TransactionSelector} TransactionSelector * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PartialResultSet.decodeDelimited = function decodeDelimited(reader) { + TransactionSelector.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PartialResultSet message. + * Verifies a TransactionSelector message. * @function verify - * @memberof google.spanner.v1.PartialResultSet + * @memberof google.spanner.v1.TransactionSelector * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PartialResultSet.verify = function verify(message) { + TransactionSelector.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.spanner.v1.ResultSetMetadata.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.values != null && message.hasOwnProperty("values")) { - if (!Array.isArray(message.values)) - return "values: array expected"; - for (var i = 0; i < message.values.length; ++i) { - var error = $root.google.protobuf.Value.verify(message.values[i]); + var properties = {}; + if (message.singleUse != null && message.hasOwnProperty("singleUse")) { + properties.selector = 1; + { + var error = $root.google.spanner.v1.TransactionOptions.verify(message.singleUse); if (error) - return "values." + error; + return "singleUse." + error; } } - if (message.chunkedValue != null && message.hasOwnProperty("chunkedValue")) - if (typeof message.chunkedValue !== "boolean") - return "chunkedValue: boolean expected"; - if (message.resumeToken != null && message.hasOwnProperty("resumeToken")) - if (!(message.resumeToken && typeof message.resumeToken.length === "number" || $util.isString(message.resumeToken))) - return "resumeToken: buffer expected"; - if (message.stats != null && message.hasOwnProperty("stats")) { - var error = $root.google.spanner.v1.ResultSetStats.verify(message.stats); - if (error) - return "stats." + error; + if (message.id != null && message.hasOwnProperty("id")) { + if (properties.selector === 1) + return "selector: multiple values"; + properties.selector = 1; + if (!(message.id && typeof message.id.length === "number" || $util.isString(message.id))) + return "id: buffer expected"; + } + if (message.begin != null && message.hasOwnProperty("begin")) { + if (properties.selector === 1) + return "selector: multiple values"; + properties.selector = 1; + { + var error = $root.google.spanner.v1.TransactionOptions.verify(message.begin); + if (error) + return "begin." + error; + } } return null; }; /** - * Creates a PartialResultSet message from a plain object. Also converts values to their respective internal types. + * Creates a TransactionSelector message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.spanner.v1.PartialResultSet + * @memberof google.spanner.v1.TransactionSelector * @static * @param {Object.} object Plain object - * @returns {google.spanner.v1.PartialResultSet} PartialResultSet + * @returns {google.spanner.v1.TransactionSelector} TransactionSelector */ - PartialResultSet.fromObject = function fromObject(object) { - if (object instanceof $root.google.spanner.v1.PartialResultSet) + TransactionSelector.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.v1.TransactionSelector) return object; - var message = new $root.google.spanner.v1.PartialResultSet(); - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.spanner.v1.PartialResultSet.metadata: object expected"); - message.metadata = $root.google.spanner.v1.ResultSetMetadata.fromObject(object.metadata); - } - if (object.values) { - if (!Array.isArray(object.values)) - throw TypeError(".google.spanner.v1.PartialResultSet.values: array expected"); - message.values = []; - for (var i = 0; i < object.values.length; ++i) { - if (typeof object.values[i] !== "object") - throw TypeError(".google.spanner.v1.PartialResultSet.values: object expected"); - message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); - } + var message = new $root.google.spanner.v1.TransactionSelector(); + if (object.singleUse != null) { + if (typeof object.singleUse !== "object") + throw TypeError(".google.spanner.v1.TransactionSelector.singleUse: object expected"); + message.singleUse = $root.google.spanner.v1.TransactionOptions.fromObject(object.singleUse); } - if (object.chunkedValue != null) - message.chunkedValue = Boolean(object.chunkedValue); - if (object.resumeToken != null) - if (typeof object.resumeToken === "string") - $util.base64.decode(object.resumeToken, message.resumeToken = $util.newBuffer($util.base64.length(object.resumeToken)), 0); - else if (object.resumeToken.length >= 0) - message.resumeToken = object.resumeToken; - if (object.stats != null) { - if (typeof object.stats !== "object") - throw TypeError(".google.spanner.v1.PartialResultSet.stats: object expected"); - message.stats = $root.google.spanner.v1.ResultSetStats.fromObject(object.stats); + if (object.id != null) + if (typeof object.id === "string") + $util.base64.decode(object.id, message.id = $util.newBuffer($util.base64.length(object.id)), 0); + else if (object.id.length >= 0) + message.id = object.id; + if (object.begin != null) { + if (typeof object.begin !== "object") + throw TypeError(".google.spanner.v1.TransactionSelector.begin: object expected"); + message.begin = $root.google.spanner.v1.TransactionOptions.fromObject(object.begin); } return message; }; /** - * Creates a plain object from a PartialResultSet message. Also converts values to other types if specified. + * Creates a plain object from a TransactionSelector message. Also converts values to other types if specified. * @function toObject - * @memberof google.spanner.v1.PartialResultSet + * @memberof google.spanner.v1.TransactionSelector * @static - * @param {google.spanner.v1.PartialResultSet} message PartialResultSet + * @param {google.spanner.v1.TransactionSelector} message TransactionSelector * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PartialResultSet.toObject = function toObject(message, options) { + TransactionSelector.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.values = []; - if (options.defaults) { - object.metadata = null; - object.chunkedValue = false; - if (options.bytes === String) - object.resumeToken = ""; - else { - object.resumeToken = []; - if (options.bytes !== Array) - object.resumeToken = $util.newBuffer(object.resumeToken); - } - object.stats = null; + if (message.singleUse != null && message.hasOwnProperty("singleUse")) { + object.singleUse = $root.google.spanner.v1.TransactionOptions.toObject(message.singleUse, options); + if (options.oneofs) + object.selector = "singleUse"; } - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.spanner.v1.ResultSetMetadata.toObject(message.metadata, options); - if (message.values && message.values.length) { - object.values = []; - for (var j = 0; j < message.values.length; ++j) - object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); + if (message.id != null && message.hasOwnProperty("id")) { + object.id = options.bytes === String ? $util.base64.encode(message.id, 0, message.id.length) : options.bytes === Array ? Array.prototype.slice.call(message.id) : message.id; + if (options.oneofs) + object.selector = "id"; + } + if (message.begin != null && message.hasOwnProperty("begin")) { + object.begin = $root.google.spanner.v1.TransactionOptions.toObject(message.begin, options); + if (options.oneofs) + object.selector = "begin"; } - if (message.chunkedValue != null && message.hasOwnProperty("chunkedValue")) - object.chunkedValue = message.chunkedValue; - if (message.resumeToken != null && message.hasOwnProperty("resumeToken")) - object.resumeToken = options.bytes === String ? $util.base64.encode(message.resumeToken, 0, message.resumeToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.resumeToken) : message.resumeToken; - if (message.stats != null && message.hasOwnProperty("stats")) - object.stats = $root.google.spanner.v1.ResultSetStats.toObject(message.stats, options); return object; }; /** - * Converts this PartialResultSet to JSON. + * Converts this TransactionSelector to JSON. * @function toJSON - * @memberof google.spanner.v1.PartialResultSet + * @memberof google.spanner.v1.TransactionSelector * @instance * @returns {Object.} JSON object */ - PartialResultSet.prototype.toJSON = function toJSON() { + TransactionSelector.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PartialResultSet + * Gets the default type url for TransactionSelector * @function getTypeUrl - * @memberof google.spanner.v1.PartialResultSet + * @memberof google.spanner.v1.TransactionSelector * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PartialResultSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + TransactionSelector.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.spanner.v1.PartialResultSet"; + return typeUrlPrefix + "/google.spanner.v1.TransactionSelector"; }; - return PartialResultSet; + return TransactionSelector; })(); - v1.ResultSetMetadata = (function() { + v1.MultiplexedSessionPrecommitToken = (function() { /** - * Properties of a ResultSetMetadata. + * Properties of a MultiplexedSessionPrecommitToken. * @memberof google.spanner.v1 - * @interface IResultSetMetadata - * @property {google.spanner.v1.IStructType|null} [rowType] ResultSetMetadata rowType - * @property {google.spanner.v1.ITransaction|null} [transaction] ResultSetMetadata transaction - * @property {google.spanner.v1.IStructType|null} [undeclaredParameters] ResultSetMetadata undeclaredParameters + * @interface IMultiplexedSessionPrecommitToken + * @property {Uint8Array|null} [precommitToken] MultiplexedSessionPrecommitToken precommitToken + * @property {number|null} [seqNum] MultiplexedSessionPrecommitToken seqNum */ /** - * Constructs a new ResultSetMetadata. + * Constructs a new MultiplexedSessionPrecommitToken. * @memberof google.spanner.v1 - * @classdesc Represents a ResultSetMetadata. - * @implements IResultSetMetadata + * @classdesc Represents a MultiplexedSessionPrecommitToken. + * @implements IMultiplexedSessionPrecommitToken * @constructor - * @param {google.spanner.v1.IResultSetMetadata=} [properties] Properties to set + * @param {google.spanner.v1.IMultiplexedSessionPrecommitToken=} [properties] Properties to set */ - function ResultSetMetadata(properties) { + function MultiplexedSessionPrecommitToken(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -82141,103 +82971,89 @@ } /** - * ResultSetMetadata rowType. - * @member {google.spanner.v1.IStructType|null|undefined} rowType - * @memberof google.spanner.v1.ResultSetMetadata - * @instance - */ - ResultSetMetadata.prototype.rowType = null; - - /** - * ResultSetMetadata transaction. - * @member {google.spanner.v1.ITransaction|null|undefined} transaction - * @memberof google.spanner.v1.ResultSetMetadata + * MultiplexedSessionPrecommitToken precommitToken. + * @member {Uint8Array} precommitToken + * @memberof google.spanner.v1.MultiplexedSessionPrecommitToken * @instance */ - ResultSetMetadata.prototype.transaction = null; + MultiplexedSessionPrecommitToken.prototype.precommitToken = $util.newBuffer([]); /** - * ResultSetMetadata undeclaredParameters. - * @member {google.spanner.v1.IStructType|null|undefined} undeclaredParameters - * @memberof google.spanner.v1.ResultSetMetadata + * MultiplexedSessionPrecommitToken seqNum. + * @member {number} seqNum + * @memberof google.spanner.v1.MultiplexedSessionPrecommitToken * @instance */ - ResultSetMetadata.prototype.undeclaredParameters = null; + MultiplexedSessionPrecommitToken.prototype.seqNum = 0; /** - * Creates a new ResultSetMetadata instance using the specified properties. + * Creates a new MultiplexedSessionPrecommitToken instance using the specified properties. * @function create - * @memberof google.spanner.v1.ResultSetMetadata + * @memberof google.spanner.v1.MultiplexedSessionPrecommitToken * @static - * @param {google.spanner.v1.IResultSetMetadata=} [properties] Properties to set - * @returns {google.spanner.v1.ResultSetMetadata} ResultSetMetadata instance + * @param {google.spanner.v1.IMultiplexedSessionPrecommitToken=} [properties] Properties to set + * @returns {google.spanner.v1.MultiplexedSessionPrecommitToken} MultiplexedSessionPrecommitToken instance */ - ResultSetMetadata.create = function create(properties) { - return new ResultSetMetadata(properties); + MultiplexedSessionPrecommitToken.create = function create(properties) { + return new MultiplexedSessionPrecommitToken(properties); }; /** - * Encodes the specified ResultSetMetadata message. Does not implicitly {@link google.spanner.v1.ResultSetMetadata.verify|verify} messages. + * Encodes the specified MultiplexedSessionPrecommitToken message. Does not implicitly {@link google.spanner.v1.MultiplexedSessionPrecommitToken.verify|verify} messages. * @function encode - * @memberof google.spanner.v1.ResultSetMetadata + * @memberof google.spanner.v1.MultiplexedSessionPrecommitToken * @static - * @param {google.spanner.v1.IResultSetMetadata} message ResultSetMetadata message or plain object to encode + * @param {google.spanner.v1.IMultiplexedSessionPrecommitToken} message MultiplexedSessionPrecommitToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResultSetMetadata.encode = function encode(message, writer) { + MultiplexedSessionPrecommitToken.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.rowType != null && Object.hasOwnProperty.call(message, "rowType")) - $root.google.spanner.v1.StructType.encode(message.rowType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.transaction != null && Object.hasOwnProperty.call(message, "transaction")) - $root.google.spanner.v1.Transaction.encode(message.transaction, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.undeclaredParameters != null && Object.hasOwnProperty.call(message, "undeclaredParameters")) - $root.google.spanner.v1.StructType.encode(message.undeclaredParameters, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.precommitToken != null && Object.hasOwnProperty.call(message, "precommitToken")) + writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.precommitToken); + if (message.seqNum != null && Object.hasOwnProperty.call(message, "seqNum")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.seqNum); return writer; }; /** - * Encodes the specified ResultSetMetadata message, length delimited. Does not implicitly {@link google.spanner.v1.ResultSetMetadata.verify|verify} messages. + * Encodes the specified MultiplexedSessionPrecommitToken message, length delimited. Does not implicitly {@link google.spanner.v1.MultiplexedSessionPrecommitToken.verify|verify} messages. * @function encodeDelimited - * @memberof google.spanner.v1.ResultSetMetadata + * @memberof google.spanner.v1.MultiplexedSessionPrecommitToken * @static - * @param {google.spanner.v1.IResultSetMetadata} message ResultSetMetadata message or plain object to encode + * @param {google.spanner.v1.IMultiplexedSessionPrecommitToken} message MultiplexedSessionPrecommitToken message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResultSetMetadata.encodeDelimited = function encodeDelimited(message, writer) { + MultiplexedSessionPrecommitToken.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResultSetMetadata message from the specified reader or buffer. + * Decodes a MultiplexedSessionPrecommitToken message from the specified reader or buffer. * @function decode - * @memberof google.spanner.v1.ResultSetMetadata + * @memberof google.spanner.v1.MultiplexedSessionPrecommitToken * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.spanner.v1.ResultSetMetadata} ResultSetMetadata + * @returns {google.spanner.v1.MultiplexedSessionPrecommitToken} MultiplexedSessionPrecommitToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResultSetMetadata.decode = function decode(reader, length) { + MultiplexedSessionPrecommitToken.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.ResultSetMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.MultiplexedSessionPrecommitToken(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.rowType = $root.google.spanner.v1.StructType.decode(reader, reader.uint32()); + message.precommitToken = reader.bytes(); break; } case 2: { - message.transaction = $root.google.spanner.v1.Transaction.decode(reader, reader.uint32()); - break; - } - case 3: { - message.undeclaredParameters = $root.google.spanner.v1.StructType.decode(reader, reader.uint32()); + message.seqNum = reader.int32(); break; } default: @@ -82249,157 +83065,143 @@ }; /** - * Decodes a ResultSetMetadata message from the specified reader or buffer, length delimited. + * Decodes a MultiplexedSessionPrecommitToken message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.spanner.v1.ResultSetMetadata + * @memberof google.spanner.v1.MultiplexedSessionPrecommitToken * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.spanner.v1.ResultSetMetadata} ResultSetMetadata + * @returns {google.spanner.v1.MultiplexedSessionPrecommitToken} MultiplexedSessionPrecommitToken * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResultSetMetadata.decodeDelimited = function decodeDelimited(reader) { + MultiplexedSessionPrecommitToken.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResultSetMetadata message. + * Verifies a MultiplexedSessionPrecommitToken message. * @function verify - * @memberof google.spanner.v1.ResultSetMetadata + * @memberof google.spanner.v1.MultiplexedSessionPrecommitToken * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResultSetMetadata.verify = function verify(message) { + MultiplexedSessionPrecommitToken.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.rowType != null && message.hasOwnProperty("rowType")) { - var error = $root.google.spanner.v1.StructType.verify(message.rowType); - if (error) - return "rowType." + error; - } - if (message.transaction != null && message.hasOwnProperty("transaction")) { - var error = $root.google.spanner.v1.Transaction.verify(message.transaction); - if (error) - return "transaction." + error; - } - if (message.undeclaredParameters != null && message.hasOwnProperty("undeclaredParameters")) { - var error = $root.google.spanner.v1.StructType.verify(message.undeclaredParameters); - if (error) - return "undeclaredParameters." + error; - } + if (message.precommitToken != null && message.hasOwnProperty("precommitToken")) + if (!(message.precommitToken && typeof message.precommitToken.length === "number" || $util.isString(message.precommitToken))) + return "precommitToken: buffer expected"; + if (message.seqNum != null && message.hasOwnProperty("seqNum")) + if (!$util.isInteger(message.seqNum)) + return "seqNum: integer expected"; return null; }; /** - * Creates a ResultSetMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a MultiplexedSessionPrecommitToken message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.spanner.v1.ResultSetMetadata + * @memberof google.spanner.v1.MultiplexedSessionPrecommitToken * @static * @param {Object.} object Plain object - * @returns {google.spanner.v1.ResultSetMetadata} ResultSetMetadata + * @returns {google.spanner.v1.MultiplexedSessionPrecommitToken} MultiplexedSessionPrecommitToken */ - ResultSetMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.spanner.v1.ResultSetMetadata) + MultiplexedSessionPrecommitToken.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.v1.MultiplexedSessionPrecommitToken) return object; - var message = new $root.google.spanner.v1.ResultSetMetadata(); - if (object.rowType != null) { - if (typeof object.rowType !== "object") - throw TypeError(".google.spanner.v1.ResultSetMetadata.rowType: object expected"); - message.rowType = $root.google.spanner.v1.StructType.fromObject(object.rowType); - } - if (object.transaction != null) { - if (typeof object.transaction !== "object") - throw TypeError(".google.spanner.v1.ResultSetMetadata.transaction: object expected"); - message.transaction = $root.google.spanner.v1.Transaction.fromObject(object.transaction); - } - if (object.undeclaredParameters != null) { - if (typeof object.undeclaredParameters !== "object") - throw TypeError(".google.spanner.v1.ResultSetMetadata.undeclaredParameters: object expected"); - message.undeclaredParameters = $root.google.spanner.v1.StructType.fromObject(object.undeclaredParameters); - } + var message = new $root.google.spanner.v1.MultiplexedSessionPrecommitToken(); + if (object.precommitToken != null) + if (typeof object.precommitToken === "string") + $util.base64.decode(object.precommitToken, message.precommitToken = $util.newBuffer($util.base64.length(object.precommitToken)), 0); + else if (object.precommitToken.length >= 0) + message.precommitToken = object.precommitToken; + if (object.seqNum != null) + message.seqNum = object.seqNum | 0; return message; }; /** - * Creates a plain object from a ResultSetMetadata message. Also converts values to other types if specified. + * Creates a plain object from a MultiplexedSessionPrecommitToken message. Also converts values to other types if specified. * @function toObject - * @memberof google.spanner.v1.ResultSetMetadata + * @memberof google.spanner.v1.MultiplexedSessionPrecommitToken * @static - * @param {google.spanner.v1.ResultSetMetadata} message ResultSetMetadata + * @param {google.spanner.v1.MultiplexedSessionPrecommitToken} message MultiplexedSessionPrecommitToken * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResultSetMetadata.toObject = function toObject(message, options) { + MultiplexedSessionPrecommitToken.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.rowType = null; - object.transaction = null; - object.undeclaredParameters = null; + if (options.bytes === String) + object.precommitToken = ""; + else { + object.precommitToken = []; + if (options.bytes !== Array) + object.precommitToken = $util.newBuffer(object.precommitToken); + } + object.seqNum = 0; } - if (message.rowType != null && message.hasOwnProperty("rowType")) - object.rowType = $root.google.spanner.v1.StructType.toObject(message.rowType, options); - if (message.transaction != null && message.hasOwnProperty("transaction")) - object.transaction = $root.google.spanner.v1.Transaction.toObject(message.transaction, options); - if (message.undeclaredParameters != null && message.hasOwnProperty("undeclaredParameters")) - object.undeclaredParameters = $root.google.spanner.v1.StructType.toObject(message.undeclaredParameters, options); + if (message.precommitToken != null && message.hasOwnProperty("precommitToken")) + object.precommitToken = options.bytes === String ? $util.base64.encode(message.precommitToken, 0, message.precommitToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.precommitToken) : message.precommitToken; + if (message.seqNum != null && message.hasOwnProperty("seqNum")) + object.seqNum = message.seqNum; return object; }; /** - * Converts this ResultSetMetadata to JSON. + * Converts this MultiplexedSessionPrecommitToken to JSON. * @function toJSON - * @memberof google.spanner.v1.ResultSetMetadata + * @memberof google.spanner.v1.MultiplexedSessionPrecommitToken * @instance * @returns {Object.} JSON object */ - ResultSetMetadata.prototype.toJSON = function toJSON() { + MultiplexedSessionPrecommitToken.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResultSetMetadata + * Gets the default type url for MultiplexedSessionPrecommitToken * @function getTypeUrl - * @memberof google.spanner.v1.ResultSetMetadata + * @memberof google.spanner.v1.MultiplexedSessionPrecommitToken * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResultSetMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MultiplexedSessionPrecommitToken.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.spanner.v1.ResultSetMetadata"; + return typeUrlPrefix + "/google.spanner.v1.MultiplexedSessionPrecommitToken"; }; - return ResultSetMetadata; + return MultiplexedSessionPrecommitToken; })(); - v1.ResultSetStats = (function() { + v1.KeyRange = (function() { /** - * Properties of a ResultSetStats. + * Properties of a KeyRange. * @memberof google.spanner.v1 - * @interface IResultSetStats - * @property {google.spanner.v1.IQueryPlan|null} [queryPlan] ResultSetStats queryPlan - * @property {google.protobuf.IStruct|null} [queryStats] ResultSetStats queryStats - * @property {number|Long|null} [rowCountExact] ResultSetStats rowCountExact - * @property {number|Long|null} [rowCountLowerBound] ResultSetStats rowCountLowerBound + * @interface IKeyRange + * @property {google.protobuf.IListValue|null} [startClosed] KeyRange startClosed + * @property {google.protobuf.IListValue|null} [startOpen] KeyRange startOpen + * @property {google.protobuf.IListValue|null} [endClosed] KeyRange endClosed + * @property {google.protobuf.IListValue|null} [endOpen] KeyRange endOpen */ /** - * Constructs a new ResultSetStats. + * Constructs a new KeyRange. * @memberof google.spanner.v1 - * @classdesc Represents a ResultSetStats. - * @implements IResultSetStats + * @classdesc Represents a KeyRange. + * @implements IKeyRange * @constructor - * @param {google.spanner.v1.IResultSetStats=} [properties] Properties to set + * @param {google.spanner.v1.IKeyRange=} [properties] Properties to set */ - function ResultSetStats(properties) { + function KeyRange(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -82407,131 +83209,142 @@ } /** - * ResultSetStats queryPlan. - * @member {google.spanner.v1.IQueryPlan|null|undefined} queryPlan - * @memberof google.spanner.v1.ResultSetStats + * KeyRange startClosed. + * @member {google.protobuf.IListValue|null|undefined} startClosed + * @memberof google.spanner.v1.KeyRange * @instance */ - ResultSetStats.prototype.queryPlan = null; + KeyRange.prototype.startClosed = null; /** - * ResultSetStats queryStats. - * @member {google.protobuf.IStruct|null|undefined} queryStats - * @memberof google.spanner.v1.ResultSetStats + * KeyRange startOpen. + * @member {google.protobuf.IListValue|null|undefined} startOpen + * @memberof google.spanner.v1.KeyRange * @instance */ - ResultSetStats.prototype.queryStats = null; + KeyRange.prototype.startOpen = null; /** - * ResultSetStats rowCountExact. - * @member {number|Long|null|undefined} rowCountExact - * @memberof google.spanner.v1.ResultSetStats + * KeyRange endClosed. + * @member {google.protobuf.IListValue|null|undefined} endClosed + * @memberof google.spanner.v1.KeyRange * @instance */ - ResultSetStats.prototype.rowCountExact = null; + KeyRange.prototype.endClosed = null; /** - * ResultSetStats rowCountLowerBound. - * @member {number|Long|null|undefined} rowCountLowerBound - * @memberof google.spanner.v1.ResultSetStats + * KeyRange endOpen. + * @member {google.protobuf.IListValue|null|undefined} endOpen + * @memberof google.spanner.v1.KeyRange * @instance */ - ResultSetStats.prototype.rowCountLowerBound = null; + KeyRange.prototype.endOpen = null; // OneOf field names bound to virtual getters and setters var $oneOfFields; /** - * ResultSetStats rowCount. - * @member {"rowCountExact"|"rowCountLowerBound"|undefined} rowCount - * @memberof google.spanner.v1.ResultSetStats + * KeyRange startKeyType. + * @member {"startClosed"|"startOpen"|undefined} startKeyType + * @memberof google.spanner.v1.KeyRange * @instance */ - Object.defineProperty(ResultSetStats.prototype, "rowCount", { - get: $util.oneOfGetter($oneOfFields = ["rowCountExact", "rowCountLowerBound"]), + Object.defineProperty(KeyRange.prototype, "startKeyType", { + get: $util.oneOfGetter($oneOfFields = ["startClosed", "startOpen"]), set: $util.oneOfSetter($oneOfFields) }); /** - * Creates a new ResultSetStats instance using the specified properties. + * KeyRange endKeyType. + * @member {"endClosed"|"endOpen"|undefined} endKeyType + * @memberof google.spanner.v1.KeyRange + * @instance + */ + Object.defineProperty(KeyRange.prototype, "endKeyType", { + get: $util.oneOfGetter($oneOfFields = ["endClosed", "endOpen"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new KeyRange instance using the specified properties. * @function create - * @memberof google.spanner.v1.ResultSetStats + * @memberof google.spanner.v1.KeyRange * @static - * @param {google.spanner.v1.IResultSetStats=} [properties] Properties to set - * @returns {google.spanner.v1.ResultSetStats} ResultSetStats instance + * @param {google.spanner.v1.IKeyRange=} [properties] Properties to set + * @returns {google.spanner.v1.KeyRange} KeyRange instance */ - ResultSetStats.create = function create(properties) { - return new ResultSetStats(properties); + KeyRange.create = function create(properties) { + return new KeyRange(properties); }; /** - * Encodes the specified ResultSetStats message. Does not implicitly {@link google.spanner.v1.ResultSetStats.verify|verify} messages. + * Encodes the specified KeyRange message. Does not implicitly {@link google.spanner.v1.KeyRange.verify|verify} messages. * @function encode - * @memberof google.spanner.v1.ResultSetStats + * @memberof google.spanner.v1.KeyRange * @static - * @param {google.spanner.v1.IResultSetStats} message ResultSetStats message or plain object to encode + * @param {google.spanner.v1.IKeyRange} message KeyRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResultSetStats.encode = function encode(message, writer) { + KeyRange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.queryPlan != null && Object.hasOwnProperty.call(message, "queryPlan")) - $root.google.spanner.v1.QueryPlan.encode(message.queryPlan, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.queryStats != null && Object.hasOwnProperty.call(message, "queryStats")) - $root.google.protobuf.Struct.encode(message.queryStats, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.rowCountExact != null && Object.hasOwnProperty.call(message, "rowCountExact")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.rowCountExact); - if (message.rowCountLowerBound != null && Object.hasOwnProperty.call(message, "rowCountLowerBound")) - writer.uint32(/* id 4, wireType 0 =*/32).int64(message.rowCountLowerBound); + if (message.startClosed != null && Object.hasOwnProperty.call(message, "startClosed")) + $root.google.protobuf.ListValue.encode(message.startClosed, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.startOpen != null && Object.hasOwnProperty.call(message, "startOpen")) + $root.google.protobuf.ListValue.encode(message.startOpen, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.endClosed != null && Object.hasOwnProperty.call(message, "endClosed")) + $root.google.protobuf.ListValue.encode(message.endClosed, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.endOpen != null && Object.hasOwnProperty.call(message, "endOpen")) + $root.google.protobuf.ListValue.encode(message.endOpen, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ResultSetStats message, length delimited. Does not implicitly {@link google.spanner.v1.ResultSetStats.verify|verify} messages. + * Encodes the specified KeyRange message, length delimited. Does not implicitly {@link google.spanner.v1.KeyRange.verify|verify} messages. * @function encodeDelimited - * @memberof google.spanner.v1.ResultSetStats + * @memberof google.spanner.v1.KeyRange * @static - * @param {google.spanner.v1.IResultSetStats} message ResultSetStats message or plain object to encode + * @param {google.spanner.v1.IKeyRange} message KeyRange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResultSetStats.encodeDelimited = function encodeDelimited(message, writer) { + KeyRange.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResultSetStats message from the specified reader or buffer. + * Decodes a KeyRange message from the specified reader or buffer. * @function decode - * @memberof google.spanner.v1.ResultSetStats + * @memberof google.spanner.v1.KeyRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.spanner.v1.ResultSetStats} ResultSetStats + * @returns {google.spanner.v1.KeyRange} KeyRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResultSetStats.decode = function decode(reader, length) { + KeyRange.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.ResultSetStats(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.KeyRange(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.queryPlan = $root.google.spanner.v1.QueryPlan.decode(reader, reader.uint32()); + message.startClosed = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); break; } case 2: { - message.queryStats = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + message.startOpen = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); break; } case 3: { - message.rowCountExact = reader.int64(); + message.endClosed = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); break; } case 4: { - message.rowCountLowerBound = reader.int64(); + message.endOpen = $root.google.protobuf.ListValue.decode(reader, reader.uint32()); break; } default: @@ -82543,195 +83356,194 @@ }; /** - * Decodes a ResultSetStats message from the specified reader or buffer, length delimited. + * Decodes a KeyRange message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.spanner.v1.ResultSetStats + * @memberof google.spanner.v1.KeyRange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.spanner.v1.ResultSetStats} ResultSetStats + * @returns {google.spanner.v1.KeyRange} KeyRange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ResultSetStats.decodeDelimited = function decodeDelimited(reader) { + KeyRange.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ResultSetStats message. + * Verifies a KeyRange message. * @function verify - * @memberof google.spanner.v1.ResultSetStats + * @memberof google.spanner.v1.KeyRange * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ResultSetStats.verify = function verify(message) { + KeyRange.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; var properties = {}; - if (message.queryPlan != null && message.hasOwnProperty("queryPlan")) { - var error = $root.google.spanner.v1.QueryPlan.verify(message.queryPlan); - if (error) - return "queryPlan." + error; + if (message.startClosed != null && message.hasOwnProperty("startClosed")) { + properties.startKeyType = 1; + { + var error = $root.google.protobuf.ListValue.verify(message.startClosed); + if (error) + return "startClosed." + error; + } } - if (message.queryStats != null && message.hasOwnProperty("queryStats")) { - var error = $root.google.protobuf.Struct.verify(message.queryStats); - if (error) - return "queryStats." + error; + if (message.startOpen != null && message.hasOwnProperty("startOpen")) { + if (properties.startKeyType === 1) + return "startKeyType: multiple values"; + properties.startKeyType = 1; + { + var error = $root.google.protobuf.ListValue.verify(message.startOpen); + if (error) + return "startOpen." + error; + } } - if (message.rowCountExact != null && message.hasOwnProperty("rowCountExact")) { - properties.rowCount = 1; - if (!$util.isInteger(message.rowCountExact) && !(message.rowCountExact && $util.isInteger(message.rowCountExact.low) && $util.isInteger(message.rowCountExact.high))) - return "rowCountExact: integer|Long expected"; + if (message.endClosed != null && message.hasOwnProperty("endClosed")) { + properties.endKeyType = 1; + { + var error = $root.google.protobuf.ListValue.verify(message.endClosed); + if (error) + return "endClosed." + error; + } } - if (message.rowCountLowerBound != null && message.hasOwnProperty("rowCountLowerBound")) { - if (properties.rowCount === 1) - return "rowCount: multiple values"; - properties.rowCount = 1; - if (!$util.isInteger(message.rowCountLowerBound) && !(message.rowCountLowerBound && $util.isInteger(message.rowCountLowerBound.low) && $util.isInteger(message.rowCountLowerBound.high))) - return "rowCountLowerBound: integer|Long expected"; + if (message.endOpen != null && message.hasOwnProperty("endOpen")) { + if (properties.endKeyType === 1) + return "endKeyType: multiple values"; + properties.endKeyType = 1; + { + var error = $root.google.protobuf.ListValue.verify(message.endOpen); + if (error) + return "endOpen." + error; + } } return null; }; /** - * Creates a ResultSetStats message from a plain object. Also converts values to their respective internal types. + * Creates a KeyRange message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.spanner.v1.ResultSetStats + * @memberof google.spanner.v1.KeyRange * @static * @param {Object.} object Plain object - * @returns {google.spanner.v1.ResultSetStats} ResultSetStats + * @returns {google.spanner.v1.KeyRange} KeyRange */ - ResultSetStats.fromObject = function fromObject(object) { - if (object instanceof $root.google.spanner.v1.ResultSetStats) + KeyRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.v1.KeyRange) return object; - var message = new $root.google.spanner.v1.ResultSetStats(); - if (object.queryPlan != null) { - if (typeof object.queryPlan !== "object") - throw TypeError(".google.spanner.v1.ResultSetStats.queryPlan: object expected"); - message.queryPlan = $root.google.spanner.v1.QueryPlan.fromObject(object.queryPlan); + var message = new $root.google.spanner.v1.KeyRange(); + if (object.startClosed != null) { + if (typeof object.startClosed !== "object") + throw TypeError(".google.spanner.v1.KeyRange.startClosed: object expected"); + message.startClosed = $root.google.protobuf.ListValue.fromObject(object.startClosed); } - if (object.queryStats != null) { - if (typeof object.queryStats !== "object") - throw TypeError(".google.spanner.v1.ResultSetStats.queryStats: object expected"); - message.queryStats = $root.google.protobuf.Struct.fromObject(object.queryStats); + if (object.startOpen != null) { + if (typeof object.startOpen !== "object") + throw TypeError(".google.spanner.v1.KeyRange.startOpen: object expected"); + message.startOpen = $root.google.protobuf.ListValue.fromObject(object.startOpen); + } + if (object.endClosed != null) { + if (typeof object.endClosed !== "object") + throw TypeError(".google.spanner.v1.KeyRange.endClosed: object expected"); + message.endClosed = $root.google.protobuf.ListValue.fromObject(object.endClosed); + } + if (object.endOpen != null) { + if (typeof object.endOpen !== "object") + throw TypeError(".google.spanner.v1.KeyRange.endOpen: object expected"); + message.endOpen = $root.google.protobuf.ListValue.fromObject(object.endOpen); } - if (object.rowCountExact != null) - if ($util.Long) - (message.rowCountExact = $util.Long.fromValue(object.rowCountExact)).unsigned = false; - else if (typeof object.rowCountExact === "string") - message.rowCountExact = parseInt(object.rowCountExact, 10); - else if (typeof object.rowCountExact === "number") - message.rowCountExact = object.rowCountExact; - else if (typeof object.rowCountExact === "object") - message.rowCountExact = new $util.LongBits(object.rowCountExact.low >>> 0, object.rowCountExact.high >>> 0).toNumber(); - if (object.rowCountLowerBound != null) - if ($util.Long) - (message.rowCountLowerBound = $util.Long.fromValue(object.rowCountLowerBound)).unsigned = false; - else if (typeof object.rowCountLowerBound === "string") - message.rowCountLowerBound = parseInt(object.rowCountLowerBound, 10); - else if (typeof object.rowCountLowerBound === "number") - message.rowCountLowerBound = object.rowCountLowerBound; - else if (typeof object.rowCountLowerBound === "object") - message.rowCountLowerBound = new $util.LongBits(object.rowCountLowerBound.low >>> 0, object.rowCountLowerBound.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a ResultSetStats message. Also converts values to other types if specified. + * Creates a plain object from a KeyRange message. Also converts values to other types if specified. * @function toObject - * @memberof google.spanner.v1.ResultSetStats + * @memberof google.spanner.v1.KeyRange * @static - * @param {google.spanner.v1.ResultSetStats} message ResultSetStats + * @param {google.spanner.v1.KeyRange} message KeyRange * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResultSetStats.toObject = function toObject(message, options) { + KeyRange.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.queryPlan = null; - object.queryStats = null; + if (message.startClosed != null && message.hasOwnProperty("startClosed")) { + object.startClosed = $root.google.protobuf.ListValue.toObject(message.startClosed, options); + if (options.oneofs) + object.startKeyType = "startClosed"; } - if (message.queryPlan != null && message.hasOwnProperty("queryPlan")) - object.queryPlan = $root.google.spanner.v1.QueryPlan.toObject(message.queryPlan, options); - if (message.queryStats != null && message.hasOwnProperty("queryStats")) - object.queryStats = $root.google.protobuf.Struct.toObject(message.queryStats, options); - if (message.rowCountExact != null && message.hasOwnProperty("rowCountExact")) { - if (typeof message.rowCountExact === "number") - object.rowCountExact = options.longs === String ? String(message.rowCountExact) : message.rowCountExact; - else - object.rowCountExact = options.longs === String ? $util.Long.prototype.toString.call(message.rowCountExact) : options.longs === Number ? new $util.LongBits(message.rowCountExact.low >>> 0, message.rowCountExact.high >>> 0).toNumber() : message.rowCountExact; + if (message.startOpen != null && message.hasOwnProperty("startOpen")) { + object.startOpen = $root.google.protobuf.ListValue.toObject(message.startOpen, options); if (options.oneofs) - object.rowCount = "rowCountExact"; + object.startKeyType = "startOpen"; } - if (message.rowCountLowerBound != null && message.hasOwnProperty("rowCountLowerBound")) { - if (typeof message.rowCountLowerBound === "number") - object.rowCountLowerBound = options.longs === String ? String(message.rowCountLowerBound) : message.rowCountLowerBound; - else - object.rowCountLowerBound = options.longs === String ? $util.Long.prototype.toString.call(message.rowCountLowerBound) : options.longs === Number ? new $util.LongBits(message.rowCountLowerBound.low >>> 0, message.rowCountLowerBound.high >>> 0).toNumber() : message.rowCountLowerBound; + if (message.endClosed != null && message.hasOwnProperty("endClosed")) { + object.endClosed = $root.google.protobuf.ListValue.toObject(message.endClosed, options); if (options.oneofs) - object.rowCount = "rowCountLowerBound"; + object.endKeyType = "endClosed"; + } + if (message.endOpen != null && message.hasOwnProperty("endOpen")) { + object.endOpen = $root.google.protobuf.ListValue.toObject(message.endOpen, options); + if (options.oneofs) + object.endKeyType = "endOpen"; } return object; }; /** - * Converts this ResultSetStats to JSON. + * Converts this KeyRange to JSON. * @function toJSON - * @memberof google.spanner.v1.ResultSetStats + * @memberof google.spanner.v1.KeyRange * @instance * @returns {Object.} JSON object */ - ResultSetStats.prototype.toJSON = function toJSON() { + KeyRange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResultSetStats + * Gets the default type url for KeyRange * @function getTypeUrl - * @memberof google.spanner.v1.ResultSetStats + * @memberof google.spanner.v1.KeyRange * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResultSetStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + KeyRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.spanner.v1.ResultSetStats"; + return typeUrlPrefix + "/google.spanner.v1.KeyRange"; }; - return ResultSetStats; + return KeyRange; })(); - v1.PlanNode = (function() { + v1.KeySet = (function() { /** - * Properties of a PlanNode. + * Properties of a KeySet. * @memberof google.spanner.v1 - * @interface IPlanNode - * @property {number|null} [index] PlanNode index - * @property {google.spanner.v1.PlanNode.Kind|null} [kind] PlanNode kind - * @property {string|null} [displayName] PlanNode displayName - * @property {Array.|null} [childLinks] PlanNode childLinks - * @property {google.spanner.v1.PlanNode.IShortRepresentation|null} [shortRepresentation] PlanNode shortRepresentation - * @property {google.protobuf.IStruct|null} [metadata] PlanNode metadata - * @property {google.protobuf.IStruct|null} [executionStats] PlanNode executionStats + * @interface IKeySet + * @property {Array.|null} [keys] KeySet keys + * @property {Array.|null} [ranges] KeySet ranges + * @property {boolean|null} [all] KeySet all */ /** - * Constructs a new PlanNode. + * Constructs a new KeySet. * @memberof google.spanner.v1 - * @classdesc Represents a PlanNode. - * @implements IPlanNode + * @classdesc Represents a KeySet. + * @implements IKeySet * @constructor - * @param {google.spanner.v1.IPlanNode=} [properties] Properties to set + * @param {google.spanner.v1.IKeySet=} [properties] Properties to set */ - function PlanNode(properties) { - this.childLinks = []; + function KeySet(properties) { + this.keys = []; + this.ranges = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -82739,162 +83551,109 @@ } /** - * PlanNode index. - * @member {number} index - * @memberof google.spanner.v1.PlanNode - * @instance - */ - PlanNode.prototype.index = 0; - - /** - * PlanNode kind. - * @member {google.spanner.v1.PlanNode.Kind} kind - * @memberof google.spanner.v1.PlanNode - * @instance - */ - PlanNode.prototype.kind = 0; - - /** - * PlanNode displayName. - * @member {string} displayName - * @memberof google.spanner.v1.PlanNode - * @instance - */ - PlanNode.prototype.displayName = ""; - - /** - * PlanNode childLinks. - * @member {Array.} childLinks - * @memberof google.spanner.v1.PlanNode - * @instance - */ - PlanNode.prototype.childLinks = $util.emptyArray; - - /** - * PlanNode shortRepresentation. - * @member {google.spanner.v1.PlanNode.IShortRepresentation|null|undefined} shortRepresentation - * @memberof google.spanner.v1.PlanNode + * KeySet keys. + * @member {Array.} keys + * @memberof google.spanner.v1.KeySet * @instance */ - PlanNode.prototype.shortRepresentation = null; + KeySet.prototype.keys = $util.emptyArray; /** - * PlanNode metadata. - * @member {google.protobuf.IStruct|null|undefined} metadata - * @memberof google.spanner.v1.PlanNode + * KeySet ranges. + * @member {Array.} ranges + * @memberof google.spanner.v1.KeySet * @instance */ - PlanNode.prototype.metadata = null; + KeySet.prototype.ranges = $util.emptyArray; /** - * PlanNode executionStats. - * @member {google.protobuf.IStruct|null|undefined} executionStats - * @memberof google.spanner.v1.PlanNode + * KeySet all. + * @member {boolean} all + * @memberof google.spanner.v1.KeySet * @instance */ - PlanNode.prototype.executionStats = null; + KeySet.prototype.all = false; /** - * Creates a new PlanNode instance using the specified properties. + * Creates a new KeySet instance using the specified properties. * @function create - * @memberof google.spanner.v1.PlanNode + * @memberof google.spanner.v1.KeySet * @static - * @param {google.spanner.v1.IPlanNode=} [properties] Properties to set - * @returns {google.spanner.v1.PlanNode} PlanNode instance + * @param {google.spanner.v1.IKeySet=} [properties] Properties to set + * @returns {google.spanner.v1.KeySet} KeySet instance */ - PlanNode.create = function create(properties) { - return new PlanNode(properties); + KeySet.create = function create(properties) { + return new KeySet(properties); }; /** - * Encodes the specified PlanNode message. Does not implicitly {@link google.spanner.v1.PlanNode.verify|verify} messages. + * Encodes the specified KeySet message. Does not implicitly {@link google.spanner.v1.KeySet.verify|verify} messages. * @function encode - * @memberof google.spanner.v1.PlanNode + * @memberof google.spanner.v1.KeySet * @static - * @param {google.spanner.v1.IPlanNode} message PlanNode message or plain object to encode + * @param {google.spanner.v1.IKeySet} message KeySet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlanNode.encode = function encode(message, writer) { + KeySet.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.index != null && Object.hasOwnProperty.call(message, "index")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.index); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.kind); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); - if (message.childLinks != null && message.childLinks.length) - for (var i = 0; i < message.childLinks.length; ++i) - $root.google.spanner.v1.PlanNode.ChildLink.encode(message.childLinks[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.shortRepresentation != null && Object.hasOwnProperty.call(message, "shortRepresentation")) - $root.google.spanner.v1.PlanNode.ShortRepresentation.encode(message.shortRepresentation, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) - $root.google.protobuf.Struct.encode(message.metadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.executionStats != null && Object.hasOwnProperty.call(message, "executionStats")) - $root.google.protobuf.Struct.encode(message.executionStats, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.keys != null && message.keys.length) + for (var i = 0; i < message.keys.length; ++i) + $root.google.protobuf.ListValue.encode(message.keys[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.ranges != null && message.ranges.length) + for (var i = 0; i < message.ranges.length; ++i) + $root.google.spanner.v1.KeyRange.encode(message.ranges[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.all != null && Object.hasOwnProperty.call(message, "all")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.all); return writer; }; /** - * Encodes the specified PlanNode message, length delimited. Does not implicitly {@link google.spanner.v1.PlanNode.verify|verify} messages. + * Encodes the specified KeySet message, length delimited. Does not implicitly {@link google.spanner.v1.KeySet.verify|verify} messages. * @function encodeDelimited - * @memberof google.spanner.v1.PlanNode + * @memberof google.spanner.v1.KeySet * @static - * @param {google.spanner.v1.IPlanNode} message PlanNode message or plain object to encode + * @param {google.spanner.v1.IKeySet} message KeySet message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlanNode.encodeDelimited = function encodeDelimited(message, writer) { + KeySet.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PlanNode message from the specified reader or buffer. + * Decodes a KeySet message from the specified reader or buffer. * @function decode - * @memberof google.spanner.v1.PlanNode + * @memberof google.spanner.v1.KeySet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.spanner.v1.PlanNode} PlanNode + * @returns {google.spanner.v1.KeySet} KeySet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlanNode.decode = function decode(reader, length) { + KeySet.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.PlanNode(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.KeySet(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.index = reader.int32(); + if (!(message.keys && message.keys.length)) + message.keys = []; + message.keys.push($root.google.protobuf.ListValue.decode(reader, reader.uint32())); break; } case 2: { - message.kind = reader.int32(); + if (!(message.ranges && message.ranges.length)) + message.ranges = []; + message.ranges.push($root.google.spanner.v1.KeyRange.decode(reader, reader.uint32())); break; } case 3: { - message.displayName = reader.string(); - break; - } - case 4: { - if (!(message.childLinks && message.childLinks.length)) - message.childLinks = []; - message.childLinks.push($root.google.spanner.v1.PlanNode.ChildLink.decode(reader, reader.uint32())); - break; - } - case 5: { - message.shortRepresentation = $root.google.spanner.v1.PlanNode.ShortRepresentation.decode(reader, reader.uint32()); - break; - } - case 6: { - message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); - break; - } - case 7: { - message.executionStats = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + message.all = reader.bool(); break; } default: @@ -82906,493 +83665,542 @@ }; /** - * Decodes a PlanNode message from the specified reader or buffer, length delimited. + * Decodes a KeySet message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.spanner.v1.PlanNode + * @memberof google.spanner.v1.KeySet * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.spanner.v1.PlanNode} PlanNode + * @returns {google.spanner.v1.KeySet} KeySet * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlanNode.decodeDelimited = function decodeDelimited(reader) { + KeySet.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PlanNode message. + * Verifies a KeySet message. * @function verify - * @memberof google.spanner.v1.PlanNode + * @memberof google.spanner.v1.KeySet * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PlanNode.verify = function verify(message) { + KeySet.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.index != null && message.hasOwnProperty("index")) - if (!$util.isInteger(message.index)) - return "index: integer expected"; - if (message.kind != null && message.hasOwnProperty("kind")) - switch (message.kind) { - default: - return "kind: enum value expected"; - case 0: - case 1: - case 2: - break; - } - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.childLinks != null && message.hasOwnProperty("childLinks")) { - if (!Array.isArray(message.childLinks)) - return "childLinks: array expected"; - for (var i = 0; i < message.childLinks.length; ++i) { - var error = $root.google.spanner.v1.PlanNode.ChildLink.verify(message.childLinks[i]); + if (message.keys != null && message.hasOwnProperty("keys")) { + if (!Array.isArray(message.keys)) + return "keys: array expected"; + for (var i = 0; i < message.keys.length; ++i) { + var error = $root.google.protobuf.ListValue.verify(message.keys[i]); if (error) - return "childLinks." + error; + return "keys." + error; } } - if (message.shortRepresentation != null && message.hasOwnProperty("shortRepresentation")) { - var error = $root.google.spanner.v1.PlanNode.ShortRepresentation.verify(message.shortRepresentation); - if (error) - return "shortRepresentation." + error; - } - if (message.metadata != null && message.hasOwnProperty("metadata")) { - var error = $root.google.protobuf.Struct.verify(message.metadata); - if (error) - return "metadata." + error; - } - if (message.executionStats != null && message.hasOwnProperty("executionStats")) { - var error = $root.google.protobuf.Struct.verify(message.executionStats); - if (error) - return "executionStats." + error; + if (message.ranges != null && message.hasOwnProperty("ranges")) { + if (!Array.isArray(message.ranges)) + return "ranges: array expected"; + for (var i = 0; i < message.ranges.length; ++i) { + var error = $root.google.spanner.v1.KeyRange.verify(message.ranges[i]); + if (error) + return "ranges." + error; + } } + if (message.all != null && message.hasOwnProperty("all")) + if (typeof message.all !== "boolean") + return "all: boolean expected"; return null; }; /** - * Creates a PlanNode message from a plain object. Also converts values to their respective internal types. + * Creates a KeySet message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.spanner.v1.PlanNode + * @memberof google.spanner.v1.KeySet * @static * @param {Object.} object Plain object - * @returns {google.spanner.v1.PlanNode} PlanNode + * @returns {google.spanner.v1.KeySet} KeySet */ - PlanNode.fromObject = function fromObject(object) { - if (object instanceof $root.google.spanner.v1.PlanNode) + KeySet.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.v1.KeySet) return object; - var message = new $root.google.spanner.v1.PlanNode(); - if (object.index != null) - message.index = object.index | 0; - switch (object.kind) { - default: - if (typeof object.kind === "number") { - message.kind = object.kind; - break; + var message = new $root.google.spanner.v1.KeySet(); + if (object.keys) { + if (!Array.isArray(object.keys)) + throw TypeError(".google.spanner.v1.KeySet.keys: array expected"); + message.keys = []; + for (var i = 0; i < object.keys.length; ++i) { + if (typeof object.keys[i] !== "object") + throw TypeError(".google.spanner.v1.KeySet.keys: object expected"); + message.keys[i] = $root.google.protobuf.ListValue.fromObject(object.keys[i]); } - break; - case "KIND_UNSPECIFIED": - case 0: - message.kind = 0; - break; - case "RELATIONAL": - case 1: - message.kind = 1; - break; - case "SCALAR": - case 2: - message.kind = 2; - break; } - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.childLinks) { - if (!Array.isArray(object.childLinks)) - throw TypeError(".google.spanner.v1.PlanNode.childLinks: array expected"); - message.childLinks = []; - for (var i = 0; i < object.childLinks.length; ++i) { - if (typeof object.childLinks[i] !== "object") - throw TypeError(".google.spanner.v1.PlanNode.childLinks: object expected"); - message.childLinks[i] = $root.google.spanner.v1.PlanNode.ChildLink.fromObject(object.childLinks[i]); + if (object.ranges) { + if (!Array.isArray(object.ranges)) + throw TypeError(".google.spanner.v1.KeySet.ranges: array expected"); + message.ranges = []; + for (var i = 0; i < object.ranges.length; ++i) { + if (typeof object.ranges[i] !== "object") + throw TypeError(".google.spanner.v1.KeySet.ranges: object expected"); + message.ranges[i] = $root.google.spanner.v1.KeyRange.fromObject(object.ranges[i]); } } - if (object.shortRepresentation != null) { - if (typeof object.shortRepresentation !== "object") - throw TypeError(".google.spanner.v1.PlanNode.shortRepresentation: object expected"); - message.shortRepresentation = $root.google.spanner.v1.PlanNode.ShortRepresentation.fromObject(object.shortRepresentation); - } - if (object.metadata != null) { - if (typeof object.metadata !== "object") - throw TypeError(".google.spanner.v1.PlanNode.metadata: object expected"); - message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); - } - if (object.executionStats != null) { - if (typeof object.executionStats !== "object") - throw TypeError(".google.spanner.v1.PlanNode.executionStats: object expected"); - message.executionStats = $root.google.protobuf.Struct.fromObject(object.executionStats); - } + if (object.all != null) + message.all = Boolean(object.all); return message; }; /** - * Creates a plain object from a PlanNode message. Also converts values to other types if specified. + * Creates a plain object from a KeySet message. Also converts values to other types if specified. * @function toObject - * @memberof google.spanner.v1.PlanNode + * @memberof google.spanner.v1.KeySet * @static - * @param {google.spanner.v1.PlanNode} message PlanNode + * @param {google.spanner.v1.KeySet} message KeySet * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PlanNode.toObject = function toObject(message, options) { + KeySet.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.childLinks = []; - if (options.defaults) { - object.index = 0; - object.kind = options.enums === String ? "KIND_UNSPECIFIED" : 0; - object.displayName = ""; - object.shortRepresentation = null; - object.metadata = null; - object.executionStats = null; + if (options.arrays || options.defaults) { + object.keys = []; + object.ranges = []; } - if (message.index != null && message.hasOwnProperty("index")) - object.index = message.index; - if (message.kind != null && message.hasOwnProperty("kind")) - object.kind = options.enums === String ? $root.google.spanner.v1.PlanNode.Kind[message.kind] === undefined ? message.kind : $root.google.spanner.v1.PlanNode.Kind[message.kind] : message.kind; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.childLinks && message.childLinks.length) { - object.childLinks = []; - for (var j = 0; j < message.childLinks.length; ++j) - object.childLinks[j] = $root.google.spanner.v1.PlanNode.ChildLink.toObject(message.childLinks[j], options); + if (options.defaults) + object.all = false; + if (message.keys && message.keys.length) { + object.keys = []; + for (var j = 0; j < message.keys.length; ++j) + object.keys[j] = $root.google.protobuf.ListValue.toObject(message.keys[j], options); } - if (message.shortRepresentation != null && message.hasOwnProperty("shortRepresentation")) - object.shortRepresentation = $root.google.spanner.v1.PlanNode.ShortRepresentation.toObject(message.shortRepresentation, options); - if (message.metadata != null && message.hasOwnProperty("metadata")) - object.metadata = $root.google.protobuf.Struct.toObject(message.metadata, options); - if (message.executionStats != null && message.hasOwnProperty("executionStats")) - object.executionStats = $root.google.protobuf.Struct.toObject(message.executionStats, options); + if (message.ranges && message.ranges.length) { + object.ranges = []; + for (var j = 0; j < message.ranges.length; ++j) + object.ranges[j] = $root.google.spanner.v1.KeyRange.toObject(message.ranges[j], options); + } + if (message.all != null && message.hasOwnProperty("all")) + object.all = message.all; return object; }; /** - * Converts this PlanNode to JSON. + * Converts this KeySet to JSON. * @function toJSON - * @memberof google.spanner.v1.PlanNode + * @memberof google.spanner.v1.KeySet * @instance * @returns {Object.} JSON object */ - PlanNode.prototype.toJSON = function toJSON() { + KeySet.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PlanNode + * Gets the default type url for KeySet * @function getTypeUrl - * @memberof google.spanner.v1.PlanNode + * @memberof google.spanner.v1.KeySet * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PlanNode.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + KeySet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.spanner.v1.PlanNode"; + return typeUrlPrefix + "/google.spanner.v1.KeySet"; }; + return KeySet; + })(); + + v1.Mutation = (function() { + /** - * Kind enum. - * @name google.spanner.v1.PlanNode.Kind - * @enum {number} - * @property {number} KIND_UNSPECIFIED=0 KIND_UNSPECIFIED value - * @property {number} RELATIONAL=1 RELATIONAL value - * @property {number} SCALAR=2 SCALAR value + * Properties of a Mutation. + * @memberof google.spanner.v1 + * @interface IMutation + * @property {google.spanner.v1.Mutation.IWrite|null} [insert] Mutation insert + * @property {google.spanner.v1.Mutation.IWrite|null} [update] Mutation update + * @property {google.spanner.v1.Mutation.IWrite|null} [insertOrUpdate] Mutation insertOrUpdate + * @property {google.spanner.v1.Mutation.IWrite|null} [replace] Mutation replace + * @property {google.spanner.v1.Mutation.IDelete|null} ["delete"] Mutation delete */ - PlanNode.Kind = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "KIND_UNSPECIFIED"] = 0; - values[valuesById[1] = "RELATIONAL"] = 1; - values[valuesById[2] = "SCALAR"] = 2; - return values; - })(); - PlanNode.ChildLink = (function() { + /** + * Constructs a new Mutation. + * @memberof google.spanner.v1 + * @classdesc Represents a Mutation. + * @implements IMutation + * @constructor + * @param {google.spanner.v1.IMutation=} [properties] Properties to set + */ + function Mutation(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Properties of a ChildLink. - * @memberof google.spanner.v1.PlanNode - * @interface IChildLink - * @property {number|null} [childIndex] ChildLink childIndex - * @property {string|null} [type] ChildLink type - * @property {string|null} [variable] ChildLink variable - */ + /** + * Mutation insert. + * @member {google.spanner.v1.Mutation.IWrite|null|undefined} insert + * @memberof google.spanner.v1.Mutation + * @instance + */ + Mutation.prototype.insert = null; - /** - * Constructs a new ChildLink. - * @memberof google.spanner.v1.PlanNode - * @classdesc Represents a ChildLink. - * @implements IChildLink - * @constructor - * @param {google.spanner.v1.PlanNode.IChildLink=} [properties] Properties to set - */ - function ChildLink(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Mutation update. + * @member {google.spanner.v1.Mutation.IWrite|null|undefined} update + * @memberof google.spanner.v1.Mutation + * @instance + */ + Mutation.prototype.update = null; - /** - * ChildLink childIndex. - * @member {number} childIndex - * @memberof google.spanner.v1.PlanNode.ChildLink - * @instance - */ - ChildLink.prototype.childIndex = 0; + /** + * Mutation insertOrUpdate. + * @member {google.spanner.v1.Mutation.IWrite|null|undefined} insertOrUpdate + * @memberof google.spanner.v1.Mutation + * @instance + */ + Mutation.prototype.insertOrUpdate = null; - /** - * ChildLink type. - * @member {string} type - * @memberof google.spanner.v1.PlanNode.ChildLink - * @instance - */ - ChildLink.prototype.type = ""; + /** + * Mutation replace. + * @member {google.spanner.v1.Mutation.IWrite|null|undefined} replace + * @memberof google.spanner.v1.Mutation + * @instance + */ + Mutation.prototype.replace = null; - /** - * ChildLink variable. - * @member {string} variable - * @memberof google.spanner.v1.PlanNode.ChildLink - * @instance - */ - ChildLink.prototype.variable = ""; + /** + * Mutation delete. + * @member {google.spanner.v1.Mutation.IDelete|null|undefined} delete + * @memberof google.spanner.v1.Mutation + * @instance + */ + Mutation.prototype["delete"] = null; - /** - * Creates a new ChildLink instance using the specified properties. - * @function create - * @memberof google.spanner.v1.PlanNode.ChildLink - * @static - * @param {google.spanner.v1.PlanNode.IChildLink=} [properties] Properties to set - * @returns {google.spanner.v1.PlanNode.ChildLink} ChildLink instance - */ - ChildLink.create = function create(properties) { - return new ChildLink(properties); - }; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Encodes the specified ChildLink message. Does not implicitly {@link google.spanner.v1.PlanNode.ChildLink.verify|verify} messages. - * @function encode - * @memberof google.spanner.v1.PlanNode.ChildLink - * @static - * @param {google.spanner.v1.PlanNode.IChildLink} message ChildLink message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ChildLink.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.childIndex != null && Object.hasOwnProperty.call(message, "childIndex")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.childIndex); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); - if (message.variable != null && Object.hasOwnProperty.call(message, "variable")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.variable); - return writer; - }; + /** + * Mutation operation. + * @member {"insert"|"update"|"insertOrUpdate"|"replace"|"delete"|undefined} operation + * @memberof google.spanner.v1.Mutation + * @instance + */ + Object.defineProperty(Mutation.prototype, "operation", { + get: $util.oneOfGetter($oneOfFields = ["insert", "update", "insertOrUpdate", "replace", "delete"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified ChildLink message, length delimited. Does not implicitly {@link google.spanner.v1.PlanNode.ChildLink.verify|verify} messages. - * @function encodeDelimited - * @memberof google.spanner.v1.PlanNode.ChildLink - * @static - * @param {google.spanner.v1.PlanNode.IChildLink} message ChildLink message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ChildLink.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Creates a new Mutation instance using the specified properties. + * @function create + * @memberof google.spanner.v1.Mutation + * @static + * @param {google.spanner.v1.IMutation=} [properties] Properties to set + * @returns {google.spanner.v1.Mutation} Mutation instance + */ + Mutation.create = function create(properties) { + return new Mutation(properties); + }; - /** - * Decodes a ChildLink message from the specified reader or buffer. - * @function decode - * @memberof google.spanner.v1.PlanNode.ChildLink - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.spanner.v1.PlanNode.ChildLink} ChildLink - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ChildLink.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.PlanNode.ChildLink(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.childIndex = reader.int32(); - break; - } - case 2: { - message.type = reader.string(); - break; - } - case 3: { - message.variable = reader.string(); - break; - } - default: - reader.skipType(tag & 7); + /** + * Encodes the specified Mutation message. Does not implicitly {@link google.spanner.v1.Mutation.verify|verify} messages. + * @function encode + * @memberof google.spanner.v1.Mutation + * @static + * @param {google.spanner.v1.IMutation} message Mutation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Mutation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.insert != null && Object.hasOwnProperty.call(message, "insert")) + $root.google.spanner.v1.Mutation.Write.encode(message.insert, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.update != null && Object.hasOwnProperty.call(message, "update")) + $root.google.spanner.v1.Mutation.Write.encode(message.update, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.insertOrUpdate != null && Object.hasOwnProperty.call(message, "insertOrUpdate")) + $root.google.spanner.v1.Mutation.Write.encode(message.insertOrUpdate, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.replace != null && Object.hasOwnProperty.call(message, "replace")) + $root.google.spanner.v1.Mutation.Write.encode(message.replace, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + $root.google.spanner.v1.Mutation.Delete.encode(message["delete"], writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Mutation message, length delimited. Does not implicitly {@link google.spanner.v1.Mutation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.spanner.v1.Mutation + * @static + * @param {google.spanner.v1.IMutation} message Mutation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Mutation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Mutation message from the specified reader or buffer. + * @function decode + * @memberof google.spanner.v1.Mutation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.spanner.v1.Mutation} Mutation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Mutation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.Mutation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.insert = $root.google.spanner.v1.Mutation.Write.decode(reader, reader.uint32()); + break; + } + case 2: { + message.update = $root.google.spanner.v1.Mutation.Write.decode(reader, reader.uint32()); + break; + } + case 3: { + message.insertOrUpdate = $root.google.spanner.v1.Mutation.Write.decode(reader, reader.uint32()); + break; + } + case 4: { + message.replace = $root.google.spanner.v1.Mutation.Write.decode(reader, reader.uint32()); + break; + } + case 5: { + message["delete"] = $root.google.spanner.v1.Mutation.Delete.decode(reader, reader.uint32()); break; } + default: + reader.skipType(tag & 7); + break; } - return message; - }; - - /** - * Decodes a ChildLink message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.spanner.v1.PlanNode.ChildLink - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.spanner.v1.PlanNode.ChildLink} ChildLink - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ChildLink.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ChildLink message. - * @function verify - * @memberof google.spanner.v1.PlanNode.ChildLink - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ChildLink.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.childIndex != null && message.hasOwnProperty("childIndex")) - if (!$util.isInteger(message.childIndex)) - return "childIndex: integer expected"; - if (message.type != null && message.hasOwnProperty("type")) - if (!$util.isString(message.type)) - return "type: string expected"; - if (message.variable != null && message.hasOwnProperty("variable")) - if (!$util.isString(message.variable)) - return "variable: string expected"; - return null; - }; + } + return message; + }; - /** - * Creates a ChildLink message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.spanner.v1.PlanNode.ChildLink - * @static - * @param {Object.} object Plain object - * @returns {google.spanner.v1.PlanNode.ChildLink} ChildLink - */ - ChildLink.fromObject = function fromObject(object) { - if (object instanceof $root.google.spanner.v1.PlanNode.ChildLink) - return object; - var message = new $root.google.spanner.v1.PlanNode.ChildLink(); - if (object.childIndex != null) - message.childIndex = object.childIndex | 0; - if (object.type != null) - message.type = String(object.type); - if (object.variable != null) - message.variable = String(object.variable); - return message; - }; + /** + * Decodes a Mutation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.spanner.v1.Mutation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.spanner.v1.Mutation} Mutation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Mutation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a plain object from a ChildLink message. Also converts values to other types if specified. - * @function toObject - * @memberof google.spanner.v1.PlanNode.ChildLink - * @static - * @param {google.spanner.v1.PlanNode.ChildLink} message ChildLink - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ChildLink.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.childIndex = 0; - object.type = ""; - object.variable = ""; + /** + * Verifies a Mutation message. + * @function verify + * @memberof google.spanner.v1.Mutation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Mutation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.insert != null && message.hasOwnProperty("insert")) { + properties.operation = 1; + { + var error = $root.google.spanner.v1.Mutation.Write.verify(message.insert); + if (error) + return "insert." + error; } - if (message.childIndex != null && message.hasOwnProperty("childIndex")) - object.childIndex = message.childIndex; - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.variable != null && message.hasOwnProperty("variable")) - object.variable = message.variable; + } + if (message.update != null && message.hasOwnProperty("update")) { + if (properties.operation === 1) + return "operation: multiple values"; + properties.operation = 1; + { + var error = $root.google.spanner.v1.Mutation.Write.verify(message.update); + if (error) + return "update." + error; + } + } + if (message.insertOrUpdate != null && message.hasOwnProperty("insertOrUpdate")) { + if (properties.operation === 1) + return "operation: multiple values"; + properties.operation = 1; + { + var error = $root.google.spanner.v1.Mutation.Write.verify(message.insertOrUpdate); + if (error) + return "insertOrUpdate." + error; + } + } + if (message.replace != null && message.hasOwnProperty("replace")) { + if (properties.operation === 1) + return "operation: multiple values"; + properties.operation = 1; + { + var error = $root.google.spanner.v1.Mutation.Write.verify(message.replace); + if (error) + return "replace." + error; + } + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.operation === 1) + return "operation: multiple values"; + properties.operation = 1; + { + var error = $root.google.spanner.v1.Mutation.Delete.verify(message["delete"]); + if (error) + return "delete." + error; + } + } + return null; + }; + + /** + * Creates a Mutation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.spanner.v1.Mutation + * @static + * @param {Object.} object Plain object + * @returns {google.spanner.v1.Mutation} Mutation + */ + Mutation.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.v1.Mutation) return object; - }; + var message = new $root.google.spanner.v1.Mutation(); + if (object.insert != null) { + if (typeof object.insert !== "object") + throw TypeError(".google.spanner.v1.Mutation.insert: object expected"); + message.insert = $root.google.spanner.v1.Mutation.Write.fromObject(object.insert); + } + if (object.update != null) { + if (typeof object.update !== "object") + throw TypeError(".google.spanner.v1.Mutation.update: object expected"); + message.update = $root.google.spanner.v1.Mutation.Write.fromObject(object.update); + } + if (object.insertOrUpdate != null) { + if (typeof object.insertOrUpdate !== "object") + throw TypeError(".google.spanner.v1.Mutation.insertOrUpdate: object expected"); + message.insertOrUpdate = $root.google.spanner.v1.Mutation.Write.fromObject(object.insertOrUpdate); + } + if (object.replace != null) { + if (typeof object.replace !== "object") + throw TypeError(".google.spanner.v1.Mutation.replace: object expected"); + message.replace = $root.google.spanner.v1.Mutation.Write.fromObject(object.replace); + } + if (object["delete"] != null) { + if (typeof object["delete"] !== "object") + throw TypeError(".google.spanner.v1.Mutation.delete: object expected"); + message["delete"] = $root.google.spanner.v1.Mutation.Delete.fromObject(object["delete"]); + } + return message; + }; - /** - * Converts this ChildLink to JSON. - * @function toJSON - * @memberof google.spanner.v1.PlanNode.ChildLink - * @instance - * @returns {Object.} JSON object - */ - ChildLink.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a Mutation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.spanner.v1.Mutation + * @static + * @param {google.spanner.v1.Mutation} message Mutation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Mutation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.insert != null && message.hasOwnProperty("insert")) { + object.insert = $root.google.spanner.v1.Mutation.Write.toObject(message.insert, options); + if (options.oneofs) + object.operation = "insert"; + } + if (message.update != null && message.hasOwnProperty("update")) { + object.update = $root.google.spanner.v1.Mutation.Write.toObject(message.update, options); + if (options.oneofs) + object.operation = "update"; + } + if (message.insertOrUpdate != null && message.hasOwnProperty("insertOrUpdate")) { + object.insertOrUpdate = $root.google.spanner.v1.Mutation.Write.toObject(message.insertOrUpdate, options); + if (options.oneofs) + object.operation = "insertOrUpdate"; + } + if (message.replace != null && message.hasOwnProperty("replace")) { + object.replace = $root.google.spanner.v1.Mutation.Write.toObject(message.replace, options); + if (options.oneofs) + object.operation = "replace"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = $root.google.spanner.v1.Mutation.Delete.toObject(message["delete"], options); + if (options.oneofs) + object.operation = "delete"; + } + return object; + }; - /** - * Gets the default type url for ChildLink - * @function getTypeUrl - * @memberof google.spanner.v1.PlanNode.ChildLink - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ChildLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.spanner.v1.PlanNode.ChildLink"; - }; + /** + * Converts this Mutation to JSON. + * @function toJSON + * @memberof google.spanner.v1.Mutation + * @instance + * @returns {Object.} JSON object + */ + Mutation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ChildLink; - })(); + /** + * Gets the default type url for Mutation + * @function getTypeUrl + * @memberof google.spanner.v1.Mutation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Mutation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.spanner.v1.Mutation"; + }; - PlanNode.ShortRepresentation = (function() { + Mutation.Write = (function() { /** - * Properties of a ShortRepresentation. - * @memberof google.spanner.v1.PlanNode - * @interface IShortRepresentation - * @property {string|null} [description] ShortRepresentation description - * @property {Object.|null} [subqueries] ShortRepresentation subqueries + * Properties of a Write. + * @memberof google.spanner.v1.Mutation + * @interface IWrite + * @property {string|null} [table] Write table + * @property {Array.|null} [columns] Write columns + * @property {Array.|null} [values] Write values */ /** - * Constructs a new ShortRepresentation. - * @memberof google.spanner.v1.PlanNode - * @classdesc Represents a ShortRepresentation. - * @implements IShortRepresentation + * Constructs a new Write. + * @memberof google.spanner.v1.Mutation + * @classdesc Represents a Write. + * @implements IWrite * @constructor - * @param {google.spanner.v1.PlanNode.IShortRepresentation=} [properties] Properties to set + * @param {google.spanner.v1.Mutation.IWrite=} [properties] Properties to set */ - function ShortRepresentation(properties) { - this.subqueries = {}; + function Write(properties) { + this.columns = []; + this.values = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -83400,109 +84208,109 @@ } /** - * ShortRepresentation description. - * @member {string} description - * @memberof google.spanner.v1.PlanNode.ShortRepresentation + * Write table. + * @member {string} table + * @memberof google.spanner.v1.Mutation.Write * @instance */ - ShortRepresentation.prototype.description = ""; + Write.prototype.table = ""; /** - * ShortRepresentation subqueries. - * @member {Object.} subqueries - * @memberof google.spanner.v1.PlanNode.ShortRepresentation + * Write columns. + * @member {Array.} columns + * @memberof google.spanner.v1.Mutation.Write * @instance */ - ShortRepresentation.prototype.subqueries = $util.emptyObject; + Write.prototype.columns = $util.emptyArray; /** - * Creates a new ShortRepresentation instance using the specified properties. + * Write values. + * @member {Array.} values + * @memberof google.spanner.v1.Mutation.Write + * @instance + */ + Write.prototype.values = $util.emptyArray; + + /** + * Creates a new Write instance using the specified properties. * @function create - * @memberof google.spanner.v1.PlanNode.ShortRepresentation + * @memberof google.spanner.v1.Mutation.Write * @static - * @param {google.spanner.v1.PlanNode.IShortRepresentation=} [properties] Properties to set - * @returns {google.spanner.v1.PlanNode.ShortRepresentation} ShortRepresentation instance + * @param {google.spanner.v1.Mutation.IWrite=} [properties] Properties to set + * @returns {google.spanner.v1.Mutation.Write} Write instance */ - ShortRepresentation.create = function create(properties) { - return new ShortRepresentation(properties); + Write.create = function create(properties) { + return new Write(properties); }; /** - * Encodes the specified ShortRepresentation message. Does not implicitly {@link google.spanner.v1.PlanNode.ShortRepresentation.verify|verify} messages. + * Encodes the specified Write message. Does not implicitly {@link google.spanner.v1.Mutation.Write.verify|verify} messages. * @function encode - * @memberof google.spanner.v1.PlanNode.ShortRepresentation + * @memberof google.spanner.v1.Mutation.Write * @static - * @param {google.spanner.v1.PlanNode.IShortRepresentation} message ShortRepresentation message or plain object to encode + * @param {google.spanner.v1.Mutation.IWrite} message Write message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShortRepresentation.encode = function encode(message, writer) { + Write.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.description != null && Object.hasOwnProperty.call(message, "description")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); - if (message.subqueries != null && Object.hasOwnProperty.call(message, "subqueries")) - for (var keys = Object.keys(message.subqueries), i = 0; i < keys.length; ++i) - writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int32(message.subqueries[keys[i]]).ldelim(); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); + if (message.columns != null && message.columns.length) + for (var i = 0; i < message.columns.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.columns[i]); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.protobuf.ListValue.encode(message.values[i], writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ShortRepresentation message, length delimited. Does not implicitly {@link google.spanner.v1.PlanNode.ShortRepresentation.verify|verify} messages. + * Encodes the specified Write message, length delimited. Does not implicitly {@link google.spanner.v1.Mutation.Write.verify|verify} messages. * @function encodeDelimited - * @memberof google.spanner.v1.PlanNode.ShortRepresentation + * @memberof google.spanner.v1.Mutation.Write * @static - * @param {google.spanner.v1.PlanNode.IShortRepresentation} message ShortRepresentation message or plain object to encode + * @param {google.spanner.v1.Mutation.IWrite} message Write message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ShortRepresentation.encodeDelimited = function encodeDelimited(message, writer) { + Write.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ShortRepresentation message from the specified reader or buffer. + * Decodes a Write message from the specified reader or buffer. * @function decode - * @memberof google.spanner.v1.PlanNode.ShortRepresentation + * @memberof google.spanner.v1.Mutation.Write * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.spanner.v1.PlanNode.ShortRepresentation} ShortRepresentation + * @returns {google.spanner.v1.Mutation.Write} Write * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShortRepresentation.decode = function decode(reader, length) { + Write.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.PlanNode.ShortRepresentation(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.Mutation.Write(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.description = reader.string(); + message.table = reader.string(); break; } case 2: { - if (message.subqueries === $util.emptyObject) - message.subqueries = {}; - var end2 = reader.uint32() + reader.pos; - key = ""; - value = 0; - while (reader.pos < end2) { - var tag2 = reader.uint32(); - switch (tag2 >>> 3) { - case 1: - key = reader.string(); - break; - case 2: - value = reader.int32(); - break; - default: - reader.skipType(tag2 & 7); - break; - } - } - message.subqueries[key] = value; + if (!(message.columns && message.columns.length)) + message.columns = []; + message.columns.push(reader.string()); + break; + } + case 3: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.ListValue.decode(reader, reader.uint32())); break; } default: @@ -83514,149 +84322,1347 @@ }; /** - * Decodes a ShortRepresentation message from the specified reader or buffer, length delimited. + * Decodes a Write message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.spanner.v1.PlanNode.ShortRepresentation + * @memberof google.spanner.v1.Mutation.Write * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.spanner.v1.PlanNode.ShortRepresentation} ShortRepresentation + * @returns {google.spanner.v1.Mutation.Write} Write * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ShortRepresentation.decodeDelimited = function decodeDelimited(reader) { + Write.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ShortRepresentation message. + * Verifies a Write message. * @function verify - * @memberof google.spanner.v1.PlanNode.ShortRepresentation + * @memberof google.spanner.v1.Mutation.Write * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ShortRepresentation.verify = function verify(message) { + Write.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.description != null && message.hasOwnProperty("description")) - if (!$util.isString(message.description)) - return "description: string expected"; - if (message.subqueries != null && message.hasOwnProperty("subqueries")) { - if (!$util.isObject(message.subqueries)) - return "subqueries: object expected"; - var key = Object.keys(message.subqueries); - for (var i = 0; i < key.length; ++i) - if (!$util.isInteger(message.subqueries[key[i]])) - return "subqueries: integer{k:string} expected"; + if (message.table != null && message.hasOwnProperty("table")) + if (!$util.isString(message.table)) + return "table: string expected"; + if (message.columns != null && message.hasOwnProperty("columns")) { + if (!Array.isArray(message.columns)) + return "columns: array expected"; + for (var i = 0; i < message.columns.length; ++i) + if (!$util.isString(message.columns[i])) + return "columns: string[] expected"; + } + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.protobuf.ListValue.verify(message.values[i]); + if (error) + return "values." + error; + } } return null; }; /** - * Creates a ShortRepresentation message from a plain object. Also converts values to their respective internal types. + * Creates a Write message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.spanner.v1.PlanNode.ShortRepresentation + * @memberof google.spanner.v1.Mutation.Write * @static * @param {Object.} object Plain object - * @returns {google.spanner.v1.PlanNode.ShortRepresentation} ShortRepresentation + * @returns {google.spanner.v1.Mutation.Write} Write */ - ShortRepresentation.fromObject = function fromObject(object) { - if (object instanceof $root.google.spanner.v1.PlanNode.ShortRepresentation) + Write.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.v1.Mutation.Write) return object; - var message = new $root.google.spanner.v1.PlanNode.ShortRepresentation(); - if (object.description != null) - message.description = String(object.description); - if (object.subqueries) { - if (typeof object.subqueries !== "object") - throw TypeError(".google.spanner.v1.PlanNode.ShortRepresentation.subqueries: object expected"); - message.subqueries = {}; - for (var keys = Object.keys(object.subqueries), i = 0; i < keys.length; ++i) - message.subqueries[keys[i]] = object.subqueries[keys[i]] | 0; + var message = new $root.google.spanner.v1.Mutation.Write(); + if (object.table != null) + message.table = String(object.table); + if (object.columns) { + if (!Array.isArray(object.columns)) + throw TypeError(".google.spanner.v1.Mutation.Write.columns: array expected"); + message.columns = []; + for (var i = 0; i < object.columns.length; ++i) + message.columns[i] = String(object.columns[i]); + } + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.spanner.v1.Mutation.Write.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.spanner.v1.Mutation.Write.values: object expected"); + message.values[i] = $root.google.protobuf.ListValue.fromObject(object.values[i]); + } } return message; }; /** - * Creates a plain object from a ShortRepresentation message. Also converts values to other types if specified. + * Creates a plain object from a Write message. Also converts values to other types if specified. * @function toObject - * @memberof google.spanner.v1.PlanNode.ShortRepresentation + * @memberof google.spanner.v1.Mutation.Write * @static - * @param {google.spanner.v1.PlanNode.ShortRepresentation} message ShortRepresentation + * @param {google.spanner.v1.Mutation.Write} message Write * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ShortRepresentation.toObject = function toObject(message, options) { + Write.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.subqueries = {}; + if (options.arrays || options.defaults) { + object.columns = []; + object.values = []; + } if (options.defaults) - object.description = ""; - if (message.description != null && message.hasOwnProperty("description")) - object.description = message.description; - var keys2; - if (message.subqueries && (keys2 = Object.keys(message.subqueries)).length) { - object.subqueries = {}; - for (var j = 0; j < keys2.length; ++j) - object.subqueries[keys2[j]] = message.subqueries[keys2[j]]; + object.table = ""; + if (message.table != null && message.hasOwnProperty("table")) + object.table = message.table; + if (message.columns && message.columns.length) { + object.columns = []; + for (var j = 0; j < message.columns.length; ++j) + object.columns[j] = message.columns[j]; + } + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.protobuf.ListValue.toObject(message.values[j], options); + } + return object; + }; + + /** + * Converts this Write to JSON. + * @function toJSON + * @memberof google.spanner.v1.Mutation.Write + * @instance + * @returns {Object.} JSON object + */ + Write.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Write + * @function getTypeUrl + * @memberof google.spanner.v1.Mutation.Write + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Write.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.spanner.v1.Mutation.Write"; + }; + + return Write; + })(); + + Mutation.Delete = (function() { + + /** + * Properties of a Delete. + * @memberof google.spanner.v1.Mutation + * @interface IDelete + * @property {string|null} [table] Delete table + * @property {google.spanner.v1.IKeySet|null} [keySet] Delete keySet + */ + + /** + * Constructs a new Delete. + * @memberof google.spanner.v1.Mutation + * @classdesc Represents a Delete. + * @implements IDelete + * @constructor + * @param {google.spanner.v1.Mutation.IDelete=} [properties] Properties to set + */ + function Delete(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Delete table. + * @member {string} table + * @memberof google.spanner.v1.Mutation.Delete + * @instance + */ + Delete.prototype.table = ""; + + /** + * Delete keySet. + * @member {google.spanner.v1.IKeySet|null|undefined} keySet + * @memberof google.spanner.v1.Mutation.Delete + * @instance + */ + Delete.prototype.keySet = null; + + /** + * Creates a new Delete instance using the specified properties. + * @function create + * @memberof google.spanner.v1.Mutation.Delete + * @static + * @param {google.spanner.v1.Mutation.IDelete=} [properties] Properties to set + * @returns {google.spanner.v1.Mutation.Delete} Delete instance + */ + Delete.create = function create(properties) { + return new Delete(properties); + }; + + /** + * Encodes the specified Delete message. Does not implicitly {@link google.spanner.v1.Mutation.Delete.verify|verify} messages. + * @function encode + * @memberof google.spanner.v1.Mutation.Delete + * @static + * @param {google.spanner.v1.Mutation.IDelete} message Delete message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Delete.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.table != null && Object.hasOwnProperty.call(message, "table")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.table); + if (message.keySet != null && Object.hasOwnProperty.call(message, "keySet")) + $root.google.spanner.v1.KeySet.encode(message.keySet, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Delete message, length delimited. Does not implicitly {@link google.spanner.v1.Mutation.Delete.verify|verify} messages. + * @function encodeDelimited + * @memberof google.spanner.v1.Mutation.Delete + * @static + * @param {google.spanner.v1.Mutation.IDelete} message Delete message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Delete.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Delete message from the specified reader or buffer. + * @function decode + * @memberof google.spanner.v1.Mutation.Delete + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.spanner.v1.Mutation.Delete} Delete + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Delete.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.Mutation.Delete(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.table = reader.string(); + break; + } + case 2: { + message.keySet = $root.google.spanner.v1.KeySet.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Delete message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.spanner.v1.Mutation.Delete + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.spanner.v1.Mutation.Delete} Delete + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Delete.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Delete message. + * @function verify + * @memberof google.spanner.v1.Mutation.Delete + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Delete.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.table != null && message.hasOwnProperty("table")) + if (!$util.isString(message.table)) + return "table: string expected"; + if (message.keySet != null && message.hasOwnProperty("keySet")) { + var error = $root.google.spanner.v1.KeySet.verify(message.keySet); + if (error) + return "keySet." + error; + } + return null; + }; + + /** + * Creates a Delete message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.spanner.v1.Mutation.Delete + * @static + * @param {Object.} object Plain object + * @returns {google.spanner.v1.Mutation.Delete} Delete + */ + Delete.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.v1.Mutation.Delete) + return object; + var message = new $root.google.spanner.v1.Mutation.Delete(); + if (object.table != null) + message.table = String(object.table); + if (object.keySet != null) { + if (typeof object.keySet !== "object") + throw TypeError(".google.spanner.v1.Mutation.Delete.keySet: object expected"); + message.keySet = $root.google.spanner.v1.KeySet.fromObject(object.keySet); + } + return message; + }; + + /** + * Creates a plain object from a Delete message. Also converts values to other types if specified. + * @function toObject + * @memberof google.spanner.v1.Mutation.Delete + * @static + * @param {google.spanner.v1.Mutation.Delete} message Delete + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Delete.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.table = ""; + object.keySet = null; + } + if (message.table != null && message.hasOwnProperty("table")) + object.table = message.table; + if (message.keySet != null && message.hasOwnProperty("keySet")) + object.keySet = $root.google.spanner.v1.KeySet.toObject(message.keySet, options); + return object; + }; + + /** + * Converts this Delete to JSON. + * @function toJSON + * @memberof google.spanner.v1.Mutation.Delete + * @instance + * @returns {Object.} JSON object + */ + Delete.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Delete + * @function getTypeUrl + * @memberof google.spanner.v1.Mutation.Delete + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Delete.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.spanner.v1.Mutation.Delete"; + }; + + return Delete; + })(); + + return Mutation; + })(); + + v1.ResultSet = (function() { + + /** + * Properties of a ResultSet. + * @memberof google.spanner.v1 + * @interface IResultSet + * @property {google.spanner.v1.IResultSetMetadata|null} [metadata] ResultSet metadata + * @property {Array.|null} [rows] ResultSet rows + * @property {google.spanner.v1.IResultSetStats|null} [stats] ResultSet stats + * @property {google.spanner.v1.IMultiplexedSessionPrecommitToken|null} [precommitToken] ResultSet precommitToken + */ + + /** + * Constructs a new ResultSet. + * @memberof google.spanner.v1 + * @classdesc Represents a ResultSet. + * @implements IResultSet + * @constructor + * @param {google.spanner.v1.IResultSet=} [properties] Properties to set + */ + function ResultSet(properties) { + this.rows = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResultSet metadata. + * @member {google.spanner.v1.IResultSetMetadata|null|undefined} metadata + * @memberof google.spanner.v1.ResultSet + * @instance + */ + ResultSet.prototype.metadata = null; + + /** + * ResultSet rows. + * @member {Array.} rows + * @memberof google.spanner.v1.ResultSet + * @instance + */ + ResultSet.prototype.rows = $util.emptyArray; + + /** + * ResultSet stats. + * @member {google.spanner.v1.IResultSetStats|null|undefined} stats + * @memberof google.spanner.v1.ResultSet + * @instance + */ + ResultSet.prototype.stats = null; + + /** + * ResultSet precommitToken. + * @member {google.spanner.v1.IMultiplexedSessionPrecommitToken|null|undefined} precommitToken + * @memberof google.spanner.v1.ResultSet + * @instance + */ + ResultSet.prototype.precommitToken = null; + + /** + * Creates a new ResultSet instance using the specified properties. + * @function create + * @memberof google.spanner.v1.ResultSet + * @static + * @param {google.spanner.v1.IResultSet=} [properties] Properties to set + * @returns {google.spanner.v1.ResultSet} ResultSet instance + */ + ResultSet.create = function create(properties) { + return new ResultSet(properties); + }; + + /** + * Encodes the specified ResultSet message. Does not implicitly {@link google.spanner.v1.ResultSet.verify|verify} messages. + * @function encode + * @memberof google.spanner.v1.ResultSet + * @static + * @param {google.spanner.v1.IResultSet} message ResultSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResultSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.spanner.v1.ResultSetMetadata.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.rows != null && message.rows.length) + for (var i = 0; i < message.rows.length; ++i) + $root.google.protobuf.ListValue.encode(message.rows[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.stats != null && Object.hasOwnProperty.call(message, "stats")) + $root.google.spanner.v1.ResultSetStats.encode(message.stats, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.precommitToken != null && Object.hasOwnProperty.call(message, "precommitToken")) + $root.google.spanner.v1.MultiplexedSessionPrecommitToken.encode(message.precommitToken, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResultSet message, length delimited. Does not implicitly {@link google.spanner.v1.ResultSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.spanner.v1.ResultSet + * @static + * @param {google.spanner.v1.IResultSet} message ResultSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResultSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResultSet message from the specified reader or buffer. + * @function decode + * @memberof google.spanner.v1.ResultSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.spanner.v1.ResultSet} ResultSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResultSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.ResultSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metadata = $root.google.spanner.v1.ResultSetMetadata.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.rows && message.rows.length)) + message.rows = []; + message.rows.push($root.google.protobuf.ListValue.decode(reader, reader.uint32())); + break; + } + case 3: { + message.stats = $root.google.spanner.v1.ResultSetStats.decode(reader, reader.uint32()); + break; + } + case 5: { + message.precommitToken = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResultSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.spanner.v1.ResultSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.spanner.v1.ResultSet} ResultSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResultSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResultSet message. + * @function verify + * @memberof google.spanner.v1.ResultSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResultSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.spanner.v1.ResultSetMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.rows != null && message.hasOwnProperty("rows")) { + if (!Array.isArray(message.rows)) + return "rows: array expected"; + for (var i = 0; i < message.rows.length; ++i) { + var error = $root.google.protobuf.ListValue.verify(message.rows[i]); + if (error) + return "rows." + error; } + } + if (message.stats != null && message.hasOwnProperty("stats")) { + var error = $root.google.spanner.v1.ResultSetStats.verify(message.stats); + if (error) + return "stats." + error; + } + if (message.precommitToken != null && message.hasOwnProperty("precommitToken")) { + var error = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.verify(message.precommitToken); + if (error) + return "precommitToken." + error; + } + return null; + }; + + /** + * Creates a ResultSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.spanner.v1.ResultSet + * @static + * @param {Object.} object Plain object + * @returns {google.spanner.v1.ResultSet} ResultSet + */ + ResultSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.v1.ResultSet) + return object; + var message = new $root.google.spanner.v1.ResultSet(); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.spanner.v1.ResultSet.metadata: object expected"); + message.metadata = $root.google.spanner.v1.ResultSetMetadata.fromObject(object.metadata); + } + if (object.rows) { + if (!Array.isArray(object.rows)) + throw TypeError(".google.spanner.v1.ResultSet.rows: array expected"); + message.rows = []; + for (var i = 0; i < object.rows.length; ++i) { + if (typeof object.rows[i] !== "object") + throw TypeError(".google.spanner.v1.ResultSet.rows: object expected"); + message.rows[i] = $root.google.protobuf.ListValue.fromObject(object.rows[i]); + } + } + if (object.stats != null) { + if (typeof object.stats !== "object") + throw TypeError(".google.spanner.v1.ResultSet.stats: object expected"); + message.stats = $root.google.spanner.v1.ResultSetStats.fromObject(object.stats); + } + if (object.precommitToken != null) { + if (typeof object.precommitToken !== "object") + throw TypeError(".google.spanner.v1.ResultSet.precommitToken: object expected"); + message.precommitToken = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.fromObject(object.precommitToken); + } + return message; + }; + + /** + * Creates a plain object from a ResultSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.spanner.v1.ResultSet + * @static + * @param {google.spanner.v1.ResultSet} message ResultSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResultSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rows = []; + if (options.defaults) { + object.metadata = null; + object.stats = null; + object.precommitToken = null; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.spanner.v1.ResultSetMetadata.toObject(message.metadata, options); + if (message.rows && message.rows.length) { + object.rows = []; + for (var j = 0; j < message.rows.length; ++j) + object.rows[j] = $root.google.protobuf.ListValue.toObject(message.rows[j], options); + } + if (message.stats != null && message.hasOwnProperty("stats")) + object.stats = $root.google.spanner.v1.ResultSetStats.toObject(message.stats, options); + if (message.precommitToken != null && message.hasOwnProperty("precommitToken")) + object.precommitToken = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.toObject(message.precommitToken, options); + return object; + }; + + /** + * Converts this ResultSet to JSON. + * @function toJSON + * @memberof google.spanner.v1.ResultSet + * @instance + * @returns {Object.} JSON object + */ + ResultSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResultSet + * @function getTypeUrl + * @memberof google.spanner.v1.ResultSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResultSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.spanner.v1.ResultSet"; + }; + + return ResultSet; + })(); + + v1.PartialResultSet = (function() { + + /** + * Properties of a PartialResultSet. + * @memberof google.spanner.v1 + * @interface IPartialResultSet + * @property {google.spanner.v1.IResultSetMetadata|null} [metadata] PartialResultSet metadata + * @property {Array.|null} [values] PartialResultSet values + * @property {boolean|null} [chunkedValue] PartialResultSet chunkedValue + * @property {Uint8Array|null} [resumeToken] PartialResultSet resumeToken + * @property {google.spanner.v1.IResultSetStats|null} [stats] PartialResultSet stats + * @property {google.spanner.v1.IMultiplexedSessionPrecommitToken|null} [precommitToken] PartialResultSet precommitToken + */ + + /** + * Constructs a new PartialResultSet. + * @memberof google.spanner.v1 + * @classdesc Represents a PartialResultSet. + * @implements IPartialResultSet + * @constructor + * @param {google.spanner.v1.IPartialResultSet=} [properties] Properties to set + */ + function PartialResultSet(properties) { + this.values = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PartialResultSet metadata. + * @member {google.spanner.v1.IResultSetMetadata|null|undefined} metadata + * @memberof google.spanner.v1.PartialResultSet + * @instance + */ + PartialResultSet.prototype.metadata = null; + + /** + * PartialResultSet values. + * @member {Array.} values + * @memberof google.spanner.v1.PartialResultSet + * @instance + */ + PartialResultSet.prototype.values = $util.emptyArray; + + /** + * PartialResultSet chunkedValue. + * @member {boolean} chunkedValue + * @memberof google.spanner.v1.PartialResultSet + * @instance + */ + PartialResultSet.prototype.chunkedValue = false; + + /** + * PartialResultSet resumeToken. + * @member {Uint8Array} resumeToken + * @memberof google.spanner.v1.PartialResultSet + * @instance + */ + PartialResultSet.prototype.resumeToken = $util.newBuffer([]); + + /** + * PartialResultSet stats. + * @member {google.spanner.v1.IResultSetStats|null|undefined} stats + * @memberof google.spanner.v1.PartialResultSet + * @instance + */ + PartialResultSet.prototype.stats = null; + + /** + * PartialResultSet precommitToken. + * @member {google.spanner.v1.IMultiplexedSessionPrecommitToken|null|undefined} precommitToken + * @memberof google.spanner.v1.PartialResultSet + * @instance + */ + PartialResultSet.prototype.precommitToken = null; + + /** + * Creates a new PartialResultSet instance using the specified properties. + * @function create + * @memberof google.spanner.v1.PartialResultSet + * @static + * @param {google.spanner.v1.IPartialResultSet=} [properties] Properties to set + * @returns {google.spanner.v1.PartialResultSet} PartialResultSet instance + */ + PartialResultSet.create = function create(properties) { + return new PartialResultSet(properties); + }; + + /** + * Encodes the specified PartialResultSet message. Does not implicitly {@link google.spanner.v1.PartialResultSet.verify|verify} messages. + * @function encode + * @memberof google.spanner.v1.PartialResultSet + * @static + * @param {google.spanner.v1.IPartialResultSet} message PartialResultSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartialResultSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.spanner.v1.ResultSetMetadata.encode(message.metadata, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.values != null && message.values.length) + for (var i = 0; i < message.values.length; ++i) + $root.google.protobuf.Value.encode(message.values[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.chunkedValue != null && Object.hasOwnProperty.call(message, "chunkedValue")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.chunkedValue); + if (message.resumeToken != null && Object.hasOwnProperty.call(message, "resumeToken")) + writer.uint32(/* id 4, wireType 2 =*/34).bytes(message.resumeToken); + if (message.stats != null && Object.hasOwnProperty.call(message, "stats")) + $root.google.spanner.v1.ResultSetStats.encode(message.stats, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.precommitToken != null && Object.hasOwnProperty.call(message, "precommitToken")) + $root.google.spanner.v1.MultiplexedSessionPrecommitToken.encode(message.precommitToken, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PartialResultSet message, length delimited. Does not implicitly {@link google.spanner.v1.PartialResultSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.spanner.v1.PartialResultSet + * @static + * @param {google.spanner.v1.IPartialResultSet} message PartialResultSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PartialResultSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PartialResultSet message from the specified reader or buffer. + * @function decode + * @memberof google.spanner.v1.PartialResultSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.spanner.v1.PartialResultSet} PartialResultSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartialResultSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.PartialResultSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.metadata = $root.google.spanner.v1.ResultSetMetadata.decode(reader, reader.uint32()); + break; + } + case 2: { + if (!(message.values && message.values.length)) + message.values = []; + message.values.push($root.google.protobuf.Value.decode(reader, reader.uint32())); + break; + } + case 3: { + message.chunkedValue = reader.bool(); + break; + } + case 4: { + message.resumeToken = reader.bytes(); + break; + } + case 5: { + message.stats = $root.google.spanner.v1.ResultSetStats.decode(reader, reader.uint32()); + break; + } + case 8: { + message.precommitToken = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PartialResultSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.spanner.v1.PartialResultSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.spanner.v1.PartialResultSet} PartialResultSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PartialResultSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PartialResultSet message. + * @function verify + * @memberof google.spanner.v1.PartialResultSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PartialResultSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.spanner.v1.ResultSetMetadata.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.values != null && message.hasOwnProperty("values")) { + if (!Array.isArray(message.values)) + return "values: array expected"; + for (var i = 0; i < message.values.length; ++i) { + var error = $root.google.protobuf.Value.verify(message.values[i]); + if (error) + return "values." + error; + } + } + if (message.chunkedValue != null && message.hasOwnProperty("chunkedValue")) + if (typeof message.chunkedValue !== "boolean") + return "chunkedValue: boolean expected"; + if (message.resumeToken != null && message.hasOwnProperty("resumeToken")) + if (!(message.resumeToken && typeof message.resumeToken.length === "number" || $util.isString(message.resumeToken))) + return "resumeToken: buffer expected"; + if (message.stats != null && message.hasOwnProperty("stats")) { + var error = $root.google.spanner.v1.ResultSetStats.verify(message.stats); + if (error) + return "stats." + error; + } + if (message.precommitToken != null && message.hasOwnProperty("precommitToken")) { + var error = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.verify(message.precommitToken); + if (error) + return "precommitToken." + error; + } + return null; + }; + + /** + * Creates a PartialResultSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.spanner.v1.PartialResultSet + * @static + * @param {Object.} object Plain object + * @returns {google.spanner.v1.PartialResultSet} PartialResultSet + */ + PartialResultSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.v1.PartialResultSet) + return object; + var message = new $root.google.spanner.v1.PartialResultSet(); + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.spanner.v1.PartialResultSet.metadata: object expected"); + message.metadata = $root.google.spanner.v1.ResultSetMetadata.fromObject(object.metadata); + } + if (object.values) { + if (!Array.isArray(object.values)) + throw TypeError(".google.spanner.v1.PartialResultSet.values: array expected"); + message.values = []; + for (var i = 0; i < object.values.length; ++i) { + if (typeof object.values[i] !== "object") + throw TypeError(".google.spanner.v1.PartialResultSet.values: object expected"); + message.values[i] = $root.google.protobuf.Value.fromObject(object.values[i]); + } + } + if (object.chunkedValue != null) + message.chunkedValue = Boolean(object.chunkedValue); + if (object.resumeToken != null) + if (typeof object.resumeToken === "string") + $util.base64.decode(object.resumeToken, message.resumeToken = $util.newBuffer($util.base64.length(object.resumeToken)), 0); + else if (object.resumeToken.length >= 0) + message.resumeToken = object.resumeToken; + if (object.stats != null) { + if (typeof object.stats !== "object") + throw TypeError(".google.spanner.v1.PartialResultSet.stats: object expected"); + message.stats = $root.google.spanner.v1.ResultSetStats.fromObject(object.stats); + } + if (object.precommitToken != null) { + if (typeof object.precommitToken !== "object") + throw TypeError(".google.spanner.v1.PartialResultSet.precommitToken: object expected"); + message.precommitToken = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.fromObject(object.precommitToken); + } + return message; + }; + + /** + * Creates a plain object from a PartialResultSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.spanner.v1.PartialResultSet + * @static + * @param {google.spanner.v1.PartialResultSet} message PartialResultSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PartialResultSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.values = []; + if (options.defaults) { + object.metadata = null; + object.chunkedValue = false; + if (options.bytes === String) + object.resumeToken = ""; + else { + object.resumeToken = []; + if (options.bytes !== Array) + object.resumeToken = $util.newBuffer(object.resumeToken); + } + object.stats = null; + object.precommitToken = null; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.spanner.v1.ResultSetMetadata.toObject(message.metadata, options); + if (message.values && message.values.length) { + object.values = []; + for (var j = 0; j < message.values.length; ++j) + object.values[j] = $root.google.protobuf.Value.toObject(message.values[j], options); + } + if (message.chunkedValue != null && message.hasOwnProperty("chunkedValue")) + object.chunkedValue = message.chunkedValue; + if (message.resumeToken != null && message.hasOwnProperty("resumeToken")) + object.resumeToken = options.bytes === String ? $util.base64.encode(message.resumeToken, 0, message.resumeToken.length) : options.bytes === Array ? Array.prototype.slice.call(message.resumeToken) : message.resumeToken; + if (message.stats != null && message.hasOwnProperty("stats")) + object.stats = $root.google.spanner.v1.ResultSetStats.toObject(message.stats, options); + if (message.precommitToken != null && message.hasOwnProperty("precommitToken")) + object.precommitToken = $root.google.spanner.v1.MultiplexedSessionPrecommitToken.toObject(message.precommitToken, options); + return object; + }; + + /** + * Converts this PartialResultSet to JSON. + * @function toJSON + * @memberof google.spanner.v1.PartialResultSet + * @instance + * @returns {Object.} JSON object + */ + PartialResultSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PartialResultSet + * @function getTypeUrl + * @memberof google.spanner.v1.PartialResultSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PartialResultSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.spanner.v1.PartialResultSet"; + }; + + return PartialResultSet; + })(); + + v1.ResultSetMetadata = (function() { + + /** + * Properties of a ResultSetMetadata. + * @memberof google.spanner.v1 + * @interface IResultSetMetadata + * @property {google.spanner.v1.IStructType|null} [rowType] ResultSetMetadata rowType + * @property {google.spanner.v1.ITransaction|null} [transaction] ResultSetMetadata transaction + * @property {google.spanner.v1.IStructType|null} [undeclaredParameters] ResultSetMetadata undeclaredParameters + */ + + /** + * Constructs a new ResultSetMetadata. + * @memberof google.spanner.v1 + * @classdesc Represents a ResultSetMetadata. + * @implements IResultSetMetadata + * @constructor + * @param {google.spanner.v1.IResultSetMetadata=} [properties] Properties to set + */ + function ResultSetMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResultSetMetadata rowType. + * @member {google.spanner.v1.IStructType|null|undefined} rowType + * @memberof google.spanner.v1.ResultSetMetadata + * @instance + */ + ResultSetMetadata.prototype.rowType = null; + + /** + * ResultSetMetadata transaction. + * @member {google.spanner.v1.ITransaction|null|undefined} transaction + * @memberof google.spanner.v1.ResultSetMetadata + * @instance + */ + ResultSetMetadata.prototype.transaction = null; + + /** + * ResultSetMetadata undeclaredParameters. + * @member {google.spanner.v1.IStructType|null|undefined} undeclaredParameters + * @memberof google.spanner.v1.ResultSetMetadata + * @instance + */ + ResultSetMetadata.prototype.undeclaredParameters = null; + + /** + * Creates a new ResultSetMetadata instance using the specified properties. + * @function create + * @memberof google.spanner.v1.ResultSetMetadata + * @static + * @param {google.spanner.v1.IResultSetMetadata=} [properties] Properties to set + * @returns {google.spanner.v1.ResultSetMetadata} ResultSetMetadata instance + */ + ResultSetMetadata.create = function create(properties) { + return new ResultSetMetadata(properties); + }; + + /** + * Encodes the specified ResultSetMetadata message. Does not implicitly {@link google.spanner.v1.ResultSetMetadata.verify|verify} messages. + * @function encode + * @memberof google.spanner.v1.ResultSetMetadata + * @static + * @param {google.spanner.v1.IResultSetMetadata} message ResultSetMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResultSetMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.rowType != null && Object.hasOwnProperty.call(message, "rowType")) + $root.google.spanner.v1.StructType.encode(message.rowType, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.transaction != null && Object.hasOwnProperty.call(message, "transaction")) + $root.google.spanner.v1.Transaction.encode(message.transaction, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.undeclaredParameters != null && Object.hasOwnProperty.call(message, "undeclaredParameters")) + $root.google.spanner.v1.StructType.encode(message.undeclaredParameters, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ResultSetMetadata message, length delimited. Does not implicitly {@link google.spanner.v1.ResultSetMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.spanner.v1.ResultSetMetadata + * @static + * @param {google.spanner.v1.IResultSetMetadata} message ResultSetMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResultSetMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResultSetMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.spanner.v1.ResultSetMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.spanner.v1.ResultSetMetadata} ResultSetMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResultSetMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.ResultSetMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.rowType = $root.google.spanner.v1.StructType.decode(reader, reader.uint32()); + break; + } + case 2: { + message.transaction = $root.google.spanner.v1.Transaction.decode(reader, reader.uint32()); + break; + } + case 3: { + message.undeclaredParameters = $root.google.spanner.v1.StructType.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResultSetMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.spanner.v1.ResultSetMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.spanner.v1.ResultSetMetadata} ResultSetMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResultSetMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResultSetMetadata message. + * @function verify + * @memberof google.spanner.v1.ResultSetMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResultSetMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rowType != null && message.hasOwnProperty("rowType")) { + var error = $root.google.spanner.v1.StructType.verify(message.rowType); + if (error) + return "rowType." + error; + } + if (message.transaction != null && message.hasOwnProperty("transaction")) { + var error = $root.google.spanner.v1.Transaction.verify(message.transaction); + if (error) + return "transaction." + error; + } + if (message.undeclaredParameters != null && message.hasOwnProperty("undeclaredParameters")) { + var error = $root.google.spanner.v1.StructType.verify(message.undeclaredParameters); + if (error) + return "undeclaredParameters." + error; + } + return null; + }; + + /** + * Creates a ResultSetMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.spanner.v1.ResultSetMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.spanner.v1.ResultSetMetadata} ResultSetMetadata + */ + ResultSetMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.v1.ResultSetMetadata) return object; - }; + var message = new $root.google.spanner.v1.ResultSetMetadata(); + if (object.rowType != null) { + if (typeof object.rowType !== "object") + throw TypeError(".google.spanner.v1.ResultSetMetadata.rowType: object expected"); + message.rowType = $root.google.spanner.v1.StructType.fromObject(object.rowType); + } + if (object.transaction != null) { + if (typeof object.transaction !== "object") + throw TypeError(".google.spanner.v1.ResultSetMetadata.transaction: object expected"); + message.transaction = $root.google.spanner.v1.Transaction.fromObject(object.transaction); + } + if (object.undeclaredParameters != null) { + if (typeof object.undeclaredParameters !== "object") + throw TypeError(".google.spanner.v1.ResultSetMetadata.undeclaredParameters: object expected"); + message.undeclaredParameters = $root.google.spanner.v1.StructType.fromObject(object.undeclaredParameters); + } + return message; + }; - /** - * Converts this ShortRepresentation to JSON. - * @function toJSON - * @memberof google.spanner.v1.PlanNode.ShortRepresentation - * @instance - * @returns {Object.} JSON object - */ - ShortRepresentation.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Creates a plain object from a ResultSetMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.spanner.v1.ResultSetMetadata + * @static + * @param {google.spanner.v1.ResultSetMetadata} message ResultSetMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResultSetMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.rowType = null; + object.transaction = null; + object.undeclaredParameters = null; + } + if (message.rowType != null && message.hasOwnProperty("rowType")) + object.rowType = $root.google.spanner.v1.StructType.toObject(message.rowType, options); + if (message.transaction != null && message.hasOwnProperty("transaction")) + object.transaction = $root.google.spanner.v1.Transaction.toObject(message.transaction, options); + if (message.undeclaredParameters != null && message.hasOwnProperty("undeclaredParameters")) + object.undeclaredParameters = $root.google.spanner.v1.StructType.toObject(message.undeclaredParameters, options); + return object; + }; - /** - * Gets the default type url for ShortRepresentation - * @function getTypeUrl - * @memberof google.spanner.v1.PlanNode.ShortRepresentation - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ShortRepresentation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.spanner.v1.PlanNode.ShortRepresentation"; - }; + /** + * Converts this ResultSetMetadata to JSON. + * @function toJSON + * @memberof google.spanner.v1.ResultSetMetadata + * @instance + * @returns {Object.} JSON object + */ + ResultSetMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - return ShortRepresentation; - })(); + /** + * Gets the default type url for ResultSetMetadata + * @function getTypeUrl + * @memberof google.spanner.v1.ResultSetMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResultSetMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.spanner.v1.ResultSetMetadata"; + }; - return PlanNode; + return ResultSetMetadata; })(); - v1.QueryPlan = (function() { + v1.ResultSetStats = (function() { /** - * Properties of a QueryPlan. + * Properties of a ResultSetStats. * @memberof google.spanner.v1 - * @interface IQueryPlan - * @property {Array.|null} [planNodes] QueryPlan planNodes + * @interface IResultSetStats + * @property {google.spanner.v1.IQueryPlan|null} [queryPlan] ResultSetStats queryPlan + * @property {google.protobuf.IStruct|null} [queryStats] ResultSetStats queryStats + * @property {number|Long|null} [rowCountExact] ResultSetStats rowCountExact + * @property {number|Long|null} [rowCountLowerBound] ResultSetStats rowCountLowerBound */ /** - * Constructs a new QueryPlan. + * Constructs a new ResultSetStats. * @memberof google.spanner.v1 - * @classdesc Represents a QueryPlan. - * @implements IQueryPlan + * @classdesc Represents a ResultSetStats. + * @implements IResultSetStats * @constructor - * @param {google.spanner.v1.IQueryPlan=} [properties] Properties to set + * @param {google.spanner.v1.IResultSetStats=} [properties] Properties to set */ - function QueryPlan(properties) { - this.planNodes = []; + function ResultSetStats(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -83664,78 +85670,131 @@ } /** - * QueryPlan planNodes. - * @member {Array.} planNodes - * @memberof google.spanner.v1.QueryPlan + * ResultSetStats queryPlan. + * @member {google.spanner.v1.IQueryPlan|null|undefined} queryPlan + * @memberof google.spanner.v1.ResultSetStats * @instance */ - QueryPlan.prototype.planNodes = $util.emptyArray; + ResultSetStats.prototype.queryPlan = null; /** - * Creates a new QueryPlan instance using the specified properties. + * ResultSetStats queryStats. + * @member {google.protobuf.IStruct|null|undefined} queryStats + * @memberof google.spanner.v1.ResultSetStats + * @instance + */ + ResultSetStats.prototype.queryStats = null; + + /** + * ResultSetStats rowCountExact. + * @member {number|Long|null|undefined} rowCountExact + * @memberof google.spanner.v1.ResultSetStats + * @instance + */ + ResultSetStats.prototype.rowCountExact = null; + + /** + * ResultSetStats rowCountLowerBound. + * @member {number|Long|null|undefined} rowCountLowerBound + * @memberof google.spanner.v1.ResultSetStats + * @instance + */ + ResultSetStats.prototype.rowCountLowerBound = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ResultSetStats rowCount. + * @member {"rowCountExact"|"rowCountLowerBound"|undefined} rowCount + * @memberof google.spanner.v1.ResultSetStats + * @instance + */ + Object.defineProperty(ResultSetStats.prototype, "rowCount", { + get: $util.oneOfGetter($oneOfFields = ["rowCountExact", "rowCountLowerBound"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ResultSetStats instance using the specified properties. * @function create - * @memberof google.spanner.v1.QueryPlan + * @memberof google.spanner.v1.ResultSetStats * @static - * @param {google.spanner.v1.IQueryPlan=} [properties] Properties to set - * @returns {google.spanner.v1.QueryPlan} QueryPlan instance + * @param {google.spanner.v1.IResultSetStats=} [properties] Properties to set + * @returns {google.spanner.v1.ResultSetStats} ResultSetStats instance */ - QueryPlan.create = function create(properties) { - return new QueryPlan(properties); + ResultSetStats.create = function create(properties) { + return new ResultSetStats(properties); }; /** - * Encodes the specified QueryPlan message. Does not implicitly {@link google.spanner.v1.QueryPlan.verify|verify} messages. + * Encodes the specified ResultSetStats message. Does not implicitly {@link google.spanner.v1.ResultSetStats.verify|verify} messages. * @function encode - * @memberof google.spanner.v1.QueryPlan + * @memberof google.spanner.v1.ResultSetStats * @static - * @param {google.spanner.v1.IQueryPlan} message QueryPlan message or plain object to encode + * @param {google.spanner.v1.IResultSetStats} message ResultSetStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryPlan.encode = function encode(message, writer) { + ResultSetStats.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.planNodes != null && message.planNodes.length) - for (var i = 0; i < message.planNodes.length; ++i) - $root.google.spanner.v1.PlanNode.encode(message.planNodes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.queryPlan != null && Object.hasOwnProperty.call(message, "queryPlan")) + $root.google.spanner.v1.QueryPlan.encode(message.queryPlan, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.queryStats != null && Object.hasOwnProperty.call(message, "queryStats")) + $root.google.protobuf.Struct.encode(message.queryStats, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.rowCountExact != null && Object.hasOwnProperty.call(message, "rowCountExact")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.rowCountExact); + if (message.rowCountLowerBound != null && Object.hasOwnProperty.call(message, "rowCountLowerBound")) + writer.uint32(/* id 4, wireType 0 =*/32).int64(message.rowCountLowerBound); return writer; }; /** - * Encodes the specified QueryPlan message, length delimited. Does not implicitly {@link google.spanner.v1.QueryPlan.verify|verify} messages. + * Encodes the specified ResultSetStats message, length delimited. Does not implicitly {@link google.spanner.v1.ResultSetStats.verify|verify} messages. * @function encodeDelimited - * @memberof google.spanner.v1.QueryPlan + * @memberof google.spanner.v1.ResultSetStats * @static - * @param {google.spanner.v1.IQueryPlan} message QueryPlan message or plain object to encode + * @param {google.spanner.v1.IResultSetStats} message ResultSetStats message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - QueryPlan.encodeDelimited = function encodeDelimited(message, writer) { + ResultSetStats.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a QueryPlan message from the specified reader or buffer. + * Decodes a ResultSetStats message from the specified reader or buffer. * @function decode - * @memberof google.spanner.v1.QueryPlan + * @memberof google.spanner.v1.ResultSetStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.spanner.v1.QueryPlan} QueryPlan + * @returns {google.spanner.v1.ResultSetStats} ResultSetStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryPlan.decode = function decode(reader, length) { + ResultSetStats.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.QueryPlan(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.ResultSetStats(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.planNodes && message.planNodes.length)) - message.planNodes = []; - message.planNodes.push($root.google.spanner.v1.PlanNode.decode(reader, reader.uint32())); + message.queryPlan = $root.google.spanner.v1.QueryPlan.decode(reader, reader.uint32()); + break; + } + case 2: { + message.queryStats = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 3: { + message.rowCountExact = reader.int64(); + break; + } + case 4: { + message.rowCountLowerBound = reader.int64(); break; } default: @@ -83747,142 +85806,195 @@ }; /** - * Decodes a QueryPlan message from the specified reader or buffer, length delimited. + * Decodes a ResultSetStats message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.spanner.v1.QueryPlan + * @memberof google.spanner.v1.ResultSetStats * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.spanner.v1.QueryPlan} QueryPlan + * @returns {google.spanner.v1.ResultSetStats} ResultSetStats * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - QueryPlan.decodeDelimited = function decodeDelimited(reader) { + ResultSetStats.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a QueryPlan message. + * Verifies a ResultSetStats message. * @function verify - * @memberof google.spanner.v1.QueryPlan + * @memberof google.spanner.v1.ResultSetStats * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - QueryPlan.verify = function verify(message) { + ResultSetStats.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.planNodes != null && message.hasOwnProperty("planNodes")) { - if (!Array.isArray(message.planNodes)) - return "planNodes: array expected"; - for (var i = 0; i < message.planNodes.length; ++i) { - var error = $root.google.spanner.v1.PlanNode.verify(message.planNodes[i]); - if (error) - return "planNodes." + error; - } + var properties = {}; + if (message.queryPlan != null && message.hasOwnProperty("queryPlan")) { + var error = $root.google.spanner.v1.QueryPlan.verify(message.queryPlan); + if (error) + return "queryPlan." + error; + } + if (message.queryStats != null && message.hasOwnProperty("queryStats")) { + var error = $root.google.protobuf.Struct.verify(message.queryStats); + if (error) + return "queryStats." + error; + } + if (message.rowCountExact != null && message.hasOwnProperty("rowCountExact")) { + properties.rowCount = 1; + if (!$util.isInteger(message.rowCountExact) && !(message.rowCountExact && $util.isInteger(message.rowCountExact.low) && $util.isInteger(message.rowCountExact.high))) + return "rowCountExact: integer|Long expected"; + } + if (message.rowCountLowerBound != null && message.hasOwnProperty("rowCountLowerBound")) { + if (properties.rowCount === 1) + return "rowCount: multiple values"; + properties.rowCount = 1; + if (!$util.isInteger(message.rowCountLowerBound) && !(message.rowCountLowerBound && $util.isInteger(message.rowCountLowerBound.low) && $util.isInteger(message.rowCountLowerBound.high))) + return "rowCountLowerBound: integer|Long expected"; } return null; }; /** - * Creates a QueryPlan message from a plain object. Also converts values to their respective internal types. + * Creates a ResultSetStats message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.spanner.v1.QueryPlan + * @memberof google.spanner.v1.ResultSetStats * @static * @param {Object.} object Plain object - * @returns {google.spanner.v1.QueryPlan} QueryPlan + * @returns {google.spanner.v1.ResultSetStats} ResultSetStats */ - QueryPlan.fromObject = function fromObject(object) { - if (object instanceof $root.google.spanner.v1.QueryPlan) + ResultSetStats.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.v1.ResultSetStats) return object; - var message = new $root.google.spanner.v1.QueryPlan(); - if (object.planNodes) { - if (!Array.isArray(object.planNodes)) - throw TypeError(".google.spanner.v1.QueryPlan.planNodes: array expected"); - message.planNodes = []; - for (var i = 0; i < object.planNodes.length; ++i) { - if (typeof object.planNodes[i] !== "object") - throw TypeError(".google.spanner.v1.QueryPlan.planNodes: object expected"); - message.planNodes[i] = $root.google.spanner.v1.PlanNode.fromObject(object.planNodes[i]); - } + var message = new $root.google.spanner.v1.ResultSetStats(); + if (object.queryPlan != null) { + if (typeof object.queryPlan !== "object") + throw TypeError(".google.spanner.v1.ResultSetStats.queryPlan: object expected"); + message.queryPlan = $root.google.spanner.v1.QueryPlan.fromObject(object.queryPlan); + } + if (object.queryStats != null) { + if (typeof object.queryStats !== "object") + throw TypeError(".google.spanner.v1.ResultSetStats.queryStats: object expected"); + message.queryStats = $root.google.protobuf.Struct.fromObject(object.queryStats); } + if (object.rowCountExact != null) + if ($util.Long) + (message.rowCountExact = $util.Long.fromValue(object.rowCountExact)).unsigned = false; + else if (typeof object.rowCountExact === "string") + message.rowCountExact = parseInt(object.rowCountExact, 10); + else if (typeof object.rowCountExact === "number") + message.rowCountExact = object.rowCountExact; + else if (typeof object.rowCountExact === "object") + message.rowCountExact = new $util.LongBits(object.rowCountExact.low >>> 0, object.rowCountExact.high >>> 0).toNumber(); + if (object.rowCountLowerBound != null) + if ($util.Long) + (message.rowCountLowerBound = $util.Long.fromValue(object.rowCountLowerBound)).unsigned = false; + else if (typeof object.rowCountLowerBound === "string") + message.rowCountLowerBound = parseInt(object.rowCountLowerBound, 10); + else if (typeof object.rowCountLowerBound === "number") + message.rowCountLowerBound = object.rowCountLowerBound; + else if (typeof object.rowCountLowerBound === "object") + message.rowCountLowerBound = new $util.LongBits(object.rowCountLowerBound.low >>> 0, object.rowCountLowerBound.high >>> 0).toNumber(); return message; }; /** - * Creates a plain object from a QueryPlan message. Also converts values to other types if specified. + * Creates a plain object from a ResultSetStats message. Also converts values to other types if specified. * @function toObject - * @memberof google.spanner.v1.QueryPlan + * @memberof google.spanner.v1.ResultSetStats * @static - * @param {google.spanner.v1.QueryPlan} message QueryPlan + * @param {google.spanner.v1.ResultSetStats} message ResultSetStats * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - QueryPlan.toObject = function toObject(message, options) { + ResultSetStats.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.planNodes = []; - if (message.planNodes && message.planNodes.length) { - object.planNodes = []; - for (var j = 0; j < message.planNodes.length; ++j) - object.planNodes[j] = $root.google.spanner.v1.PlanNode.toObject(message.planNodes[j], options); + if (options.defaults) { + object.queryPlan = null; + object.queryStats = null; + } + if (message.queryPlan != null && message.hasOwnProperty("queryPlan")) + object.queryPlan = $root.google.spanner.v1.QueryPlan.toObject(message.queryPlan, options); + if (message.queryStats != null && message.hasOwnProperty("queryStats")) + object.queryStats = $root.google.protobuf.Struct.toObject(message.queryStats, options); + if (message.rowCountExact != null && message.hasOwnProperty("rowCountExact")) { + if (typeof message.rowCountExact === "number") + object.rowCountExact = options.longs === String ? String(message.rowCountExact) : message.rowCountExact; + else + object.rowCountExact = options.longs === String ? $util.Long.prototype.toString.call(message.rowCountExact) : options.longs === Number ? new $util.LongBits(message.rowCountExact.low >>> 0, message.rowCountExact.high >>> 0).toNumber() : message.rowCountExact; + if (options.oneofs) + object.rowCount = "rowCountExact"; + } + if (message.rowCountLowerBound != null && message.hasOwnProperty("rowCountLowerBound")) { + if (typeof message.rowCountLowerBound === "number") + object.rowCountLowerBound = options.longs === String ? String(message.rowCountLowerBound) : message.rowCountLowerBound; + else + object.rowCountLowerBound = options.longs === String ? $util.Long.prototype.toString.call(message.rowCountLowerBound) : options.longs === Number ? new $util.LongBits(message.rowCountLowerBound.low >>> 0, message.rowCountLowerBound.high >>> 0).toNumber() : message.rowCountLowerBound; + if (options.oneofs) + object.rowCount = "rowCountLowerBound"; } return object; }; /** - * Converts this QueryPlan to JSON. + * Converts this ResultSetStats to JSON. * @function toJSON - * @memberof google.spanner.v1.QueryPlan + * @memberof google.spanner.v1.ResultSetStats * @instance * @returns {Object.} JSON object */ - QueryPlan.prototype.toJSON = function toJSON() { + ResultSetStats.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for QueryPlan + * Gets the default type url for ResultSetStats * @function getTypeUrl - * @memberof google.spanner.v1.QueryPlan + * @memberof google.spanner.v1.ResultSetStats * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - QueryPlan.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ResultSetStats.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.spanner.v1.QueryPlan"; + return typeUrlPrefix + "/google.spanner.v1.ResultSetStats"; }; - return QueryPlan; + return ResultSetStats; })(); - v1.TransactionOptions = (function() { + v1.PlanNode = (function() { /** - * Properties of a TransactionOptions. + * Properties of a PlanNode. * @memberof google.spanner.v1 - * @interface ITransactionOptions - * @property {google.spanner.v1.TransactionOptions.IReadWrite|null} [readWrite] TransactionOptions readWrite - * @property {google.spanner.v1.TransactionOptions.IPartitionedDml|null} [partitionedDml] TransactionOptions partitionedDml - * @property {google.spanner.v1.TransactionOptions.IReadOnly|null} [readOnly] TransactionOptions readOnly - * @property {boolean|null} [excludeTxnFromChangeStreams] TransactionOptions excludeTxnFromChangeStreams + * @interface IPlanNode + * @property {number|null} [index] PlanNode index + * @property {google.spanner.v1.PlanNode.Kind|null} [kind] PlanNode kind + * @property {string|null} [displayName] PlanNode displayName + * @property {Array.|null} [childLinks] PlanNode childLinks + * @property {google.spanner.v1.PlanNode.IShortRepresentation|null} [shortRepresentation] PlanNode shortRepresentation + * @property {google.protobuf.IStruct|null} [metadata] PlanNode metadata + * @property {google.protobuf.IStruct|null} [executionStats] PlanNode executionStats */ /** - * Constructs a new TransactionOptions. + * Constructs a new PlanNode. * @memberof google.spanner.v1 - * @classdesc Represents a TransactionOptions. - * @implements ITransactionOptions + * @classdesc Represents a PlanNode. + * @implements IPlanNode * @constructor - * @param {google.spanner.v1.ITransactionOptions=} [properties] Properties to set + * @param {google.spanner.v1.IPlanNode=} [properties] Properties to set */ - function TransactionOptions(properties) { + function PlanNode(properties) { + this.childLinks = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -83890,131 +86002,162 @@ } /** - * TransactionOptions readWrite. - * @member {google.spanner.v1.TransactionOptions.IReadWrite|null|undefined} readWrite - * @memberof google.spanner.v1.TransactionOptions + * PlanNode index. + * @member {number} index + * @memberof google.spanner.v1.PlanNode * @instance */ - TransactionOptions.prototype.readWrite = null; + PlanNode.prototype.index = 0; /** - * TransactionOptions partitionedDml. - * @member {google.spanner.v1.TransactionOptions.IPartitionedDml|null|undefined} partitionedDml - * @memberof google.spanner.v1.TransactionOptions + * PlanNode kind. + * @member {google.spanner.v1.PlanNode.Kind} kind + * @memberof google.spanner.v1.PlanNode * @instance */ - TransactionOptions.prototype.partitionedDml = null; + PlanNode.prototype.kind = 0; /** - * TransactionOptions readOnly. - * @member {google.spanner.v1.TransactionOptions.IReadOnly|null|undefined} readOnly - * @memberof google.spanner.v1.TransactionOptions + * PlanNode displayName. + * @member {string} displayName + * @memberof google.spanner.v1.PlanNode * @instance */ - TransactionOptions.prototype.readOnly = null; + PlanNode.prototype.displayName = ""; /** - * TransactionOptions excludeTxnFromChangeStreams. - * @member {boolean} excludeTxnFromChangeStreams - * @memberof google.spanner.v1.TransactionOptions + * PlanNode childLinks. + * @member {Array.} childLinks + * @memberof google.spanner.v1.PlanNode * @instance */ - TransactionOptions.prototype.excludeTxnFromChangeStreams = false; + PlanNode.prototype.childLinks = $util.emptyArray; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * PlanNode shortRepresentation. + * @member {google.spanner.v1.PlanNode.IShortRepresentation|null|undefined} shortRepresentation + * @memberof google.spanner.v1.PlanNode + * @instance + */ + PlanNode.prototype.shortRepresentation = null; /** - * TransactionOptions mode. - * @member {"readWrite"|"partitionedDml"|"readOnly"|undefined} mode - * @memberof google.spanner.v1.TransactionOptions + * PlanNode metadata. + * @member {google.protobuf.IStruct|null|undefined} metadata + * @memberof google.spanner.v1.PlanNode * @instance */ - Object.defineProperty(TransactionOptions.prototype, "mode", { - get: $util.oneOfGetter($oneOfFields = ["readWrite", "partitionedDml", "readOnly"]), - set: $util.oneOfSetter($oneOfFields) - }); + PlanNode.prototype.metadata = null; /** - * Creates a new TransactionOptions instance using the specified properties. + * PlanNode executionStats. + * @member {google.protobuf.IStruct|null|undefined} executionStats + * @memberof google.spanner.v1.PlanNode + * @instance + */ + PlanNode.prototype.executionStats = null; + + /** + * Creates a new PlanNode instance using the specified properties. * @function create - * @memberof google.spanner.v1.TransactionOptions + * @memberof google.spanner.v1.PlanNode * @static - * @param {google.spanner.v1.ITransactionOptions=} [properties] Properties to set - * @returns {google.spanner.v1.TransactionOptions} TransactionOptions instance + * @param {google.spanner.v1.IPlanNode=} [properties] Properties to set + * @returns {google.spanner.v1.PlanNode} PlanNode instance */ - TransactionOptions.create = function create(properties) { - return new TransactionOptions(properties); + PlanNode.create = function create(properties) { + return new PlanNode(properties); }; /** - * Encodes the specified TransactionOptions message. Does not implicitly {@link google.spanner.v1.TransactionOptions.verify|verify} messages. + * Encodes the specified PlanNode message. Does not implicitly {@link google.spanner.v1.PlanNode.verify|verify} messages. * @function encode - * @memberof google.spanner.v1.TransactionOptions + * @memberof google.spanner.v1.PlanNode * @static - * @param {google.spanner.v1.ITransactionOptions} message TransactionOptions message or plain object to encode + * @param {google.spanner.v1.IPlanNode} message PlanNode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransactionOptions.encode = function encode(message, writer) { + PlanNode.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.readWrite != null && Object.hasOwnProperty.call(message, "readWrite")) - $root.google.spanner.v1.TransactionOptions.ReadWrite.encode(message.readWrite, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.readOnly != null && Object.hasOwnProperty.call(message, "readOnly")) - $root.google.spanner.v1.TransactionOptions.ReadOnly.encode(message.readOnly, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.partitionedDml != null && Object.hasOwnProperty.call(message, "partitionedDml")) - $root.google.spanner.v1.TransactionOptions.PartitionedDml.encode(message.partitionedDml, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.excludeTxnFromChangeStreams != null && Object.hasOwnProperty.call(message, "excludeTxnFromChangeStreams")) - writer.uint32(/* id 5, wireType 0 =*/40).bool(message.excludeTxnFromChangeStreams); + if (message.index != null && Object.hasOwnProperty.call(message, "index")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.index); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.kind); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.childLinks != null && message.childLinks.length) + for (var i = 0; i < message.childLinks.length; ++i) + $root.google.spanner.v1.PlanNode.ChildLink.encode(message.childLinks[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.shortRepresentation != null && Object.hasOwnProperty.call(message, "shortRepresentation")) + $root.google.spanner.v1.PlanNode.ShortRepresentation.encode(message.shortRepresentation, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); + if (message.metadata != null && Object.hasOwnProperty.call(message, "metadata")) + $root.google.protobuf.Struct.encode(message.metadata, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.executionStats != null && Object.hasOwnProperty.call(message, "executionStats")) + $root.google.protobuf.Struct.encode(message.executionStats, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); return writer; }; /** - * Encodes the specified TransactionOptions message, length delimited. Does not implicitly {@link google.spanner.v1.TransactionOptions.verify|verify} messages. + * Encodes the specified PlanNode message, length delimited. Does not implicitly {@link google.spanner.v1.PlanNode.verify|verify} messages. * @function encodeDelimited - * @memberof google.spanner.v1.TransactionOptions + * @memberof google.spanner.v1.PlanNode * @static - * @param {google.spanner.v1.ITransactionOptions} message TransactionOptions message or plain object to encode + * @param {google.spanner.v1.IPlanNode} message PlanNode message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransactionOptions.encodeDelimited = function encodeDelimited(message, writer) { + PlanNode.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TransactionOptions message from the specified reader or buffer. + * Decodes a PlanNode message from the specified reader or buffer. * @function decode - * @memberof google.spanner.v1.TransactionOptions + * @memberof google.spanner.v1.PlanNode * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.spanner.v1.TransactionOptions} TransactionOptions + * @returns {google.spanner.v1.PlanNode} PlanNode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransactionOptions.decode = function decode(reader, length) { + PlanNode.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.TransactionOptions(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.PlanNode(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.readWrite = $root.google.spanner.v1.TransactionOptions.ReadWrite.decode(reader, reader.uint32()); + message.index = reader.int32(); + break; + } + case 2: { + message.kind = reader.int32(); break; } case 3: { - message.partitionedDml = $root.google.spanner.v1.TransactionOptions.PartitionedDml.decode(reader, reader.uint32()); + message.displayName = reader.string(); break; } - case 2: { - message.readOnly = $root.google.spanner.v1.TransactionOptions.ReadOnly.decode(reader, reader.uint32()); + case 4: { + if (!(message.childLinks && message.childLinks.length)) + message.childLinks = []; + message.childLinks.push($root.google.spanner.v1.PlanNode.ChildLink.decode(reader, reader.uint32())); break; } case 5: { - message.excludeTxnFromChangeStreams = reader.bool(); + message.shortRepresentation = $root.google.spanner.v1.PlanNode.ShortRepresentation.decode(reader, reader.uint32()); + break; + } + case 6: { + message.metadata = $root.google.protobuf.Struct.decode(reader, reader.uint32()); + break; + } + case 7: { + message.executionStats = $root.google.protobuf.Struct.decode(reader, reader.uint32()); break; } default: @@ -84026,420 +86169,243 @@ }; /** - * Decodes a TransactionOptions message from the specified reader or buffer, length delimited. + * Decodes a PlanNode message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.spanner.v1.TransactionOptions + * @memberof google.spanner.v1.PlanNode * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.spanner.v1.TransactionOptions} TransactionOptions + * @returns {google.spanner.v1.PlanNode} PlanNode * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransactionOptions.decodeDelimited = function decodeDelimited(reader) { + PlanNode.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TransactionOptions message. + * Verifies a PlanNode message. * @function verify - * @memberof google.spanner.v1.TransactionOptions + * @memberof google.spanner.v1.PlanNode * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TransactionOptions.verify = function verify(message) { + PlanNode.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.readWrite != null && message.hasOwnProperty("readWrite")) { - properties.mode = 1; - { - var error = $root.google.spanner.v1.TransactionOptions.ReadWrite.verify(message.readWrite); - if (error) - return "readWrite." + error; + if (message.index != null && message.hasOwnProperty("index")) + if (!$util.isInteger(message.index)) + return "index: integer expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + switch (message.kind) { + default: + return "kind: enum value expected"; + case 0: + case 1: + case 2: + break; } - } - if (message.partitionedDml != null && message.hasOwnProperty("partitionedDml")) { - if (properties.mode === 1) - return "mode: multiple values"; - properties.mode = 1; - { - var error = $root.google.spanner.v1.TransactionOptions.PartitionedDml.verify(message.partitionedDml); + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.childLinks != null && message.hasOwnProperty("childLinks")) { + if (!Array.isArray(message.childLinks)) + return "childLinks: array expected"; + for (var i = 0; i < message.childLinks.length; ++i) { + var error = $root.google.spanner.v1.PlanNode.ChildLink.verify(message.childLinks[i]); if (error) - return "partitionedDml." + error; + return "childLinks." + error; } } - if (message.readOnly != null && message.hasOwnProperty("readOnly")) { - if (properties.mode === 1) - return "mode: multiple values"; - properties.mode = 1; - { - var error = $root.google.spanner.v1.TransactionOptions.ReadOnly.verify(message.readOnly); - if (error) - return "readOnly." + error; - } + if (message.shortRepresentation != null && message.hasOwnProperty("shortRepresentation")) { + var error = $root.google.spanner.v1.PlanNode.ShortRepresentation.verify(message.shortRepresentation); + if (error) + return "shortRepresentation." + error; + } + if (message.metadata != null && message.hasOwnProperty("metadata")) { + var error = $root.google.protobuf.Struct.verify(message.metadata); + if (error) + return "metadata." + error; + } + if (message.executionStats != null && message.hasOwnProperty("executionStats")) { + var error = $root.google.protobuf.Struct.verify(message.executionStats); + if (error) + return "executionStats." + error; } - if (message.excludeTxnFromChangeStreams != null && message.hasOwnProperty("excludeTxnFromChangeStreams")) - if (typeof message.excludeTxnFromChangeStreams !== "boolean") - return "excludeTxnFromChangeStreams: boolean expected"; return null; }; /** - * Creates a TransactionOptions message from a plain object. Also converts values to their respective internal types. + * Creates a PlanNode message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.spanner.v1.TransactionOptions + * @memberof google.spanner.v1.PlanNode * @static * @param {Object.} object Plain object - * @returns {google.spanner.v1.TransactionOptions} TransactionOptions + * @returns {google.spanner.v1.PlanNode} PlanNode */ - TransactionOptions.fromObject = function fromObject(object) { - if (object instanceof $root.google.spanner.v1.TransactionOptions) + PlanNode.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.v1.PlanNode) return object; - var message = new $root.google.spanner.v1.TransactionOptions(); - if (object.readWrite != null) { - if (typeof object.readWrite !== "object") - throw TypeError(".google.spanner.v1.TransactionOptions.readWrite: object expected"); - message.readWrite = $root.google.spanner.v1.TransactionOptions.ReadWrite.fromObject(object.readWrite); + var message = new $root.google.spanner.v1.PlanNode(); + if (object.index != null) + message.index = object.index | 0; + switch (object.kind) { + default: + if (typeof object.kind === "number") { + message.kind = object.kind; + break; + } + break; + case "KIND_UNSPECIFIED": + case 0: + message.kind = 0; + break; + case "RELATIONAL": + case 1: + message.kind = 1; + break; + case "SCALAR": + case 2: + message.kind = 2; + break; } - if (object.partitionedDml != null) { - if (typeof object.partitionedDml !== "object") - throw TypeError(".google.spanner.v1.TransactionOptions.partitionedDml: object expected"); - message.partitionedDml = $root.google.spanner.v1.TransactionOptions.PartitionedDml.fromObject(object.partitionedDml); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.childLinks) { + if (!Array.isArray(object.childLinks)) + throw TypeError(".google.spanner.v1.PlanNode.childLinks: array expected"); + message.childLinks = []; + for (var i = 0; i < object.childLinks.length; ++i) { + if (typeof object.childLinks[i] !== "object") + throw TypeError(".google.spanner.v1.PlanNode.childLinks: object expected"); + message.childLinks[i] = $root.google.spanner.v1.PlanNode.ChildLink.fromObject(object.childLinks[i]); + } } - if (object.readOnly != null) { - if (typeof object.readOnly !== "object") - throw TypeError(".google.spanner.v1.TransactionOptions.readOnly: object expected"); - message.readOnly = $root.google.spanner.v1.TransactionOptions.ReadOnly.fromObject(object.readOnly); + if (object.shortRepresentation != null) { + if (typeof object.shortRepresentation !== "object") + throw TypeError(".google.spanner.v1.PlanNode.shortRepresentation: object expected"); + message.shortRepresentation = $root.google.spanner.v1.PlanNode.ShortRepresentation.fromObject(object.shortRepresentation); + } + if (object.metadata != null) { + if (typeof object.metadata !== "object") + throw TypeError(".google.spanner.v1.PlanNode.metadata: object expected"); + message.metadata = $root.google.protobuf.Struct.fromObject(object.metadata); + } + if (object.executionStats != null) { + if (typeof object.executionStats !== "object") + throw TypeError(".google.spanner.v1.PlanNode.executionStats: object expected"); + message.executionStats = $root.google.protobuf.Struct.fromObject(object.executionStats); } - if (object.excludeTxnFromChangeStreams != null) - message.excludeTxnFromChangeStreams = Boolean(object.excludeTxnFromChangeStreams); return message; }; /** - * Creates a plain object from a TransactionOptions message. Also converts values to other types if specified. + * Creates a plain object from a PlanNode message. Also converts values to other types if specified. * @function toObject - * @memberof google.spanner.v1.TransactionOptions + * @memberof google.spanner.v1.PlanNode * @static - * @param {google.spanner.v1.TransactionOptions} message TransactionOptions + * @param {google.spanner.v1.PlanNode} message PlanNode * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TransactionOptions.toObject = function toObject(message, options) { + PlanNode.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.excludeTxnFromChangeStreams = false; - if (message.readWrite != null && message.hasOwnProperty("readWrite")) { - object.readWrite = $root.google.spanner.v1.TransactionOptions.ReadWrite.toObject(message.readWrite, options); - if (options.oneofs) - object.mode = "readWrite"; - } - if (message.readOnly != null && message.hasOwnProperty("readOnly")) { - object.readOnly = $root.google.spanner.v1.TransactionOptions.ReadOnly.toObject(message.readOnly, options); - if (options.oneofs) - object.mode = "readOnly"; + if (options.arrays || options.defaults) + object.childLinks = []; + if (options.defaults) { + object.index = 0; + object.kind = options.enums === String ? "KIND_UNSPECIFIED" : 0; + object.displayName = ""; + object.shortRepresentation = null; + object.metadata = null; + object.executionStats = null; } - if (message.partitionedDml != null && message.hasOwnProperty("partitionedDml")) { - object.partitionedDml = $root.google.spanner.v1.TransactionOptions.PartitionedDml.toObject(message.partitionedDml, options); - if (options.oneofs) - object.mode = "partitionedDml"; + if (message.index != null && message.hasOwnProperty("index")) + object.index = message.index; + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = options.enums === String ? $root.google.spanner.v1.PlanNode.Kind[message.kind] === undefined ? message.kind : $root.google.spanner.v1.PlanNode.Kind[message.kind] : message.kind; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.childLinks && message.childLinks.length) { + object.childLinks = []; + for (var j = 0; j < message.childLinks.length; ++j) + object.childLinks[j] = $root.google.spanner.v1.PlanNode.ChildLink.toObject(message.childLinks[j], options); } - if (message.excludeTxnFromChangeStreams != null && message.hasOwnProperty("excludeTxnFromChangeStreams")) - object.excludeTxnFromChangeStreams = message.excludeTxnFromChangeStreams; + if (message.shortRepresentation != null && message.hasOwnProperty("shortRepresentation")) + object.shortRepresentation = $root.google.spanner.v1.PlanNode.ShortRepresentation.toObject(message.shortRepresentation, options); + if (message.metadata != null && message.hasOwnProperty("metadata")) + object.metadata = $root.google.protobuf.Struct.toObject(message.metadata, options); + if (message.executionStats != null && message.hasOwnProperty("executionStats")) + object.executionStats = $root.google.protobuf.Struct.toObject(message.executionStats, options); return object; }; /** - * Converts this TransactionOptions to JSON. + * Converts this PlanNode to JSON. * @function toJSON - * @memberof google.spanner.v1.TransactionOptions + * @memberof google.spanner.v1.PlanNode * @instance * @returns {Object.} JSON object */ - TransactionOptions.prototype.toJSON = function toJSON() { + PlanNode.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TransactionOptions + * Gets the default type url for PlanNode * @function getTypeUrl - * @memberof google.spanner.v1.TransactionOptions + * @memberof google.spanner.v1.PlanNode * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TransactionOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PlanNode.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.spanner.v1.TransactionOptions"; + return typeUrlPrefix + "/google.spanner.v1.PlanNode"; }; - TransactionOptions.ReadWrite = (function() { - - /** - * Properties of a ReadWrite. - * @memberof google.spanner.v1.TransactionOptions - * @interface IReadWrite - * @property {google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode|null} [readLockMode] ReadWrite readLockMode - */ - - /** - * Constructs a new ReadWrite. - * @memberof google.spanner.v1.TransactionOptions - * @classdesc Represents a ReadWrite. - * @implements IReadWrite - * @constructor - * @param {google.spanner.v1.TransactionOptions.IReadWrite=} [properties] Properties to set - */ - function ReadWrite(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ReadWrite readLockMode. - * @member {google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode} readLockMode - * @memberof google.spanner.v1.TransactionOptions.ReadWrite - * @instance - */ - ReadWrite.prototype.readLockMode = 0; - - /** - * Creates a new ReadWrite instance using the specified properties. - * @function create - * @memberof google.spanner.v1.TransactionOptions.ReadWrite - * @static - * @param {google.spanner.v1.TransactionOptions.IReadWrite=} [properties] Properties to set - * @returns {google.spanner.v1.TransactionOptions.ReadWrite} ReadWrite instance - */ - ReadWrite.create = function create(properties) { - return new ReadWrite(properties); - }; - - /** - * Encodes the specified ReadWrite message. Does not implicitly {@link google.spanner.v1.TransactionOptions.ReadWrite.verify|verify} messages. - * @function encode - * @memberof google.spanner.v1.TransactionOptions.ReadWrite - * @static - * @param {google.spanner.v1.TransactionOptions.IReadWrite} message ReadWrite message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReadWrite.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.readLockMode != null && Object.hasOwnProperty.call(message, "readLockMode")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.readLockMode); - return writer; - }; - - /** - * Encodes the specified ReadWrite message, length delimited. Does not implicitly {@link google.spanner.v1.TransactionOptions.ReadWrite.verify|verify} messages. - * @function encodeDelimited - * @memberof google.spanner.v1.TransactionOptions.ReadWrite - * @static - * @param {google.spanner.v1.TransactionOptions.IReadWrite} message ReadWrite message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - ReadWrite.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a ReadWrite message from the specified reader or buffer. - * @function decode - * @memberof google.spanner.v1.TransactionOptions.ReadWrite - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.spanner.v1.TransactionOptions.ReadWrite} ReadWrite - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReadWrite.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.TransactionOptions.ReadWrite(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.readLockMode = reader.int32(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a ReadWrite message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.spanner.v1.TransactionOptions.ReadWrite - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.spanner.v1.TransactionOptions.ReadWrite} ReadWrite - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ReadWrite.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a ReadWrite message. - * @function verify - * @memberof google.spanner.v1.TransactionOptions.ReadWrite - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - ReadWrite.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.readLockMode != null && message.hasOwnProperty("readLockMode")) - switch (message.readLockMode) { - default: - return "readLockMode: enum value expected"; - case 0: - case 1: - case 2: - break; - } - return null; - }; - - /** - * Creates a ReadWrite message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.spanner.v1.TransactionOptions.ReadWrite - * @static - * @param {Object.} object Plain object - * @returns {google.spanner.v1.TransactionOptions.ReadWrite} ReadWrite - */ - ReadWrite.fromObject = function fromObject(object) { - if (object instanceof $root.google.spanner.v1.TransactionOptions.ReadWrite) - return object; - var message = new $root.google.spanner.v1.TransactionOptions.ReadWrite(); - switch (object.readLockMode) { - default: - if (typeof object.readLockMode === "number") { - message.readLockMode = object.readLockMode; - break; - } - break; - case "READ_LOCK_MODE_UNSPECIFIED": - case 0: - message.readLockMode = 0; - break; - case "PESSIMISTIC": - case 1: - message.readLockMode = 1; - break; - case "OPTIMISTIC": - case 2: - message.readLockMode = 2; - break; - } - return message; - }; - - /** - * Creates a plain object from a ReadWrite message. Also converts values to other types if specified. - * @function toObject - * @memberof google.spanner.v1.TransactionOptions.ReadWrite - * @static - * @param {google.spanner.v1.TransactionOptions.ReadWrite} message ReadWrite - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - ReadWrite.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.readLockMode = options.enums === String ? "READ_LOCK_MODE_UNSPECIFIED" : 0; - if (message.readLockMode != null && message.hasOwnProperty("readLockMode")) - object.readLockMode = options.enums === String ? $root.google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode[message.readLockMode] === undefined ? message.readLockMode : $root.google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode[message.readLockMode] : message.readLockMode; - return object; - }; - - /** - * Converts this ReadWrite to JSON. - * @function toJSON - * @memberof google.spanner.v1.TransactionOptions.ReadWrite - * @instance - * @returns {Object.} JSON object - */ - ReadWrite.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for ReadWrite - * @function getTypeUrl - * @memberof google.spanner.v1.TransactionOptions.ReadWrite - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - ReadWrite.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.spanner.v1.TransactionOptions.ReadWrite"; - }; - - /** - * ReadLockMode enum. - * @name google.spanner.v1.TransactionOptions.ReadWrite.ReadLockMode - * @enum {number} - * @property {number} READ_LOCK_MODE_UNSPECIFIED=0 READ_LOCK_MODE_UNSPECIFIED value - * @property {number} PESSIMISTIC=1 PESSIMISTIC value - * @property {number} OPTIMISTIC=2 OPTIMISTIC value - */ - ReadWrite.ReadLockMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "READ_LOCK_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "PESSIMISTIC"] = 1; - values[valuesById[2] = "OPTIMISTIC"] = 2; - return values; - })(); - - return ReadWrite; + /** + * Kind enum. + * @name google.spanner.v1.PlanNode.Kind + * @enum {number} + * @property {number} KIND_UNSPECIFIED=0 KIND_UNSPECIFIED value + * @property {number} RELATIONAL=1 RELATIONAL value + * @property {number} SCALAR=2 SCALAR value + */ + PlanNode.Kind = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "KIND_UNSPECIFIED"] = 0; + values[valuesById[1] = "RELATIONAL"] = 1; + values[valuesById[2] = "SCALAR"] = 2; + return values; })(); - TransactionOptions.PartitionedDml = (function() { + PlanNode.ChildLink = (function() { /** - * Properties of a PartitionedDml. - * @memberof google.spanner.v1.TransactionOptions - * @interface IPartitionedDml + * Properties of a ChildLink. + * @memberof google.spanner.v1.PlanNode + * @interface IChildLink + * @property {number|null} [childIndex] ChildLink childIndex + * @property {string|null} [type] ChildLink type + * @property {string|null} [variable] ChildLink variable */ /** - * Constructs a new PartitionedDml. - * @memberof google.spanner.v1.TransactionOptions - * @classdesc Represents a PartitionedDml. - * @implements IPartitionedDml + * Constructs a new ChildLink. + * @memberof google.spanner.v1.PlanNode + * @classdesc Represents a ChildLink. + * @implements IChildLink * @constructor - * @param {google.spanner.v1.TransactionOptions.IPartitionedDml=} [properties] Properties to set + * @param {google.spanner.v1.PlanNode.IChildLink=} [properties] Properties to set */ - function PartitionedDml(properties) { + function ChildLink(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -84447,63 +86413,105 @@ } /** - * Creates a new PartitionedDml instance using the specified properties. + * ChildLink childIndex. + * @member {number} childIndex + * @memberof google.spanner.v1.PlanNode.ChildLink + * @instance + */ + ChildLink.prototype.childIndex = 0; + + /** + * ChildLink type. + * @member {string} type + * @memberof google.spanner.v1.PlanNode.ChildLink + * @instance + */ + ChildLink.prototype.type = ""; + + /** + * ChildLink variable. + * @member {string} variable + * @memberof google.spanner.v1.PlanNode.ChildLink + * @instance + */ + ChildLink.prototype.variable = ""; + + /** + * Creates a new ChildLink instance using the specified properties. * @function create - * @memberof google.spanner.v1.TransactionOptions.PartitionedDml + * @memberof google.spanner.v1.PlanNode.ChildLink * @static - * @param {google.spanner.v1.TransactionOptions.IPartitionedDml=} [properties] Properties to set - * @returns {google.spanner.v1.TransactionOptions.PartitionedDml} PartitionedDml instance + * @param {google.spanner.v1.PlanNode.IChildLink=} [properties] Properties to set + * @returns {google.spanner.v1.PlanNode.ChildLink} ChildLink instance */ - PartitionedDml.create = function create(properties) { - return new PartitionedDml(properties); + ChildLink.create = function create(properties) { + return new ChildLink(properties); }; /** - * Encodes the specified PartitionedDml message. Does not implicitly {@link google.spanner.v1.TransactionOptions.PartitionedDml.verify|verify} messages. + * Encodes the specified ChildLink message. Does not implicitly {@link google.spanner.v1.PlanNode.ChildLink.verify|verify} messages. * @function encode - * @memberof google.spanner.v1.TransactionOptions.PartitionedDml + * @memberof google.spanner.v1.PlanNode.ChildLink * @static - * @param {google.spanner.v1.TransactionOptions.IPartitionedDml} message PartitionedDml message or plain object to encode + * @param {google.spanner.v1.PlanNode.IChildLink} message ChildLink message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PartitionedDml.encode = function encode(message, writer) { + ChildLink.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.childIndex != null && Object.hasOwnProperty.call(message, "childIndex")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.childIndex); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.type); + if (message.variable != null && Object.hasOwnProperty.call(message, "variable")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.variable); return writer; }; /** - * Encodes the specified PartitionedDml message, length delimited. Does not implicitly {@link google.spanner.v1.TransactionOptions.PartitionedDml.verify|verify} messages. + * Encodes the specified ChildLink message, length delimited. Does not implicitly {@link google.spanner.v1.PlanNode.ChildLink.verify|verify} messages. * @function encodeDelimited - * @memberof google.spanner.v1.TransactionOptions.PartitionedDml + * @memberof google.spanner.v1.PlanNode.ChildLink * @static - * @param {google.spanner.v1.TransactionOptions.IPartitionedDml} message PartitionedDml message or plain object to encode + * @param {google.spanner.v1.PlanNode.IChildLink} message ChildLink message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PartitionedDml.encodeDelimited = function encodeDelimited(message, writer) { + ChildLink.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PartitionedDml message from the specified reader or buffer. + * Decodes a ChildLink message from the specified reader or buffer. * @function decode - * @memberof google.spanner.v1.TransactionOptions.PartitionedDml + * @memberof google.spanner.v1.PlanNode.ChildLink * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.spanner.v1.TransactionOptions.PartitionedDml} PartitionedDml + * @returns {google.spanner.v1.PlanNode.ChildLink} ChildLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PartitionedDml.decode = function decode(reader, length) { + ChildLink.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.TransactionOptions.PartitionedDml(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.PlanNode.ChildLink(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.childIndex = reader.int32(); + break; + } + case 2: { + message.type = reader.string(); + break; + } + case 3: { + message.variable = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -84513,114 +86521,141 @@ }; /** - * Decodes a PartitionedDml message from the specified reader or buffer, length delimited. + * Decodes a ChildLink message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.spanner.v1.TransactionOptions.PartitionedDml + * @memberof google.spanner.v1.PlanNode.ChildLink * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.spanner.v1.TransactionOptions.PartitionedDml} PartitionedDml + * @returns {google.spanner.v1.PlanNode.ChildLink} ChildLink * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PartitionedDml.decodeDelimited = function decodeDelimited(reader) { + ChildLink.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PartitionedDml message. + * Verifies a ChildLink message. * @function verify - * @memberof google.spanner.v1.TransactionOptions.PartitionedDml + * @memberof google.spanner.v1.PlanNode.ChildLink * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PartitionedDml.verify = function verify(message) { + ChildLink.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.childIndex != null && message.hasOwnProperty("childIndex")) + if (!$util.isInteger(message.childIndex)) + return "childIndex: integer expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.variable != null && message.hasOwnProperty("variable")) + if (!$util.isString(message.variable)) + return "variable: string expected"; return null; }; /** - * Creates a PartitionedDml message from a plain object. Also converts values to their respective internal types. + * Creates a ChildLink message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.spanner.v1.TransactionOptions.PartitionedDml + * @memberof google.spanner.v1.PlanNode.ChildLink * @static * @param {Object.} object Plain object - * @returns {google.spanner.v1.TransactionOptions.PartitionedDml} PartitionedDml + * @returns {google.spanner.v1.PlanNode.ChildLink} ChildLink */ - PartitionedDml.fromObject = function fromObject(object) { - if (object instanceof $root.google.spanner.v1.TransactionOptions.PartitionedDml) + ChildLink.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.v1.PlanNode.ChildLink) return object; - return new $root.google.spanner.v1.TransactionOptions.PartitionedDml(); + var message = new $root.google.spanner.v1.PlanNode.ChildLink(); + if (object.childIndex != null) + message.childIndex = object.childIndex | 0; + if (object.type != null) + message.type = String(object.type); + if (object.variable != null) + message.variable = String(object.variable); + return message; }; /** - * Creates a plain object from a PartitionedDml message. Also converts values to other types if specified. + * Creates a plain object from a ChildLink message. Also converts values to other types if specified. * @function toObject - * @memberof google.spanner.v1.TransactionOptions.PartitionedDml + * @memberof google.spanner.v1.PlanNode.ChildLink * @static - * @param {google.spanner.v1.TransactionOptions.PartitionedDml} message PartitionedDml + * @param {google.spanner.v1.PlanNode.ChildLink} message ChildLink * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PartitionedDml.toObject = function toObject() { - return {}; + ChildLink.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.childIndex = 0; + object.type = ""; + object.variable = ""; + } + if (message.childIndex != null && message.hasOwnProperty("childIndex")) + object.childIndex = message.childIndex; + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.variable != null && message.hasOwnProperty("variable")) + object.variable = message.variable; + return object; }; /** - * Converts this PartitionedDml to JSON. + * Converts this ChildLink to JSON. * @function toJSON - * @memberof google.spanner.v1.TransactionOptions.PartitionedDml + * @memberof google.spanner.v1.PlanNode.ChildLink * @instance * @returns {Object.} JSON object */ - PartitionedDml.prototype.toJSON = function toJSON() { + ChildLink.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PartitionedDml + * Gets the default type url for ChildLink * @function getTypeUrl - * @memberof google.spanner.v1.TransactionOptions.PartitionedDml + * @memberof google.spanner.v1.PlanNode.ChildLink * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PartitionedDml.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ChildLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.spanner.v1.TransactionOptions.PartitionedDml"; + return typeUrlPrefix + "/google.spanner.v1.PlanNode.ChildLink"; }; - return PartitionedDml; + return ChildLink; })(); - TransactionOptions.ReadOnly = (function() { + PlanNode.ShortRepresentation = (function() { /** - * Properties of a ReadOnly. - * @memberof google.spanner.v1.TransactionOptions - * @interface IReadOnly - * @property {boolean|null} [strong] ReadOnly strong - * @property {google.protobuf.ITimestamp|null} [minReadTimestamp] ReadOnly minReadTimestamp - * @property {google.protobuf.IDuration|null} [maxStaleness] ReadOnly maxStaleness - * @property {google.protobuf.ITimestamp|null} [readTimestamp] ReadOnly readTimestamp - * @property {google.protobuf.IDuration|null} [exactStaleness] ReadOnly exactStaleness - * @property {boolean|null} [returnReadTimestamp] ReadOnly returnReadTimestamp + * Properties of a ShortRepresentation. + * @memberof google.spanner.v1.PlanNode + * @interface IShortRepresentation + * @property {string|null} [description] ShortRepresentation description + * @property {Object.|null} [subqueries] ShortRepresentation subqueries */ /** - * Constructs a new ReadOnly. - * @memberof google.spanner.v1.TransactionOptions - * @classdesc Represents a ReadOnly. - * @implements IReadOnly + * Constructs a new ShortRepresentation. + * @memberof google.spanner.v1.PlanNode + * @classdesc Represents a ShortRepresentation. + * @implements IShortRepresentation * @constructor - * @param {google.spanner.v1.TransactionOptions.IReadOnly=} [properties] Properties to set + * @param {google.spanner.v1.PlanNode.IShortRepresentation=} [properties] Properties to set */ - function ReadOnly(properties) { + function ShortRepresentation(properties) { + this.subqueries = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -84628,159 +86663,109 @@ } /** - * ReadOnly strong. - * @member {boolean|null|undefined} strong - * @memberof google.spanner.v1.TransactionOptions.ReadOnly - * @instance - */ - ReadOnly.prototype.strong = null; - - /** - * ReadOnly minReadTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} minReadTimestamp - * @memberof google.spanner.v1.TransactionOptions.ReadOnly - * @instance - */ - ReadOnly.prototype.minReadTimestamp = null; - - /** - * ReadOnly maxStaleness. - * @member {google.protobuf.IDuration|null|undefined} maxStaleness - * @memberof google.spanner.v1.TransactionOptions.ReadOnly - * @instance - */ - ReadOnly.prototype.maxStaleness = null; - - /** - * ReadOnly readTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} readTimestamp - * @memberof google.spanner.v1.TransactionOptions.ReadOnly - * @instance - */ - ReadOnly.prototype.readTimestamp = null; - - /** - * ReadOnly exactStaleness. - * @member {google.protobuf.IDuration|null|undefined} exactStaleness - * @memberof google.spanner.v1.TransactionOptions.ReadOnly - * @instance - */ - ReadOnly.prototype.exactStaleness = null; - - /** - * ReadOnly returnReadTimestamp. - * @member {boolean} returnReadTimestamp - * @memberof google.spanner.v1.TransactionOptions.ReadOnly + * ShortRepresentation description. + * @member {string} description + * @memberof google.spanner.v1.PlanNode.ShortRepresentation * @instance */ - ReadOnly.prototype.returnReadTimestamp = false; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + ShortRepresentation.prototype.description = ""; /** - * ReadOnly timestampBound. - * @member {"strong"|"minReadTimestamp"|"maxStaleness"|"readTimestamp"|"exactStaleness"|undefined} timestampBound - * @memberof google.spanner.v1.TransactionOptions.ReadOnly + * ShortRepresentation subqueries. + * @member {Object.} subqueries + * @memberof google.spanner.v1.PlanNode.ShortRepresentation * @instance */ - Object.defineProperty(ReadOnly.prototype, "timestampBound", { - get: $util.oneOfGetter($oneOfFields = ["strong", "minReadTimestamp", "maxStaleness", "readTimestamp", "exactStaleness"]), - set: $util.oneOfSetter($oneOfFields) - }); + ShortRepresentation.prototype.subqueries = $util.emptyObject; /** - * Creates a new ReadOnly instance using the specified properties. + * Creates a new ShortRepresentation instance using the specified properties. * @function create - * @memberof google.spanner.v1.TransactionOptions.ReadOnly + * @memberof google.spanner.v1.PlanNode.ShortRepresentation * @static - * @param {google.spanner.v1.TransactionOptions.IReadOnly=} [properties] Properties to set - * @returns {google.spanner.v1.TransactionOptions.ReadOnly} ReadOnly instance + * @param {google.spanner.v1.PlanNode.IShortRepresentation=} [properties] Properties to set + * @returns {google.spanner.v1.PlanNode.ShortRepresentation} ShortRepresentation instance */ - ReadOnly.create = function create(properties) { - return new ReadOnly(properties); + ShortRepresentation.create = function create(properties) { + return new ShortRepresentation(properties); }; /** - * Encodes the specified ReadOnly message. Does not implicitly {@link google.spanner.v1.TransactionOptions.ReadOnly.verify|verify} messages. + * Encodes the specified ShortRepresentation message. Does not implicitly {@link google.spanner.v1.PlanNode.ShortRepresentation.verify|verify} messages. * @function encode - * @memberof google.spanner.v1.TransactionOptions.ReadOnly + * @memberof google.spanner.v1.PlanNode.ShortRepresentation * @static - * @param {google.spanner.v1.TransactionOptions.IReadOnly} message ReadOnly message or plain object to encode + * @param {google.spanner.v1.PlanNode.IShortRepresentation} message ShortRepresentation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReadOnly.encode = function encode(message, writer) { + ShortRepresentation.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.strong != null && Object.hasOwnProperty.call(message, "strong")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.strong); - if (message.minReadTimestamp != null && Object.hasOwnProperty.call(message, "minReadTimestamp")) - $root.google.protobuf.Timestamp.encode(message.minReadTimestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.maxStaleness != null && Object.hasOwnProperty.call(message, "maxStaleness")) - $root.google.protobuf.Duration.encode(message.maxStaleness, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.readTimestamp != null && Object.hasOwnProperty.call(message, "readTimestamp")) - $root.google.protobuf.Timestamp.encode(message.readTimestamp, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.exactStaleness != null && Object.hasOwnProperty.call(message, "exactStaleness")) - $root.google.protobuf.Duration.encode(message.exactStaleness, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); - if (message.returnReadTimestamp != null && Object.hasOwnProperty.call(message, "returnReadTimestamp")) - writer.uint32(/* id 6, wireType 0 =*/48).bool(message.returnReadTimestamp); + if (message.description != null && Object.hasOwnProperty.call(message, "description")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.description); + if (message.subqueries != null && Object.hasOwnProperty.call(message, "subqueries")) + for (var keys = Object.keys(message.subqueries), i = 0; i < keys.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).fork().uint32(/* id 1, wireType 2 =*/10).string(keys[i]).uint32(/* id 2, wireType 0 =*/16).int32(message.subqueries[keys[i]]).ldelim(); return writer; }; /** - * Encodes the specified ReadOnly message, length delimited. Does not implicitly {@link google.spanner.v1.TransactionOptions.ReadOnly.verify|verify} messages. + * Encodes the specified ShortRepresentation message, length delimited. Does not implicitly {@link google.spanner.v1.PlanNode.ShortRepresentation.verify|verify} messages. * @function encodeDelimited - * @memberof google.spanner.v1.TransactionOptions.ReadOnly + * @memberof google.spanner.v1.PlanNode.ShortRepresentation * @static - * @param {google.spanner.v1.TransactionOptions.IReadOnly} message ReadOnly message or plain object to encode + * @param {google.spanner.v1.PlanNode.IShortRepresentation} message ShortRepresentation message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ReadOnly.encodeDelimited = function encodeDelimited(message, writer) { + ShortRepresentation.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ReadOnly message from the specified reader or buffer. + * Decodes a ShortRepresentation message from the specified reader or buffer. * @function decode - * @memberof google.spanner.v1.TransactionOptions.ReadOnly + * @memberof google.spanner.v1.PlanNode.ShortRepresentation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.spanner.v1.TransactionOptions.ReadOnly} ReadOnly + * @returns {google.spanner.v1.PlanNode.ShortRepresentation} ShortRepresentation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReadOnly.decode = function decode(reader, length) { + ShortRepresentation.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.TransactionOptions.ReadOnly(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.PlanNode.ShortRepresentation(), key, value; while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.strong = reader.bool(); + message.description = reader.string(); break; } case 2: { - message.minReadTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 3: { - message.maxStaleness = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 4: { - message.readTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 5: { - message.exactStaleness = $root.google.protobuf.Duration.decode(reader, reader.uint32()); - break; - } - case 6: { - message.returnReadTimestamp = reader.bool(); + if (message.subqueries === $util.emptyObject) + message.subqueries = {}; + var end2 = reader.uint32() + reader.pos; + key = ""; + value = 0; + while (reader.pos < end2) { + var tag2 = reader.uint32(); + switch (tag2 >>> 3) { + case 1: + key = reader.string(); + break; + case 2: + value = reader.int32(); + break; + default: + reader.skipType(tag2 & 7); + break; + } + } + message.subqueries[key] = value; break; } default: @@ -84792,461 +86777,149 @@ }; /** - * Decodes a ReadOnly message from the specified reader or buffer, length delimited. + * Decodes a ShortRepresentation message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.spanner.v1.TransactionOptions.ReadOnly + * @memberof google.spanner.v1.PlanNode.ShortRepresentation * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.spanner.v1.TransactionOptions.ReadOnly} ReadOnly + * @returns {google.spanner.v1.PlanNode.ShortRepresentation} ShortRepresentation * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ReadOnly.decodeDelimited = function decodeDelimited(reader) { + ShortRepresentation.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ReadOnly message. + * Verifies a ShortRepresentation message. * @function verify - * @memberof google.spanner.v1.TransactionOptions.ReadOnly + * @memberof google.spanner.v1.PlanNode.ShortRepresentation * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ReadOnly.verify = function verify(message) { + ShortRepresentation.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.strong != null && message.hasOwnProperty("strong")) { - properties.timestampBound = 1; - if (typeof message.strong !== "boolean") - return "strong: boolean expected"; - } - if (message.minReadTimestamp != null && message.hasOwnProperty("minReadTimestamp")) { - if (properties.timestampBound === 1) - return "timestampBound: multiple values"; - properties.timestampBound = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.minReadTimestamp); - if (error) - return "minReadTimestamp." + error; - } - } - if (message.maxStaleness != null && message.hasOwnProperty("maxStaleness")) { - if (properties.timestampBound === 1) - return "timestampBound: multiple values"; - properties.timestampBound = 1; - { - var error = $root.google.protobuf.Duration.verify(message.maxStaleness); - if (error) - return "maxStaleness." + error; - } - } - if (message.readTimestamp != null && message.hasOwnProperty("readTimestamp")) { - if (properties.timestampBound === 1) - return "timestampBound: multiple values"; - properties.timestampBound = 1; - { - var error = $root.google.protobuf.Timestamp.verify(message.readTimestamp); - if (error) - return "readTimestamp." + error; - } - } - if (message.exactStaleness != null && message.hasOwnProperty("exactStaleness")) { - if (properties.timestampBound === 1) - return "timestampBound: multiple values"; - properties.timestampBound = 1; - { - var error = $root.google.protobuf.Duration.verify(message.exactStaleness); - if (error) - return "exactStaleness." + error; - } + if (message.description != null && message.hasOwnProperty("description")) + if (!$util.isString(message.description)) + return "description: string expected"; + if (message.subqueries != null && message.hasOwnProperty("subqueries")) { + if (!$util.isObject(message.subqueries)) + return "subqueries: object expected"; + var key = Object.keys(message.subqueries); + for (var i = 0; i < key.length; ++i) + if (!$util.isInteger(message.subqueries[key[i]])) + return "subqueries: integer{k:string} expected"; } - if (message.returnReadTimestamp != null && message.hasOwnProperty("returnReadTimestamp")) - if (typeof message.returnReadTimestamp !== "boolean") - return "returnReadTimestamp: boolean expected"; return null; }; /** - * Creates a ReadOnly message from a plain object. Also converts values to their respective internal types. + * Creates a ShortRepresentation message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.spanner.v1.TransactionOptions.ReadOnly + * @memberof google.spanner.v1.PlanNode.ShortRepresentation * @static * @param {Object.} object Plain object - * @returns {google.spanner.v1.TransactionOptions.ReadOnly} ReadOnly + * @returns {google.spanner.v1.PlanNode.ShortRepresentation} ShortRepresentation */ - ReadOnly.fromObject = function fromObject(object) { - if (object instanceof $root.google.spanner.v1.TransactionOptions.ReadOnly) + ShortRepresentation.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.v1.PlanNode.ShortRepresentation) return object; - var message = new $root.google.spanner.v1.TransactionOptions.ReadOnly(); - if (object.strong != null) - message.strong = Boolean(object.strong); - if (object.minReadTimestamp != null) { - if (typeof object.minReadTimestamp !== "object") - throw TypeError(".google.spanner.v1.TransactionOptions.ReadOnly.minReadTimestamp: object expected"); - message.minReadTimestamp = $root.google.protobuf.Timestamp.fromObject(object.minReadTimestamp); - } - if (object.maxStaleness != null) { - if (typeof object.maxStaleness !== "object") - throw TypeError(".google.spanner.v1.TransactionOptions.ReadOnly.maxStaleness: object expected"); - message.maxStaleness = $root.google.protobuf.Duration.fromObject(object.maxStaleness); - } - if (object.readTimestamp != null) { - if (typeof object.readTimestamp !== "object") - throw TypeError(".google.spanner.v1.TransactionOptions.ReadOnly.readTimestamp: object expected"); - message.readTimestamp = $root.google.protobuf.Timestamp.fromObject(object.readTimestamp); - } - if (object.exactStaleness != null) { - if (typeof object.exactStaleness !== "object") - throw TypeError(".google.spanner.v1.TransactionOptions.ReadOnly.exactStaleness: object expected"); - message.exactStaleness = $root.google.protobuf.Duration.fromObject(object.exactStaleness); + var message = new $root.google.spanner.v1.PlanNode.ShortRepresentation(); + if (object.description != null) + message.description = String(object.description); + if (object.subqueries) { + if (typeof object.subqueries !== "object") + throw TypeError(".google.spanner.v1.PlanNode.ShortRepresentation.subqueries: object expected"); + message.subqueries = {}; + for (var keys = Object.keys(object.subqueries), i = 0; i < keys.length; ++i) + message.subqueries[keys[i]] = object.subqueries[keys[i]] | 0; } - if (object.returnReadTimestamp != null) - message.returnReadTimestamp = Boolean(object.returnReadTimestamp); return message; }; /** - * Creates a plain object from a ReadOnly message. Also converts values to other types if specified. + * Creates a plain object from a ShortRepresentation message. Also converts values to other types if specified. * @function toObject - * @memberof google.spanner.v1.TransactionOptions.ReadOnly + * @memberof google.spanner.v1.PlanNode.ShortRepresentation * @static - * @param {google.spanner.v1.TransactionOptions.ReadOnly} message ReadOnly + * @param {google.spanner.v1.PlanNode.ShortRepresentation} message ShortRepresentation * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ReadOnly.toObject = function toObject(message, options) { + ShortRepresentation.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.returnReadTimestamp = false; - if (message.strong != null && message.hasOwnProperty("strong")) { - object.strong = message.strong; - if (options.oneofs) - object.timestampBound = "strong"; - } - if (message.minReadTimestamp != null && message.hasOwnProperty("minReadTimestamp")) { - object.minReadTimestamp = $root.google.protobuf.Timestamp.toObject(message.minReadTimestamp, options); - if (options.oneofs) - object.timestampBound = "minReadTimestamp"; - } - if (message.maxStaleness != null && message.hasOwnProperty("maxStaleness")) { - object.maxStaleness = $root.google.protobuf.Duration.toObject(message.maxStaleness, options); - if (options.oneofs) - object.timestampBound = "maxStaleness"; - } - if (message.readTimestamp != null && message.hasOwnProperty("readTimestamp")) { - object.readTimestamp = $root.google.protobuf.Timestamp.toObject(message.readTimestamp, options); - if (options.oneofs) - object.timestampBound = "readTimestamp"; - } - if (message.exactStaleness != null && message.hasOwnProperty("exactStaleness")) { - object.exactStaleness = $root.google.protobuf.Duration.toObject(message.exactStaleness, options); - if (options.oneofs) - object.timestampBound = "exactStaleness"; + if (options.objects || options.defaults) + object.subqueries = {}; + if (options.defaults) + object.description = ""; + if (message.description != null && message.hasOwnProperty("description")) + object.description = message.description; + var keys2; + if (message.subqueries && (keys2 = Object.keys(message.subqueries)).length) { + object.subqueries = {}; + for (var j = 0; j < keys2.length; ++j) + object.subqueries[keys2[j]] = message.subqueries[keys2[j]]; } - if (message.returnReadTimestamp != null && message.hasOwnProperty("returnReadTimestamp")) - object.returnReadTimestamp = message.returnReadTimestamp; return object; }; /** - * Converts this ReadOnly to JSON. + * Converts this ShortRepresentation to JSON. * @function toJSON - * @memberof google.spanner.v1.TransactionOptions.ReadOnly + * @memberof google.spanner.v1.PlanNode.ShortRepresentation * @instance * @returns {Object.} JSON object */ - ReadOnly.prototype.toJSON = function toJSON() { + ShortRepresentation.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ReadOnly + * Gets the default type url for ShortRepresentation * @function getTypeUrl - * @memberof google.spanner.v1.TransactionOptions.ReadOnly + * @memberof google.spanner.v1.PlanNode.ShortRepresentation * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ReadOnly.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ShortRepresentation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.spanner.v1.TransactionOptions.ReadOnly"; + return typeUrlPrefix + "/google.spanner.v1.PlanNode.ShortRepresentation"; }; - return ReadOnly; + return ShortRepresentation; })(); - return TransactionOptions; - })(); - - v1.Transaction = (function() { - - /** - * Properties of a Transaction. - * @memberof google.spanner.v1 - * @interface ITransaction - * @property {Uint8Array|null} [id] Transaction id - * @property {google.protobuf.ITimestamp|null} [readTimestamp] Transaction readTimestamp - */ - - /** - * Constructs a new Transaction. - * @memberof google.spanner.v1 - * @classdesc Represents a Transaction. - * @implements ITransaction - * @constructor - * @param {google.spanner.v1.ITransaction=} [properties] Properties to set - */ - function Transaction(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Transaction id. - * @member {Uint8Array} id - * @memberof google.spanner.v1.Transaction - * @instance - */ - Transaction.prototype.id = $util.newBuffer([]); - - /** - * Transaction readTimestamp. - * @member {google.protobuf.ITimestamp|null|undefined} readTimestamp - * @memberof google.spanner.v1.Transaction - * @instance - */ - Transaction.prototype.readTimestamp = null; - - /** - * Creates a new Transaction instance using the specified properties. - * @function create - * @memberof google.spanner.v1.Transaction - * @static - * @param {google.spanner.v1.ITransaction=} [properties] Properties to set - * @returns {google.spanner.v1.Transaction} Transaction instance - */ - Transaction.create = function create(properties) { - return new Transaction(properties); - }; - - /** - * Encodes the specified Transaction message. Does not implicitly {@link google.spanner.v1.Transaction.verify|verify} messages. - * @function encode - * @memberof google.spanner.v1.Transaction - * @static - * @param {google.spanner.v1.ITransaction} message Transaction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Transaction.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 1, wireType 2 =*/10).bytes(message.id); - if (message.readTimestamp != null && Object.hasOwnProperty.call(message, "readTimestamp")) - $root.google.protobuf.Timestamp.encode(message.readTimestamp, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - return writer; - }; - - /** - * Encodes the specified Transaction message, length delimited. Does not implicitly {@link google.spanner.v1.Transaction.verify|verify} messages. - * @function encodeDelimited - * @memberof google.spanner.v1.Transaction - * @static - * @param {google.spanner.v1.ITransaction} message Transaction message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Transaction.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a Transaction message from the specified reader or buffer. - * @function decode - * @memberof google.spanner.v1.Transaction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.spanner.v1.Transaction} Transaction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Transaction.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.Transaction(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.id = reader.bytes(); - break; - } - case 2: { - message.readTimestamp = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a Transaction message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.spanner.v1.Transaction - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.spanner.v1.Transaction} Transaction - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Transaction.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Transaction message. - * @function verify - * @memberof google.spanner.v1.Transaction - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Transaction.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.id != null && message.hasOwnProperty("id")) - if (!(message.id && typeof message.id.length === "number" || $util.isString(message.id))) - return "id: buffer expected"; - if (message.readTimestamp != null && message.hasOwnProperty("readTimestamp")) { - var error = $root.google.protobuf.Timestamp.verify(message.readTimestamp); - if (error) - return "readTimestamp." + error; - } - return null; - }; - - /** - * Creates a Transaction message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.spanner.v1.Transaction - * @static - * @param {Object.} object Plain object - * @returns {google.spanner.v1.Transaction} Transaction - */ - Transaction.fromObject = function fromObject(object) { - if (object instanceof $root.google.spanner.v1.Transaction) - return object; - var message = new $root.google.spanner.v1.Transaction(); - if (object.id != null) - if (typeof object.id === "string") - $util.base64.decode(object.id, message.id = $util.newBuffer($util.base64.length(object.id)), 0); - else if (object.id.length >= 0) - message.id = object.id; - if (object.readTimestamp != null) { - if (typeof object.readTimestamp !== "object") - throw TypeError(".google.spanner.v1.Transaction.readTimestamp: object expected"); - message.readTimestamp = $root.google.protobuf.Timestamp.fromObject(object.readTimestamp); - } - return message; - }; - - /** - * Creates a plain object from a Transaction message. Also converts values to other types if specified. - * @function toObject - * @memberof google.spanner.v1.Transaction - * @static - * @param {google.spanner.v1.Transaction} message Transaction - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Transaction.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - if (options.bytes === String) - object.id = ""; - else { - object.id = []; - if (options.bytes !== Array) - object.id = $util.newBuffer(object.id); - } - object.readTimestamp = null; - } - if (message.id != null && message.hasOwnProperty("id")) - object.id = options.bytes === String ? $util.base64.encode(message.id, 0, message.id.length) : options.bytes === Array ? Array.prototype.slice.call(message.id) : message.id; - if (message.readTimestamp != null && message.hasOwnProperty("readTimestamp")) - object.readTimestamp = $root.google.protobuf.Timestamp.toObject(message.readTimestamp, options); - return object; - }; - - /** - * Converts this Transaction to JSON. - * @function toJSON - * @memberof google.spanner.v1.Transaction - * @instance - * @returns {Object.} JSON object - */ - Transaction.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Transaction - * @function getTypeUrl - * @memberof google.spanner.v1.Transaction - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Transaction.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.spanner.v1.Transaction"; - }; - - return Transaction; + return PlanNode; })(); - v1.TransactionSelector = (function() { + v1.QueryPlan = (function() { /** - * Properties of a TransactionSelector. + * Properties of a QueryPlan. * @memberof google.spanner.v1 - * @interface ITransactionSelector - * @property {google.spanner.v1.ITransactionOptions|null} [singleUse] TransactionSelector singleUse - * @property {Uint8Array|null} [id] TransactionSelector id - * @property {google.spanner.v1.ITransactionOptions|null} [begin] TransactionSelector begin + * @interface IQueryPlan + * @property {Array.|null} [planNodes] QueryPlan planNodes */ /** - * Constructs a new TransactionSelector. + * Constructs a new QueryPlan. * @memberof google.spanner.v1 - * @classdesc Represents a TransactionSelector. - * @implements ITransactionSelector + * @classdesc Represents a QueryPlan. + * @implements IQueryPlan * @constructor - * @param {google.spanner.v1.ITransactionSelector=} [properties] Properties to set + * @param {google.spanner.v1.IQueryPlan=} [properties] Properties to set */ - function TransactionSelector(properties) { + function QueryPlan(properties) { + this.planNodes = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -85254,117 +86927,78 @@ } /** - * TransactionSelector singleUse. - * @member {google.spanner.v1.ITransactionOptions|null|undefined} singleUse - * @memberof google.spanner.v1.TransactionSelector - * @instance - */ - TransactionSelector.prototype.singleUse = null; - - /** - * TransactionSelector id. - * @member {Uint8Array|null|undefined} id - * @memberof google.spanner.v1.TransactionSelector - * @instance - */ - TransactionSelector.prototype.id = null; - - /** - * TransactionSelector begin. - * @member {google.spanner.v1.ITransactionOptions|null|undefined} begin - * @memberof google.spanner.v1.TransactionSelector - * @instance - */ - TransactionSelector.prototype.begin = null; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; - - /** - * TransactionSelector selector. - * @member {"singleUse"|"id"|"begin"|undefined} selector - * @memberof google.spanner.v1.TransactionSelector + * QueryPlan planNodes. + * @member {Array.} planNodes + * @memberof google.spanner.v1.QueryPlan * @instance */ - Object.defineProperty(TransactionSelector.prototype, "selector", { - get: $util.oneOfGetter($oneOfFields = ["singleUse", "id", "begin"]), - set: $util.oneOfSetter($oneOfFields) - }); + QueryPlan.prototype.planNodes = $util.emptyArray; /** - * Creates a new TransactionSelector instance using the specified properties. + * Creates a new QueryPlan instance using the specified properties. * @function create - * @memberof google.spanner.v1.TransactionSelector + * @memberof google.spanner.v1.QueryPlan * @static - * @param {google.spanner.v1.ITransactionSelector=} [properties] Properties to set - * @returns {google.spanner.v1.TransactionSelector} TransactionSelector instance + * @param {google.spanner.v1.IQueryPlan=} [properties] Properties to set + * @returns {google.spanner.v1.QueryPlan} QueryPlan instance */ - TransactionSelector.create = function create(properties) { - return new TransactionSelector(properties); + QueryPlan.create = function create(properties) { + return new QueryPlan(properties); }; /** - * Encodes the specified TransactionSelector message. Does not implicitly {@link google.spanner.v1.TransactionSelector.verify|verify} messages. + * Encodes the specified QueryPlan message. Does not implicitly {@link google.spanner.v1.QueryPlan.verify|verify} messages. * @function encode - * @memberof google.spanner.v1.TransactionSelector + * @memberof google.spanner.v1.QueryPlan * @static - * @param {google.spanner.v1.ITransactionSelector} message TransactionSelector message or plain object to encode + * @param {google.spanner.v1.IQueryPlan} message QueryPlan message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransactionSelector.encode = function encode(message, writer) { + QueryPlan.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.singleUse != null && Object.hasOwnProperty.call(message, "singleUse")) - $root.google.spanner.v1.TransactionOptions.encode(message.singleUse, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.id != null && Object.hasOwnProperty.call(message, "id")) - writer.uint32(/* id 2, wireType 2 =*/18).bytes(message.id); - if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) - $root.google.spanner.v1.TransactionOptions.encode(message.begin, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.planNodes != null && message.planNodes.length) + for (var i = 0; i < message.planNodes.length; ++i) + $root.google.spanner.v1.PlanNode.encode(message.planNodes[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified TransactionSelector message, length delimited. Does not implicitly {@link google.spanner.v1.TransactionSelector.verify|verify} messages. + * Encodes the specified QueryPlan message, length delimited. Does not implicitly {@link google.spanner.v1.QueryPlan.verify|verify} messages. * @function encodeDelimited - * @memberof google.spanner.v1.TransactionSelector + * @memberof google.spanner.v1.QueryPlan * @static - * @param {google.spanner.v1.ITransactionSelector} message TransactionSelector message or plain object to encode + * @param {google.spanner.v1.IQueryPlan} message QueryPlan message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - TransactionSelector.encodeDelimited = function encodeDelimited(message, writer) { + QueryPlan.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a TransactionSelector message from the specified reader or buffer. + * Decodes a QueryPlan message from the specified reader or buffer. * @function decode - * @memberof google.spanner.v1.TransactionSelector + * @memberof google.spanner.v1.QueryPlan * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.spanner.v1.TransactionSelector} TransactionSelector + * @returns {google.spanner.v1.QueryPlan} QueryPlan * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransactionSelector.decode = function decode(reader, length) { + QueryPlan.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.TransactionSelector(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.spanner.v1.QueryPlan(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.singleUse = $root.google.spanner.v1.TransactionOptions.decode(reader, reader.uint32()); - break; - } - case 2: { - message.id = reader.bytes(); - break; - } - case 3: { - message.begin = $root.google.spanner.v1.TransactionOptions.decode(reader, reader.uint32()); + if (!(message.planNodes && message.planNodes.length)) + message.planNodes = []; + message.planNodes.push($root.google.spanner.v1.PlanNode.decode(reader, reader.uint32())); break; } default: @@ -85376,149 +87010,119 @@ }; /** - * Decodes a TransactionSelector message from the specified reader or buffer, length delimited. + * Decodes a QueryPlan message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.spanner.v1.TransactionSelector + * @memberof google.spanner.v1.QueryPlan * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.spanner.v1.TransactionSelector} TransactionSelector + * @returns {google.spanner.v1.QueryPlan} QueryPlan * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - TransactionSelector.decodeDelimited = function decodeDelimited(reader) { + QueryPlan.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a TransactionSelector message. + * Verifies a QueryPlan message. * @function verify - * @memberof google.spanner.v1.TransactionSelector + * @memberof google.spanner.v1.QueryPlan * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - TransactionSelector.verify = function verify(message) { + QueryPlan.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.singleUse != null && message.hasOwnProperty("singleUse")) { - properties.selector = 1; - { - var error = $root.google.spanner.v1.TransactionOptions.verify(message.singleUse); - if (error) - return "singleUse." + error; - } - } - if (message.id != null && message.hasOwnProperty("id")) { - if (properties.selector === 1) - return "selector: multiple values"; - properties.selector = 1; - if (!(message.id && typeof message.id.length === "number" || $util.isString(message.id))) - return "id: buffer expected"; - } - if (message.begin != null && message.hasOwnProperty("begin")) { - if (properties.selector === 1) - return "selector: multiple values"; - properties.selector = 1; - { - var error = $root.google.spanner.v1.TransactionOptions.verify(message.begin); + if (message.planNodes != null && message.hasOwnProperty("planNodes")) { + if (!Array.isArray(message.planNodes)) + return "planNodes: array expected"; + for (var i = 0; i < message.planNodes.length; ++i) { + var error = $root.google.spanner.v1.PlanNode.verify(message.planNodes[i]); if (error) - return "begin." + error; + return "planNodes." + error; } } return null; }; /** - * Creates a TransactionSelector message from a plain object. Also converts values to their respective internal types. + * Creates a QueryPlan message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.spanner.v1.TransactionSelector + * @memberof google.spanner.v1.QueryPlan * @static * @param {Object.} object Plain object - * @returns {google.spanner.v1.TransactionSelector} TransactionSelector + * @returns {google.spanner.v1.QueryPlan} QueryPlan */ - TransactionSelector.fromObject = function fromObject(object) { - if (object instanceof $root.google.spanner.v1.TransactionSelector) + QueryPlan.fromObject = function fromObject(object) { + if (object instanceof $root.google.spanner.v1.QueryPlan) return object; - var message = new $root.google.spanner.v1.TransactionSelector(); - if (object.singleUse != null) { - if (typeof object.singleUse !== "object") - throw TypeError(".google.spanner.v1.TransactionSelector.singleUse: object expected"); - message.singleUse = $root.google.spanner.v1.TransactionOptions.fromObject(object.singleUse); - } - if (object.id != null) - if (typeof object.id === "string") - $util.base64.decode(object.id, message.id = $util.newBuffer($util.base64.length(object.id)), 0); - else if (object.id.length >= 0) - message.id = object.id; - if (object.begin != null) { - if (typeof object.begin !== "object") - throw TypeError(".google.spanner.v1.TransactionSelector.begin: object expected"); - message.begin = $root.google.spanner.v1.TransactionOptions.fromObject(object.begin); + var message = new $root.google.spanner.v1.QueryPlan(); + if (object.planNodes) { + if (!Array.isArray(object.planNodes)) + throw TypeError(".google.spanner.v1.QueryPlan.planNodes: array expected"); + message.planNodes = []; + for (var i = 0; i < object.planNodes.length; ++i) { + if (typeof object.planNodes[i] !== "object") + throw TypeError(".google.spanner.v1.QueryPlan.planNodes: object expected"); + message.planNodes[i] = $root.google.spanner.v1.PlanNode.fromObject(object.planNodes[i]); + } } return message; }; /** - * Creates a plain object from a TransactionSelector message. Also converts values to other types if specified. + * Creates a plain object from a QueryPlan message. Also converts values to other types if specified. * @function toObject - * @memberof google.spanner.v1.TransactionSelector + * @memberof google.spanner.v1.QueryPlan * @static - * @param {google.spanner.v1.TransactionSelector} message TransactionSelector + * @param {google.spanner.v1.QueryPlan} message QueryPlan * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - TransactionSelector.toObject = function toObject(message, options) { + QueryPlan.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.singleUse != null && message.hasOwnProperty("singleUse")) { - object.singleUse = $root.google.spanner.v1.TransactionOptions.toObject(message.singleUse, options); - if (options.oneofs) - object.selector = "singleUse"; - } - if (message.id != null && message.hasOwnProperty("id")) { - object.id = options.bytes === String ? $util.base64.encode(message.id, 0, message.id.length) : options.bytes === Array ? Array.prototype.slice.call(message.id) : message.id; - if (options.oneofs) - object.selector = "id"; - } - if (message.begin != null && message.hasOwnProperty("begin")) { - object.begin = $root.google.spanner.v1.TransactionOptions.toObject(message.begin, options); - if (options.oneofs) - object.selector = "begin"; + if (options.arrays || options.defaults) + object.planNodes = []; + if (message.planNodes && message.planNodes.length) { + object.planNodes = []; + for (var j = 0; j < message.planNodes.length; ++j) + object.planNodes[j] = $root.google.spanner.v1.PlanNode.toObject(message.planNodes[j], options); } return object; }; /** - * Converts this TransactionSelector to JSON. + * Converts this QueryPlan to JSON. * @function toJSON - * @memberof google.spanner.v1.TransactionSelector + * @memberof google.spanner.v1.QueryPlan * @instance * @returns {Object.} JSON object */ - TransactionSelector.prototype.toJSON = function toJSON() { + QueryPlan.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for TransactionSelector + * Gets the default type url for QueryPlan * @function getTypeUrl - * @memberof google.spanner.v1.TransactionSelector + * @memberof google.spanner.v1.QueryPlan * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - TransactionSelector.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + QueryPlan.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.spanner.v1.TransactionSelector"; + return typeUrlPrefix + "/google.spanner.v1.QueryPlan"; }; - return TransactionSelector; + return QueryPlan; })(); v1.Type = (function() { @@ -85731,6 +87335,7 @@ case 11: case 13: case 14: + case 16: break; } if (message.arrayElementType != null && message.hasOwnProperty("arrayElementType")) { @@ -85838,6 +87443,10 @@ case 14: message.code = 14; break; + case "INTERVAL": + case 16: + message.code = 16; + break; } if (object.arrayElementType != null) { if (typeof object.arrayElementType !== "object") @@ -86415,6 +88024,7 @@ * @property {number} JSON=11 JSON value * @property {number} PROTO=13 PROTO value * @property {number} ENUM=14 ENUM value + * @property {number} INTERVAL=16 INTERVAL value */ v1.TypeCode = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -86433,6 +88043,7 @@ values[valuesById[11] = "JSON"] = 11; values[valuesById[13] = "PROTO"] = 13; values[valuesById[14] = "ENUM"] = 14; + values[valuesById[16] = "INTERVAL"] = 16; return values; })(); diff --git a/protos/protos.json b/protos/protos.json index 68b8708a8..4920ef456 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -3619,6 +3619,17 @@ "FULFILLMENT_PERIOD_EXTENDED": 2 } }, + "ReplicaSelection": { + "fields": { + "location": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, "InstanceAdmin": { "options": { "(google.api.default_host)": "spanner.googleapis.com", @@ -4190,6 +4201,33 @@ } } }, + "ReplicaComputeCapacity": { + "oneofs": { + "computeCapacity": { + "oneof": [ + "nodeCount", + "processingUnits" + ] + } + }, + "fields": { + "replicaSelection": { + "type": "ReplicaSelection", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "nodeCount": { + "type": "int32", + "id": 2 + }, + "processingUnits": { + "type": "int32", + "id": 3 + } + } + }, "AutoscalingConfig": { "fields": { "autoscalingLimits": { @@ -4205,6 +4243,14 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } + }, + "asymmetricAutoscalingOptions": { + "rule": "repeated", + "type": "AsymmetricAutoscalingOption", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -4259,6 +4305,44 @@ } } } + }, + "AsymmetricAutoscalingOption": { + "fields": { + "replicaSelection": { + "type": "ReplicaSelection", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "overrides": { + "type": "AutoscalingConfigOverrides", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "AutoscalingConfigOverrides": { + "fields": { + "autoscalingLimits": { + "type": "AutoscalingLimits", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "autoscalingTargetHighPriorityCpuUtilizationPercent": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } } } }, @@ -4298,6 +4382,14 @@ "type": "int32", "id": 9 }, + "replicaComputeCapacity": { + "rule": "repeated", + "type": "ReplicaComputeCapacity", + "id": 19, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, "autoscalingConfig": { "type": "AutoscalingConfig", "id": 17, @@ -4342,6 +4434,13 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "defaultBackupScheduleType": { + "type": "DefaultBackupScheduleType", + "id": 23, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -4359,6 +4458,13 @@ "ENTERPRISE": 2, "ENTERPRISE_PLUS": 3 } + }, + "DefaultBackupScheduleType": { + "values": { + "DEFAULT_BACKUP_SCHEDULE_TYPE_UNSPECIFIED": 0, + "NONE": 1, + "AUTOMATIC": 2 + } } } }, @@ -7966,7 +8072,9 @@ "values": { "NORMAL": 0, "PLAN": 1, - "PROFILE": 2 + "PROFILE": 2, + "WITH_STATS": 3, + "WITH_PLAN_AND_STATS": 4 } }, "QueryOptions": { @@ -8053,6 +8161,13 @@ "status": { "type": "google.rpc.Status", "id": 2 + }, + "precommitToken": { + "type": "MultiplexedSessionPrecommitToken", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -8284,6 +8399,13 @@ "requestOptions": { "type": "RequestOptions", "id": 3 + }, + "mutationKey": { + "type": "Mutation", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -8332,6 +8454,13 @@ "requestOptions": { "type": "RequestOptions", "id": 6 + }, + "precommitToken": { + "type": "MultiplexedSessionPrecommitToken", + "id": 9, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -8417,6 +8546,13 @@ } }, "CommitResponse": { + "oneofs": { + "MultiplexedSessionRetry": { + "oneof": [ + "precommitToken" + ] + } + }, "fields": { "commitTimestamp": { "type": "google.protobuf.Timestamp", @@ -8425,6 +8561,10 @@ "commitStats": { "type": "CommitStats", "id": 2 + }, + "precommitToken": { + "type": "MultiplexedSessionPrecommitToken", + "id": 4 } }, "nested": { @@ -8438,6 +8578,156 @@ } } }, + "TransactionOptions": { + "oneofs": { + "mode": { + "oneof": [ + "readWrite", + "partitionedDml", + "readOnly" + ] + } + }, + "fields": { + "readWrite": { + "type": "ReadWrite", + "id": 1 + }, + "partitionedDml": { + "type": "PartitionedDml", + "id": 3 + }, + "readOnly": { + "type": "ReadOnly", + "id": 2 + }, + "excludeTxnFromChangeStreams": { + "type": "bool", + "id": 5 + } + }, + "nested": { + "ReadWrite": { + "fields": { + "readLockMode": { + "type": "ReadLockMode", + "id": 1 + }, + "multiplexedSessionPreviousTransactionId": { + "type": "bytes", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "ReadLockMode": { + "values": { + "READ_LOCK_MODE_UNSPECIFIED": 0, + "PESSIMISTIC": 1, + "OPTIMISTIC": 2 + } + } + } + }, + "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 + }, + "precommitToken": { + "type": "MultiplexedSessionPrecommitToken", + "id": 3 + } + } + }, + "TransactionSelector": { + "oneofs": { + "selector": { + "oneof": [ + "singleUse", + "id", + "begin" + ] + } + }, + "fields": { + "singleUse": { + "type": "TransactionOptions", + "id": 1 + }, + "id": { + "type": "bytes", + "id": 2 + }, + "begin": { + "type": "TransactionOptions", + "id": 3 + } + } + }, + "MultiplexedSessionPrecommitToken": { + "fields": { + "precommitToken": { + "type": "bytes", + "id": 1 + }, + "seqNum": { + "type": "int32", + "id": 2 + } + } + }, "KeyRange": { "oneofs": { "startKeyType": { @@ -8580,6 +8870,13 @@ "stats": { "type": "ResultSetStats", "id": 3 + }, + "precommitToken": { + "type": "MultiplexedSessionPrecommitToken", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -8605,6 +8902,13 @@ "stats": { "type": "ResultSetStats", "id": 5 + }, + "precommitToken": { + "type": "MultiplexedSessionPrecommitToken", + "id": 8, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } } }, @@ -8732,133 +9036,6 @@ } } }, - "TransactionOptions": { - "oneofs": { - "mode": { - "oneof": [ - "readWrite", - "partitionedDml", - "readOnly" - ] - } - }, - "fields": { - "readWrite": { - "type": "ReadWrite", - "id": 1 - }, - "partitionedDml": { - "type": "PartitionedDml", - "id": 3 - }, - "readOnly": { - "type": "ReadOnly", - "id": 2 - }, - "excludeTxnFromChangeStreams": { - "type": "bool", - "id": 5 - } - }, - "nested": { - "ReadWrite": { - "fields": { - "readLockMode": { - "type": "ReadLockMode", - "id": 1 - } - }, - "nested": { - "ReadLockMode": { - "values": { - "READ_LOCK_MODE_UNSPECIFIED": 0, - "PESSIMISTIC": 1, - "OPTIMISTIC": 2 - } - } - } - }, - "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": { - "singleUse": { - "type": "TransactionOptions", - "id": 1 - }, - "id": { - "type": "bytes", - "id": 2 - }, - "begin": { - "type": "TransactionOptions", - "id": 3 - } - } - }, "Type": { "fields": { "code": { @@ -8925,7 +9102,8 @@ "NUMERIC": 10, "JSON": 11, "PROTO": 13, - "ENUM": 14 + "ENUM": 14, + "INTERVAL": 16 } }, "TypeAnnotationCode": { diff --git a/src/v1/spanner_client.ts b/src/v1/spanner_client.ts index 88ccdd254..c774dd59c 100644 --- a/src/v1/spanner_client.ts +++ b/src/v1/spanner_client.ts @@ -1264,6 +1264,13 @@ export class SpannerClient { * request_options struct will not do anything. To set the priority for a * transaction, set it on the reads and writes that are part of this * transaction instead. + * @param {google.spanner.v1.Mutation} [request.mutationKey] + * Optional. Required for read-write transactions on a multiplexed session + * that commit mutations but do not perform any reads or queries. Clients + * should randomly select one of the mutations from the mutation set and send + * it as a part of this request. + * This feature is not yet supported and will result in an UNIMPLEMENTED + * error. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -1385,6 +1392,13 @@ export class SpannerClient { * and 500 ms. * @param {google.spanner.v1.RequestOptions} request.requestOptions * Common options for this request. + * @param {google.spanner.v1.MultiplexedSessionPrecommitToken} [request.precommitToken] + * Optional. If the read-write transaction was executed on a multiplexed + * session, the precommit token with the highest sequence number received in + * this transaction attempt, should be included here. Failing to do so will + * result in a FailedPrecondition error. + * This feature is not yet supported and will result in an UNIMPLEMENTED + * error. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. diff --git a/test/spanner.ts b/test/spanner.ts index 0212f6b92..dcc8a3300 100644 --- a/test/spanner.ts +++ b/test/spanner.ts @@ -3433,9 +3433,6 @@ describe('Spanner with mock server', () => { }) as v1.CommitRequest; assert.ok(commitRequest, 'Commit was called'); assert.strictEqual(commitRequest.mutations.length, 2); - assert.deepStrictEqual(commitRequest.singleUseTransaction?.readWrite, { - readLockMode: 'READ_LOCK_MODE_UNSPECIFIED', - }); }); it('should apply blind writes only once with excludeTxnFromChangeStreams option', async () => {