diff --git a/protos/protos.d.ts b/protos/protos.d.ts index 2ada44c72..94b480b85 100644 --- a/protos/protos.d.ts +++ b/protos/protos.d.ts @@ -18879,6 +18879,9 @@ export namespace google { /** ReadAction limit. */ public limit: number; + /** ReadAction _index. */ + public _index?: "index"; + /** * Creates a new ReadAction instance using the specified properties. * @param [properties] Properties to set @@ -19197,6 +19200,9 @@ export namespace google { /** DmlAction autocommitIfSupported. */ public autocommitIfSupported?: (boolean|null); + /** DmlAction _autocommitIfSupported. */ + public _autocommitIfSupported?: "autocommitIfSupported"; + /** * Creates a new DmlAction instance using the specified properties. * @param [properties] Properties to set @@ -19460,6 +19466,9 @@ export namespace google { /** Value valueType. */ public valueType?: ("isNull"|"intValue"|"boolValue"|"doubleValue"|"bytesValue"|"stringValue"|"structValue"|"timestampValue"|"dateDaysValue"|"isCommitTimestamp"|"arrayValue"); + /** Value _arrayType. */ + public _arrayType?: "arrayType"; + /** * Creates a new Value instance using the specified properties. * @param [properties] Properties to set @@ -19569,6 +19578,9 @@ export namespace google { /** KeyRange type. */ public type?: (google.spanner.executor.v1.KeyRange.Type|keyof typeof google.spanner.executor.v1.KeyRange.Type|null); + /** KeyRange _type. */ + public _type?: "type"; + /** * Creates a new KeyRange instance using the specified properties. * @param [properties] Properties to set @@ -20432,6 +20444,9 @@ export namespace google { /** PartitionedUpdateAction update. */ public update?: (google.spanner.executor.v1.IQueryAction|null); + /** PartitionedUpdateAction _options. */ + public _options?: "options"; + /** * Creates a new PartitionedUpdateAction instance using the specified properties. * @param [properties] Properties to set @@ -20537,6 +20552,12 @@ export namespace google { /** ExecutePartitionedUpdateOptions tag. */ public tag?: (string|null); + /** ExecutePartitionedUpdateOptions _rpcPriority. */ + public _rpcPriority?: "rpcPriority"; + + /** ExecutePartitionedUpdateOptions _tag. */ + public _tag?: "tag"; + /** * Creates a new ExecutePartitionedUpdateOptions instance using the specified properties. * @param [properties] Properties to set @@ -20653,6 +20674,12 @@ export namespace google { /** StartTransactionAction executionOptions. */ public executionOptions?: (google.spanner.executor.v1.ITransactionExecutionOptions|null); + /** StartTransactionAction _concurrency. */ + public _concurrency?: "concurrency"; + + /** StartTransactionAction _executionOptions. */ + public _executionOptions?: "executionOptions"; + /** * Creates a new StartTransactionAction instance using the specified properties. * @param [properties] Properties to set @@ -21709,6 +21736,9 @@ export namespace google { /** UpdateUserInstanceConfigAction labels. */ public labels: { [k: string]: string }; + /** UpdateUserInstanceConfigAction _displayName. */ + public _displayName?: "displayName"; + /** * Creates a new UpdateUserInstanceConfigAction instance using the specified properties. * @param [properties] Properties to set @@ -22024,6 +22054,12 @@ export namespace google { /** ListCloudInstanceConfigsAction pageToken. */ public pageToken?: (string|null); + /** ListCloudInstanceConfigsAction _pageSize. */ + public _pageSize?: "pageSize"; + + /** ListCloudInstanceConfigsAction _pageToken. */ + public _pageToken?: "pageToken"; + /** * Creates a new ListCloudInstanceConfigsAction instance using the specified properties. * @param [properties] Properties to set @@ -22157,6 +22193,15 @@ export namespace google { /** CreateCloudInstanceAction labels. */ public labels: { [k: string]: string }; + /** CreateCloudInstanceAction _nodeCount. */ + public _nodeCount?: "nodeCount"; + + /** CreateCloudInstanceAction _processingUnits. */ + public _processingUnits?: "processingUnits"; + + /** CreateCloudInstanceAction _autoscalingConfig. */ + public _autoscalingConfig?: "autoscalingConfig"; + /** * Creates a new CreateCloudInstanceAction instance using the specified properties. * @param [properties] Properties to set @@ -22290,6 +22335,18 @@ export namespace google { /** UpdateCloudInstanceAction labels. */ public labels: { [k: string]: string }; + /** UpdateCloudInstanceAction _displayName. */ + public _displayName?: "displayName"; + + /** UpdateCloudInstanceAction _nodeCount. */ + public _nodeCount?: "nodeCount"; + + /** UpdateCloudInstanceAction _processingUnits. */ + public _processingUnits?: "processingUnits"; + + /** UpdateCloudInstanceAction _autoscalingConfig. */ + public _autoscalingConfig?: "autoscalingConfig"; + /** * Creates a new UpdateCloudInstanceAction instance using the specified properties. * @param [properties] Properties to set @@ -22526,6 +22583,12 @@ export namespace google { /** CreateCloudDatabaseAction protoDescriptors. */ public protoDescriptors?: (Uint8Array|string|null); + /** CreateCloudDatabaseAction _dialect. */ + public _dialect?: "dialect"; + + /** CreateCloudDatabaseAction _protoDescriptors. */ + public _protoDescriptors?: "protoDescriptors"; + /** * Creates a new CreateCloudDatabaseAction instance using the specified properties. * @param [properties] Properties to set @@ -22653,6 +22716,9 @@ export namespace google { /** UpdateCloudDatabaseDdlAction protoDescriptors. */ public protoDescriptors?: (Uint8Array|string|null); + /** UpdateCloudDatabaseDdlAction _protoDescriptors. */ + public _protoDescriptors?: "protoDescriptors"; + /** * Creates a new UpdateCloudDatabaseDdlAction instance using the specified properties. * @param [properties] Properties to set @@ -22980,6 +23046,9 @@ export namespace google { /** ChangeQuorumCloudDatabaseAction servingLocations. */ public servingLocations: string[]; + /** ChangeQuorumCloudDatabaseAction _databaseUri. */ + public _databaseUri?: "databaseUri"; + /** * Creates a new ChangeQuorumCloudDatabaseAction instance using the specified properties. * @param [properties] Properties to set @@ -23210,6 +23279,15 @@ export namespace google { /** ListCloudInstancesAction pageToken. */ public pageToken?: (string|null); + /** ListCloudInstancesAction _filter. */ + public _filter?: "filter"; + + /** ListCloudInstancesAction _pageSize. */ + public _pageSize?: "pageSize"; + + /** ListCloudInstancesAction _pageToken. */ + public _pageToken?: "pageToken"; + /** * Creates a new ListCloudInstancesAction instance using the specified properties. * @param [properties] Properties to set @@ -23803,6 +23881,9 @@ export namespace google { /** CreateCloudBackupAction encryptionConfig. */ public encryptionConfig?: (google.spanner.admin.database.v1.IEncryptionConfig|null); + /** CreateCloudBackupAction _versionTime. */ + public _versionTime?: "versionTime"; + /** * Creates a new CreateCloudBackupAction instance using the specified properties. * @param [properties] Properties to set @@ -25120,6 +25201,12 @@ export namespace google { /** GenerateDbPartitionsForReadAction maxPartitionCount. */ public maxPartitionCount?: (number|Long|string|null); + /** GenerateDbPartitionsForReadAction _desiredBytesPerPartition. */ + public _desiredBytesPerPartition?: "desiredBytesPerPartition"; + + /** GenerateDbPartitionsForReadAction _maxPartitionCount. */ + public _maxPartitionCount?: "maxPartitionCount"; + /** * Creates a new GenerateDbPartitionsForReadAction instance using the specified properties. * @param [properties] Properties to set @@ -25223,6 +25310,9 @@ export namespace google { /** GenerateDbPartitionsForQueryAction desiredBytesPerPartition. */ public desiredBytesPerPartition?: (number|Long|string|null); + /** GenerateDbPartitionsForQueryAction _desiredBytesPerPartition. */ + public _desiredBytesPerPartition?: "desiredBytesPerPartition"; + /** * Creates a new GenerateDbPartitionsForQueryAction instance using the specified properties. * @param [properties] Properties to set @@ -25338,6 +25428,12 @@ export namespace google { /** BatchPartition index. */ public index?: (string|null); + /** BatchPartition _table. */ + public _table?: "table"; + + /** BatchPartition _index. */ + public _index?: "index"; + /** * Creates a new BatchPartition instance using the specified properties. * @param [properties] Properties to set @@ -25574,6 +25670,21 @@ export namespace google { /** ExecuteChangeStreamQuery cloudDatabaseRole. */ public cloudDatabaseRole?: (string|null); + /** ExecuteChangeStreamQuery _endTime. */ + public _endTime?: "endTime"; + + /** ExecuteChangeStreamQuery _partitionToken. */ + public _partitionToken?: "partitionToken"; + + /** ExecuteChangeStreamQuery _heartbeatMilliseconds. */ + public _heartbeatMilliseconds?: "heartbeatMilliseconds"; + + /** ExecuteChangeStreamQuery _deadlineSeconds. */ + public _deadlineSeconds?: "deadlineSeconds"; + + /** ExecuteChangeStreamQuery _cloudDatabaseRole. */ + public _cloudDatabaseRole?: "cloudDatabaseRole"; + /** * Creates a new ExecuteChangeStreamQuery instance using the specified properties. * @param [properties] Properties to set @@ -25725,6 +25836,27 @@ export namespace google { /** SpannerActionOutcome changeStreamRecords. */ public changeStreamRecords: google.spanner.executor.v1.IChangeStreamRecord[]; + /** SpannerActionOutcome _status. */ + public _status?: "status"; + + /** SpannerActionOutcome _commitTime. */ + public _commitTime?: "commitTime"; + + /** SpannerActionOutcome _readResult. */ + public _readResult?: "readResult"; + + /** SpannerActionOutcome _queryResult. */ + public _queryResult?: "queryResult"; + + /** SpannerActionOutcome _transactionRestarted. */ + public _transactionRestarted?: "transactionRestarted"; + + /** SpannerActionOutcome _batchTxnId. */ + public _batchTxnId?: "batchTxnId"; + + /** SpannerActionOutcome _adminResult. */ + public _adminResult?: "adminResult"; + /** * Creates a new SpannerActionOutcome instance using the specified properties. * @param [properties] Properties to set @@ -26524,6 +26656,15 @@ export namespace google { /** ReadResult rowType. */ public rowType?: (google.spanner.v1.IStructType|null); + /** ReadResult _index. */ + public _index?: "index"; + + /** ReadResult _requestIndex. */ + public _requestIndex?: "requestIndex"; + + /** ReadResult _rowType. */ + public _rowType?: "rowType"; + /** * Creates a new ReadResult instance using the specified properties. * @param [properties] Properties to set @@ -26627,6 +26768,9 @@ export namespace google { /** QueryResult rowType. */ public rowType?: (google.spanner.v1.IStructType|null); + /** QueryResult _rowType. */ + public _rowType?: "rowType"; + /** * Creates a new QueryResult instance using the specified properties. * @param [properties] Properties to set diff --git a/protos/protos.js b/protos/protos.js index 6a0b1f694..8618d8719 100644 --- a/protos/protos.js +++ b/protos/protos.js @@ -47740,7 +47740,12 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field + /** + * ReadAction _index. + * @member {"index"|undefined} _index + * @memberof google.spanner.executor.v1.ReadAction + * @instance + */ Object.defineProperty(ReadAction.prototype, "_index", { get: $util.oneOfGetter($oneOfFields = ["index"]), set: $util.oneOfSetter($oneOfFields) @@ -48552,7 +48557,12 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field + /** + * DmlAction _autocommitIfSupported. + * @member {"autocommitIfSupported"|undefined} _autocommitIfSupported + * @memberof google.spanner.executor.v1.DmlAction + * @instance + */ Object.defineProperty(DmlAction.prototype, "_autocommitIfSupported", { get: $util.oneOfGetter($oneOfFields = ["autocommitIfSupported"]), set: $util.oneOfSetter($oneOfFields) @@ -49122,7 +49132,12 @@ set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * Value _arrayType. + * @member {"arrayType"|undefined} _arrayType + * @memberof google.spanner.executor.v1.Value + * @instance + */ Object.defineProperty(Value.prototype, "_arrayType", { get: $util.oneOfGetter($oneOfFields = ["arrayType"]), set: $util.oneOfSetter($oneOfFields) @@ -49611,7 +49626,12 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field + /** + * KeyRange _type. + * @member {"type"|undefined} _type + * @memberof google.spanner.executor.v1.KeyRange + * @instance + */ Object.defineProperty(KeyRange.prototype, "_type", { get: $util.oneOfGetter($oneOfFields = ["type"]), set: $util.oneOfSetter($oneOfFields) @@ -51839,7 +51859,12 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field + /** + * PartitionedUpdateAction _options. + * @member {"options"|undefined} _options + * @memberof google.spanner.executor.v1.PartitionedUpdateAction + * @instance + */ Object.defineProperty(PartitionedUpdateAction.prototype, "_options", { get: $util.oneOfGetter($oneOfFields = ["options"]), set: $util.oneOfSetter($oneOfFields) @@ -52087,13 +52112,23 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field + /** + * ExecutePartitionedUpdateOptions _rpcPriority. + * @member {"rpcPriority"|undefined} _rpcPriority + * @memberof google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + * @instance + */ Object.defineProperty(ExecutePartitionedUpdateOptions.prototype, "_rpcPriority", { get: $util.oneOfGetter($oneOfFields = ["rpcPriority"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * ExecutePartitionedUpdateOptions _tag. + * @member {"tag"|undefined} _tag + * @memberof google.spanner.executor.v1.PartitionedUpdateAction.ExecutePartitionedUpdateOptions + * @instance + */ Object.defineProperty(ExecutePartitionedUpdateOptions.prototype, "_tag", { get: $util.oneOfGetter($oneOfFields = ["tag"]), set: $util.oneOfSetter($oneOfFields) @@ -52387,13 +52422,23 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field + /** + * StartTransactionAction _concurrency. + * @member {"concurrency"|undefined} _concurrency + * @memberof google.spanner.executor.v1.StartTransactionAction + * @instance + */ Object.defineProperty(StartTransactionAction.prototype, "_concurrency", { get: $util.oneOfGetter($oneOfFields = ["concurrency"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * StartTransactionAction _executionOptions. + * @member {"executionOptions"|undefined} _executionOptions + * @memberof google.spanner.executor.v1.StartTransactionAction + * @instance + */ Object.defineProperty(StartTransactionAction.prototype, "_executionOptions", { get: $util.oneOfGetter($oneOfFields = ["executionOptions"]), set: $util.oneOfSetter($oneOfFields) @@ -55626,7 +55671,12 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field + /** + * UpdateUserInstanceConfigAction _displayName. + * @member {"displayName"|undefined} _displayName + * @memberof google.spanner.executor.v1.UpdateUserInstanceConfigAction + * @instance + */ Object.defineProperty(UpdateUserInstanceConfigAction.prototype, "_displayName", { get: $util.oneOfGetter($oneOfFields = ["displayName"]), set: $util.oneOfSetter($oneOfFields) @@ -56393,13 +56443,23 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field + /** + * ListCloudInstanceConfigsAction _pageSize. + * @member {"pageSize"|undefined} _pageSize + * @memberof google.spanner.executor.v1.ListCloudInstanceConfigsAction + * @instance + */ Object.defineProperty(ListCloudInstanceConfigsAction.prototype, "_pageSize", { get: $util.oneOfGetter($oneOfFields = ["pageSize"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * ListCloudInstanceConfigsAction _pageToken. + * @member {"pageToken"|undefined} _pageToken + * @memberof google.spanner.executor.v1.ListCloudInstanceConfigsAction + * @instance + */ Object.defineProperty(ListCloudInstanceConfigsAction.prototype, "_pageToken", { get: $util.oneOfGetter($oneOfFields = ["pageToken"]), set: $util.oneOfSetter($oneOfFields) @@ -56703,19 +56763,34 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field + /** + * CreateCloudInstanceAction _nodeCount. + * @member {"nodeCount"|undefined} _nodeCount + * @memberof google.spanner.executor.v1.CreateCloudInstanceAction + * @instance + */ Object.defineProperty(CreateCloudInstanceAction.prototype, "_nodeCount", { get: $util.oneOfGetter($oneOfFields = ["nodeCount"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * CreateCloudInstanceAction _processingUnits. + * @member {"processingUnits"|undefined} _processingUnits + * @memberof google.spanner.executor.v1.CreateCloudInstanceAction + * @instance + */ Object.defineProperty(CreateCloudInstanceAction.prototype, "_processingUnits", { get: $util.oneOfGetter($oneOfFields = ["processingUnits"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * CreateCloudInstanceAction _autoscalingConfig. + * @member {"autoscalingConfig"|undefined} _autoscalingConfig + * @memberof google.spanner.executor.v1.CreateCloudInstanceAction + * @instance + */ Object.defineProperty(CreateCloudInstanceAction.prototype, "_autoscalingConfig", { get: $util.oneOfGetter($oneOfFields = ["autoscalingConfig"]), set: $util.oneOfSetter($oneOfFields) @@ -57121,25 +57196,45 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field + /** + * UpdateCloudInstanceAction _displayName. + * @member {"displayName"|undefined} _displayName + * @memberof google.spanner.executor.v1.UpdateCloudInstanceAction + * @instance + */ Object.defineProperty(UpdateCloudInstanceAction.prototype, "_displayName", { get: $util.oneOfGetter($oneOfFields = ["displayName"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * UpdateCloudInstanceAction _nodeCount. + * @member {"nodeCount"|undefined} _nodeCount + * @memberof google.spanner.executor.v1.UpdateCloudInstanceAction + * @instance + */ Object.defineProperty(UpdateCloudInstanceAction.prototype, "_nodeCount", { get: $util.oneOfGetter($oneOfFields = ["nodeCount"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * UpdateCloudInstanceAction _processingUnits. + * @member {"processingUnits"|undefined} _processingUnits + * @memberof google.spanner.executor.v1.UpdateCloudInstanceAction + * @instance + */ Object.defineProperty(UpdateCloudInstanceAction.prototype, "_processingUnits", { get: $util.oneOfGetter($oneOfFields = ["processingUnits"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * UpdateCloudInstanceAction _autoscalingConfig. + * @member {"autoscalingConfig"|undefined} _autoscalingConfig + * @memberof google.spanner.executor.v1.UpdateCloudInstanceAction + * @instance + */ Object.defineProperty(UpdateCloudInstanceAction.prototype, "_autoscalingConfig", { get: $util.oneOfGetter($oneOfFields = ["autoscalingConfig"]), set: $util.oneOfSetter($oneOfFields) @@ -57776,13 +57871,23 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field + /** + * CreateCloudDatabaseAction _dialect. + * @member {"dialect"|undefined} _dialect + * @memberof google.spanner.executor.v1.CreateCloudDatabaseAction + * @instance + */ Object.defineProperty(CreateCloudDatabaseAction.prototype, "_dialect", { get: $util.oneOfGetter($oneOfFields = ["dialect"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * CreateCloudDatabaseAction _protoDescriptors. + * @member {"protoDescriptors"|undefined} _protoDescriptors + * @memberof google.spanner.executor.v1.CreateCloudDatabaseAction + * @instance + */ Object.defineProperty(CreateCloudDatabaseAction.prototype, "_protoDescriptors", { get: $util.oneOfGetter($oneOfFields = ["protoDescriptors"]), set: $util.oneOfSetter($oneOfFields) @@ -58158,7 +58263,12 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field + /** + * UpdateCloudDatabaseDdlAction _protoDescriptors. + * @member {"protoDescriptors"|undefined} _protoDescriptors + * @memberof google.spanner.executor.v1.UpdateCloudDatabaseDdlAction + * @instance + */ Object.defineProperty(UpdateCloudDatabaseDdlAction.prototype, "_protoDescriptors", { get: $util.oneOfGetter($oneOfFields = ["protoDescriptors"]), set: $util.oneOfSetter($oneOfFields) @@ -58998,7 +59108,12 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field + /** + * ChangeQuorumCloudDatabaseAction _databaseUri. + * @member {"databaseUri"|undefined} _databaseUri + * @memberof google.spanner.executor.v1.ChangeQuorumCloudDatabaseAction + * @instance + */ Object.defineProperty(ChangeQuorumCloudDatabaseAction.prototype, "_databaseUri", { get: $util.oneOfGetter($oneOfFields = ["databaseUri"]), set: $util.oneOfSetter($oneOfFields) @@ -59544,19 +59659,34 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field + /** + * ListCloudInstancesAction _filter. + * @member {"filter"|undefined} _filter + * @memberof google.spanner.executor.v1.ListCloudInstancesAction + * @instance + */ Object.defineProperty(ListCloudInstancesAction.prototype, "_filter", { get: $util.oneOfGetter($oneOfFields = ["filter"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * ListCloudInstancesAction _pageSize. + * @member {"pageSize"|undefined} _pageSize + * @memberof google.spanner.executor.v1.ListCloudInstancesAction + * @instance + */ Object.defineProperty(ListCloudInstancesAction.prototype, "_pageSize", { get: $util.oneOfGetter($oneOfFields = ["pageSize"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * ListCloudInstancesAction _pageToken. + * @member {"pageToken"|undefined} _pageToken + * @memberof google.spanner.executor.v1.ListCloudInstancesAction + * @instance + */ Object.defineProperty(ListCloudInstancesAction.prototype, "_pageToken", { get: $util.oneOfGetter($oneOfFields = ["pageToken"]), set: $util.oneOfSetter($oneOfFields) @@ -60974,7 +61104,12 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field + /** + * CreateCloudBackupAction _versionTime. + * @member {"versionTime"|undefined} _versionTime + * @memberof google.spanner.executor.v1.CreateCloudBackupAction + * @instance + */ Object.defineProperty(CreateCloudBackupAction.prototype, "_versionTime", { get: $util.oneOfGetter($oneOfFields = ["versionTime"]), set: $util.oneOfSetter($oneOfFields) @@ -64110,13 +64245,23 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field + /** + * GenerateDbPartitionsForReadAction _desiredBytesPerPartition. + * @member {"desiredBytesPerPartition"|undefined} _desiredBytesPerPartition + * @memberof google.spanner.executor.v1.GenerateDbPartitionsForReadAction + * @instance + */ Object.defineProperty(GenerateDbPartitionsForReadAction.prototype, "_desiredBytesPerPartition", { get: $util.oneOfGetter($oneOfFields = ["desiredBytesPerPartition"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * GenerateDbPartitionsForReadAction _maxPartitionCount. + * @member {"maxPartitionCount"|undefined} _maxPartitionCount + * @memberof google.spanner.executor.v1.GenerateDbPartitionsForReadAction + * @instance + */ Object.defineProperty(GenerateDbPartitionsForReadAction.prototype, "_maxPartitionCount", { get: $util.oneOfGetter($oneOfFields = ["maxPartitionCount"]), set: $util.oneOfSetter($oneOfFields) @@ -64434,7 +64579,12 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field + /** + * GenerateDbPartitionsForQueryAction _desiredBytesPerPartition. + * @member {"desiredBytesPerPartition"|undefined} _desiredBytesPerPartition + * @memberof google.spanner.executor.v1.GenerateDbPartitionsForQueryAction + * @instance + */ Object.defineProperty(GenerateDbPartitionsForQueryAction.prototype, "_desiredBytesPerPartition", { get: $util.oneOfGetter($oneOfFields = ["desiredBytesPerPartition"]), set: $util.oneOfSetter($oneOfFields) @@ -64707,13 +64857,23 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field + /** + * BatchPartition _table. + * @member {"table"|undefined} _table + * @memberof google.spanner.executor.v1.BatchPartition + * @instance + */ Object.defineProperty(BatchPartition.prototype, "_table", { get: $util.oneOfGetter($oneOfFields = ["table"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * BatchPartition _index. + * @member {"index"|undefined} _index + * @memberof google.spanner.executor.v1.BatchPartition + * @instance + */ Object.defineProperty(BatchPartition.prototype, "_index", { get: $util.oneOfGetter($oneOfFields = ["index"]), set: $util.oneOfSetter($oneOfFields) @@ -65267,31 +65427,56 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field + /** + * ExecuteChangeStreamQuery _endTime. + * @member {"endTime"|undefined} _endTime + * @memberof google.spanner.executor.v1.ExecuteChangeStreamQuery + * @instance + */ Object.defineProperty(ExecuteChangeStreamQuery.prototype, "_endTime", { get: $util.oneOfGetter($oneOfFields = ["endTime"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * ExecuteChangeStreamQuery _partitionToken. + * @member {"partitionToken"|undefined} _partitionToken + * @memberof google.spanner.executor.v1.ExecuteChangeStreamQuery + * @instance + */ Object.defineProperty(ExecuteChangeStreamQuery.prototype, "_partitionToken", { get: $util.oneOfGetter($oneOfFields = ["partitionToken"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * ExecuteChangeStreamQuery _heartbeatMilliseconds. + * @member {"heartbeatMilliseconds"|undefined} _heartbeatMilliseconds + * @memberof google.spanner.executor.v1.ExecuteChangeStreamQuery + * @instance + */ Object.defineProperty(ExecuteChangeStreamQuery.prototype, "_heartbeatMilliseconds", { get: $util.oneOfGetter($oneOfFields = ["heartbeatMilliseconds"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * ExecuteChangeStreamQuery _deadlineSeconds. + * @member {"deadlineSeconds"|undefined} _deadlineSeconds + * @memberof google.spanner.executor.v1.ExecuteChangeStreamQuery + * @instance + */ Object.defineProperty(ExecuteChangeStreamQuery.prototype, "_deadlineSeconds", { get: $util.oneOfGetter($oneOfFields = ["deadlineSeconds"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * ExecuteChangeStreamQuery _cloudDatabaseRole. + * @member {"cloudDatabaseRole"|undefined} _cloudDatabaseRole + * @memberof google.spanner.executor.v1.ExecuteChangeStreamQuery + * @instance + */ Object.defineProperty(ExecuteChangeStreamQuery.prototype, "_cloudDatabaseRole", { get: $util.oneOfGetter($oneOfFields = ["cloudDatabaseRole"]), set: $util.oneOfSetter($oneOfFields) @@ -65744,43 +65929,78 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field + /** + * SpannerActionOutcome _status. + * @member {"status"|undefined} _status + * @memberof google.spanner.executor.v1.SpannerActionOutcome + * @instance + */ Object.defineProperty(SpannerActionOutcome.prototype, "_status", { get: $util.oneOfGetter($oneOfFields = ["status"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * SpannerActionOutcome _commitTime. + * @member {"commitTime"|undefined} _commitTime + * @memberof google.spanner.executor.v1.SpannerActionOutcome + * @instance + */ Object.defineProperty(SpannerActionOutcome.prototype, "_commitTime", { get: $util.oneOfGetter($oneOfFields = ["commitTime"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * SpannerActionOutcome _readResult. + * @member {"readResult"|undefined} _readResult + * @memberof google.spanner.executor.v1.SpannerActionOutcome + * @instance + */ Object.defineProperty(SpannerActionOutcome.prototype, "_readResult", { get: $util.oneOfGetter($oneOfFields = ["readResult"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * SpannerActionOutcome _queryResult. + * @member {"queryResult"|undefined} _queryResult + * @memberof google.spanner.executor.v1.SpannerActionOutcome + * @instance + */ Object.defineProperty(SpannerActionOutcome.prototype, "_queryResult", { get: $util.oneOfGetter($oneOfFields = ["queryResult"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * SpannerActionOutcome _transactionRestarted. + * @member {"transactionRestarted"|undefined} _transactionRestarted + * @memberof google.spanner.executor.v1.SpannerActionOutcome + * @instance + */ Object.defineProperty(SpannerActionOutcome.prototype, "_transactionRestarted", { get: $util.oneOfGetter($oneOfFields = ["transactionRestarted"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * SpannerActionOutcome _batchTxnId. + * @member {"batchTxnId"|undefined} _batchTxnId + * @memberof google.spanner.executor.v1.SpannerActionOutcome + * @instance + */ Object.defineProperty(SpannerActionOutcome.prototype, "_batchTxnId", { get: $util.oneOfGetter($oneOfFields = ["batchTxnId"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * SpannerActionOutcome _adminResult. + * @member {"adminResult"|undefined} _adminResult + * @memberof google.spanner.executor.v1.SpannerActionOutcome + * @instance + */ Object.defineProperty(SpannerActionOutcome.prototype, "_adminResult", { get: $util.oneOfGetter($oneOfFields = ["adminResult"]), set: $util.oneOfSetter($oneOfFields) @@ -68087,19 +68307,34 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field + /** + * ReadResult _index. + * @member {"index"|undefined} _index + * @memberof google.spanner.executor.v1.ReadResult + * @instance + */ Object.defineProperty(ReadResult.prototype, "_index", { get: $util.oneOfGetter($oneOfFields = ["index"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * ReadResult _requestIndex. + * @member {"requestIndex"|undefined} _requestIndex + * @memberof google.spanner.executor.v1.ReadResult + * @instance + */ Object.defineProperty(ReadResult.prototype, "_requestIndex", { get: $util.oneOfGetter($oneOfFields = ["requestIndex"]), set: $util.oneOfSetter($oneOfFields) }); - // Virtual OneOf for proto3 optional field + /** + * ReadResult _rowType. + * @member {"rowType"|undefined} _rowType + * @memberof google.spanner.executor.v1.ReadResult + * @instance + */ Object.defineProperty(ReadResult.prototype, "_rowType", { get: $util.oneOfGetter($oneOfFields = ["rowType"]), set: $util.oneOfSetter($oneOfFields) @@ -68417,7 +68652,12 @@ // OneOf field names bound to virtual getters and setters var $oneOfFields; - // Virtual OneOf for proto3 optional field + /** + * QueryResult _rowType. + * @member {"rowType"|undefined} _rowType + * @memberof google.spanner.executor.v1.QueryResult + * @instance + */ Object.defineProperty(QueryResult.prototype, "_rowType", { get: $util.oneOfGetter($oneOfFields = ["rowType"]), set: $util.oneOfSetter($oneOfFields) diff --git a/protos/protos.json b/protos/protos.json index aa5a29c92..315af76cd 100644 --- a/protos/protos.json +++ b/protos/protos.json @@ -1,7 +1,4 @@ { - "options": { - "syntax": "proto3" - }, "nested": { "google": { "nested": { diff --git a/src/batch-transaction.ts b/src/batch-transaction.ts index 8298ca029..0e6b7e3e2 100644 --- a/src/batch-transaction.ts +++ b/src/batch-transaction.ts @@ -147,7 +147,6 @@ class BatchTransaction extends Snapshot { 'BatchTransaction.createQueryPartitions', traceConfig, span => { - const database = this.session.parent as Database; const headers: {[k: string]: string} = {}; if (this._getSpanner().routeToLeaderEnabled) { addLeaderAwareRoutingHeader(headers); @@ -289,7 +288,6 @@ class BatchTransaction extends Snapshot { if (this._getSpanner().routeToLeaderEnabled) { addLeaderAwareRoutingHeader(headers); } - const database = this.session.parent as Database; this.createPartitions_( { client: 'SpannerClient', diff --git a/src/database.ts b/src/database.ts index b55e30eeb..4c9ae51ab 100644 --- a/src/database.ts +++ b/src/database.ts @@ -85,7 +85,6 @@ import { LongRunningCallback, NormalCallback, PagedOptionsWithFilter, - CLOUD_RESOURCE_HEADER, PagedResponse, RequestCallback, ResourceCallback, @@ -764,7 +763,7 @@ class Database extends common.GrpcServiceObject { ...priorMetadata, }; withReqId[X_GOOG_SPANNER_REQUEST_ID_HEADER] = craftRequestId( - this._clientId, + this._clientId || 1, 1, // TODO: Properly infer the channelId nthRequest, attempt @@ -1040,7 +1039,7 @@ class Database extends common.GrpcServiceObject { const headers = this._metadataWithRequestId( this._nextNthRequest(), 1, - this.commonHeaders_, + this.commonHeaders_ ); if (this._getSpanner().routeToLeaderEnabled) { addLeaderAwareRoutingHeader(headers); diff --git a/src/session.ts b/src/session.ts index a72a34e67..d1dc6dfa4 100644 --- a/src/session.ts +++ b/src/session.ts @@ -325,8 +325,8 @@ export class Session extends common.GrpcServiceObject { reqOpts, gaxOpts, headers: injectRequestIDIntoHeaders( - this.commonHeaders_, - this.session, + this.resourceHeader_, + this, nextNthRequest(database), 1 ), @@ -461,25 +461,17 @@ export class Session extends common.GrpcServiceObject { method: 'executeSql', reqOpts, gaxOpts, - headers: database._metadataWithRequestId( - database._nextNthRequest(), - 1, - this.commonHeaders_ + headers: injectRequestIDIntoHeaders( + this.commonHeaders_, + this, + nextNthRequest(database), + 1 ), }, callback! ); } - public _metadataWithRequestId( - nthRequest: number, - attempt: number, - priorMetadata?: {[k: string]: string} - ): {[k: string]: string} { - const database = this.parent as Database; - return database._metadataWithRequestId(nthRequest, attempt, priorMetadata); - } - /** * Create a PartitionedDml transaction. * diff --git a/src/transaction.ts b/src/transaction.ts index 26c746d8b..04ca5a531 100644 --- a/src/transaction.ts +++ b/src/transaction.ts @@ -447,7 +447,6 @@ export class Snapshot extends EventEmitter { opts: this._observabilityOptions, dbName: this._dbName!, }; - const database = this.session.parent as Database; return startTrace('Snapshot.begin', traceConfig, span => { span.addEvent('Begin Transaction'); diff --git a/test/database.ts b/test/database.ts index a3ea02b85..ec424f7a2 100644 --- a/test/database.ts +++ b/test/database.ts @@ -2111,7 +2111,7 @@ describe('Database', () => { config.headers, Object.assign( { - [LEADER_AWARE_ROUTING_HEADER]: true, + [LEADER_AWARE_ROUTING_HEADER]: 'true', [X_GOOG_SPANNER_REQUEST_ID_HEADER]: craftRequestId(1, 1, 1, 1), }, database.commonHeaders_ diff --git a/test/gapic_spanner_v1.ts b/test/gapic_spanner_v1.ts index d2220d051..460800b18 100644 --- a/test/gapic_spanner_v1.ts +++ b/test/gapic_spanner_v1.ts @@ -486,9 +486,9 @@ describe('v1.SpannerClient', () => { ).getCall(0).args[1].otherArgs.headers; const actualHeaderRequestParams = actualHeaders['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); - const actualRequestID = actualHeaders['x-goog-spanner-request-id']; - console.log('headers', actualHeaders); - assert.deepStrictEqual(actualRequestID, 'foo'); + // const actualRequestID = actualHeaders['x-goog-spanner-request-id']; + // console.log('headers', actualHeaders); + // assert.deepStrictEqual(actualRequestID, 'foo'); }); it('invokes batchCreateSessions without error using callback', async () => { diff --git a/test/request_id_header.ts b/test/request_id_header.ts index 31d28621e..d1c23de09 100644 --- a/test/request_id_header.ts +++ b/test/request_id_header.ts @@ -15,6 +15,7 @@ */ /* eslint-disable prefer-rest-params */ +import * as assert from 'assert'; import {AtomicCounter} from '../src/request_id_header'; describe('AtomicCounter', () => { @@ -35,13 +36,13 @@ describe('AtomicCounter', () => { const ac1 = new AtomicCounter(1); assert.strictEqual(ac1.value(), 1); assert.strictEqual( - ac0.increment(1 << 32), - (1 << 32) + 1, + ac1.increment(1 << 27), + (1 << 27) + 1, 'increment should return the added value' ); assert.strictEqual( - ac0.value(), - (1 << 32) + 1, + ac1.value(), + (1 << 27) + 1, 'increment should have modified the value' ); done(); diff --git a/test/session.ts b/test/session.ts index c5598de22..5d67d2e95 100644 --- a/test/session.ts +++ b/test/session.ts @@ -26,6 +26,10 @@ import { LEADER_AWARE_ROUTING_HEADER, } from '../src/common'; import {Database, Instance, Spanner} from '../src'; +import { + X_GOOG_SPANNER_REQUEST_ID_HEADER, + craftRequestId, +} from '../src/request_id_header'; let promisified = false; const fakePfy = extend({}, pfy, { @@ -262,7 +266,10 @@ describe('Session', () => { name: session.formattedName_, }); assert.deepStrictEqual(config.gaxOpts, {}); - assert.deepStrictEqual(config.headers, session.commonHeaders_); + assert.deepStrictEqual(config.headers, { + ...session.commonHeaders_, + [X_GOOG_SPANNER_REQUEST_ID_HEADER]: craftRequestId(1, 1, 1, 1), + }); assert.strictEqual(callback_, callback); return requestReturnValue; @@ -403,7 +410,10 @@ describe('Session', () => { sql: 'SELECT 1', }); assert.deepStrictEqual(config.gaxOpts, {}); - assert.deepStrictEqual(config.headers, session.commonHeaders_); + assert.deepStrictEqual(config.headers, { + ...session.commonHeaders_, + [X_GOOG_SPANNER_REQUEST_ID_HEADER]: craftRequestId(1, 1, 1, 1), + }); assert.strictEqual(callback_, callback); return requestReturnValue; }; diff --git a/test/transaction.ts b/test/transaction.ts index 558e55010..de6f2e5c5 100644 --- a/test/transaction.ts +++ b/test/transaction.ts @@ -1428,7 +1428,7 @@ describe('Transaction', () => { Object.assign( { [X_GOOG_SPANNER_REQUEST_ID_HEADER]: craftRequestId(1, 1, 1, 1), - [LEADER_AWARE_ROUTING_HEADER]: true, + [LEADER_AWARE_ROUTING_HEADER]: 'true', }, transaction.commonHeaders_ )